From 27dcec3fa758bf685c6bd2e09dce88b984b21127 Mon Sep 17 00:00:00 2001 From: Marc Haber Date: Fri, 20 Jan 2006 18:48:40 +0000 Subject: [PATCH] remove source-dist branch --- ABOUT-NLS | 435 + ACKNOWLEDGEMENTS | 29 + AUTHORS | 13 + BUGS | 20 + CHANGES | 15 + CODING | 116 + COPYING | 340 + ChangeLog | 6165 ++++ FAQ | 87 + INSTALL | 229 + LEGAL | 10 + Makefile.am | 51 + Makefile.in | 731 + NEWS | 2 + NPTest.pm | 554 + README | 101 + REQUIREMENTS | 78 + SUPPORT | 75 + THANKS | 172 + acinclude.m4 | 78 + aclocal.m4 | 933 + command.cfg.in | 275 + config.guess | 1466 + config.h.in | 856 + config.rpath | 513 + config.sub | 1579 + config_test/Makefile | 10 + config_test/child_test.c | 77 + config_test/run_tests | 16 + configure | 26673 ++++++++++++++++ configure.in | 1567 + contrib/README.TXT | 56 + contrib/aix/check_failed | 48 + contrib/aix/check_io | 69 + contrib/aix/check_kerberos | 49 + contrib/aix/check_queue | 67 + contrib/aix/pg_stat | 45 + contrib/check_adptraid.sh | 75 + contrib/check_apache.pl | 283 + contrib/check_apc_ups.pl | 307 + contrib/check_appletalk.pl | 210 + contrib/check_arping.pl | 120 + contrib/check_asterisk.pl | 259 + contrib/check_axis.sh | 95 + contrib/check_backup.pl | 114 + contrib/check_bgpstate.pl | 215 + contrib/check_breeze.pl | 22 + contrib/check_cluster.c | 332 + contrib/check_cluster2.c | 232 + contrib/check_compaq_insight.pl | 296 + contrib/check_cpqarray.c | 430 + contrib/check_digitemp.pl | 252 + contrib/check_disk_snmp.pl | 74 + contrib/check_dlswcircuit.pl | 221 + contrib/check_dns_random.pl | 74 + contrib/check_email_loop.pl | 295 + contrib/check_fan_cpq_present | 133 + contrib/check_fan_fsc_present | 135 + contrib/check_flexlm.pl | 82 + contrib/check_frontpage | 151 + contrib/check_hltherm.c | 209 + contrib/check_hprsc.pl | 221 + contrib/check_http-with-client-certificate.c | 1567 + contrib/check_hw.sh | 66 + contrib/check_ica_master_browser.pl | 229 + contrib/check_ica_metaframe_pub_apps.pl | 382 + contrib/check_ica_program_neigbourhood.pl | 619 + contrib/check_inodes-freebsd.pl | 127 + contrib/check_inodes.pl | 69 + contrib/check_ipxping.c | 201 + contrib/check_javaproc.pl | 278 + contrib/check_joy.sh | 69 + contrib/check_linux_raid.pl | 88 + contrib/check_lmmon.pl | 19 + contrib/check_log2.pl | 185 + contrib/check_lotus.pl | 261 + contrib/check_maxchannels.pl | 231 + contrib/check_maxwanstate.pl | 201 + contrib/check_mem.pl | 146 + contrib/check_ms_spooler.pl | 325 + contrib/check_mssql.sh | 104 + contrib/check_nagios.pl | 48 + contrib/check_nagios_db.pl | 89 + contrib/check_nagios_db_pg.pl | 91 + contrib/check_netapp.pl | 178 + contrib/check_nmap.py | 442 + contrib/check_ora_table_space.pl | 82 + contrib/check_oracle_instance.pl | 470 + contrib/check_oracle_tbs | 218 + contrib/check_pcpmetric.py | 106 + contrib/check_pfstate | 75 + contrib/check_qmailq.pl | 121 + contrib/check_rbl.c | 328 + contrib/check_remote_nagios_status.pl | 666 + contrib/check_rrd_data.pl | 129 + contrib/check_sap.sh | 89 + contrib/check_smart.pl | 180 + contrib/check_smb.sh | 111 + contrib/check_snmp_disk_monitor.pl | 185 + contrib/check_snmp_printer.pl | 605 + contrib/check_snmp_process_monitor.pl | 331 + contrib/check_snmp_procs.pl | 590 + contrib/check_sockets.pl | 145 + contrib/check_sybase | 370 + contrib/check_temp_cpq | 162 + contrib/check_temp_fsc | 160 + contrib/check_timeout.c | 55 + contrib/check_traceroute-pure_perl.pl | 119 + contrib/check_traceroute.pl | 210 + contrib/check_uptime.c | 99 + contrib/check_vcs.pl | 165 + contrib/check_wave.pl | 77 + contrib/check_wins.pl | 248 + contrib/checkciscotemp.pl | 166 + contrib/mrtgext.pl | 291 + contrib/nagios_sendim.pl | 66 + contrib/packet_utils.pm | 120 + contrib/rblcheck-dns | 69 + contrib/rblcheck-web | 37 + contrib/restrict.pl | 26 + contrib/sched_downtime.pl | 47 + contrib/tarballs/bowen-langley_plugins.tar.gz | Bin 0 -> 28742 bytes contrib/tarballs/check_bgp-1.0.tar.gz | Bin 0 -> 1469 bytes contrib/tarballs/check_radius.tar.gz | Bin 0 -> 25190 bytes contrib/tarballs/check_traffic-0.90b.tar.gz | Bin 0 -> 13229 bytes contrib/tarballs/check_traffic-0.91b.tar.gz | Bin 0 -> 12198 bytes contrib/tarballs/fetchlog-0.94.tar.gz | Bin 0 -> 23179 bytes contrib/urlize.pl | 29 + contrib/utils.py | 310 + debian/README.Debian | 39 + debian/TODO | 28 + debian/changelog | 353 + debian/compat | 1 + debian/control | 75 + debian/copyright | 38 + debian/dirs | 1 + debian/docs | 6 + debian/nagios-plugins-basic.dirs | 2 + debian/nagios-plugins-standard.dirs | 2 + debian/patches/00list | 14 + debian/patches/02_utilspm.dpatch | 33 + debian/patches/06_checkircd.dpatch | 45 + .../patches/10_config.h_debiandefaults.dpatch | 82 + .../11_check_ups.c_perfdata_fix.dpatch | 47 + .../12_check_mysql.c_mysql_options.dpatch | 356 + debian/patches/13_subst.in_again.dpatch | 64 + debian/patches/14_check_log_paths.dpatch | 26 + .../15_check_mrtg_wtf_conditionals.dpatch | 92 + .../patches/16_check_smtp_protocolfix.dpatch | 202 + debian/patches/17_check_smb_freespace.dpatch | 104 + debian/patches/18_check_game_cmdline.dpatch | 21 + debian/patches/19_check_disk_subdirs.dpatch | 156 + .../20_check_ntp_lessbeastlyregex.dpatch | 19 + debian/patches/21_de.po_fixes.dpatch | 48 + .../patches/22_check_smb_hostaddress.dpatch | 90 + debian/pluginconfig/breeze.cfg | 5 + debian/pluginconfig/dhcp.cfg | 15 + debian/pluginconfig/disk-smb.cfg | 54 + debian/pluginconfig/disk.cfg | 19 + debian/pluginconfig/dns.cfg | 11 + debian/pluginconfig/dummy.cfg | 29 + debian/pluginconfig/flexlm.cfg | 6 + debian/pluginconfig/ftp.cfg | 6 + debian/pluginconfig/games.cfg | 14 + debian/pluginconfig/hppjd.cfg | 6 + debian/pluginconfig/http.cfg | 31 + debian/pluginconfig/ifstatus.cfg | 20 + debian/pluginconfig/ldap.cfg | 6 + debian/pluginconfig/load.cfg | 6 + debian/pluginconfig/mail.cfg | 61 + debian/pluginconfig/mrtg.cfg | 14 + debian/pluginconfig/mysql.cfg | 11 + debian/pluginconfig/netware.cfg | 84 + debian/pluginconfig/news.cfg | 6 + debian/pluginconfig/nt.cfg | 5 + debian/pluginconfig/ntp.cfg | 18 + debian/pluginconfig/pgsql.cfg | 6 + debian/pluginconfig/ping.cfg | 41 + debian/pluginconfig/procs.cfg | 20 + debian/pluginconfig/radius.cfg | 6 + debian/pluginconfig/real.cfg | 13 + debian/pluginconfig/rpc-nfs.cfg | 14 + debian/pluginconfig/snmp.cfg | 139 + debian/pluginconfig/ssh.cfg | 5 + debian/pluginconfig/tcp_udp.cfg | 13 + debian/pluginconfig/telnet.cfg | 6 + debian/pluginconfig/users.cfg | 6 + debian/pluginconfig/vsz.cfg | 6 + debian/rules | 130 + debian/watch | 2 + depcomp | 520 + install-sh | 295 + intl/ChangeLog | 4 + intl/Makefile.in | 337 + intl/VERSION | 1 + intl/bindtextdom.c | 369 + intl/config.charset | 466 + intl/dcgettext.c | 59 + intl/dcigettext.c | 1206 + intl/dcngettext.c | 61 + intl/dgettext.c | 59 + intl/dngettext.c | 61 + intl/eval-plural.h | 114 + intl/explodename.c | 192 + intl/finddomain.c | 198 + intl/gettext.c | 64 + intl/gettextP.h | 242 + intl/gmo.h | 148 + intl/hash-string.h | 59 + intl/intl-compat.c | 131 + intl/l10nflist.c | 453 + intl/libgnuintl.h | 296 + intl/loadinfo.h | 156 + intl/loadmsgcat.c | 1316 + intl/localcharset.c | 369 + intl/locale.alias | 78 + intl/localealias.c | 419 + intl/localename.c | 772 + intl/ngettext.c | 68 + intl/os2compat.c | 98 + intl/os2compat.h | 46 + intl/osdep.c | 24 + intl/plural-exp.c | 156 + intl/plural-exp.h | 126 + intl/plural.c | 1322 + intl/plural.y | 409 + intl/ref-add.sin | 31 + intl/ref-del.sin | 26 + intl/textdomain.c | 142 + lib/Makefile.am | 47 + lib/Makefile.in | 568 + lib/cloexec.c | 63 + lib/cloexec.h | 2 + lib/error.c | 310 + lib/error.h | 66 + lib/exit.h | 32 + lib/exitfail.c | 27 + lib/exitfail.h | 20 + lib/fsusage.c | 292 + lib/fsusage.h | 37 + lib/full-read.c | 19 + lib/full-read.h | 24 + lib/full-write.c | 85 + lib/full-write.h | 24 + lib/getloadavg.c | 1032 + lib/getopt.c | 1209 + lib/getopt.h | 169 + lib/getopt1.c | 185 + lib/gettext.h | 68 + lib/malloc.c | 36 + lib/mountlist.c | 831 + lib/mountlist.h | 53 + lib/realloc.c | 39 + lib/safe-read.c | 82 + lib/safe-read.h | 25 + lib/safe-write.c | 19 + lib/safe-write.h | 25 + lib/snprintf.c | 1023 + lib/stdbool_.h | 93 + lib/strtod.c | 189 + lib/unlocked-io.h | 132 + lib/xalloc.h | 87 + lib/xmalloc.c | 255 + lib/xstrdup.c | 33 + m4/Makefile.am | 47 + m4/Makefile.am.in | 12 + m4/Makefile.in | 399 + m4/afs.m4 | 13 + m4/codeset.m4 | 23 + m4/error.m4 | 15 + m4/exitfail.m4 | 13 + m4/extensions.m4 | 29 + m4/fstypename.m4 | 32 + m4/fsusage.m4 | 246 + m4/getopt.m4 | 13 + m4/gettext.m4 | 587 + m4/glibc21.m4 | 32 + m4/iconv.m4 | 103 + m4/intdiv0.m4 | 72 + m4/inttypes-pri.m4 | 32 + m4/inttypes.m4 | 27 + m4/inttypes_h.m4 | 28 + m4/isc-posix.m4 | 26 + m4/lcmessage.m4 | 32 + m4/lib-ld.m4 | 97 + m4/lib-link.m4 | 554 + m4/lib-prefix.m4 | 148 + m4/ls-mntd-fs.m4 | 282 + m4/malloc.m4 | 25 + m4/mountlist.m4 | 26 + m4/np_coreutils.m4 | 21 + m4/np_curl.m4 | 60 + m4/onceonly.m4 | 63 + m4/progtest.m4 | 59 + m4/realloc.m4 | 25 + m4/stdbool.m4 | 89 + m4/stdint_h.m4 | 28 + m4/uintmax_t.m4 | 29 + m4/ulonglong.m4 | 23 + m4/unlocked-io.m4 | 22 + m4/xalloc.m4 | 32 + missing | 360 + mkinstalldirs | 143 + nagios-plugins.spec | 81 + pkg/redhat/requires | 35 + pkg/solaris/.cvsignore | 2 + pkg/solaris/pkginfo | 12 + pkg/solaris/pkginfo.in | 12 + pkg/solaris/solpkg | 81 + plugins-scripts/Makefile.am | 34 + plugins-scripts/Makefile.in | 521 + plugins-scripts/check_breeze.pl | 87 + plugins-scripts/check_disk_smb.pl | 272 + plugins-scripts/check_file_age.pl | 113 + plugins-scripts/check_flexlm.pl | 245 + plugins-scripts/check_ifoperstatus.pl | 505 + plugins-scripts/check_ifstatus.pl | 459 + plugins-scripts/check_ircd.pl | 251 + plugins-scripts/check_log.sh | 217 + plugins-scripts/check_mailq.pl | 610 + plugins-scripts/check_ntp.pl | 465 + plugins-scripts/check_oracle.sh | 284 + plugins-scripts/check_rpc.pl | 377 + plugins-scripts/check_sensors.sh | 65 + plugins-scripts/check_wave.pl | 123 + plugins-scripts/subst.in | 74 + plugins-scripts/t/check_rpc.t | 22 + plugins-scripts/utils.pm.in | 83 + plugins-scripts/utils.sh.in | 23 + plugins/Makefile.am | 152 + plugins/Makefile.in | 989 + plugins/check_by_ssh.c | 413 + plugins/check_dhcp.c | 1261 + plugins/check_dig.c | 364 + plugins/check_disk.c | 640 + plugins/check_dns.c | 435 + plugins/check_dummy.c | 110 + plugins/check_fping.c | 397 + plugins/check_game.c | 348 + plugins/check_hpjd.c | 398 + plugins/check_http.c | 1572 + plugins/check_icmp.c | 1199 + plugins/check_ide_smart.c | 530 + plugins/check_ldap.c | 407 + plugins/check_load.c | 295 + plugins/check_mrtg.c | 380 + plugins/check_mrtgtraf.c | 364 + plugins/check_mysql.c | 333 + plugins/check_nagios.c | 299 + plugins/check_nt.c | 695 + plugins/check_nwstat.c | 1008 + plugins/check_overcr.c | 456 + plugins/check_pgsql.c | 445 + plugins/check_ping.c | 550 + plugins/check_procs.c | 751 + plugins/check_radius.c | 338 + plugins/check_real.c | 440 + plugins/check_smtp.c | 723 + plugins/check_snmp.c | 1017 + plugins/check_ssh.c | 290 + plugins/check_swap.c | 521 + plugins/check_tcp.c | 788 + plugins/check_time.c | 360 + plugins/check_udp.c | 264 + plugins/check_ups.c | 646 + plugins/check_users.c | 215 + plugins/common.h | 193 + plugins/getaddrinfo.c | 305 + plugins/getaddrinfo.h | 71 + plugins/gethostbyname.c | 230 + plugins/gethostbyname.h | 105 + plugins/negate.c | 275 + plugins/netutils.c | 330 + plugins/netutils.h | 79 + plugins/popen.c | 341 + plugins/popen.h | 15 + plugins/t/check_disk.t | 33 + plugins/t/check_dns.t | 42 + plugins/t/check_fping.t | 43 + plugins/t/check_ftp.t | 34 + plugins/t/check_hpjd.t | 42 + plugins/t/check_http.t | 36 + plugins/t/check_imap.t | 39 + plugins/t/check_load.t | 25 + plugins/t/check_mysql.t | 33 + plugins/t/check_ping.t | 37 + plugins/t/check_pop.t | 38 + plugins/t/check_procs.t | 24 + plugins/t/check_smtp.t | 34 + plugins/t/check_snmp.t | 57 + plugins/t/check_swap.t | 25 + plugins/t/check_tcp.t | 34 + plugins/t/check_time.t | 40 + plugins/t/check_udp.t | 33 + plugins/t/check_users.t | 25 + plugins/urlize.c | 164 + plugins/utils.c | 570 + plugins/utils.h | 171 + po/ChangeLog | 11 + po/LINGUAS | 1 + po/Makefile.in.in | 317 + po/Makevars | 25 + po/POTFILES.in | 43 + po/Rules-quot | 42 + po/boldquot.sed | 10 + po/de.gmo | Bin 0 -> 16308 bytes po/de.po | 4024 +++ po/en@boldquot.header | 25 + po/en@quot.header | 22 + po/fr.gmo | Bin 0 -> 79352 bytes po/fr.po | 4564 +++ po/insert-header.sin | 23 + po/nagios-plugins.pot | 3856 +++ po/quot.sed | 6 + po/remove-potcdate.sin | 19 + test.pl.in | 51 + 416 files changed, 128456 insertions(+) create mode 100644 ABOUT-NLS create mode 100644 ACKNOWLEDGEMENTS create mode 100644 AUTHORS create mode 100644 BUGS create mode 100644 CHANGES create mode 100644 CODING create mode 100644 COPYING create mode 100644 ChangeLog create mode 100644 FAQ create mode 100644 INSTALL create mode 100644 LEGAL create mode 100644 Makefile.am create mode 100644 Makefile.in create mode 100644 NEWS create mode 100644 NPTest.pm create mode 100644 README create mode 100644 REQUIREMENTS create mode 100644 SUPPORT create mode 100644 THANKS create mode 100644 acinclude.m4 create mode 100644 aclocal.m4 create mode 100644 command.cfg.in create mode 100755 config.guess create mode 100644 config.h.in create mode 100755 config.rpath create mode 100755 config.sub create mode 100644 config_test/Makefile create mode 100644 config_test/child_test.c create mode 100755 config_test/run_tests create mode 100755 configure create mode 100644 configure.in create mode 100644 contrib/README.TXT create mode 100644 contrib/aix/check_failed create mode 100644 contrib/aix/check_io create mode 100644 contrib/aix/check_kerberos create mode 100644 contrib/aix/check_queue create mode 100644 contrib/aix/pg_stat create mode 100644 contrib/check_adptraid.sh create mode 100644 contrib/check_apache.pl create mode 100644 contrib/check_apc_ups.pl create mode 100644 contrib/check_appletalk.pl create mode 100644 contrib/check_arping.pl create mode 100644 contrib/check_asterisk.pl create mode 100644 contrib/check_axis.sh create mode 100644 contrib/check_backup.pl create mode 100644 contrib/check_bgpstate.pl create mode 100644 contrib/check_breeze.pl create mode 100644 contrib/check_cluster.c create mode 100644 contrib/check_cluster2.c create mode 100644 contrib/check_compaq_insight.pl create mode 100644 contrib/check_cpqarray.c create mode 100755 contrib/check_digitemp.pl create mode 100644 contrib/check_disk_snmp.pl create mode 100755 contrib/check_dlswcircuit.pl create mode 100644 contrib/check_dns_random.pl create mode 100644 contrib/check_email_loop.pl create mode 100644 contrib/check_fan_cpq_present create mode 100644 contrib/check_fan_fsc_present create mode 100644 contrib/check_flexlm.pl create mode 100644 contrib/check_frontpage create mode 100644 contrib/check_hltherm.c create mode 100755 contrib/check_hprsc.pl create mode 100644 contrib/check_http-with-client-certificate.c create mode 100644 contrib/check_hw.sh create mode 100755 contrib/check_ica_master_browser.pl create mode 100755 contrib/check_ica_metaframe_pub_apps.pl create mode 100755 contrib/check_ica_program_neigbourhood.pl create mode 100644 contrib/check_inodes-freebsd.pl create mode 100755 contrib/check_inodes.pl create mode 100644 contrib/check_ipxping.c create mode 100644 contrib/check_javaproc.pl create mode 100755 contrib/check_joy.sh create mode 100644 contrib/check_linux_raid.pl create mode 100644 contrib/check_lmmon.pl create mode 100644 contrib/check_log2.pl create mode 100755 contrib/check_lotus.pl create mode 100644 contrib/check_maxchannels.pl create mode 100644 contrib/check_maxwanstate.pl create mode 100644 contrib/check_mem.pl create mode 100755 contrib/check_ms_spooler.pl create mode 100755 contrib/check_mssql.sh create mode 100644 contrib/check_nagios.pl create mode 100644 contrib/check_nagios_db.pl create mode 100644 contrib/check_nagios_db_pg.pl create mode 100755 contrib/check_netapp.pl create mode 100644 contrib/check_nmap.py create mode 100644 contrib/check_ora_table_space.pl create mode 100644 contrib/check_oracle_instance.pl create mode 100644 contrib/check_oracle_tbs create mode 100644 contrib/check_pcpmetric.py create mode 100644 contrib/check_pfstate create mode 100755 contrib/check_qmailq.pl create mode 100644 contrib/check_rbl.c create mode 100644 contrib/check_remote_nagios_status.pl create mode 100644 contrib/check_rrd_data.pl create mode 100755 contrib/check_sap.sh create mode 100644 contrib/check_smart.pl create mode 100644 contrib/check_smb.sh create mode 100644 contrib/check_snmp_disk_monitor.pl create mode 100755 contrib/check_snmp_printer.pl create mode 100644 contrib/check_snmp_process_monitor.pl create mode 100644 contrib/check_snmp_procs.pl create mode 100644 contrib/check_sockets.pl create mode 100755 contrib/check_sybase create mode 100644 contrib/check_temp_cpq create mode 100644 contrib/check_temp_fsc create mode 100644 contrib/check_timeout.c create mode 100644 contrib/check_traceroute-pure_perl.pl create mode 100755 contrib/check_traceroute.pl create mode 100644 contrib/check_uptime.c create mode 100644 contrib/check_vcs.pl create mode 100644 contrib/check_wave.pl create mode 100755 contrib/check_wins.pl create mode 100644 contrib/checkciscotemp.pl create mode 100644 contrib/mrtgext.pl create mode 100644 contrib/nagios_sendim.pl create mode 100755 contrib/packet_utils.pm create mode 100755 contrib/rblcheck-dns create mode 100755 contrib/rblcheck-web create mode 100755 contrib/restrict.pl create mode 100644 contrib/sched_downtime.pl create mode 100644 contrib/tarballs/bowen-langley_plugins.tar.gz create mode 100644 contrib/tarballs/check_bgp-1.0.tar.gz create mode 100644 contrib/tarballs/check_radius.tar.gz create mode 100644 contrib/tarballs/check_traffic-0.90b.tar.gz create mode 100644 contrib/tarballs/check_traffic-0.91b.tar.gz create mode 100644 contrib/tarballs/fetchlog-0.94.tar.gz create mode 100644 contrib/urlize.pl create mode 100644 contrib/utils.py create mode 100644 debian/README.Debian create mode 100644 debian/TODO create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/dirs create mode 100644 debian/docs create mode 100644 debian/nagios-plugins-basic.dirs create mode 100644 debian/nagios-plugins-standard.dirs create mode 100644 debian/patches/00list create mode 100644 debian/patches/02_utilspm.dpatch create mode 100644 debian/patches/06_checkircd.dpatch create mode 100755 debian/patches/10_config.h_debiandefaults.dpatch create mode 100755 debian/patches/11_check_ups.c_perfdata_fix.dpatch create mode 100755 debian/patches/12_check_mysql.c_mysql_options.dpatch create mode 100755 debian/patches/13_subst.in_again.dpatch create mode 100755 debian/patches/14_check_log_paths.dpatch create mode 100755 debian/patches/15_check_mrtg_wtf_conditionals.dpatch create mode 100755 debian/patches/16_check_smtp_protocolfix.dpatch create mode 100755 debian/patches/17_check_smb_freespace.dpatch create mode 100755 debian/patches/18_check_game_cmdline.dpatch create mode 100755 debian/patches/19_check_disk_subdirs.dpatch create mode 100755 debian/patches/20_check_ntp_lessbeastlyregex.dpatch create mode 100755 debian/patches/21_de.po_fixes.dpatch create mode 100755 debian/patches/22_check_smb_hostaddress.dpatch create mode 100644 debian/pluginconfig/breeze.cfg create mode 100644 debian/pluginconfig/dhcp.cfg create mode 100644 debian/pluginconfig/disk-smb.cfg create mode 100644 debian/pluginconfig/disk.cfg create mode 100644 debian/pluginconfig/dns.cfg create mode 100644 debian/pluginconfig/dummy.cfg create mode 100644 debian/pluginconfig/flexlm.cfg create mode 100644 debian/pluginconfig/ftp.cfg create mode 100644 debian/pluginconfig/games.cfg create mode 100644 debian/pluginconfig/hppjd.cfg create mode 100644 debian/pluginconfig/http.cfg create mode 100644 debian/pluginconfig/ifstatus.cfg create mode 100644 debian/pluginconfig/ldap.cfg create mode 100644 debian/pluginconfig/load.cfg create mode 100644 debian/pluginconfig/mail.cfg create mode 100644 debian/pluginconfig/mrtg.cfg create mode 100644 debian/pluginconfig/mysql.cfg create mode 100644 debian/pluginconfig/netware.cfg create mode 100644 debian/pluginconfig/news.cfg create mode 100644 debian/pluginconfig/nt.cfg create mode 100644 debian/pluginconfig/ntp.cfg create mode 100644 debian/pluginconfig/pgsql.cfg create mode 100644 debian/pluginconfig/ping.cfg create mode 100644 debian/pluginconfig/procs.cfg create mode 100644 debian/pluginconfig/radius.cfg create mode 100644 debian/pluginconfig/real.cfg create mode 100644 debian/pluginconfig/rpc-nfs.cfg create mode 100644 debian/pluginconfig/snmp.cfg create mode 100644 debian/pluginconfig/ssh.cfg create mode 100644 debian/pluginconfig/tcp_udp.cfg create mode 100644 debian/pluginconfig/telnet.cfg create mode 100644 debian/pluginconfig/users.cfg create mode 100644 debian/pluginconfig/vsz.cfg create mode 100755 debian/rules create mode 100644 debian/watch create mode 100755 depcomp create mode 100755 install-sh create mode 100644 intl/ChangeLog create mode 100644 intl/Makefile.in create mode 100644 intl/VERSION create mode 100644 intl/bindtextdom.c create mode 100755 intl/config.charset create mode 100644 intl/dcgettext.c create mode 100644 intl/dcigettext.c create mode 100644 intl/dcngettext.c create mode 100644 intl/dgettext.c create mode 100644 intl/dngettext.c create mode 100644 intl/eval-plural.h create mode 100644 intl/explodename.c create mode 100644 intl/finddomain.c create mode 100644 intl/gettext.c create mode 100644 intl/gettextP.h create mode 100644 intl/gmo.h create mode 100644 intl/hash-string.h create mode 100644 intl/intl-compat.c create mode 100644 intl/l10nflist.c create mode 100644 intl/libgnuintl.h create mode 100644 intl/loadinfo.h create mode 100644 intl/loadmsgcat.c create mode 100644 intl/localcharset.c create mode 100644 intl/locale.alias create mode 100644 intl/localealias.c create mode 100644 intl/localename.c create mode 100644 intl/ngettext.c create mode 100644 intl/os2compat.c create mode 100644 intl/os2compat.h create mode 100644 intl/osdep.c create mode 100644 intl/plural-exp.c create mode 100644 intl/plural-exp.h create mode 100644 intl/plural.c create mode 100644 intl/plural.y create mode 100644 intl/ref-add.sin create mode 100644 intl/ref-del.sin create mode 100644 intl/textdomain.c create mode 100644 lib/Makefile.am create mode 100644 lib/Makefile.in create mode 100644 lib/cloexec.c create mode 100644 lib/cloexec.h create mode 100644 lib/error.c create mode 100644 lib/error.h create mode 100644 lib/exit.h create mode 100644 lib/exitfail.c create mode 100644 lib/exitfail.h create mode 100644 lib/fsusage.c create mode 100644 lib/fsusage.h create mode 100644 lib/full-read.c create mode 100644 lib/full-read.h create mode 100644 lib/full-write.c create mode 100644 lib/full-write.h create mode 100644 lib/getloadavg.c create mode 100644 lib/getopt.c create mode 100644 lib/getopt.h create mode 100644 lib/getopt1.c create mode 100644 lib/gettext.h create mode 100644 lib/malloc.c create mode 100644 lib/mountlist.c create mode 100644 lib/mountlist.h create mode 100644 lib/realloc.c create mode 100644 lib/safe-read.c create mode 100644 lib/safe-read.h create mode 100644 lib/safe-write.c create mode 100644 lib/safe-write.h create mode 100644 lib/snprintf.c create mode 100644 lib/stdbool_.h create mode 100644 lib/strtod.c create mode 100644 lib/unlocked-io.h create mode 100644 lib/xalloc.h create mode 100644 lib/xmalloc.c create mode 100644 lib/xstrdup.c create mode 100644 m4/Makefile.am create mode 100644 m4/Makefile.am.in create mode 100644 m4/Makefile.in create mode 100644 m4/afs.m4 create mode 100644 m4/codeset.m4 create mode 100644 m4/error.m4 create mode 100644 m4/exitfail.m4 create mode 100644 m4/extensions.m4 create mode 100644 m4/fstypename.m4 create mode 100644 m4/fsusage.m4 create mode 100644 m4/getopt.m4 create mode 100644 m4/gettext.m4 create mode 100644 m4/glibc21.m4 create mode 100644 m4/iconv.m4 create mode 100644 m4/intdiv0.m4 create mode 100644 m4/inttypes-pri.m4 create mode 100644 m4/inttypes.m4 create mode 100644 m4/inttypes_h.m4 create mode 100644 m4/isc-posix.m4 create mode 100644 m4/lcmessage.m4 create mode 100644 m4/lib-ld.m4 create mode 100644 m4/lib-link.m4 create mode 100644 m4/lib-prefix.m4 create mode 100644 m4/ls-mntd-fs.m4 create mode 100644 m4/malloc.m4 create mode 100644 m4/mountlist.m4 create mode 100644 m4/np_coreutils.m4 create mode 100644 m4/np_curl.m4 create mode 100644 m4/onceonly.m4 create mode 100644 m4/progtest.m4 create mode 100644 m4/realloc.m4 create mode 100644 m4/stdbool.m4 create mode 100644 m4/stdint_h.m4 create mode 100644 m4/uintmax_t.m4 create mode 100644 m4/ulonglong.m4 create mode 100644 m4/unlocked-io.m4 create mode 100644 m4/xalloc.m4 create mode 100755 missing create mode 100755 mkinstalldirs create mode 100644 nagios-plugins.spec create mode 100644 pkg/redhat/requires create mode 100644 pkg/solaris/.cvsignore create mode 100644 pkg/solaris/pkginfo create mode 100644 pkg/solaris/pkginfo.in create mode 100755 pkg/solaris/solpkg create mode 100644 plugins-scripts/Makefile.am create mode 100644 plugins-scripts/Makefile.in create mode 100755 plugins-scripts/check_breeze.pl create mode 100755 plugins-scripts/check_disk_smb.pl create mode 100755 plugins-scripts/check_file_age.pl create mode 100755 plugins-scripts/check_flexlm.pl create mode 100644 plugins-scripts/check_ifoperstatus.pl create mode 100755 plugins-scripts/check_ifstatus.pl create mode 100755 plugins-scripts/check_ircd.pl create mode 100755 plugins-scripts/check_log.sh create mode 100755 plugins-scripts/check_mailq.pl create mode 100755 plugins-scripts/check_ntp.pl create mode 100755 plugins-scripts/check_oracle.sh create mode 100755 plugins-scripts/check_rpc.pl create mode 100755 plugins-scripts/check_sensors.sh create mode 100755 plugins-scripts/check_wave.pl create mode 100644 plugins-scripts/subst.in create mode 100644 plugins-scripts/t/check_rpc.t create mode 100644 plugins-scripts/utils.pm.in create mode 100644 plugins-scripts/utils.sh.in create mode 100644 plugins/Makefile.am create mode 100644 plugins/Makefile.in create mode 100644 plugins/check_by_ssh.c create mode 100644 plugins/check_dhcp.c create mode 100644 plugins/check_dig.c create mode 100644 plugins/check_disk.c create mode 100644 plugins/check_dns.c create mode 100644 plugins/check_dummy.c create mode 100644 plugins/check_fping.c create mode 100644 plugins/check_game.c create mode 100644 plugins/check_hpjd.c create mode 100644 plugins/check_http.c create mode 100644 plugins/check_icmp.c create mode 100644 plugins/check_ide_smart.c create mode 100644 plugins/check_ldap.c create mode 100644 plugins/check_load.c create mode 100644 plugins/check_mrtg.c create mode 100644 plugins/check_mrtgtraf.c create mode 100644 plugins/check_mysql.c create mode 100644 plugins/check_nagios.c create mode 100644 plugins/check_nt.c create mode 100644 plugins/check_nwstat.c create mode 100644 plugins/check_overcr.c create mode 100644 plugins/check_pgsql.c create mode 100644 plugins/check_ping.c create mode 100644 plugins/check_procs.c create mode 100644 plugins/check_radius.c create mode 100644 plugins/check_real.c create mode 100644 plugins/check_smtp.c create mode 100644 plugins/check_snmp.c create mode 100644 plugins/check_ssh.c create mode 100644 plugins/check_swap.c create mode 100644 plugins/check_tcp.c create mode 100644 plugins/check_time.c create mode 100644 plugins/check_udp.c create mode 100644 plugins/check_ups.c create mode 100644 plugins/check_users.c create mode 100644 plugins/common.h create mode 100644 plugins/getaddrinfo.c create mode 100644 plugins/getaddrinfo.h create mode 100644 plugins/gethostbyname.c create mode 100644 plugins/gethostbyname.h create mode 100644 plugins/negate.c create mode 100644 plugins/netutils.c create mode 100644 plugins/netutils.h create mode 100644 plugins/popen.c create mode 100644 plugins/popen.h create mode 100644 plugins/t/check_disk.t create mode 100644 plugins/t/check_dns.t create mode 100644 plugins/t/check_fping.t create mode 100644 plugins/t/check_ftp.t create mode 100644 plugins/t/check_hpjd.t create mode 100644 plugins/t/check_http.t create mode 100644 plugins/t/check_imap.t create mode 100644 plugins/t/check_load.t create mode 100644 plugins/t/check_mysql.t create mode 100644 plugins/t/check_ping.t create mode 100644 plugins/t/check_pop.t create mode 100644 plugins/t/check_procs.t create mode 100644 plugins/t/check_smtp.t create mode 100644 plugins/t/check_snmp.t create mode 100644 plugins/t/check_swap.t create mode 100644 plugins/t/check_tcp.t create mode 100644 plugins/t/check_time.t create mode 100644 plugins/t/check_udp.t create mode 100644 plugins/t/check_users.t create mode 100644 plugins/urlize.c create mode 100644 plugins/utils.c create mode 100644 plugins/utils.h create mode 100644 po/ChangeLog create mode 100644 po/LINGUAS create mode 100644 po/Makefile.in.in create mode 100644 po/Makevars create mode 100644 po/POTFILES.in create mode 100644 po/Rules-quot create mode 100644 po/boldquot.sed create mode 100644 po/de.gmo create mode 100644 po/de.po create mode 100644 po/en@boldquot.header create mode 100644 po/en@quot.header create mode 100644 po/fr.gmo create mode 100644 po/fr.po create mode 100644 po/insert-header.sin create mode 100644 po/nagios-plugins.pot create mode 100644 po/quot.sed create mode 100644 po/remove-potcdate.sin create mode 100755 test.pl.in diff --git a/ABOUT-NLS b/ABOUT-NLS new file mode 100644 index 0000000..d528f9c --- /dev/null +++ b/ABOUT-NLS @@ -0,0 +1,435 @@ +Notes on the Free Translation Project +************************************* + + Free software is going international! The Free Translation Project +is a way to get maintainers of free software, translators, and users all +together, so that will gradually become able to speak many languages. +A few packages already provide translations for their messages. + + If you found this `ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU `gettext' internally, +itself available at your nearest GNU archive site. But you do _not_ +need to install GNU `gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work at translations should contact the appropriate team. + + When reporting bugs in the `intl/' directory or bugs which may be +related to internationalization, you should tell about the version of +`gettext' which is used. The information can be found in the +`intl/VERSION' file, in internationalized packages. + +Quick configuration advice +========================== + + If you want to exploit the full power of internationalization, you +should configure it using + + ./configure --with-included-gettext + +to force usage of internationalizing routines provided within this +package, despite the existence of internationalizing capabilities in the +operating system where this package is being installed. So far, only +the `gettext' implementation in the GNU C library version 2 provides as +many features (such as locale alias, message inheritance, automatic +charset conversion or plural form handling) as the implementation here. +It is also not possible to offer this additional functionality on top +of a `catgets' implementation. Future versions of GNU `gettext' will +very likely convey even more functionality. So it might be a good idea +to change to GNU `gettext' as soon as possible. + + So you need _not_ provide this option if you are using GNU libc 2 or +you have installed a recent copy of the GNU gettext package with the +included `libintl'. + +INSTALL Matters +=============== + + Some packages are "localizable" when properly installed; the +programs they contain can be made to speak your own native language. +Most such packages use GNU `gettext'. Other packages have their own +ways to internationalization, predating GNU `gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system already +provides the GNU `gettext' functions. If not, the GNU `gettext' own +library will be used. This library is wholly contained within this +package, usually in the `intl/' subdirectory, so prior installation of +the GNU `gettext' package is _not_ required. Installers may use +special options at configuration time for changing the default +behaviour. The commands: + + ./configure --with-included-gettext + ./configure --disable-nls + +will respectively bypass any pre-existing `gettext' to use the +internationalizing routines provided within this package, or else, +_totally_ disable translation of messages. + + When you already have GNU `gettext' installed on your system and run +configure without an option for your new package, `configure' will +probably detect the previously built and installed `libintl.a' file and +will decide to use this. This might be not what is desirable. You +should use the more recent version of the GNU `gettext' library. I.e. +if the file `intl/VERSION' shows that the library which comes with this +package is more recent, you should use + + ./configure --with-included-gettext + +to prevent auto-detection. + + The configuration process will not test for the `catgets' function +and therefore it will not be used. The reason is that even an +emulation of `gettext' on top of `catgets' could not provide all the +extensions of the GNU `gettext' library. + + Internationalized packages have usually many `po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at `configure' time by using the +`--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable `LINGUAS' +may be set, prior to configuration, to limit the installed set. +`LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +Using This Package +================== + + As a user, if your language has been installed for this package, you +only have to set the `LANG' environment variable to the appropriate +`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, +and `CC' is an ISO 3166 two-letter country code. For example, let's +suppose that you speak German and live in Germany. At the shell +prompt, merely execute `setenv LANG de_DE' (in `csh'), +`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). +This can be done from your `.login' or `.profile' file, once and for +all. + + You might think that the country code specification is redundant. +But in fact, some languages have dialects in different countries. For +example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The +country code serves to distinguish the dialects. + + The locale naming convention of `LL_CC', with `LL' denoting the +language and `CC' denoting the country, is the one use on systems based +on GNU libc. On other systems, some variations of this scheme are +used, such as `LL' or `LL_CC.ENCODING'. You can get the list of +locales supported by your system for your country by running the command +`locale -a | grep '^LL''. + + Not all programs have translations for all languages. By default, an +English message is shown in place of a nonexistent translation. If you +understand other languages, you can set up a priority list of languages. +This is done through a different environment variable, called +`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' +for the purpose of message handling, but you still need to have `LANG' +set to the primary language; this is required by other parts of the +system libraries. For example, some Swedish users who would rather +read translations in German than English for when Swedish is not +available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. + + In the `LANGUAGE' environment variable, but not in the `LANG' +environment variable, `LL_CC' combinations can be abbreviated as `LL' +to denote the language's main dialect. For example, `de' is equivalent +to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' +(Portuguese as spoken in Portugal) in this context. + +Translating Teams +================= + + For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list. The up-to-date list of +teams can be found at the Free Translation Project's homepage, +`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" +area. + + If you'd like to volunteer to _work_ at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is _not_ the same as the list itself, it has +`-request' appended. For example, speakers of Swedish can send a +message to `sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate +_actively_ in translations, or at solving translational difficulties, +rather than merely lurking around. If your team does not exist yet and +you want to start one, or if you are unsure about what to do or how to +get started, please write to `translation@iro.umontreal.ca' to reach the +coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skill are praised more than +programming skill, here. + +Available Packages +================== + + Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of August +2002. The matrix shows, in regard of each package, for which languages +PO files have been submitted to translation coordination, with a +translation percentage of at least 50%. + + Ready PO files be bg ca cs da de el en eo es et fi fr + +----------------------------------------+ + a2ps | [] [] [] [] | + ap-utils | | + bash | [] [] [] [] | + bfd | [] [] | + binutils | [] [] | + bison | [] [] [] [] | + clisp | | + clisp | [] [] [] [] | + clisplow | | + cpio | [] [] [] [] | + darkstat | () | + diffutils | [] [] [] [] [] [] | + enscript | [] [] | + error | [] [] [] | + fetchmail | [] () [] [] [] () | + fileutils | [] [] [] [] [] | + findutils | [] [] [] [] [] [] | + flex | [] [] [] [] [] | + gas | [] [] | + gawk | [] [] [] | + gcal | [] [] | + gcc | [] [] | + gettext | [] [] [] [] [] | + gnupg | [] [] [] [] [] [] [] | + gprof | [] [] | + gpsdrive | () () () () () | + grep | [] [] [] [] [] [] [] [] | + gretl | [] | + gthumb | () () () | + hello | [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] | + indent | [] [] [] [] [] | + jpilot | () [] [] [] | + jwhois | [] [] | + kbd | [] [] [] | + ld | [] [] | + libc | [] [] [] [] [] [] [] [] | + libiconv | [] [] [] [] | + lifelines | () () | + lilypond | [] [] | + lingoteach | [] [] | + lingoteach_lessons| () () | + lynx | [] [] [] [] [] | + m4 | [] [] [] [] [] | + make | [] [] [] [] | + man-db | [] () () [] () () | + mysecretdiary | [] [] [] | + nano | [] () [] [] [] [] | + nano_1_0 | [] () [] [] [] [] | + opcodes | [] [] [] | + parted | [] [] [] [] [] | + ptx | [] [] [] [] [] [] [] | + python | | + recode | [] [] [] [] [] [] | + sed | [] [] [] [] [] [] [] [] [] [] | + sh-utils | [] [] [] [] | + sharutils | [] [] [] [] [] [] [] | + sketch | () [] () | + soundtracker | [] [] [] | + sp | [] | + tar | [] [] [] [] [] [] | + texinfo | [] [] [] [] [] | + textutils | [] [] [] [] [] | + util-linux | [] [] [] [] [] [] | + vorbis-tools | [] | + wastesedge | | + wdiff | [] [] [] [] [] [] | + wget | [] [] [] [] [] [] [] [] [] [] | + +----------------------------------------+ + be bg ca cs da de el en eo es et fi fr + 0 2 19 10 30 44 9 1 12 44 17 6 53 + + gl he hr hu id it ja ko lv nb nl nn + +-------------------------------------+ + a2ps | () () [] | + ap-utils | | + bash | [] | + bfd | [] | + binutils | [] | + bison | [] [] [] [] | + clisp | | + clisp | [] | + clisplow | | + cpio | [] [] [] [] | + darkstat | | + diffutils | [] [] [] [] [] | + enscript | [] [] | + error | [] | + fetchmail | [] | + fileutils | [] [] [] | + findutils | [] [] [] [] [] [] [] [] | + flex | [] | + gas | | + gawk | [] | + gcal | | + gcc | [] | + gettext | [] [] | + gnupg | [] [] [] [] | + gprof | [] | + gpsdrive | [] () () | + grep | [] [] [] [] [] [] [] | + gretl | | + gthumb | () () | + hello | [] [] [] [] [] [] [] [] [] [] [] [] | + id-utils | [] [] | + indent | [] [] [] [] | + jpilot | () () | + jwhois | [] [] | + kbd | | + ld | | + libc | [] [] [] [] | + libiconv | [] [] [] | + lifelines | | + lilypond | [] | + lingoteach | [] | + lingoteach_lessons| | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + make | [] [] [] [] [] [] | + man-db | () () | + mysecretdiary | [] | + nano | [] [] [] [] | + nano_1_0 | [] [] [] [] [] | + opcodes | [] [] | + parted | [] [] [] | + ptx | [] [] [] [] [] | + python | | + recode | [] [] [] | + sed | [] [] [] [] [] [] [] [] | + sh-utils | [] [] [] | + sharutils | [] [] [] | + sketch | () | + soundtracker | [] [] | + sp | | + tar | [] [] [] [] [] [] | + texinfo | [] [] [] | + textutils | [] [] [] [] | + util-linux | () [] | + vorbis-tools | [] | + wastesedge | | + wdiff | [] [] [] | + wget | [] [] [] [] [] [] | + +-------------------------------------+ + gl he hr hu id it ja ko lv nb nl nn + 23 9 12 19 16 13 26 9 1 7 19 3 + + no pl pt pt_BR ru sk sl sv tr uk zh_CN zh_TW + +----------------------------------------------+ + a2ps | () () () [] [] [] [] [] | 10 + ap-utils | () | 0 + bash | [] | 6 + bfd | [] [] | 5 + binutils | [] [] | 5 + bison | [] [] [] [] | 12 + clisp | | 0 + clisp | | 5 + clisplow | | 0 + cpio | [] [] [] [] | 12 + darkstat | [] [] () () | 2 + diffutils | [] [] [] [] [] [] | 17 + enscript | [] [] [] [] | 8 + error | [] [] [] | 7 + fetchmail | () () [] | 6 + fileutils | [] [] [] [] [] [] | 14 + findutils | [] [] [] [] [] [] [] | 21 + flex | [] [] [] | 9 + gas | [] | 3 + gawk | [] [] | 6 + gcal | [] [] | 4 + gcc | [] | 4 + gettext | [] [] [] [] [] [] | 13 + gnupg | [] [] [] | 14 + gprof | [] [] | 5 + gpsdrive | [] [] | 3 + grep | [] [] [] [] [] | 20 + gretl | | 1 + gthumb | () () [] | 1 + hello | [] [] [] [] [] [] [] | 28 + id-utils | [] [] [] [] | 9 + indent | [] [] [] [] [] | 14 + jpilot | () () [] [] | 5 + jwhois | [] () () [] [] | 7 + kbd | [] [] | 5 + ld | [] [] | 4 + libc | [] [] [] [] [] [] | 18 + libiconv | [] [] [] [] [] | 12 + lifelines | [] | 1 + lilypond | [] | 4 + lingoteach | [] [] | 5 + lingoteach_lessons| () | 0 + lynx | [] [] [] [] | 13 + m4 | [] [] [] [] | 13 + make | [] [] [] [] [] | 15 + man-db | | 3 + mysecretdiary | [] [] [] | 7 + nano | [] [] [] [] | 13 + nano_1_0 | [] [] [] [] | 14 + opcodes | [] [] [] | 8 + parted | [] [] [] [] | 12 + ptx | [] [] [] [] [] [] [] | 19 + python | | 0 + recode | [] [] [] [] [] [] | 15 + sed | [] [] [] [] [] [] | 24 + sh-utils | [] [] | 9 + sharutils | [] [] [] [] | 14 + sketch | [] () [] | 4 + soundtracker | [] | 6 + sp | | 1 + tar | [] [] [] [] [] [] [] | 19 + texinfo | [] [] | 10 + textutils | [] [] [] [] [] | 14 + util-linux | [] [] [] | 10 + vorbis-tools | [] | 3 + wastesedge | | 0 + wdiff | [] [] [] [] [] | 14 + wget | [] [] [] [] [] [] [] [] | 24 + +----------------------------------------------+ + 37 teams no pl pt pt_BR ru sk sl sv tr uk zh_CN zh_TW + 68 domains 4 15 2 28 28 12 10 49 43 4 1 9 609 + + Some counters in the preceding matrix are higher than the number of +visible blocks let us expect. This is because a few extra PO files are +used for implementing regional variants of languages, or language +dialects. + + For a PO file in the matrix above to be effective, the package to +which it applies should also have been internationalized and +distributed as such by its maintainer. There might be an observable +lag between the mere existence a PO file and its wide availability in a +distribution. + + If August 2002 seems to be old, you may fetch a more recent copy of +this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date +matrix with full percentage details can be found at +`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. + +Using `gettext' in new packages +=============================== + + If you are writing a freely available program and want to +internationalize it you are welcome to use GNU `gettext' in your +package. Of course you have to respect the GNU Library General Public +License which covers the use of the GNU `gettext' library. This means +in particular that even non-free programs can use `libintl' as a shared +library, whereas only free software can use `libintl' as a static +library or use modified versions of `libintl'. + + Once the sources are changed appropriately and the setup can handle +to use of `gettext' the only thing missing are the translations. The +Free Translation Project is also available for packages which are not +developed inside the GNU project. Therefore the information given above +applies also for every other Free Software Project. Contact +`translation@iro.umontreal.ca' to make the `.pot' files available to +the translation teams. + diff --git a/ACKNOWLEDGEMENTS b/ACKNOWLEDGEMENTS new file mode 100644 index 0000000..7eea869 --- /dev/null +++ b/ACKNOWLEDGEMENTS @@ -0,0 +1,29 @@ +This file contains the origin of code copied verbatim into some or all of the Nagios plugins. + +The NagiosPlugin team thanks the original authors. + +Copied code is cited in the source by indented commnents of the form + + .. indent level .. /* Author YYYY sub-citation see ACKNOWLEDGEMENTS */ + +.. copied code + /* Author YYYY sub-citation */ + +King, Alecs 2004 +getmac.c posted at http://lists.freebsd.org/pipermail/freebsd-hackers/2004-June/007415.html +The sysctl interface to the *BSD kernel is used to get the host MAC address in check_dhcp.c + +Kompf, Martin 200-2003 Copyright the author +http://cplus.kompf.de/macaddr.html +Using the DLPI support on SysV systems to get the host MAC address in check_dhcp.c + +Stenberg, Daniel +Copyright (c) 1996 - 2004, Daniel Stenberg, +http://curl.haxx.se/ +Use of duplication of macros in m4/np_curl.m4 + +Coreutils team +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/ + diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..b39dfb7 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,13 @@ +The Nagios Plugins are brought to you by the Nagios Plugins Development Team. + +Jeremy T Bouse +Karl DeBisschop +Ethan Galstad +Sean Finney +Subhendu Ghosh +Stanley Hopcroft +Matthew Kent +Harper Mann +Benoit Mortier +Ton Voon +Michael Wirtgen diff --git a/BUGS b/BUGS new file mode 100644 index 0000000..ae6f125 --- /dev/null +++ b/BUGS @@ -0,0 +1,20 @@ +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. + +For the 1.4 release: + +1291987 - urlize useragent does not work +1291115 - Wrong compile options for openSSL +1284352 - check_dhcp -s not compatible with helpers/relays +1283131 - check_load gives incorrect data on AIX +1267741 - check_ntp logic incorrect with > 1 peers +1252285 - check_ssh reports critical for some SSH servers +1225470 - check_swap perf data incorrect +1218438 - check_radius linking to wrong header +1210958 - check_nwstat incorrectly reporting free disk space +1144727 - check_disk fails on solaris with large available space +1108499 - check_ping with -U on Debian fails +1094326 - check_ide_smart usage errors +1090549 - check_dhcp ignores DHCP replies + 990948 - check_disk_smb doesn't allow spaces in share names + diff --git a/CHANGES b/CHANGES new file mode 100644 index 0000000..c73769c --- /dev/null +++ b/CHANGES @@ -0,0 +1,15 @@ +This file documents the major additions and syntax changes between releases. + +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/CODING b/CODING new file mode 100644 index 0000000..1581065 --- /dev/null +++ b/CODING @@ -0,0 +1,116 @@ +The following guidelines are intended to aid programmers in creating +code that is consistent with the existing core plugins. + +The primary goals of these standards are internal consistency, and +readability in a wide range of environments. + + +1. C Language Programming + +All code should comply with the requirements of the Free Software +Foundation Coding standards (which are currently available at +http://www.gnu.org/prep/standards_toc.html). We also follow most of +the FSF guidelines. Developers may suggest deviations from the FSF +style recommendations, which will be considered by open discussion on +the nagiosplug-devel mailing list. Any such deviations will apply to +the entire code base to ensure consistency. + +Currently, the exceptions to FSF recommendations are roughly equivalent +to GNU indent with invoked as 'indent -ts 2 -br'. Specifically, the +exceptions are as follows: + +a) leading white space for a statement should be formatted as tabs, +with one tab for each code indentation level. + +b) in statement continuation lines, format whitespace up to the column +starting the statement as tabs, format the rest as spaces (this +results in code that is legible regardless of tab-width setting). + +c) with the exception of the above, tabs should generally be avoided + +d) when tab width is 2 spaces, line-length should not exceed 80 +characters + +e) The opening brace of an if or while block is on the same line as +the end of the conditional expression (the '-br' option). + + +2. Perl Language Programming + +Taken from the O'Reilly book "Programming Perl" (3rd edition, pages 604-606) with +modifications for clarity and to cohere with C coding standards. + +*) Always check the return code of system calls. + +a) Use tab indentation. + +b) Put space before the opening brace of a multiline block. + +c) A short block may be put on one line, including braces. + +d) Never omit the semicolon. + +e) Surround most operators with space. + + $x = 5; # do this + $y=5; # don't do this + +f) Surround a "complex" subscript (inside brackets) with space. + +g) Put empty lines between chunks of code that do different things. + +*) Always check the return code of system calls. + +h) Put a newline between closing brace and else or elsif. + +i) Do not put space between a function name and its opening parenthesis. + +j) Do not put space before a semicolon. + +k) Put space after each comma. + +l) Break long lines after an operator (but before 'and' and 'or', even when +spelled as && and ||)). + +*) Always check the return code of system calls. + +m) Line up corresponding items vertically. + +n) Use redundant parentheses only where it increases readability. + +o) An opening brace should be put on the same line as its preceding keyword, +if possible; otherwise, line them up vertically. + + while ($condition) { + # do something + } + + while ($this_condition and $that_condition and $some_other_condition + and $this_really_really_really_long_condition) + { + # do something + } + +p) Do things the most readable way. For instance: + + open(FOO, $foo) or die "Can't open $foo: $!"; + +is better than + + die "Can't open $foo: $!" unless open(FOO, $foo); + +because the second way hides the main point of the statement in a modifier. + +q) Just because an operator lets you assume default arguments doesn't mean +that you should always use them. The defaults are there for lazy programmers +writing one-shot, non-shared programs. If you want your program to be readable, +consider supplying the argument. + +r) Choose mnemonic identifiers. That is, don't name your variables $h, $c +and $w. Try $hostaddress, $critical and $warning instead ($host, $crit and +$warn is OK too). + +s) Use underscore to split words in long identifiers. That is, use +$service_port instead of $ServicePort as the former is much more readable. + +*) Always check the return code of system calls. diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..60549be --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + 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 + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..b6b06a2 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,6165 @@ +2005-09-19 14:46 tonvoon + + * doc/RELEASING: Reminders for news item and tag format + +2005-09-19 14:42 tonvoon + + * BUGS: Updated BUGS for 1.4.2 release + +2005-09-19 11:58 tonvoon + + * THANKS.in: More contributors + +2005-09-15 09:39 tonvoon + + * plugins/t/check_ping.t: Added test to make sure hostname has to + be specified + +2005-09-15 09:27 tonvoon + + * plugins/: check_procs.c, check_swap.c: - Cleanup minor compile + errors on Irix + +2005-09-14 15:40 tonvoon + + * plugins/check_ping.c: Using common message + +2005-09-14 15:36 tonvoon + + * plugins/check_ping.c: Required hostname not flagging as an error + +2005-09-14 13:40 tonvoon + + * plugins/Makefile.am: Some makes do not like blank lines after + "\". Fixed check_ldaps to only generate if check_ldap was created + (Chester Hosey) + +2005-09-14 10:53 tonvoon + + * plugins/check_load.c: Fix to parsing of uptime (Ronald Tin - + 1254656) + +2005-09-14 10:49 tonvoon + + * configure.in: - Removing typos + +2005-09-13 16:48 tonvoon + + * plugins/check_ping.c: More diagnostic messages from check_ping + +2005-09-12 12:20 seanius + + * plugins/check_ping.c: re-add a call to setlocale(LC_ALL, "") in + check_ping.c + +2005-09-12 11:37 tonvoon + + * THANKS.in: For help in fixing Red Hat problem with ECHILD and + waitpid + +2005-09-12 11:31 tonvoon + + * plugins/popen.c, Makefile.am, configure.in, config_test/Makefile, + config_test/child_test.c, config_test/run_tests: ECHILD error at + waitpid on Red Hat systems (Peter Pramberger and Sascha Runschke + - 1250191) + +2005-08-30 23:11 tonvoon + + * plugins-scripts/subst.in: Better comments for what the + substitutions are doing + +2005-08-01 22:30 tonvoon + + * doc/BRANCHING: Move notes on branching away from RELEASING + +2005-08-01 22:28 tonvoon + + * package.def: For 1.4.1 release + +2005-08-01 22:23 tonvoon + + * ChangeLog, configure.in, BUGS, REQUIREMENTS: For 1.4.1 release + +2005-07-25 15:17 illumino + + * NPTest.pm: Change the environment variable NPTESTCACHE to + NPTEST_CACHE for consistancy + +2005-07-25 02:47 illumino + + * Helper.pm, Makefile.am, NPTest.pm, configure.in, test.pl.in, + plugins/t/check_disk.t, plugins/t/check_dns.t, + plugins/t/check_fping.t, plugins/t/check_ftp.t, + plugins/t/check_hpjd.t, plugins/t/check_http.t, + plugins/t/check_imap.t, plugins/t/check_load.t, + plugins/t/check_mysql.t, plugins/t/check_ping.t, + plugins/t/check_pop.t, plugins/t/check_procs.t, + plugins/t/check_smtp.t, plugins/t/check_snmp.t, + plugins/t/check_swap.t, plugins/t/check_tcp.t, + plugins/t/check_time.t, plugins/t/check_udp.t, + plugins/t/check_users.t, plugins/t/check_vsz.t, + plugins-scripts/t/check_rpc.t: [1185704] New Testing + Infrastructure. Complete rewrite of the original testing + infrastructure and all test cases (to use the new infrastructure) + See NPTest.pm and issue 1185704 for more details. + +2005-07-20 23:39 tonvoon + + * THANKS.in: More contributors + +2005-07-20 23:38 tonvoon + + * plugins/check_ping.c: Fix parsing for netkit-ping and + iputils-ping (Christian G Warden) + +2005-07-11 23:15 tonvoon + + * plugins/check_nwstat.c: Miscelleneous bug fixes (Gerd Mueller - + 1235879) + +2005-07-09 05:44 tonvoon + + * BRANCHES: Changed format (already!) for awk simplicity + +2005-07-09 05:03 tonvoon + + * BRANCHES: Master file to describe the current branches in CVS. + Will be used by sfsnapshot to create the snapshot tarballs + +2005-07-06 23:21 tonvoon + + * configure.in: Removed ",", causing problems with MacOSX compile + +2005-07-06 23:10 tonvoon + + * plugins/check_swap.c: Updated help file to remove swap -s + reference (Sivakumar Nellurandi) + +2005-07-06 22:00 tonvoon + + * AUTHORS, THANKS.in: Sean Finney moved to main list of plugin + developers + +2005-07-04 10:52 opensides + + * contrib/tarballs/check_traffic-0.90b.tar.gz: + replace the version of check_traffic who was missing the plugin + by a good one + +2005-06-29 05:11 seanius + + * plugins/: runcmd.c, runcmd.h: initial versions of the runcmd + framework by andreas + +2005-06-29 02:04 seanius + + * plugins/check_swap.c: divide by 0 fix for check_swap + +2005-06-28 03:26 seanius + + * plugins/check_load.c: set LC_NUMERIC to POSIX in check_load + (1164325) + +2005-06-28 01:26 seanius + + * configure.in, plugins/Makefile.am, plugins/check_swap.c: scanf + parsing fix for check_swap from tracker id 1123292. now use + floor(3) to round down floating point numbers. requires -lm on + many systems, so support for testing for this was added to the + configure.in and automake template + +2005-06-27 14:07 seanius + + * plugins/check_hpjd.c: fixes from richard brodie (tracker id + 1216576) + +2005-06-26 17:27 seanius + + * contrib/: check_dl_size.pl, check_ftpget.pl, check_logins.c, + check_mysql.c, check_mysql.pl, check_mysqlslave.pl, + check_nwstat.pl, check_pop3.pl, check_procl.sh, check_procr.sh: + spring cleaning of contrib directory from andreas + +2005-06-26 17:18 seanius + + * contrib/tarballs/: berger-ping.tar.gz, check_memory.tgz, + check_spread.tar, radius.tar.gz: removal of obsolete tarballs + +2005-06-26 02:23 seanius + + * plugins/check_swap.c: "asprintf madness" fix from andreas' patch + to np-d, minus the comments. + +2005-06-05 18:43 seanius + + * plugins/check_tcp.c: check_tcp code cleanup from andreas plus fix + to andreas' patch from sean + +2005-06-03 14:53 seanius + + * plugins/check_procs.c: gcc 2.x fixes from edward + +2005-06-01 20:41 sghosh + + * plugins/check_snmp.c: only load mibs if needed or specified - + patch 1212395 + +2005-05-28 02:21 seanius + + * plugins/check_load.c: bugfixes to check_load thanks to andreas + +2005-05-26 03:13 seanius + + * plugins/check_mysql.c: fix for check_msyql so that it doesn't use + column numbers but the names instead for determining slave + status. thanks to james kingston. + +2005-05-25 18:42 sghosh + + * plugins/check_time.c: 64bit sys support - 1185713 + +2005-05-25 16:40 sghosh + + * plugins/check_snmp.c: support for getnext - 1106430 + +2005-05-25 15:25 sghosh + + * plugins/check_ping.c: RH9 pattern + +2005-05-25 15:05 sghosh + + * plugins-scripts/check_ntp.pl: perfdata patch - 1172539 + +2005-05-25 04:37 sghosh + + * plugins-scripts/check_ntp.pl: new option for zero offset - + 1159317 + +2005-05-25 04:23 sghosh + + * plugins/check_snmp.c: v2c support - 1155754 + +2005-05-25 01:43 seanius + + * configure.in, plugins/check_nagios.c, plugins/check_procs.c: + fixes for check_procs: - added support for printing the pid in + all the ps outputs - don't use the proc name to ignore self, use + the pid vs getpid(). - initialize procetime to null string + otherwise -vvv can have funny results + +2005-05-25 01:30 seanius + + * plugins/: check_tcp.c, netutils.c, netutils.h: bah, my_connect is + taken by mysql. now calling it np_net_connect. + +2005-05-24 23:33 sghosh + + * plugins-scripts/check_ntp.pl: patched bug id 1200030 - regex + update + +2005-05-24 23:10 sghosh + + * plugins-scripts/check_ntp.pl: patched bug id 1204636 + +2005-05-24 21:25 seanius + + * plugins/: check_tcp.c, netutils.c, netutils.h: optimizations and + cleanup from andreas + +2005-05-23 06:09 seanius + + * nagios-plugins.spec.in: build fix + +2005-05-03 03:00 seanius + + * plugins/check_ping.c: setlocale(LC_ALL, "") should be + setlocale(LC_NUMERIC, "C") to properly parse the output of ping. + +2005-05-03 02:52 seanius + + * plugins/check_tcp.c: if check_tcp was called with -e but not -s, + it would hang in a call to my_recv. the fix committed here adds + on more piece of logic to the check to see if more data needs to + be read, avoiding the deadlock call. a better fix would be to + not use these "voodoo" heuristics and instead use poll() or + select(), but that's quite a bit more complicated. + +2005-05-01 21:12 seanius + + * plugins/: popen.c, popen.h: better error checking in spopen + signal handler (see 1107524) + +2005-05-01 20:50 seanius + + * configure.in: provide a --with-perl option + +2005-04-29 01:27 stanleyhopcroft + + * contrib/check_sybase: check_sybase 0.7 from Simon Bellman. Thx + +2005-04-19 01:16 seanius + + * plugins-scripts/check_ntp.pl: regexp fix for check_ntp + +2005-04-19 01:09 seanius + + * configure.in: check for the -w flag for ping6 as well as ping + +2005-04-17 23:22 seanius + + * plugins-scripts/check_disk_smb.pl: also change the --help output + to reflect that check_disk_smb defaults to empty passwords + +2005-04-16 07:09 seanius + + * plugins-scripts/check_disk_smb.pl: patch to check_disk_smb to + allow empty passwords + +2005-04-14 05:13 seanius + + * plugins-scripts/check_mailq.pl: check_mailq fix, don't be case + sensitive matching /^\s+Total\sRequests:\s(\d+)$/ + +2005-04-14 05:07 seanius + + * plugins-scripts/check_ntp.pl: typographical fix in check_ntp + +2005-04-11 19:02 seanius + + * plugins/check_ssh.c: properly call close() on the ssh connection + before exiting. + +2005-04-11 04:07 seanius + + * configure.in, plugins/check_tcp.c: this should add support for + check_ssmtp, based on the 1.3.x patch in 1155562, but fixed to + follow how things are done in 1.4 (using strdup instead of + asprintf) and patching configure.in instead of configure. + +2005-04-07 05:33 seanius + + * plugins/check_smtp.c: in honor of joining up, my first bugfix. + this should resolve 1174070. + + note i don't have an exchange server to test this against, but it + does what the requester mentioned (slightly cleaner than the + patch attached in the tracker). + + it does, however, still work against my own postfix server :) + + sean + +2005-04-05 22:26 harpermann + + * plugins/check_snmp.c: This is a first cut at adding performance + data to check_snmp. I wasn't sure how to handle UOM so only + values that return SNMP type Counter32: are labled with "c". All + other values have a blank UOM. I also left off warn, crit, max + and min values in the performance data until we come up with a + way to handle them. + +2005-04-04 19:25 tonvoon + + * THANKS.in: More contributors + +2005-04-04 19:23 tonvoon + + * plugins/: check_smtp.c: Fix static buffer (Nikolay Sturm) + +2005-03-18 03:14 mattkent + + * plugins/check_mysql.c: Replication check support for 4.1.x from + Gerrit Beine + +2005-03-08 06:19 tonvoon + + * plugins-scripts/check_ntp.pl: Added OS info for offset issue + +2005-03-04 22:20 tonvoon + + * plugins-scripts/check_ntp.pl: Ignore extra check on offset + 0.00000 (John Warburton - 1150777) + +2005-03-04 22:10 tonvoon + + * plugins/: check_disk.c, check_smtp.c, check_ups.c: Fixed // + comments + +2005-03-04 21:58 tonvoon + + * plugins/: check_disk.c, check_smtp.c, check_ups.c: Fixed // + comments (Steve Greenland - 1143836) + +2005-03-04 21:50 tonvoon + + * plugins-scripts/check_ntp.pl: Support for IPv6 (Merijn Evertse - + 1119917) + +2005-03-04 21:04 tonvoon + + * configure.in, package.def: Changed to next version number + +2005-03-04 21:03 tonvoon + + * doc/RELEASING: Notes on branching + +2005-03-04 20:43 tonvoon + + * CHANGES: Missed check_disk addition to 1.4 + +2005-02-11 11:49 stanleyhopcroft + + * plugins/Makefile.am: Fix for check_icmp build on Solaris from + Andreas Ericsson + +2005-02-04 00:44 tonvoon + + * configure.in: For 1.4 release + +2005-02-04 00:43 tonvoon + + * ChangeLog: Updated for 1.4 release + +2005-02-04 00:29 tonvoon + + * BUGS: New file to note known bugs for major releases + +2005-02-04 00:28 tonvoon + + * CHANGES: Reordering of items with most important announcements + first + +2005-02-04 00:27 stanleyhopcroft + + * contrib/check_oracle_tbs: New version (1.1) from John Koyle + +2005-02-04 00:26 tonvoon + + * Makefile.am: BUGS file addition to release + +2005-02-04 00:26 tonvoon + + * README: Cleanup and addition of reference to BUGS file + +2005-02-04 00:25 tonvoon + + * doc/RELEASING: Updated with corrections. Added note to update + BUGS file + +2005-02-03 23:52 tonvoon + + * THANKS.in: Patch against check_log + +2005-02-03 23:51 tonvoon + + * plugins-scripts/check_log.sh: Check for log file readability + +2005-02-02 09:47 stanleyhopcroft + + * contrib/check_email_loop.pl: Add debug option from John Rouillard + +2005-02-02 06:42 stanleyhopcroft + + * plugins/check_ide_smart.c: try again to stop looping + +2005-02-02 05:44 stanleyhopcroft + + * plugins/check_ide_smart.c: restructure main() to stop looping on + -n + +2005-02-01 12:43 stanleyhopcroft + + * contrib/check_traceroute-pure_perl.pl: Thank you to Myke Place + for check_traceroute-pure_perl.pl + +2005-02-01 12:42 stanleyhopcroft + + * THANKS.in: Thank you for contributed plugins + +2005-02-01 12:30 stanleyhopcroft + + * plugins/Makefile.am: check_icmp added to libexec_PROGRAMS + +2005-02-01 12:25 stanleyhopcroft + + * CHANGES: check_icmp no longer regarded as volatile; built by + default + +2005-02-01 12:23 stanleyhopcroft + + * plugins/linux.h: plugins/linux.h, vestigeal header required for + prior versions of check_icmp, no longer required. + +2005-02-01 07:35 stanleyhopcroft + + * CHANGES: Amendments for check_icmp + +2005-02-01 07:34 stanleyhopcroft + + * plugins/Makefile.am: hacks to partly support check_icmp.c (1.0). + +2005-02-01 07:33 stanleyhopcroft + + * plugins/check_icmp.c: Revised check_icmp (1.0) from A Ericsson. + +2005-02-01 04:19 stanleyhopcroft + + * contrib/: check_asterisk.pl, + check_http-with-client-certificate.c, check_email_loop.pl, + tarballs/check_traffic-0.91b.tar.gz: New or revised plugin in + /contrib + +2005-01-28 22:42 stanleyhopcroft + + * contrib/check_sybase: New version of Simon Bellwoods check_sybase + (0.4). Thank you. + +2005-01-27 10:34 stanleyhopcroft + + * contrib/check_traceroute.pl: Jon Meek's check_traceroute for Mon + hacked by YT for Nagios. Prob pretty weak + +2005-01-27 10:32 stanleyhopcroft + + * contrib/check_smart.pl: Candidate successor to + /plugins/check_ide_smart.c. Now in /contrib. NB there is another + new plugin with sim function + +2005-01-27 04:52 stanleyhopcroft + + * contrib/: check_fan_cpq_present, check_fan_fsc_present, + check_temp_cpq, check_temp_fsc, check_mysqlslave.pl: New /contrib + plugin + +2005-01-27 04:43 stanleyhopcroft + + * contrib/: check_pfstate, check_logins.c, check_arping.pl, + check_frontpage, check_oracle_tbs, check_pcpmetric.py, + check_cpqarray.c: New /contrib plugin + +2005-01-27 02:27 stanleyhopcroft + + * CHANGES, THANKS.in, contrib/README.TXT, po/de.po, po/fr.po: + + 1 New /contrib plugins 2 Revised check_dhcp.c status in CHANGES + +2005-01-27 01:38 harpermann + + * plugins/Makefile.am: Added check_dhcp bask into libexec_PROGRAMS + after talking with Stanley. + +2005-01-26 21:39 tonvoon + + * THANKS.in: More contributors + +2005-01-26 21:21 tonvoon + + * plugins/check_dig.c: Convert tabs to spaces from dig's answer + section (Randy O'Meara - 1107651) + +2005-01-26 20:53 tonvoon + + * REQUIREMENTS: Add recommendation for check_procs on Mandrake + systems (Paulo Fessel - 1106849) + +2005-01-25 22:15 stanleyhopcroft + + * plugins/check_ide_smart.c: Display usage if no argv (Reuben + Farrelly) + +2005-01-25 18:11 harpermann + + * plugins/check_dhcp.c: Tracker:1109261 This was an alignment + problem on Solaris. Linux kernel fixes alignment so this was not + seen there. Memcpy takes care of proper alignment. Tested on + RHEL V3 U3, RHEL V4, FreeBSD 4.10 (Thanks Stanley!) and Solaris 9 + with the GNU env. + +2005-01-25 12:43 stanleyhopcroft + + * plugins/check_ide_smart.c: Trivial text changes (print_help, + commentary & -n option) + +2005-01-25 09:20 stanleyhopcroft + + * contrib/tarballs/check_icmp-0.8.tar.gz: moved to /plugins (core + plugin) + +2005-01-25 09:19 stanleyhopcroft + + * contrib/tarballs/check_cit.tgz: replaced by contrib/check_ica* + (esp check_ica_metaframe_pub_apps) + +2005-01-25 09:16 stanleyhopcroft + + * contrib/check_dhcp.c: moved to /plugins (core plugin) + +2005-01-25 09:15 stanleyhopcroft + + * contrib/check_citrix: Replaced by the check_ica* pair of plugins + (mainly check_ica_metaframe_pub_apps) + +2005-01-25 09:12 stanleyhopcroft + + * contrib/packet_utils.pm: packet creation and dumping hacks used + by check_ica* and check_lotus + +2005-01-25 09:09 stanleyhopcroft + + * contrib/check_ica_master_browser.pl: New plugin - checks that ICA + master browser is what it should be (important for firewalled + dialup) + +2005-01-25 09:07 stanleyhopcroft + + * contrib/check_ica_metaframe_pub_apps.pl: Replacement (structured + name mainly) for check_citrix: check of ICA browse service + +2005-01-25 09:05 stanleyhopcroft + + * contrib/check_ica_program_neigbourhood.pl: New plugin to check + Citrix Metaframe XP "Program Neighbourhood" + +2005-01-25 09:04 stanleyhopcroft + + * contrib/check_lotus.pl: New plugin to check responsiveness of + Louts Notes (v5 at least) servers + +2005-01-24 23:17 stanleyhopcroft + + * plugins/Makefile.am: Removed check_dhcp and check_icmp from + libexec_PROGRAMS (ie dont build by defaut) + +2005-01-24 23:15 stanleyhopcroft + + * CHANGES: Notes about check_dhcp and check_icmp (no longer built + by default, use at own peril, volatile) + +2005-01-21 09:24 stanleyhopcroft + + * configure.in: Set arch specifc preprocessor symbols in config.h. + TEMPORARY hack for check_dhcp.c [on FreeBSD 4: /check_dhcp -i + fxp0 -> DHCP ok: Received 1 DHCPOFFER(s), max lease time = 259200 + sec. + +2005-01-21 01:03 harpermann + + * plugins/check_snmp.c: Tracker 1106378 fixed - The -t (timeout) + arg was not handled correctly when passed to the snmpget command. + Added -e --retries for the correct retries value to snmpcmd. + +2005-01-21 00:01 tonvoon + + * doc/developer-guidelines.sgml: Changing copyright to the Nagios + Plugins Development Team, rather than individual names. Also, + clarified use of ACKNOWLEDGEMENTS, THANKS.in and AUTHORS + +2005-01-20 23:40 harpermann + + * plugins/check_http.c: Changed long argument --minmax to + --pagesize and updated help and usage + +2005-01-20 23:39 tonvoon + + * AUTHORS, Makefile.am, THANKS.in: The AUTHORS file now used for + the plugin team, with THANKS.in as the contributors list. + +2005-01-20 23:37 harpermann + + * CHANGES: Added comment about check_http --pagesize and added max + value to page size check + +2005-01-20 23:25 tonvoon + + * AUTHORS: Added Sean for bug reports + +2005-01-20 22:50 harpermann + + * plugins/check_http.c: Tracker 1099682 fix. Now getting the page + size from Content-Length in the header. Added max value to the + -m switch so can do "-m min:max". Retained "-m min" convention. + Renamed long arg name to --minmax + +2005-01-19 23:39 harpermann + + * plugins/check_nt.c: In the CHECK_COUNTER block, there were + several strcats writing to unallocated memory. Changed to + asprintf. We're not freeing since plugin run is short. + +2005-01-19 21:14 tonvoon + + * plugins/check_swap.c: Fixed parsing of AIX lsps command (1093522) + +2005-01-14 14:39 tonvoon + + * AUTHORS: More contributors + +2005-01-14 14:13 tonvoon + + * plugins/check_disk.c: Fix logic error with -e switch where result + not set (Daniel Austin - 1102012) + +2005-01-14 10:59 tonvoon + + * configure.in: Fixed ssl configure problems on Solaris (Bug + 1096091) + +2005-01-13 18:24 tonvoon + + * configure.in, plugins/check_swap.c: Use floats for holding memory + values to avoid different types on different OSes. Seems to have + a problem with the perf data for check_swap on Sol 2.6, but not + critical + +2005-01-05 21:32 tonvoon + + * configure.in, package.def: Update version number to next release + +2005-01-04 00:16 opensides + + * plugins/check_ide_smart.c: + still trying to fix #1094326 + +2005-01-03 01:37 opensides + + * plugins/check_ide_smart.c: + more fixes for #1094326 + +2005-01-03 00:59 opensides + + * plugins-scripts/check_mailq.pl: + fixes for #1094324 + +2005-01-02 14:00 opensides + + * plugins/check_ide_smart.c: + fixing bug #1094326 + + still need to check the makefile for check_ide_smart.c + +2005-01-01 16:15 tonvoon + + * plugins/check_smtp.c: Removed old terminate function (Bug + 1093491) + +2004-12-30 17:17 tonvoon + + * ChangeLog: Updated with r1_4-beta1 details + +2004-12-30 14:23 tonvoon + + * CHANGES: Note some syntax changes to check_disk + +2004-12-30 14:22 tonvoon + + * doc/RELEASING: Update package files for version + +2004-12-30 14:21 tonvoon + + * AUTHORS: For help with ps on FreeBSD 4 + +2004-12-30 14:19 tonvoon + + * configure.in: Get ps command for FreeBSD 4 (Tomasz Pilat) + +2004-12-30 00:41 opensides + + * plugins/check_dhcp.c, plugins/check_dns.c, plugins/check_ping.c, + plugins/check_procs.c, plugins/check_smtp.c, + plugins/check_snmp.c, plugins/check_swap.c, plugins/check_tcp.c, + po/de.po, po/fr.po, po/nagios-plugins.pot: + more internationalization fixes internationalization freeze for + beta1 + +2004-12-28 23:40 opensides + + * AUTHORS, po/fr.po: + more internationalization + +2004-12-28 23:18 opensides + + * plugins/Makefile.am, plugins/check_smtp.c, po/fr.po: + starttls support for check_smtp #1041576 + +2004-12-28 22:34 opensides + + * AUTHORS, plugins/check_ping.c: + String match in check_ping for Solaris 10 #1091043 + +2004-12-28 20:40 tonvoon + + * configure.in: sys/param.h needed for sys/swap.h on openbsd 3.6 + (Julien Touche) + +2004-12-27 22:44 opensides + + * po/fr.po: + more internationalization + +2004-12-25 23:17 opensides + + * plugins/check_dig.c, plugins/check_disk.c, plugins/check_dns.c, + plugins/check_dummy.c, plugins/check_fping.c, + plugins/check_game.c, plugins/check_hpjd.c, plugins/check_icmp.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_nagios.c, plugins/check_nt.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_udp.c, plugins/check_ups.c, + plugins/check_users.c, plugins/negate.c, plugins/netutils.c, + plugins/popen.c, plugins/popen.h, plugins/urlize.c, + plugins/utils.c, po/de.po, po/fr.po, po/nagios-plugins.pot: + various fixes for localization + +2004-12-25 16:18 opensides + + * po/: de.po, fr.po, nagios-plugins.pot: + new version of po files and pot file + +2004-12-25 12:25 opensides + + * package.def, po/POTFILES.in: + change realase name on package.def adding check_dhcp.c to + potfiles.in + +2004-12-25 12:09 opensides + + * plugins/: check_by_ssh.c, check_dhcp.c: + internationalization of check_dhcp internationalization fixes of + check_ssh + +2004-12-24 18:06 opensides + + * plugins/check_icmp.c, po/POTFILES.in, po/fr.po: + first pass at adapting to plugin guidelines and start of + localization + +2004-12-23 18:54 opensides + + * plugins/check_http.c, po/fr.po: + internationalization fixes + +2004-12-23 16:47 mwirtgen + + * po/de.po: german translations 391 to go + +2004-12-23 09:30 tonvoon + + * ACKNOWLEDGEMENTS, configure.in, m4/np_curl.m4, + plugins/Makefile.am: Another attempt at fixing check_http compile + on Redhat EL3. Fixed check_icmp compile (Lynne Lawrence - + 1087171) - still some code changes to check_icmp outstanding. + Fixed compile of check_dhcp (complaining about socklen_t). Added + acknowledgements for Coreutils and curl + +2004-12-22 23:02 harpermann + + * plugins/check_nt.c: Added check for "%" in COUNTER . + If it exists, is used as an arg to asprintf. If + it doesn't exist, is used as a label. If the + formatting is wrong, the program will segv. + +2004-12-22 07:24 tonvoon + + * lib/: Makefile.am, stdbool_.h: File required from coreutils + +2004-12-21 22:52 tonvoon + + * configure.in, plugins/Makefile.am: Revert back to previous + openssl checks (the ones from curl kept having problems with + later Redhat versions) + +2004-12-21 22:36 tonvoon + + * m4/stdbool.m4: Another m4 from coreutils + +2004-12-21 15:45 tonvoon + + * AUTHORS: For their bug reports + +2004-12-21 12:47 tonvoon + + * configure.in: Fix for FreeBSD ps command (reported by Michael + Bakker) + +2004-12-21 09:32 tonvoon + + * lib/Makefile.am, m4/Makefile.am, m4/np_coreutils.m4: Fixed + compile problem on Sol2.6 with stdbool.h + +2004-12-21 08:56 stanleyhopcroft + + * plugins/check_dhcp.c: Commentary changes only: cite origin of + copied code with reference to ACK file + +2004-12-21 08:55 stanleyhopcroft + + * ACKNOWLEDGEMENTS: ACK file contains the details of the authors of + code copied by the plugins + +2004-12-21 05:00 mattkent + + * plugins/check_dns.c: Add another error string match from Pasi + Tiittanen + +2004-12-20 22:20 tonvoon + + * plugins/check_nagios.c: Corrected help for expiry units. Restored + functionality of searching for process arguments + +2004-12-20 22:01 tonvoon + + * plugins/check_nagios.c: Updating help text to reflect using + shortname instead of full path for command + +2004-12-20 21:38 tonvoon + + * configure.in: - stupid typo + +2004-12-20 21:26 tonvoon + + * configure.in: Fix compile errors when looking for openssl + +2004-12-20 09:04 stanleyhopcroft + + * COPYING, plugins/check_dhcp.c, po/de.po, po/fr.po: Compilation + fixes for check_dhcp.c HP-UX 11. Still fails on HP-UX 10. Unknown + if check_dhcp works on UX. + +2004-12-18 18:28 mwirtgen + + * po/de.po: Initial commit on german translation - 428 to go + +2004-12-17 18:14 tonvoon + + * configure.in: Support for FreeBSD 5.2.1 and 5.3 in check_procs + +2004-12-15 23:12 tonvoon + + * configure.in: Bump version to next release + +2004-12-15 23:11 tonvoon + + * doc/developer-guidelines.sgml: Mistake in automake version - back + to 1.8 + +2004-12-15 23:10 tonvoon + + * doc/RELEASING: Clarified notes + +2004-12-15 21:56 tonvoon + + * ChangeLog: Updated for r1_4_0-alpha3 + +2004-12-15 21:27 tonvoon + + * doc/developer-guidelines.sgml: Updated requirements for GNU tools + +2004-12-15 21:01 tonvoon + + * m4/Makefile.am: Makefile for m4 files + +2004-12-15 20:54 tonvoon + + * Makefile.am, configure.in, plugins/Makefile.am, tools/setup: + Support for coreutils lib. Configure tests via m4 scripts from + coreutils + +2004-12-15 20:51 tonvoon + + * m4/: Makefile.am.in, afs.m4, codeset.m4, error.m4, exitfail.m4, + extensions.m4, fstypename.m4, fsusage.m4, getopt.m4, gettext.m4, + glibc21.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, inttypes.m4, + inttypes_h.m4, isc-posix.m4, lcmessage.m4, lib-ld.m4, + lib-link.m4, lib-prefix.m4, ls-mntd-fs.m4, malloc.m4, + mountlist.m4, np_coreutils.m4, onceonly.m4, progtest.m4, + realloc.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, + unlocked-io.m4, xalloc.m4: Moving m4 files from lib/ + +2004-12-15 20:47 tonvoon + + * lib/: Makefile.am, afs.m4, error.m4, exitfail.m4, fstypename.m4, + fsusage.m4, full-read.c, full-write.c, full-write.h, getopt.m4, + ls-mntd-fs.m4, onceonly.m4, safe-read.c, safe-read.h, + safe-write.c, safe-write.h, unlocked-io.m4, xalloc.m4: Moving m4 + files into m4/. Added extra coreutils files required from + autoconf tests. Updated Makefile.am to have nagiosplug lib and a + separate coreutils lib + +2004-12-15 00:10 opensides + + * po/: de.po, fr.po: + fr.po work in progress still 88 to translate ;-) + +2004-12-11 06:25 mattkent + + * plugins/check_tcp.c: Patch from Ollie Cook to define return code + when expected value not received (#1082275). Also included + another change from Ollie Cook to do stricter matching of + expected values from the beginning of the line. When a user + defines an expected string this is changed to the old style + strstr matching. + +2004-12-10 21:18 tonvoon + + * plugins/check_ldap.c: Fixed compile warning + +2004-12-10 06:10 mattkent + + * plugins/Makefile.am: Compile broken - fixing link flags. + +2004-12-10 05:57 mattkent + + * plugins/check_dns.c: Error catching improvements from Ollie Cook + +2004-12-10 05:54 mattkent + + * plugins/check_pgsql.c: Fixing broken compile + +2004-12-10 05:39 mattkent + + * AUTHORS: More contributers + +2004-12-10 00:54 stanleyhopcroft + + * plugins/Makefile.am: Changes to link flags for check_dhcp.c + +2004-12-10 00:52 stanleyhopcroft + + * plugins/check_dhcp.c: Extensive changes to get MAC address from + Solaris via DLPI + +2004-12-10 00:20 tonvoon + + * plugins/: check_dns.c, check_procs.c: Reverting back ngettext + calls + +2004-12-10 00:13 tonvoon + + * plugins/common.h: Fix includes for gettext + +2004-12-09 22:33 tonvoon + + * configure.in: Include $libsuff for systems that define this + (based on advice from Daniel Stenberg) + +2004-12-08 23:14 tonvoon + + * configure.in: Removed redundant check and make export + LD_LIBRARY_PATH more sh friendly + +2004-12-08 00:36 opensides + + * configure.in, plugins/Makefile.am, plugins/check_by_ssh.c, + plugins/check_game.c, plugins/check_http.c, + plugins/check_ide_smart.c, plugins/check_ldap.c, + plugins/check_snmp.c, plugins/check_tcp.c: + patch 1028033 + + minor internationalization fixes + +2004-12-08 00:22 tonvoon + + * configure.in: Fixed output info for openssl and LD_LIBRARY_PATH + for subsequent compiles (otherwise get ld.so.1: ./conftest: + fatal: libssl.so.0.9.7: open failed) + +2004-12-07 06:51 tonvoon + + * configure.in, plugins/Makefile.am: Better SSL checking (inspired + by curl 7.12.2's configure.ac) + +2004-12-07 03:13 mattkent + + * plugins-scripts/check_ifoperstatus.pl: Option to check for admin + down (#1012191) from Ral Pedroche. + +2004-12-07 02:45 stanleyhopcroft + + * plugins/Makefile.am: Correct dependencies for check_dhcp.c. + +2004-12-07 02:31 stanleyhopcroft + + * plugins/: Makefile.am, check_dhcp.c: New plugin: check_dhcp.c. + Attempt to port to non Linux platform. + +2004-12-06 18:49 opensides + + * po/fr.po: + new version of fr.po + +2004-12-05 22:07 mattkent + + * plugins/check_snmp.c: Fix for -s string matching (#756567, Tony + Missana) + +2004-12-05 12:59 opensides + + * plugins/check_nt.c, po/fr.po, po/nagios-plugins.pot: + cleaned fr.po nagios-plugins.pot + +2004-12-05 00:54 opensides + + * plugins/: check_http.c, check_icmp.c, check_nwstat.c, + check_ping.c, check_smtp.c, check_swap.c, utils.h: + fix patch 998291 fix patch 1078934 expect check_ssh fix and + check_nt perfdata should stay on one word like in nagios + +2004-12-04 12:34 opensides + + * po/nagios-plugins.pot: + new version of pot file + +2004-12-04 12:31 opensides + + * plugins/check_by_ssh.c, plugins/check_dns.c, po/POTFILES.in: + various internationalization fixes + +2004-12-04 12:12 opensides + + * plugins/Makefile.am, plugins/check_by_ssh.c, plugins/check_dig.c, + plugins/check_http.c, plugins/check_ide-smart.c, + plugins/check_ide_smart.c, plugins/check_mrtg.c, + plugins/check_nt.c, plugins/check_nwstat.c, + plugins/check_overcr.c, plugins/check_real.c, + plugins/check_smtp.c, plugins/check_swap.c, plugins/check_tcp.c, + plugins/check_time.c, plugins/check_udp.c, po/POTFILES.in: + internationalization fixes bugfixes + +2004-12-04 10:57 opensides + + * plugins/: check_dns.c, check_hpjd.c: + check_dns needs a space between 'time' and the hostname + check_hpjd needs a parenthesis removed in print_usage() + +2004-12-04 00:23 opensides + + * plugins/check_swap.c: + Bug Fix [ 1024735 ] check_swap providing inaccurate swap + information on Sol6 + +2004-12-03 23:55 opensides + + * plugins/: check_by_ssh.c, check_dig.c, check_disk.c, check_dns.c, + check_fping.c, check_game.c, check_hpjd.c, check_http.c, + check_ldap.c, check_load.c, check_mrtg.c, check_mrtgtraf.c, + check_mysql.c, check_nagios.c, check_nt.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_udp.c, check_ups.c, check_users.c, negate.c: + reverting my changes from !=TRUE to == ERROR, that's not good ;-( + sorry + +2004-12-03 23:23 opensides + + * plugins/check_tcp.c, po/de.po, po/fr.po, po/nagios-plugins.pot: + check_tcp parenthesis bug, header fix for po files + +2004-12-03 23:01 opensides + + * plugins/: 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_mrtg.c, check_mrtgtraf.c, + check_nagios.c, check_nt.c, check_nwstat.c, check_overcr.c, + check_pgsql.c, check_procs.c, check_radius.c, check_real.c, + check_smtp.c, check_snmp.c, check_swap.c, check_tcp.c, + check_time.c, check_udp.c, check_ups.c: + print_help and print_usage() cleanup + + other misc cleanups + +2004-12-03 21:56 stanleyhopcroft + + * plugins/check_tcp.c: 1041571: -D option processing corrected + (Eric Chen). Changed process_arguments() to return TRUE. Dont + know why this was necessary. + +2004-12-03 20:28 opensides + + * plugins/: 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_nagios.c, + check_nt.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_udp.c, check_ups.c, + check_users.c, negate.c, urlize.c: remove UT_HLP_VRS from + print_usage this was not a good idea ;-) + +2004-12-03 19:20 opensides + + * plugins/utils.c: + removing support fonction removing warranty from print_revision + +2004-12-03 17:48 opensides + + * ROADMAP, package.def, plugins/negate.c, plugins/utils.h: + some minor fixes + +2004-12-03 17:15 opensides + + * plugins/: check_load.c, check_ssh.c: + correcting parenthesis error + +2004-12-03 16:56 opensides + + * AUTHORS, plugins/check_load.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_udp.c, plugins/check_ups.c, plugins/check_users.c, + plugins/urlize.c: + fixes for internationalization + +2004-12-03 11:45 opensides + + * plugins/: 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_nagios.c, + check_nt.c, check_nwstat.c: + internationalization fixes and help fixes + +2004-12-03 09:19 opensides + + * plugins/check_by_ssh.c, plugins/check_dig.c, + plugins/check_http.c, plugins/check_nwstat.c, + plugins/check_pgsql.c, plugins/check_ping.c, plugins/check_udp.c, + po/.cvsignore: + Localization fixes + +2004-12-03 08:45 opensides + + * plugins/: check_ide-smart.c, check_pgsql.c: + correcting copyright and remaning int result = STATE_UNKNOWN; + +2004-12-03 04:37 mattkent + + * plugins/check_nagios.c: Affected by elapsed time patch. + +2004-12-03 04:16 mattkent + + * AUTHORS: Another contributer. + +2004-12-03 04:10 mattkent + + * configure.in, plugins/check_procs.c: Patch from Russell Miller + which adds elapsed time as a metric. Only for linux so far. + (991359) + +2004-12-03 02:21 mattkent + + * plugins/check_ldap.c: Fix typo breaking compile. + +2004-12-03 00:55 opensides + + * plugins/: check_by_ssh.c, check_dig.c, check_dns.c, + check_dummy.c, check_fping.c, check_game.c, check_hpjd.c, + check_ide-smart.c, check_ldap.c, check_load.c, check_mrtg.c, + check_mrtgtraf.c, check_mysql.c, check_nagios.c, check_nt.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_udp.c, check_ups.c, check_users.c, negate.c, + urlize.c: + bump copyright year initialize result to STATE_UNKNOW in place of + STATE_OK + +2004-12-02 21:23 opensides + + * plugins/: check_dns.c, check_ldap.c, check_procs.c: + --disable-nls throws an error on check_dns, check_procs and + check_ldap without this patch. + +2004-12-02 21:03 stanleyhopcroft + + * plugins/check_tcp.c: Tracker 1041571: appended :D to + getopt_long() args (for cert expiry check). Eric Chen. + +2004-12-02 16:51 opensides + + * plugins/: check_by_ssh.c, check_dig.c, check_disk.c, check_dns.c, + check_fping.c, check_game.c, check_hpjd.c, check_http.c, + check_ldap.c, check_load.c, check_mrtg.c, check_mrtgtraf.c, + check_mysql.c, check_nagios.c, check_nt.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_udp.c, check_ups.c, check_users.c, negate.c, popen.c, + utils.c: + More internationalization work new usage4 function to permit + localisation of think like check_ssh: xxxxx + +2004-12-02 14:54 opensides + + * plugins/: check_by_ssh.c, check_dig.c, check_disk.c, check_dns.c, + check_fping.c, check_game.c, check_hpjd.c, check_ldap.c, + check_load.c, check_mrtg.c, check_mrtgtraf.c, check_mysql.c, + check_nagios.c, check_nt.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_udp.c, + check_ups.c, check_users.c, negate.c: + return of process_arguments() is TRUE not OK ! + +2004-12-02 14:35 opensides + + * plugins/check_http.c: return of process_arguments() is TRUE not + OK ! + +2004-12-02 08:45 stanleyhopcroft + + * plugins/Makefile.am: Add check_icmp plugin + +2004-12-02 08:44 stanleyhopcroft + + * plugins/check_icmp.c: check_icmp plugin from A Ericsson + +2004-12-02 08:44 stanleyhopcroft + + * plugins/linux.h: For check_icmp plugin from A Ericsson + +2004-12-02 04:48 mattkent + + * command.cfg.in: Fix typo. + +2004-12-02 04:36 mattkent + + * AUTHORS, REQUIREMENTS, command.cfg.in, plugins/check_ups.c: Patch + from Arnaud Quette to bring support to NUT 2.0 plus couple + improvements and fixes (1038413 which includes 1032009, 815785). + +2004-12-02 01:11 opensides + + * plugins/: check_dns.c, check_game.c, check_http.c, + check_ide-smart.c, check_load.c, check_mrtgtraf.c, check_mysql.c, + check_nagios.c, check_nt.c, check_nwstat.c, check_overcr.c, + check_pgsql.c, check_ping.c, check_procs.c, check_radius.c, + check_real.c, check_snmp.c, check_ssh.c, check_tcp.c, + check_time.c, check_udp.c, check_ups.c, negate.c, popen.c: + changed Error: by CRITICAL - more localization fixes + +2004-12-02 00:30 opensides + + * contrib/check_rbl.c: + adapted for localization + +2004-12-01 23:54 opensides + + * plugins/: 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_nagios.c, + check_nt.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_udp.c, check_ups.c, + check_users.c, common.h, getaddrinfo.c, getaddrinfo.h, + gethostbyname.c, gethostbyname.h, negate.c, netutils.c, + netutils.h, popen.c, urlize.c, utils.c, utils.h: + standardize localization string standardize unknow arguments + +2004-12-01 22:02 tonvoon + + * doc/RELEASING: Notes on releasing + +2004-12-01 21:55 tonvoon + + * configure.in: Next version number + +2004-12-01 21:01 tonvoon + + * ChangeLog: Updated for r1_4_0-alpha2 + +2004-12-01 20:43 tonvoon + + * tools/devmode: eval not working - instructions now in comments + +2004-12-01 20:09 tonvoon + + * plugins-scripts/check_oracle.sh: Fixed pmon process checking from + a change I made earlier + +2004-12-01 19:33 opensides + + * plugins/: check_by_ssh.c, check_dig.c, check_disk.c, check_dns.c, + check_fping.c, check_ssh.c: + first pass at standardization of messages for the localization + +2004-12-01 08:41 stanleyhopcroft + + * configure.in: Bryan Loniewski contributed check_jabber plugin + (SSL/check_tcp); Eric Chen check_nntps plugin + SSL certficate + expiry check [added -D option to check_tcp] + +2004-12-01 08:28 stanleyhopcroft + + * plugins/netutils.c: 1075725: patch to my_connect() to deal with + SEGV if connect fails + +2004-12-01 08:26 stanleyhopcroft + + * plugins/check_tcp.c: 1041571 & 664615: check_tcp with cert check + + nntps, simap, jabber + +2004-12-01 03:50 mattkent + + * contrib/check_nmap.py: Small fix from David Rippel (996800) for + newer versions of nmap + +2004-12-01 03:26 mattkent + + * plugins-scripts/check_oracle.sh: Perf data and other improvements + by Florian Gleixner (1027787) + +2004-11-30 07:40 opensides + + * po/fr.po: + more french translations + +2004-11-30 00:25 tonvoon + + * plugins/check_ide-smart.c: Capitalized some error messages + +2004-11-30 00:24 tonvoon + + * plugins/urlize.c: Updated output to UNKNOWN + +2004-11-30 00:21 opensides + + * po/fr.po: + translating fr.po new part + +2004-11-29 23:52 tonvoon + + * lib/: Makefile.am, exitfail.m4, getopt.m4: Extra files required + from coreutils + +2004-11-29 23:46 tonvoon + + * SUPPORT: Cleanup and statement re: contrib plugins + +2004-11-29 22:42 tonvoon + + * configure.in: Patches for configure on *BSD (Julien Touche) + +2004-11-29 05:07 stanleyhopcroft + + * contrib/: README.TXT, rblcheck-dns, rblcheck-web, + tarballs/check_icmp-0.8.tar.gz: [no log message] + +2004-11-29 04:49 mattkent + + * contrib/check_linux_raid.pl: Better error checking (820806) + +2004-11-29 00:56 opensides + + * po/fr.po: + second version of french .po still 300 ;-) to translate + +2004-11-28 22:57 opensides + + * po/fr.po: + first new translation of fr.po + +2004-11-27 21:00 mattkent + + * plugins/check_ssh.c: Add remote version check (1030269, Daniel + Gullin) + +2004-11-26 08:54 stanleyhopcroft + + * AUTHORS: New plugin/bugfix: tracker 1070929. check_hpjdres + +2004-11-25 05:09 mattkent + + * plugins/check_disk.c: From old test harness code, make + ./check_disk -w 0 -c 0 / valid parameters again + +2004-11-25 05:06 mattkent + + * test.pl.in, plugins/t/check_dns.t, plugins/t/check_http.t, + plugins/t/check_load.t, plugins/t/check_mysql.t: Updating test + harness + +2004-11-25 04:49 stanleyhopcroft + + * contrib/README.TXT: Removed reference to non existent tar balls + (Hopcroft plugins) + +2004-11-25 04:46 stanleyhopcroft + + * contrib/check_wins.pl: Non functional tidy ups to check_wins + +2004-11-25 04:30 stanleyhopcroft + + * contrib/check_hw.sh: Added /contrib/check_hw.sh by Rok Debevc + +2004-11-25 04:28 stanleyhopcroft + + * contrib/check_sybase: Added /contrib/check_sybase by Simon + Bellwood + +2004-11-25 03:01 stanleyhopcroft + + * contrib/check_hprsc.pl: update check_hprsc.pl for Net-SNMP + versions >=4 + +2004-11-24 21:34 tonvoon + + * tools/sfsnapshot: Removing build directory after creating + distribution + +2004-11-24 21:19 tonvoon + + * doc/makefile: Added clean + +2004-11-24 21:01 tonvoon + + * configure.in: Fix snapshot build on SF + +2004-11-24 06:36 stanleyhopcroft + + * plugins/check_hpjd.c: add -OQa to command_line in check_hpjd.c. + Correct nagiosplug-Bugs-889948, 846329 + +2004-11-24 04:35 mattkent + + * plugins/check_nwstat.c: Attempting to fix a reported segfault + (1055054) + +2004-11-24 04:25 mattkent + + * plugins/check_http.c: Added support for sending port in host + header (913633) + +2004-11-24 00:46 tonvoon + + * plugins/: 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_ldap.c, check_load.c, check_mrtg.c, + check_mrtgtraf.c, check_mysql.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_tcp.c, check_time.c, check_udp.c, check_ups.c, + check_users.c, negate.c, urlize.c: Making messages more + consistent + +2004-11-23 23:53 tonvoon + + * plugins/: check_hpjd.c, check_mrtg.c, check_mrtgtraf.c, + check_mysql.c, check_real.c, check_smtp.c, check_swap.c, + check_by_ssh.c, check_dns.c, check_time.c: Standardising + translation texts + +2004-11-23 23:35 tonvoon + + * doc/developer-guidelines.sgml: Guidelines on translated text + (Yves Mettier, Simon Bellwood, Andreas Ericsson) + +2004-11-23 22:49 tonvoon + + * doc/developer-guidelines.sgml: Adding notes on developer and + translator access in SF + +2004-11-23 06:06 mattkent + + * AUTHORS: More contributers. + +2004-11-23 05:49 mattkent + + * plugins/check_disk.c: Fix integer warning and critical options. + Take values from current unit instead of always KB. + +2004-11-23 00:06 stanleyhopcroft + + * doc/developer-guidelines.sgml: trivial changes to Perl plugin + section. + +2004-11-22 22:44 tonvoon + + * AUTHORS: More contributors + +2004-11-22 22:30 tonvoon + + * plugins/check_nt.c: Fixed some messages that should not be + translated (Benoit Mortier) + +2004-11-22 20:35 tonvoon + + * lib/getloadavg.m4: Not required - autoconf has own macros + +2004-11-21 05:24 mattkent + + * plugins/check_mysql.c: Patch from Nathan Shafer to add + replication slave check (1006777) + +2004-11-20 22:56 mattkent + + * AUTHORS: Oops, forgot one. + +2004-11-20 22:46 mattkent + + * AUTHORS: More contributers. + +2004-11-20 22:43 mattkent + + * contrib/check_linux_raid.pl: Fix always reading status from the + last line (1045506) + +2004-11-20 22:28 mattkent + + * plugins/check_ping.c: New output format reported by pumuckel1980 + (946857) + +2004-11-20 21:36 mattkent + + * plugins/check_http.c: Bit of cleanup, fix verbose output. + +2004-11-20 07:04 tonvoon + + * configure.in: Fixed va_copy problem on AIX by copying samba's + configure.in + +2004-11-19 15:58 tonvoon + + * CODING: Added perl coding guidelines, from Programming Perl book + (Andreas Ericsson) + +2004-11-19 14:28 tonvoon + + * lib/getloadavg.m4: I think getloadavg.m4 is no longer required + (as autoconf has built-in function) + +2004-11-19 14:24 tonvoon + + * lib/Makefile.am: Removed getloadavg.m4 (built-in function in + autoconf) and added cloexec.[hc] for getloadavg.c + +2004-11-19 14:22 tonvoon + + * lib/: cloexec.h, cloexec.c: Files required for getloadavg.c + +2004-11-19 03:59 mattkent + + * plugins-scripts/check_ntp.pl: Fix incorrectly labelled units in + output (1025905, Jason Martin) + +2004-11-19 03:44 mattkent + + * plugins/check_procs.c: Enabling timeout flag (1010097, Jason + Martin) + +2004-11-19 02:53 mattkent + + * plugins/check_http.c: Make -L notice ssl use to output a proper + href (1035234, Abid Rasheed) + +2004-11-19 02:39 mattkent + + * plugins/check_smtp.c: Change unit from 'us' to 's' to match other + core plugins for simplicity. + +2004-11-19 00:21 tonvoon + + * AUTHORS: - More great contributors... + +2004-11-19 00:12 tonvoon + + * plugins/check_http.c: Options for User Agent string and extra + headers (Ibere Tizio) + +2004-11-18 22:48 tonvoon + + * configure.in: Remove unnecessary CPPFLAGS for openssl (Lutz + Behnke - 686476) + +2004-11-18 22:42 tonvoon + + * plugins/check_tcp.c: Enhance SSL initialization problems (Phil + Dibowitz - 1055120) + +2004-11-18 05:36 mattkent + + * plugins/check_smtp.c: Go critical on no route to host instead of + warning (934025) + +2004-11-18 00:27 tonvoon + + * tools/setup: Use copy of tools for consistency if building on + different platforms from shared source + +2004-11-17 23:35 tonvoon + + * plugins/check_tcp.c: Ignore output from tcp port (949070 - + Jan-Piet Mens) + +2004-11-17 23:22 tonvoon + + * plugins/check_http.c: --no-body and --max-age options (949521 - + Jamie Zawinski) + +2004-11-17 22:19 tonvoon + + * doc/developer-guidelines.sgml: Added section on using + Sourceforge, mainly for administrators + +2004-11-12 00:51 tonvoon + + * tools/update_coreutils: Tool to pull newer coreutil libs into + nagiosplug's lib directory + +2004-11-12 00:49 tonvoon + + * lib/Makefile.am, lib/error.c, lib/error.h, lib/error.m4, + lib/exit.h, lib/exitfail.c, lib/exitfail.h, lib/fsusage.c, + lib/fsusage.h, lib/fsusage.m4, lib/full-read.h, lib/getloadavg.c, + lib/getopt.c, lib/getopt.h, lib/getopt1.c, lib/gettext.h, + lib/ls-mntd-fs.m4, lib/malloc.c, lib/mountlist.c, + lib/mountlist.h, lib/onceonly.m4, lib/realloc.c, lib/snprintf.c, + lib/strtod.c, lib/unlocked-io.h, lib/unlocked-io.m4, + lib/xalloc.h, lib/xalloc.m4, lib/xmalloc.c, lib/xstrdup.c, + plugins/check_disk.c, po/de.po, po/fr.po: Update to using + coreutils 5.2.1 libraries and snprintf.c from samba 3.0.8 + +2004-09-07 21:27 tonvoon + + * doc/developer-guidelines.sgml: Clarity based on comments by Ben + Clewett + +2004-08-23 22:59 tonvoon + + * AUTHORS: For patch to check_nt + +2004-08-23 22:58 tonvoon + + * plugins/check_nt.c: Restore divisor for memory size reported by + Windows. Also, implements warning and critical levels for + performance counters. (Paulo Afonso Graner Fessel) + +2004-08-23 22:18 tonvoon + + * configure.in, plugins/check_swap.c, plugins/common.h: Using + swapctl for Solaris, Tru64 and *BSD (Sean Finney) + +2004-08-19 20:05 tonvoon + + * configure.in, plugins/check_swap.c, plugins/common.h: Patch for + tru64 using swapctl calls (Sean Finney) + +2004-08-18 22:32 tonvoon + + * AUTHORS: Another day's work... + +2004-08-18 22:25 tonvoon + + * plugins/check_dig.c: Checks different record types and checks + against an expected address (Bill Kunkel) + +2004-08-18 21:36 tonvoon + + * configure.in: Support for check_swap on NetBSD/OpenBSD (Sean + Finney) + +2004-08-18 21:25 tonvoon + + * plugins-scripts/check_oracle.sh: More specific test for sid (Paul + Allen) + +2004-08-18 21:21 tonvoon + + * plugins/check_disk.c: Fixed perfdata so that shows amount used + (Garry Cook) + +2004-08-18 20:51 tonvoon + + * plugins-scripts/check_ifstatus.pl: Perfdata corrected (Garry + Cook) + +2004-08-18 20:46 tonvoon + + * plugins-scripts/check_oracle.sh: Fix for similar dataabase sids + (Carole Verdon) + +2004-08-18 20:41 tonvoon + + * AUTHORS: Gary Cook for perfdata for check_nt + +2004-08-18 20:40 tonvoon + + * plugins/check_nt.c: Perfdata added (Gary Cook) + +2004-06-26 17:39 tonvoon + + * tools/sfsnapshot: Change of compile server and cleanups + +2004-06-26 06:13 tonvoon + + * tools/sfsnapshot: Remove need to alter configure.in. Using + different compile farms for SF to do the compiling + +2004-05-24 15:22 tonvoon + + * AUTHORS: Ben Clewett + +2004-05-24 15:21 tonvoon + + * lib/Makefile.am: Missed getloadavg.c (Ben Clewett) + +2004-05-20 07:09 egalstad + + * contrib/check_dhcp.c: DHCP bug fix + +2004-05-10 11:25 tonvoon + + * configure.in: Set EXTRAS with check_swap if ac_cv_have_swap is + set + +2004-04-30 12:12 tonvoon + + * configure.in: ps -el for HP-UX + +2004-04-29 16:08 tonvoon + + * configure.in: Bug in ps -el for AIX 4.1 + +2004-04-29 12:13 tonvoon + + * AUTHORS: Sven for HP-UX requirements + +2004-04-29 12:12 tonvoon + + * REQUIREMENTS: HP-UX requirements (Sven Schaffranneck) + +2004-04-19 14:13 sghosh + + * contrib/check_nagios_db_pg.pl, AUTHORS: Postgres backend monitor + +2004-04-19 14:10 sghosh + + * AUTHORS, plugins-scripts/check_mssql.pl: check_mssql.pl + +2004-04-19 14:08 sghosh + + * README: Win32 plugin repository + +2004-04-08 12:05 tonvoon + + * AUTHORS: Torsten Werner for check_racle patches + +2004-04-08 12:05 tonvoon + + * plugins-scripts/check_oracle.sh: Cleaner calls to awk and support + if Oracle has different national language settings (Torsten + Werner) + +2004-04-08 11:50 tonvoon + + * plugins-scripts/check_oracle.sh: Cleaner calls to awk and support + if Oracle has different national language settings (Torsten + Werner) + +2004-04-06 17:02 tonvoon + + * configure.in, plugins/check_procs.c: Fixed weird scanf bug on + Solaris + +2004-04-02 20:37 kdebisschop + + * plugins/check_by_ssh.c: add example invocation to help + +2004-04-01 00:01 tonvoon + + * AUTHORS: Howard Wilkinson + +2004-03-31 23:53 tonvoon + + * plugins/check_nt.c: Command line argument bug (Howard Wilkinson) + +2004-03-31 23:48 tonvoon + + * plugins/netutils.c: Set default state (Howard Wilkinson) + +2004-03-31 20:20 tonvoon + + * doc/developer-guidelines.sgml: Update author list + +2004-03-23 06:35 kdebisschop + + * plugins/check_fping.c: check was supposed to be agains ms - got + munged wfixeg the perfdata output to be in seconds + +2004-03-22 07:25 tonvoon + + * plugins/check_http.c: Getopt bug (Joe Rhett) + +2004-03-22 07:22 tonvoon + + * AUTHORS: Joe Rhett for getopt bug + +2004-03-22 07:19 tonvoon + + * plugins/check_http.c: Option --url not mapped (Joe Rhett) + +2004-03-18 20:58 tonvoon + + * AUTHORS: More help for patches + +2004-03-18 20:50 tonvoon + + * plugins/check_disk.c: Typo in check_disk units (Matthew Kent - + 909281) + +2004-03-18 20:40 tonvoon + + * configure.in: Mysql include path not added correctly (Arnold + Cavazos - 912974) + +2004-03-18 20:37 tonvoon + + * configure.in: Mysql include path not added correctly (Arnold + Cavazos - 912974) + +2004-03-18 20:31 tonvoon + + * plugins/check_radius.c: Option to fill in NAS-identifier to + Emulate pam_radius behaviour (Alexander Kulak) + +2004-03-17 20:38 tonvoon + + * doc/developer-guidelines.sgml: Copyright information for patches + +2004-03-14 04:09 kdebisschop + + * plugins/: check_ldap.c, check_load.c, check_mrtgtraf.c, + check_pgsql.c, check_smtp.c, check_tcp.c, check_ups.c: use + fperfdata + +2004-03-14 03:37 kdebisschop + + * plugins/check_fping.c: use fperfdata + +2004-03-12 03:40 egalstad + + * contrib/check_cluster2.c: New cluster plugin for Nagios 2.x + +2004-03-11 15:33 tonvoon + + * CHANGES: check_procs difference + +2004-03-11 15:17 tonvoon + + * plugins/check_nagios.c: Incorporate check_proc changes into + check_nagios. ps handling probably should be moved into utils.c + in future + +2004-03-08 21:03 tonvoon + + * configure.in: Require ngettext + +2004-03-08 21:01 tonvoon + + * doc/developer-guidelines.sgml: Information on plugin output + format + +2004-03-04 05:08 kdebisschop + + * plugins/: check_dig.c, check_dns.c, check_game.c: use float for + time in perf data + +2004-03-03 12:33 kdebisschop + + * plugins/: check_http.c, utils.c: begin writing some perfdata as + float + +2004-03-03 04:24 kdebisschop + + * contrib/check_pop3.pl: fix loop and \r\n (Jason Burnett - + http://sourceforge.net/tracker/index.php?func=detail&aid=895677&group_id=29880&atid=397599) + +2004-03-03 03:48 kdebisschop + + * plugins/check_disk.c: check_disk was getting blocks instead of + bytes (Michael Musikhin - + http://sourceforge.net/tracker/index.php?func=detail&aid=900215&group_id=29880&atid=397599) + +2004-03-02 17:44 kdebisschop + + * pkg/redhat/requires: attempt to prune requires + +2004-03-02 06:17 kdebisschop + + * Makefile.am, nagios-plugins.spec.in: make specfile into a + template which can generate a generic spec plus specs suitable + for various repositories + +2004-03-02 06:13 kdebisschop + + * configure.in: prpare for alpha2 + +2004-03-02 05:25 kdebisschop + + * plugins/check_http.c: relax check for -w/-c to accept floats (bug + report from Warrick FitzGerald) + +2004-03-02 05:01 kdebisschop + + * AUTHORS, plugins/check_swap.c: fix div by zero error when + swaptotal is zero (Flo Gleixner) + +2004-03-01 12:27 kdebisschop + + * plugins/: check_tcp.c, netutils.c: check_tcp was returning + uninitialized string with user-defined refused outcome + +2004-03-01 06:15 kdebisschop + + * plugins/check_smtp.c: allow regex for ecpect checks + +2004-02-29 04:09 kdebisschop + + * plugins/: check_nwstat.c, netutils.c, netutils.h: was making up + to 34 separate tcp connections - now we open one and reuse + +2004-02-28 07:27 kdebisschop + + * plugins/check_snmp.c: checks for warn in check_num() mistakenly + referred to crit limits + +2004-02-28 06:51 kdebisschop + + * plugins/check_smtp.c: minor doco update to reflect handling of + repeated caoomand strings + +2004-02-28 06:48 kdebisschop + + * plugins/check_smtp.c: work in progress to accept multiple + command/expect pairs + +2004-02-28 04:54 kdebisschop + + * plugins/check_swap.c: update to work with Linux 2.6 /proc/meminfo + format + +2004-02-25 08:50 kdebisschop + + * AUTHORS, plugins/check_dns.c: check server for authoritative + status (from Jon Hallet) + +2004-02-25 08:12 kdebisschop + + * plugins/check_swap.c: change some datatypes to llu for very large + swaps + +2004-02-25 07:49 kdebisschop + + * configure.in, plugins/check_ping.c: pass timeout to ping if + supported with -w parameter (linux) + +2004-02-21 05:37 kdebisschop + + * plugins/check_by_ssh.c: add option to ignore a specified number + of lines on stderr (to suppress a login banner) + +2004-02-21 03:50 kdebisschop + + * plugins-scripts/check_breeze.pl: add $opt_C to 'use vars' (report + 882381 and patch form Jason Martin) + +2004-02-21 03:44 kdebisschop + + * AUTHORS: Add Jason Martin for report of missing $opt_C for 'use + vars' in check_breeze + +2004-02-21 03:42 kdebisschop + + * plugins-scripts/check_breeze.pl: add opt_C to 'usr vars' + +2004-02-20 19:35 tonvoon + + * plugins/check_http.c: - Missed out getopt for -T + +2004-02-20 05:25 kdebisschop + + * contrib/check_dhcp.c, contrib/check_procl.sh, + plugins/check_snmp.c, plugins/negate.c, plugins/netutils.c, + plugins/urlize.c: spell fix "received" + +2004-02-20 05:22 kdebisschop + + * plugins/check_snmp.c, plugins/negate.c, plugins/netutils.c, + plugins/urlize.c, contrib/check_dhcp.c: spell fix "received" + +2004-02-20 05:21 kdebisschop + + * plugins/: utils.c, utils.h: add perfdata function for floats to + complement ints, also spell fix "received" + +2004-02-20 05:19 kdebisschop + + * AUTHORS: add Ralph Rye for report of check_procs segfault on + AIX/WebSphere and proof-of-concept patch + +2004-02-20 05:04 kdebisschop + + * plugins/check_procs.c: handle case where line from ps output + exceed MAX_INPUT_BUFFER + +2004-02-20 03:37 tonvoon + + * AUTHORS: Shaun Wills for patch to check_http + +2004-02-20 03:21 tonvoon + + * plugins/check_http.c: Added Content-type when POSTing (Shawn + Wills) + +2004-02-20 03:00 tonvoon + + * plugins/check_procs.c: - compiler warning removed (but usage2 + messages badly broken) + +2004-02-20 02:58 tonvoon + + * AUTHORS: Matt Pounsett for bug report + +2004-02-20 02:09 tonvoon + + * plugins/check_dns.c: Different text to scan for if multiple + addresses + +2004-02-20 01:05 tonvoon + + * plugins/check_swap.c: Corrected usage message (Matt Pounsett) + +2004-02-19 13:24 tonvoon + + * AUTHORS: Michael Musikhin for check_disk patch + +2004-02-19 13:23 tonvoon + + * plugins/check_disk.c: Uninitialised variables for -X (Bug 900091 + - Michael Musikhin) + +2004-02-18 14:57 kdebisschop + + * configure.in: version bump (old) + +2004-02-18 14:56 kdebisschop + + * acinclude.m4, lib/afs.m4, lib/fstypename.m4, lib/fsusage.m4: + underquoted defines cause warning on FC2 + +2004-02-18 02:11 tonvoon + + * AUTHORS: Johannes Herlitz for patch to check_dns + +2004-02-18 02:09 tonvoon + + * plugins/check_dns.c: Output message includes the query_address, + as inspired by Johannes Herlitz. Also cleanup of comments and + handles multi-line nslookup output (MacOSX 10.3) + +2004-02-17 13:24 tonvoon + + * AUTHORS: David Alden for check_snmp_procs.pl + +2004-02-17 13:23 tonvoon + + * contrib/check_snmp_procs.pl: Checks remote processes via SNMP + (David Alden) + +2004-02-09 08:32 tonvoon + + * AUTHORS: Patrick McCormick + +2004-02-09 08:27 tonvoon + + * plugins/check_ping.c: Fix for check_ping old-style argument + handling (Patrick McCormick - 892211) + +2004-01-28 11:42 tonvoon + + * plugins/check_dummy.c: Print optional text + +2004-01-21 12:50 kdebisschop + + * AUTHORS: credit David Croft (patch check_tcp formultibyte malloc + bug in server_expect) + +2004-01-21 12:49 kdebisschop + + * plugins/check_tcp.c: =fix segfault on malloc of server_expect for + multibyte chars (David Croft) + +2004-01-21 12:46 kdebisschop + + * AUTHORS: credit David Croft (patch check_tcp formultibyte malloc + bug in server_expect) + +2004-01-21 12:45 kdebisschop + + * plugins/check_tcp.c: =fix segfault on malloc of server_expect for + multibyte chars (David Croft) + +2004-01-18 20:07 sghosh + + * contrib/check_snmp_printer.pl: plugin to check printer status via + snmp, includes page count as perfdata; perl plugin + +2003-12-24 08:51 tonvoon + + * AUTHORS: Bug reporter + +2003-12-24 08:51 tonvoon + + * plugins/check_swap.c: Fixed help doc on use of % (854817 - Gunnar + Hellekson) + +2003-12-18 09:24 tonvoon + + * README: Reference to CHANGES file + +2003-12-18 09:19 tonvoon + + * Makefile.am: Add CHANGES file to distribution + +2003-12-18 09:15 tonvoon + + * CHANGES: List major changes between releases + +2003-12-11 10:00 tonvoon + + * AUTHORS: For patch to check_http + +2003-12-11 10:00 tonvoon + + * plugins/check_http.c: Relative redirects not followed correctly + (854131 - John Sivak) + +2003-12-05 18:12 tonvoon + + * AUTHORS: Ben Whaley for reported Solaris 8 /usr/ucb/ps problem in + configure.in + +2003-12-05 18:08 tonvoon + + * configure.in: Not correctly working out ps command if /usr/ucb + before /usr/bin in PATH for Solaris (reported by Ben Whaley) + +2003-12-05 16:45 tonvoon + + * AUTHORS: Patch to my_connect + +2003-12-05 16:42 tonvoon + + * plugins/: netutils.c, netutils.h: Fix clash of namespace for + my_connect with mysql (854339 - Ian Holsman) + +2003-12-02 15:27 tonvoon + + * plugins/check_disk.c: Default thresholds not defined for lists in + -x parameter (raised by Matt Garrett) + +2003-12-01 02:47 kdebisschop + + * po/: de.po, fr.po: commit changes caused by upstream code mods + +2003-12-01 02:46 kdebisschop + + * plugins/check_procs.c: use usage2 function + +2003-12-01 02:38 kdebisschop + + * nagios-plugins.spec.in: add THANKS to %doc + +2003-11-28 14:18 tonvoon + + * plugins/check_procs.c: Fixed listing of failed processes + +2003-11-24 14:56 tonvoon + + * AUTHORS: For patches + +2003-11-24 14:53 tonvoon + + * plugins/check_hpjd.c: Bug from code-clean (Antony Simmonds - + 846311) + +2003-11-21 07:53 kdebisschop + + * README: update auotmake/autoconf versions + +2003-11-21 07:52 kdebisschop + + * doc/developer-guidelines.sgml: update developer names + +2003-11-21 07:34 kdebisschop + + * INSTALLING: our policy now is to use most recent versions of GNU + tool chain + +2003-11-19 06:24 kdebisschop + + * plugins/check_time.c: add perfdata + +2003-11-19 06:00 kdebisschop + + * plugins/check_smtp.c: use perfdata() to return perfoamnace data + in stanadrd format + +2003-11-17 11:45 kdebisschop + + * plugins/check_ups.c: bugfix - each supported option was + overwriting the previous perfdata + +2003-11-17 07:19 kdebisschop + + * plugins/check_ups.c: add perfdata + +2003-11-17 06:37 kdebisschop + + * plugins/check_pgsql.c: add perfdata + +2003-11-12 06:05 kdebisschop + + * plugins/check_snmp.c: clean up compiler warnings + +2003-11-12 05:53 kdebisschop + + * plugins/check_nt.c: clean up compiler warnings + +2003-11-12 05:48 kdebisschop + + * plugins/check_mrtg.c: clean up compiler warnings + +2003-11-12 05:41 kdebisschop + + * plugins/check_mrtgtraf.c: clean up compiler warnings + +2003-11-12 05:37 kdebisschop + + * plugins/check_swap.c: clean up compiler warnings + +2003-11-12 05:29 kdebisschop + + * plugins/check_mrtgtraf.c: add perfdata + +2003-11-12 05:28 kdebisschop + + * plugins/check_dig.c: remove overflow checks of strtod - HUGE_VALF + requires C99; also remove equality checks on warn/crit interval + which are no doubles + +2003-11-11 10:43 tonvoon + + * plugins/check_tcp.c: Added perfdata + +2003-11-11 10:34 tonvoon + + * plugins/check_users.c: Added perfdata + +2003-11-11 10:27 tonvoon + + * plugins/check_swap.c: Added perfdata + +2003-11-11 10:19 tonvoon + + * plugins/check_swap.c: Fixed if only absolute warn/crit set + +2003-11-10 11:15 tonvoon + + * plugins/utils.h: - typo fixes + +2003-11-05 22:59 sghosh + + * plugins-scripts/: check_ifoperstatus.pl, check_ifstatus.pl: + added plugin timeout options + +2003-10-31 04:22 kdebisschop + + * plugins/check_nt.c: provide an error message + +2003-10-31 04:21 kdebisschop + + * plugins/check_hpjd.c: line indentation + +2003-10-31 04:20 kdebisschop + + * plugins/check_load.c: add perfdata + +2003-10-31 04:19 kdebisschop + + * plugins/check_mrtg.c: add perf data fix bug where stale data + message would get overwritten + +2003-10-24 14:28 tonvoon + + * plugins/common.h: Ignore __attribute__ for non-GNU compilers + +2003-10-24 10:37 tonvoon + + * plugins/Makefile.am: Moved config.h to toplevel + +2003-10-23 11:24 tonvoon + + * lib/Makefile.am: Need to include intl/ for systems without + libintl.h + +2003-10-21 17:16 tonvoon + + * AUTHORS: Matt Garrett for bug reports + +2003-10-21 16:56 tonvoon + + * plugins-scripts/check_file_age.pl: - Fixed file name (Matt + Garrett) + +2003-10-20 15:03 tonvoon + + * configure.in, lib/fsusage.c, lib/mountlist.c: Fix for config.h at + top level. Required for intl/ + +2003-10-15 20:27 tonvoon + + * tools/mail_error: Need to export PATH for sfsnapshot to get + correct GNU toolchain + +2003-10-14 04:15 sghosh + + * plugins-scripts/check_ifoperstatus.pl: snmpv3 patches + +2003-10-14 04:14 sghosh + + * plugins-scripts/check_ifstatus.pl: more snmpv3 patches + +2003-10-14 03:40 sghosh + + * plugins-scripts/check_ntp.pl: Bug 773588: added check to warn on + matching # candidates only + +2003-10-14 03:15 sghosh + + * plugins-scripts/check_ifstatus.pl: Added -M for maxmsgsize + (v1/v2c) Added v3 support + +2003-09-30 14:54 tonvoon + + * plugins/check_swap.c: Fixed logic problem if HAVE_SWAP, but not + on AIX or Solaris. Removed unnecessary ifdefs for help page. + Better indentation for ifdefs + +2003-09-29 11:02 tonvoon + + * lib/Makefile.am: Missed GNU files for AIX 5.1 + +2003-09-17 20:16 tonvoon + + * AUTHORS: Added authors of obsolete contrib plugins + +2003-09-17 20:07 tonvoon + + * contrib/maser-oracle.pl: Obsolete from main check_oracle + +2003-09-17 20:05 tonvoon + + * contrib/aix/: check_crit_dsk, check_dsk, check_ping: Plugins + obsolete from main check_disk and check_ping + +2003-09-17 17:33 tonvoon + + * lib/strtod.c: Required if strtod not GNU compilant + +2003-09-17 17:31 tonvoon + + * configure.in, lib/Makefile.am, lib/error.c, lib/error.h, + lib/error.m4, lib/malloc.c, lib/realloc.c, lib/unlocked-io.h, + lib/xalloc.h, lib/xmalloc.c: Support to compile on AIX + +2003-09-17 17:15 tonvoon + + * plugins/check_load.c: - typo + +2003-09-17 10:31 tonvoon + + * configure.in, plugins/check_swap.c: Support for check_swap in AIX + (tested on 5.1) + +2003-09-17 10:25 tonvoon + + * tools/setup: Hide error message if docbook not available + +2003-09-16 22:58 tonvoon + + * doc/developer-guidelines.sgml: Added in threshold range format + and updated autoconf to 2.54 for a problem on Darwin) + +2003-09-16 15:14 tonvoon + + * configure.in, plugins/Makefile.am, plugins/check_procs.c: Support + for AIX ps command and cleanup of configure's ps checks + +2003-09-16 13:32 tonvoon + + * AUTHORS, plugins/common.h: AIX problem with enum TRUE and FALSE + (Ludse Verhoeven) + +2003-09-16 12:36 kdebisschop + + * tools/sfsnapshot: here-doc format was not correct + +2003-09-16 06:45 kdebisschop + + * plugins/check_ldap.c: milisecond timing and perfdata, fix NULL + pointer error in validate_arguments + +2003-09-15 16:49 tonvoon + + * AUTHORS: Contributors to the perfdata discussion + +2003-09-15 16:28 tonvoon + + * AUTHORS, plugins-scripts/check_mailq.pl: Added Exim support + (768445 - Eric Bollengier) + +2003-09-15 15:57 tonvoon + + * AUTHORS, plugins/check_nt.c: Option to verify check_nt version + (799098 - Steve Hanselman) + +2003-09-15 15:30 tonvoon + + * AUTHORS: Jason Burnett for check_disk_smb patch + +2003-09-15 15:26 tonvoon + + * plugins-scripts/check_disk_smb.pl: Optionally specify port for + smbclient to use (781227 - Jason Burnett) + +2003-09-15 06:03 kdebisschop + + * plugins/check_http.c: make status code extensible (thanks to + Chris Wilson ) + +2003-09-12 12:53 kdebisschop + + * AUTHORS: two new additions + +2003-09-12 12:51 kdebisschop + + * plugins/check_ping.c: *new output format reported by Patrick + Allen , also move atrribution for + Richard Brodie to thanks file + +2003-09-12 12:38 kdebisschop + + * plugins/check_ping.c: new output format reported by Patrick Allen + + +2003-09-11 12:50 kdebisschop + + * plugins/check_http.c: use prefdata function for size too + +2003-09-11 09:02 kdebisschop + + * plugins/check_http.c: use prefdata function + +2003-09-11 09:02 kdebisschop + + * configure.in, plugins/check_swap.c: last changes to configure + broke check_swap on RHLinux. Restore /proc/meminfo check and make + check_swap ifdefs safer + +2003-09-04 07:43 kdebisschop + + * Makefile.am: change so make-dist works in subdirs + +2003-09-03 20:37 tonvoon + + * configure.in: Remove df checks and ignore swap checks if no swap + commands found + +2003-09-03 20:32 tonvoon + + * doc/developer-guidelines.sgml: No named credits in source code + +2003-09-03 11:32 tonvoon + + * configure.in: Fixed substitution for Tru64's ps format + +2003-09-03 07:01 kdebisschop + + * plugins/check_dig.c: allow warn/crit times to be floating point + +2003-09-03 07:00 kdebisschop + + * configure.in, plugins/common.h: include math.h if needed for + HUGE_VAL + +2003-09-02 16:04 tonvoon + + * plugins/check_procs.c: Solaris requires asprintf checks for null + variables + +2003-09-01 21:07 tonvoon + + * Makefile.am: Report duplicates in AUTHORS file + +2003-09-01 20:43 tonvoon + + * doc/developer-guidelines.sgml: Add contributor's name into CVS + comments + +2003-08-31 06:24 tonvoon + + * .cvsignore, AUTHORS, Makefile.am, THANKS.in: Updated AUTHORS to + include all contributors listed in comments in code and CVS for + plugins and plugins-scripts. Still need to do SF + +2003-08-31 06:13 tonvoon + + * doc/developer-guidelines.sgml: Updated perf data standard for + warn before crit + +2003-08-28 12:56 kdebisschop + + * plugins/check_game.c: add perf data + +2003-08-28 04:53 kdebisschop + + * plugins/check_dns.c: add perf data + +2003-08-28 04:53 kdebisschop + + * plugins/utils.c: use single quotes per guideline, also quote when + SPC or = are found + +2003-08-28 04:22 kdebisschop + + * plugins/check_disk.c: add perf data + +2003-08-28 04:21 kdebisschop + + * plugins/utils.c: suppress quotes in perf data when not needed + (some plugins need the space to keep below line length limit + +2003-08-28 04:20 kdebisschop + + * plugins/utils.h: add min() macro to complement max() + +2003-08-26 12:08 kdebisschop + + * plugins/check_dig.c: print perfdata + +2003-08-26 11:51 kdebisschop + + * plugins/check_fping.c: print perfdata + +2003-08-26 11:44 kdebisschop + + * plugins/: utils.c, utils.h: function to make perfdata output + +2003-08-23 16:07 kdebisschop + + * plugins/check_http.c: - found and fixed memory allocation error + in rewritten redir() function + +2003-08-23 14:59 kdebisschop + + * plugins/check_http.c: - hacked interim fix to segfault on + redirect - for tesing only + +2003-08-23 14:58 kdebisschop + + * plugins/check_dig.c: - fix various format errors with newly added + perf data + +2003-08-23 00:49 kdebisschop + + * plugins/check_dig.c: - forgot to declare struct timeval tv for + hires timing + +2003-08-22 07:55 kdebisschop + + * plugins/check_dig.c: - add perf data for time + +2003-08-22 07:22 kdebisschop + + * plugins/: 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_mysql.c, check_nagios.c, check_nt.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_udp.c, check_ups.c, check_users.c, negate.c, + urlize.c: - bindtextdomain for gettext, a few other smale + cleanups here and there + +2003-08-22 05:42 kdebisschop + + * plugins/: check_http.c: * bugfix: snprintf of timestamp truncated + '\0' + +2003-08-21 19:00 kdebisschop + + * plugins/check_http.c: * Check redirections for infinte loops and + limit depth of recursion + +2003-08-20 10:54 tonvoon + + * plugins/check_time.c: Optionally use udp instead of tcp (Bradley + Baetz - 751646) + +2003-08-20 09:31 tonvoon + + * contrib/check_wins.pl: Changed netsaint to nagios in use lib + +2003-08-19 12:41 kdebisschop + + * plugins/check_http.c: *BUGFIX: LWS is not required betwwen + "Location:" header field name and field value + +2003-08-19 12:19 kdebisschop + + * plugins/check_http.c: *add missing status numbers from RFC 2616 + (HTTP1.1) + +2003-08-18 12:05 kdebisschop + + * plugins/check_ping.c: move error scans to a new separate routine + and scan both stderr and stdio + +2003-08-11 20:50 tonvoon + + * doc/developer-guidelines.sgml: Performance data guidelines added + +2003-08-11 20:43 tonvoon + + * tools/sfsnapshot: Fixed building snapshots - cvs update ignores + new directories. Also do not need to run make + +2003-08-10 13:56 kdebisschop + + * plugins/utils.c: config.h is redundant (common.h includes it) + +2003-08-10 13:48 kdebisschop + + * plugins/: check_dns.c, check_smtp.c: perf data in integer + microseconds + +2003-08-10 13:12 kdebisschop + + * po/: POTFILES.in, de.po, fr.po: first pass at NLS markup done + +2003-08-10 13:11 kdebisschop + + * plugins-scripts/check_rpc.pl: proposed fix for LANG issue + +2003-08-10 07:53 kdebisschop + + * plugins/: check_by_ssh.c, check_dig.c, check_disk.c, check_dns.c, + check_fping.c, check_game.c, check_hpjd.c, check_http.c, + check_ldap.c, check_load.c, check_mrtg.c, check_mrtgtraf.c, + check_mysql.c, check_nagios.c, check_nt.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_udp.c, check_ups.c, check_users.c, negate.c, popen.c, + urlize.c: the last round of pedantic compiler warnings + +2003-08-09 14:37 kdebisschop + + * tools/devmode: a little shell script to make it a little easier + to produce pedantic compiler warnings + +2003-08-09 14:36 kdebisschop + + * plugins/: check_smtp.c, check_ssh.c, check_tcp.c, check_time.c, + check_udp.c, check_ups.c, check_users.c: more pedantic compiler + warnings + +2003-08-09 07:51 undrgrid + + * plugins/common.h, po/de.po, po/fr.po: Code clean-up + +2003-08-09 07:01 kdebisschop + + * plugins/: check_dig.c, check_http.c, check_load.c, check_mrtg.c, + check_mrtgtraf.c, check_nwstat.c, check_overcr.c, check_ping.c, + check_procs.c, check_real.c, utils.c, utils.h: more pedantic + compiler warns + +2003-08-09 05:19 kdebisschop + + * plugins/check_http.c: more pedantic compiler warns, change to + microsecond output for perf data, add size to perf data + +2003-08-09 05:12 kdebisschop + + * plugins/: utils.c, utils.h: add function for elapsed tim ein + microseconds + +2003-08-09 01:56 kdebisschop + + * plugins/check_http.c: more pedantic compiler warnings + +2003-08-09 01:41 kdebisschop + + * plugins/: check_disk.c, check_dummy.c, popen.c, utils.c, utils.h: + more pedantic compiler warnings + +2003-08-08 21:31 kdebisschop + + * lib/Makefile.am: include getloadvag.m4 in distrib + +2003-08-08 17:49 kdebisschop + + * plugins/: check_disk.c, netutils.c, netutils.h: cleanups from + pedantic complier warnings + +2003-08-08 17:48 kdebisschop + + * plugins/check_nt.c: change if/elseif block to case, general + streamline + +2003-08-08 13:14 kdebisschop + + * plugins/check_disk.c: fix a variety of compiler warnings about + qualifier discards and other pedantic stuff + +2003-08-08 06:09 kdebisschop + + * plugins/: check_by_ssh.c, check_dig.c, check_disk.c, + check_snmp.c, utils.c, utils.h: fix a variety of compiler + warnings about qualifier discards and other pedantic stuff + +2003-08-08 05:33 kdebisschop + + * plugins/: check_by_ssh.c, check_disk.c, check_nt.c, netutils.c, + netutils.h, popen.h, utils.h: fix a variety of compiler warnings + about qualifier discards and other pedantic stuff + +2003-08-08 04:51 kdebisschop + + * plugins/: check_nt.c, check_smtp.c: markup for translation + +2003-08-08 00:17 kdebisschop + + * plugins/check_real.c: markup for translation + +2003-08-07 13:36 kdebisschop + + * plugins/check_procs.c: markup for translation + +2003-08-07 13:09 kdebisschop + + * plugins/check_load.c: reorder for consistency, restore prototypes + for print_foo, nest #ifdef to avoid pedantic traditional c warn + +2003-08-07 13:00 kdebisschop + + * plugins/check_snmp.c: reorder for consistency (no code changes) + +2003-08-07 12:51 kdebisschop + + * plugins/: check_by_ssh.c, check_disk.c, check_dns.c, + check_fping.c, check_game.c, check_http.c, check_mrtg.c, + check_mrtgtraf.c, check_nagios.c, check_nt.c, check_nwstat.c, + check_overcr.c, check_radius.c, check_real.c, check_snmp.c, + check_swap.c, check_tcp.c, check_time.c, negate.c, netutils.c, + popen.c, utils.c, utils.h: replace "terminate" with "die" for + shorter name and better readability + +2003-08-07 12:49 kdebisschop + + * plugins/check_ping.c: cleanup for better readability + +2003-08-07 10:51 kdebisschop + + * plugins/check_ping.c: markup for translation + +2003-08-07 02:23 kdebisschop + + * tools/sfsnapshot: make must be run before make dist to creat + language files + +2003-08-06 21:53 tonvoon + + * doc/developer-guidelines.sgml: Added in that Nagios plugins are + written to GNU standards + +2003-08-06 15:26 kdebisschop + + * lib/.cvsignore: ignore ulonglong.m4 + +2003-08-06 13:13 kdebisschop + + * plugins/check_overcr.c: markup for translation, move send_buffer + assignment to process_args so process_tcp_request can be moved + outside the conditional, replace if/esleif with switch, replace + #defines with enum + +2003-08-06 13:11 kdebisschop + + * plugins/check_nwstat.c: markup for translation + +2003-08-05 20:20 tonvoon + + * doc/developer-guidelines.sgml: Added dev platform requirements + +2003-08-05 12:53 kdebisschop + + * plugins/check_ssh.c: markup for translation + +2003-08-05 10:56 stanleyhopcroft + + * contrib/check_mssql.sh: Version 2.0 of MS SQL server plugin + (contrib/check_mssql.sh) from T De Blende. + +2003-08-04 12:38 kdebisschop + + * plugins/: check_users.c, urlize.c: markup for translation + +2003-08-04 09:13 kdebisschop + + * plugins/: check_time.c, check_udp.c: markup for translation + +2003-08-04 08:42 kdebisschop + + * plugins/: check_ldap.c, check_nagios.c, check_radius.c, + check_udp.c, check_ups.c, negate.c: markup for translation + +2003-08-03 15:24 kdebisschop + + * plugins/: check_ldap.c, check_mrtg.c, check_mrtgtraf.c: markup + for translation + +2003-08-03 07:19 kdebisschop + + * plugins/check_load.c: markup for translation + +2003-08-03 07:05 kdebisschop + + * plugins/: check_http.c, check_ldap.c, check_tcp.c: markup for + translation + +2003-08-03 07:03 kdebisschop + + * plugins/: Makefile.am, check_ide-smart.c: markup for translation, + use common.h, fix problems compiling + +2003-08-03 07:02 kdebisschop + + * plugins/check_ldap.c: markup for translation + +2003-08-03 01:01 kdebisschop + + * plugins/check_http.c: markup for translation + +2003-08-02 23:19 kdebisschop + + * plugins/check_hpjd.c: markup for translation + +2003-08-02 23:08 kdebisschop + + * plugins/check_mysql.c: markup for translation + +2003-08-02 23:06 kdebisschop + + * plugins/: check_fping.c, check_game.c, check_mysql.c, + check_snmp.c, utils.h: markupf for translation + +2003-08-02 19:22 kdebisschop + + * plugins/: utils.c, utils.h: ifdef so utils.h can be header for + utils.c + +2003-08-02 19:22 kdebisschop + + * plugins/: check_fping.c, check_snmp.c: markup for translation + +2003-08-02 17:42 kdebisschop + + * plugins/: check_by_ssh.c, check_dig.c, check_disk.c, check_dns.c, + check_dummy.c, check_pgsql.c, check_swap.c, check_tcp.c, utils.h: + establish "UT_" namespace for usage text in #defines + +2003-08-02 17:42 kdebisschop + + * plugins/check_snmp.c: markup for translation + +2003-08-02 06:30 kdebisschop + + * plugins/check_dns.c: restore informative output that was lost in + previous bug fix + +2003-08-02 00:56 kdebisschop + + * plugins/check_dns.c: terminate in error_scan() so meaningfull + errors can be sent + +2003-08-01 07:04 kdebisschop + + * plugins/check_dummy.c: mark for transaltion + +2003-08-01 07:03 kdebisschop + + * plugins/check_dns.c: do not translate the strings that will be + compared to utility output - LC_ALL is set to C so those strings + should be untranslated regardless of the system settings + +2003-08-01 07:01 kdebisschop + + * plugins/popen.c: set LC_ALL to C in execve environemnt + +2003-08-01 03:11 kdebisschop + + * plugins/: Makefile.am: 'ln -f -s ...' is not reliable/portable. + Use 'rm -f ...; ln -s ...' + +2003-07-31 13:06 kdebisschop + + * plugins/check_dns.c: mark for translation (note problem here - it + relies on tranalation in underlying utility, which has a high + chance of failing) + +2003-07-31 12:02 kdebisschop + + * plugins/: utils.h, check_disk.c: mark for translation + +2003-07-30 12:39 kdebisschop + + * plugins/check_by_ssh.c: mark up for translation + +2003-07-30 05:07 kdebisschop + + * plugins/: check_dig.c, check_pgsql.c, check_swap.c, check_tcp.c, + utils.h: markup for translation + +2003-07-29 12:58 kdebisschop + + * plugins/: check_pgsql.c, check_swap.c, check_tcp.c: mark for + translation + +2003-07-29 12:57 kdebisschop + + * plugins/utils.h: some shared text for internationalized help text + +2003-07-29 06:49 kdebisschop + + * plugins/utils.c: clean up warnings about ill-formed comment and + string concatenation + +2003-07-29 06:43 kdebisschop + + * .cvsignore, ChangeLog, README, configure.in, lib/Makefile.am: + bump to gettext 0.11.5 and cleanup GNU toolchain + +2003-07-29 06:38 kdebisschop + + * ABOUT-NLS, INSTALL: get from GNU files instead of storing in CVS + +2003-07-29 06:03 kdebisschop + + * tools/setup: move autopoint to start of gnu toolchain setup use + --force-missing instead on manually copying files (manual + process was broken on RedHat, and we should expect automake to do + its job right anyway) + +2003-07-29 04:06 kdebisschop + + * configure.in: look for getloadavg.c in $topdir/lib, not + $srcdir/lib + +2003-07-29 04:04 kdebisschop + + * plugins/: check_http.c: patch attempt to reference undefined + optarg (credit Paul Farrall) + +2003-07-29 04:03 kdebisschop + + * configure.in: look for getloadavg.c in $topdir/lib, not + $srcdir/lib + +2003-07-28 12:36 tonvoon + + * configure.in: - Specify srcdir so no confusion + +2003-07-28 12:34 tonvoon + + * configure.in, lib/getloadavg.m4: Fixes Redhat 6.2 compiles for + getloadavg.o + +2003-07-28 12:30 tonvoon + + * configure.in, lib/getloadavg.m4: Readded getloadavg.m4 as using + autoconf 2.50+. This fixes redhat 6.2 compiles + +2003-07-26 13:15 kdebisschop + + * plugins/check_pgsql.c: mark for translation + +2003-07-26 13:13 kdebisschop + + * plugins/common.h: add S_ macor to mark message for both + translation and inclusion into docbook SGML + +2003-07-26 06:29 kdebisschop + + * po/: de.po, fr.po: updated check_tcp + +2003-07-26 06:25 kdebisschop + + * plugins/check_tcp.c, po/ChangeLog: internationalization + +2003-07-26 06:17 kdebisschop + + * po/.cvsignore, intl/.cvsignore, lib/.cvsignore: skip gettext + files + +2003-07-26 05:33 kdebisschop + + * lib/: Makefile.am: checkins for internationalization + +2003-07-26 05:25 kdebisschop + + * po/Makevars: checkins for internationalization + +2003-07-26 05:17 kdebisschop + + * lib/gettext.h: checkins for internationalization + +2003-07-26 05:14 kdebisschop + + * tools/setup: checkins for internationalization + +2003-07-26 05:09 kdebisschop + + * configure.in, ABOUT-NLS, po/de.po, po/fr.po: checkins for + internationalization + +2003-07-26 05:06 kdebisschop + + * .cvsignore, ChangeLog, Makefile.am, configure.in, + nagios-plugins.spec.in, lib/Makefile.am, plugins/Makefile.am, + plugins/check_tcp.c, plugins/common.h, plugins/utils.c, + po/LINGUAS, po/POTFILES.in, tools/setup: checkins for + internationalization + +2003-07-21 13:06 kdebisschop + + * plugins/common.h: add stubs to allow markup for translation + +2003-07-21 12:53 kdebisschop + + * configure.in, plugins/common.h: test GNU_SOURCE and include + features.h if present to clear warning about asprintf definition + +2003-07-20 15:40 kdebisschop + + * doc/developer-guidelines.sgml: must use '&' in attribute + values instead of '&' id tokens (attibute values) must not have + embedded spaces + +2003-07-20 15:01 kdebisschop + + * nagios-plugins.spec.in: was needed for build on RH9 + +2003-07-17 13:14 tonvoon + + * plugins-scripts/check_oracle.sh: - Cleanup comments + +2003-07-17 10:35 tonvoon + + * doc/developer-guidelines.sgml: Guidelines updated to use + Sourceforge tracker system + +2003-07-11 23:20 tonvoon + + * doc/developer-guidelines.sgml: - Fixed CVS commit comments + +2003-07-11 14:06 tonvoon + + * doc/developer-guidelines.sgml: Added in practice of prefixing + comments in CVS commits + +2003-07-11 07:30 kdebisschop + + * ChangeLog: Auto Update from CVS (includes both stabel and devel - + ugh) + +2003-07-11 07:12 kdebisschop + + * configure.in, plugins/Makefile.am: link check_spop and + check_simap if ssl libs are compiled into check_tcp + +2003-07-04 11:42 kdebisschop + + * configure.in, plugins/Makefile.am: only make links for check_spop + and check_simap when SSL is built into check_tcp + +2003-07-03 17:49 tonvoon + + * plugins/check_procs.c: Fixed seg fault on some Sol 7/8 servers + (Patch 764745 - Alexander Matey) + +2003-07-03 16:00 tonvoon + + * tools/setup: Changing $() to `` to be compatible with Solaris' sh + +2003-07-03 04:23 kdebisschop + + * autogen.sh, tools/setup: mv GNU toolchain check into tools/setup + +2003-07-03 04:19 kdebisschop + + * plugins/utils.c: remove LABELLEN + +2003-07-02 17:20 tonvoon + + * plugins-scripts/: check_oracle.sh: Check for ORA- errors for + tablespace and cache (patch 755456 - Sven Meyer) + +2003-07-02 16:57 tonvoon + + * plugins-scripts/check_disk_smb.pl: Update error message from + smbclient v2.2.7 (Patch 740132 - Cove Schneider) + +2003-07-02 16:52 tonvoon + + * plugins-scripts/check_disk_smb.pl: Update error message from + smbclient v2.2.7 (Patch 740132 - Cove Schneider) + +2003-07-02 16:01 tonvoon + + * contrib/check_file_age.pl, plugins-scripts/.cvsignore, + plugins-scripts/Makefile.am, plugins-scripts/check_file_age.pl, + plugins-scripts/subst.in: Moving check_file_age into core + +2003-07-02 15:39 tonvoon + + * configure.in: Fixed SUPPORT message + +2003-07-01 10:27 tonvoon + + * plugins/check_disk.c: Fix for large filesystems > 3TB (Stuart + Webster) + +2003-06-30 20:47 undrgrid + + * plugins/: check_http.c, check_ldap.c, check_smtp.c: Added -4 and + -6 command line options into check_http, check_ldap and + check_smtp + +2003-06-30 19:52 undrgrid + + * plugins/: check_ping.c, check_ssh.c, check_tcp.c, netutils.c: + Corrections to get code to compile on systems without IPv6 + support + +2003-06-30 19:52 undrgrid + + * plugins/Makefile.am: Added check_simap & check_spop to + check_tcp_programs If someone knows how to make this conditional + in the Makefile only if being compiled with SSL I think this is + the only way to make it better + +2003-06-30 18:02 tonvoon + + * plugins/check_disk.c: Fixed support for "check_disk warn crit + [path]" with thresholds at used levels + +2003-06-29 20:54 undrgrid + + * configure.in, plugins/check_ldap.c: Included patch for check_ldap + from Patch #753621 by Ziya Suzen + +2003-06-29 20:22 undrgrid + + * plugins/: check_ping.c, check_tcp.c: Changed usage output to show + -4 and -6 are mutually exclusive. You can only use one or + the other but not both. The last one used will win out. + +2003-06-29 20:17 undrgrid + + * plugins/: check_ping.c, netutils.c: check_ping is now coded with + -4 & -6 options to call PING or PING6 command netutils modified + to verify hosts based on address_family setting when used with + -4 or -6 options. is_inet_addr() will not be tested if -6 is + used and is_inet6_addr() will not be tested if -4 is used. Also + the is_hostname() will use the address_family value to + resolve hostnames only if IPv6 support is available otherwise + defaults to AF_INET. + +2003-06-29 07:36 undrgrid + + * plugins/: check_ssh.c, check_tcp.c, netutils.c, netutils.h: Added + address_family extern int variable to netutils to allow for -4 & + -6 options for explicit connection protocol Added support + for -4 & -6 options to check_ssh and check_tcp for testing + +2003-06-29 03:18 tonvoon + + * plugins/check_nwstat.c: Added NLM test (Phil Randal) + +2003-06-29 02:52 tonvoon + + * plugins/check_swap.c: Corrected reported size for PROC_MEMINFO + systems + +2003-06-29 02:36 tonvoon + + * tools/sfwebcron: Fixed so goes to correct web area + +2003-06-29 02:07 tonvoon + + * tools/sfwebcron: New tool to run on shell.sf.net to update the + dev guidelines + +2003-06-29 01:58 tonvoon + + * doc/makefile: Fixed makefile + +2003-06-27 19:47 undrgrid + + * plugins/netutils.c: Modified my_connect to include ai_socktype in + the hints to be compliant with RFC3493 as pointed out by Janos + Mohacsi. + +2003-06-27 15:43 tonvoon + + * configure.in, plugins/check_swap.c: Support for swap -s for + solaris. Also changes size of swap to MBs through a conversion + amount in configure. Possible breakage on other OSes + +2003-06-27 13:04 tonvoon + + * doc/makefile: Remove if which check - done in tools/setup instead + +2003-06-27 11:30 tonvoon + + * tools/setup: Fiddling as Solaris' which command is broken + +2003-06-27 00:33 tonvoon + + * plugins/check_disk.c: Fixed different thresholds if using exclude + lists + +2003-06-25 16:43 tonvoon + + * plugins/check_disk.c: Support for different thresholds for + different filesystems + +2003-06-25 14:38 tonvoon + + * plugins/check_disk.c: Removed -d option and just check against -p + parameter + +2003-06-25 14:28 tonvoon + + * plugins/check_disk.c: Report errors if path specified not found + +2003-06-25 14:16 tonvoon + + * plugins/check_disk.c: Problems compiling on SunOS 5.6 with gcc + 2.8.1. Fixed by specifying floating variables, rather than + letting asprintf work it out + +2003-06-25 13:38 tonvoon + + * plugins/check_disk.c: Returns critical if fs missing. Only works + for single fs specified in -p, otherwise will return warning as + before (reported by Jim Carroll) + +2003-06-21 06:49 kdebisschop + + * plugins/Makefile.am: soalris 8 needs 'ln -s -f' instead of 'ln + -sf' + +2003-06-21 06:48 kdebisschop + + * plugins/Makefile.am: solaris 8 needs 'ln -s -f' instead of 'ln + -sf' + +2003-06-21 06:31 kdebisschop + + * plugins/check_http.c: fix character class for URI_PATH and + URI_PORT + +2003-06-21 06:23 kdebisschop + + * plugins/check_http.c: add remaining URI_PATH chars per RFC 2396 + remove '-' from URI_PORT + +2003-06-12 05:44 undrgrid + + * command.cfg.in: Renamed duplicate check_snmp command definitions + to be unique + +2003-06-12 05:14 undrgrid + + * command.cfg.in, configure.in: Made the two check_ifoperstatus + commands unique to remove conflicts + +2003-06-11 11:41 kdebisschop + + * plugins/check_http.c: fix URI_PATH to allow ?&#: (more still + should be allowed) fix class to be POSIX compliant + +2003-06-11 11:39 kdebisschop + + * plugins/check_http.c: character classes were wrong for URI_PATH + etc: 1) must include ?&#; for PATH 2) POSIX states "If a '-' is + in the scanlist and is not the first character, nor the second + where the first character is a '^' , nor the last character, the + behavior is implementation-defined" + +2003-06-10 06:04 kdebisschop + + * contrib/urlize.pl: add comment about shell quote removal to + address + https://sourceforge.net/tracker/index.php?func=detail&aid=661916&group_id=29880&atid=397597 + +2003-06-10 06:02 kdebisschop + + * plugins/urlize.c: add note about shell quote removal to address + https://sourceforge.net/tracker/index.php?func=detail&aid=661916&group_id=29880&atid=397597 + +2003-06-10 05:55 kdebisschop + + * contrib/urlize.pl: add comment relating to + https://sourceforge.net/tracker/index.php?func=detail&aid=661916&group_id=29880&atid=397597 + +2003-06-10 05:53 kdebisschop + + * plugins/urlize.c: add note about effect of shell quote handling + to address + https://sourceforge.net/tracker/index.php?func=detail&aid=661916&group_id=29880&atid=397597 + +2003-06-08 23:39 tonvoon + + * configure.in: Fixed quoting on SWAP_FORMAT + +2003-06-08 23:22 tonvoon + + * configure.in: Support for OpenBSD 3.2 & 3.3 ps (Julien Touche) + +2003-06-07 01:46 sghosh + + * plugins/check_real.c: \r\n patch from Mathias + +2003-06-07 01:36 sghosh + + * plugins/check_real.c: \r\n patch from Mathias + +2003-06-05 00:09 tonvoon + + * configure.in: Display ps command used + +2003-06-04 23:56 tonvoon + + * configure.in: Stupid bug - what happens when you don't bother + testing + +2003-06-04 23:37 tonvoon + + * configure.in: Support for OpenBSD 3.2 & 3.3 ps (Julien Touche) + +2003-06-04 23:17 tonvoon + + * plugins/check_disk.c: Argument to asprintf in wrong order + +2003-06-04 22:17 tonvoon + + * pkg/solaris/solpkg: Remove /usr as well. Maybe this is best done + by changing BASEDIR to configure's prefix? + +2003-06-02 15:46 kdebisschop + + * plugins/check_tcp.c: finish recv() loop when stream GT or EQ + maxbytes (was GT) + +2003-06-02 15:43 kdebisschop + + * plugins/check_tcp.c: finish recv() loop when stream GT or EQ + maxbytes (was GT) + +2003-06-01 06:38 kdebisschop + + * plugins/check_tcp.c: typos in doco + +2003-06-01 06:38 kdebisschop + + * plugins/check_tcp.c: allow user to limit number of bytes fetched + fix some doco (wait is now delay, server_quit was not shown) + +2003-06-01 06:19 kdebisschop + + * plugins/check_tcp.c: allow user to limit the number of bytes to + be fetched + +2003-05-31 15:39 kdebisschop + + * plugins/check_dns.c: first revised patch failed to trap the + "break" in while() + +2003-05-31 15:39 kdebisschop + + * plugins/check_dns.c: first revised patch failed to trap the + "break" in while() + +2003-05-31 15:22 kdebisschop + + * plugins/check_dns.c: typo in args to terminate + +2003-05-31 15:04 kdebisschop + + * plugins/check_dns.c: trap null or empty returns from nslookup + +2003-05-27 14:10 stanleyhopcroft + + * contrib/check_sap.sh: check_sap.sh plugin to check SAP /R3 + servers from Karel Salavec and Tom De Blende. + +2003-05-26 11:09 stanleyhopcroft + + * contrib/: check_axis.sh, check_mssql.sh: Revisions to Tom De + Blende contributed plugins: check_axis.sh and check_mssql.sh + +2003-05-18 00:07 tonvoon + + * plugins/t/: check_ftp.t: Fixed test (Mathew Ericson - 738609) + +2003-05-17 18:58 tonvoon + + * plugins/t/: check_load.t: Fixed tests (Mathew Ericson - 738607) + +2003-05-17 18:50 tonvoon + + * plugins/t/check_procs.t: Fixed test commands (Mathew Ericson - + 738605) + +2003-05-17 18:46 tonvoon + + * plugins/t/check_procs.t: Fixed test commands (Mathew Ericson - + 738605) + +2003-05-17 18:38 tonvoon + + * plugins/t/: check_http.t: Fixed tests (Mathew Ericson - 738608) + +2003-05-17 18:36 tonvoon + + * plugins/t/check_tcp.t: Fixed tests (Mathew Ericson - 738604) CV: + ---------------------------------------------------------------------- + +2003-05-17 18:33 tonvoon + + * plugins/t/check_tcp.t: Fixed tests (Mathew Ericson - 738604) + +2003-05-16 18:32 sghosh + + * plugins-scripts/: check_ntp.pl: bug fix + +2003-05-15 00:17 tonvoon + + * plugins/negate.c: Added examples + +2003-05-14 22:59 tonvoon + + * plugins-scripts/check_mailq.pl: Added postfix support (Thomas + Nilsen - 735218) + +2003-05-14 22:51 tonvoon + + * plugins/check_nwstat.c: Added DSVER and UPTIME checks (Phil + Randal - 737617) + +2003-05-14 22:49 tonvoon + + * pkg/solaris/solpkg: Typo + +2003-05-14 22:44 tonvoon + + * doc/.cvsignore: Ignore developer-guidelines.html as generated + from docbook + +2003-05-14 22:39 tonvoon + + * Makefile.am, pkg/solaris/pkginfo.in, pkg/solaris/solpkg: Remove + dependency on gnu make + +2003-05-14 00:20 tonvoon + + * doc/developer-guidelines.sgml: Updated docs to include comments, + contrib->main, getopts_long and verbose output levels + +2003-05-13 23:23 tonvoon + + * tools/sfsnapshot: Calls tools/setup and creates a README for the + snapshot directory + +2003-05-13 23:03 tonvoon + + * doc/developer-guidelines.html, doc/makefile, tools/setup: The + developer-guidelines.html file is now generated from the sgml + file by docbook2html at tools/setup time + +2003-05-13 13:14 stanleyhopcroft + + * contrib/tarballs/hopcroft-plugins.tar.gz: Removed + contrib/tarballs/hopcroft-plugins.tar.gz. This is archaic, + anachronistic, unmaintained and humblingly embarrassing. + +2003-05-13 13:13 stanleyhopcroft + + * contrib/check_mssql.sh: check_mssql.sh. A new plugin from Mr T DE + BLENDE to check MS SQLServer databases. + +2003-05-09 04:22 kdebisschop + + * plugins/check_http.c: fix error when server closes connection + immediately + +2003-05-09 04:22 kdebisschop + + * plugins/check_http.c: fix error when server closes connection + immediately + +2003-05-09 03:59 kdebisschop + + * plugins/: check_snmp.c: cause snmpget try try for 1 second less + than the timeout (allowing plugin to force close if needed) + +2003-05-07 19:01 undrgrid + + * plugins/check_ping.c: Modified check_ping to handle IPv6 as well + as IPv4 ICMP checks using the PING6_COMMAND determined during the + configure script execution. As USE_IPV6 may be defined and + PING6_COMMAND is not defined if there is not IPv6 TCP stack + available when configure is run I condition it off PING6_COMMAND + existing to remove build errors for being undefined. + +2003-04-25 10:05 sghosh + + * plugins-scripts/: check_ntp.pl: corrected output units + +2003-04-23 05:57 kdebisschop + + * plugins/: check_http.c, utils.c: update to RFC1123 hostname specs + +2003-04-17 06:56 kdebisschop + + * nagios-plugins.spec.in: add check_nt, drop check_vsz + +2003-04-17 06:55 kdebisschop + + * plugins/: check_dig.c, check_tcp.c, check_users.c: code cleanup + to clear strict compiler warnings + +2003-04-17 06:36 kdebisschop + + * plugins/: check_dig.c, check_tcp.c, netutils.c: code cleanup to + clear strict compiler warnings + +2003-04-16 16:31 sghosh + + * plugins/check_real.c: old behavior - no stream check unless -u + +2003-04-16 16:06 sghosh + + * plugins/check_real.c: reset to old behavior of not checking + stream by default + +2003-04-13 05:49 sghosh + + * plugins/check_hpjd.c: reduce compiler warning between gcc3 and + gcc2.96 + +2003-04-13 05:28 sghosh + + * configure.in: update for check_mailq - qmail support + +2003-04-13 05:25 sghosh + + * plugins-scripts/utils.pm.in: update for check_mailq - qmail + support + +2003-04-13 05:23 sghosh + + * plugins-scripts/check_mailq.pl: Added sendmail multi-queue + support (Canau), merged qmail support (Schmid) + +2003-04-12 01:02 tonvoon + + * plugins/check_procs.c: Match -a STRING anywhere in ps args + (Laurent Vaslin - 719783) + +2003-04-12 00:47 tonvoon + + * plugins/check_procs.c: Match -a STRING anywhere in ps args + (Laurent Vaslin - 719783) + +2003-04-11 23:36 sghosh + + * plugins-scripts/check_ifstatus.pl: added feature -u (list of + unused ifIndex) + +2003-04-11 23:09 sghosh + + * plugins-scripts/check_ifstatus.pl: bug 691412, added feature -x + (list of excluded ifTypes) + +2003-04-11 19:44 sghosh + + * plugins/check_hpjd.c: patch 698384 - order of args to snmpget + + print a bit of stderr + +2003-04-11 17:27 sghosh + + * plugins/check_hpjd.c: patch 698384 - order of args to snmpget + +2003-04-09 04:46 kdebisschop + + * plugins/: check_http.c, check_hpjd.c, check_nt.c: cleanup to + suppress various strict compiler warnings + +2003-04-09 04:44 kdebisschop + + * plugins/common.h: rewrite #elif to be compatible with traditional + C + +2003-04-09 03:09 kdebisschop + + * plugins/Makefile.am: check_game needs popen.c now + +2003-04-08 21:49 tonvoon + + * plugins/: check_nt.c, check_hpjd.c: Changed // to /* */ comments + as some compilers do not like them + +2003-04-08 21:38 tonvoon + + * command.cfg.in: Updated command for new check_procs + +2003-04-08 21:37 tonvoon + + * plugins/: check_hpjd.c, check_nt.c: Changed // to /* */ comments + as some compilers do not like them + +2003-04-08 01:00 stanleyhopcroft + + * contrib/check_axis.sh: check_axis.sh (Axis 5xx print servers) + from Tom De Blende + +2003-04-08 00:40 tonvoon + + * plugins/check_procs.c: Fixed zombie processes + +2003-04-08 00:16 tonvoon + + * configure.in: Missed some PS_FORMAT strings + +2003-04-07 23:53 tonvoon + + * configure.in, plugins/Makefile.am, plugins/check_nagios.c, + plugins/check_procs.c, plugins/check_vsz.c: Souped up check_procs + with different metrics + +2003-04-07 22:23 tonvoon + + * plugins/check_snmp.c: Removed unnecessary array for AIX compile + (reported by Alwyn Cherrington) + +2003-04-07 22:21 tonvoon + + * plugins/check_snmp.c: Removed unnecessary regex array + +2003-04-07 12:39 kdebisschop + + * plugins/check_http.c: ste timeout one second greater than + critical time + +2003-04-07 12:38 kdebisschop + + * plugins/check_game.c: had been grandfathered ibto core, finally + use normal getopts, add options for player, max-player array + positions + +2003-04-03 22:21 tonvoon + + * plugins-scripts/check_oracle.sh: Cleaned up cache output + +2003-04-01 23:24 tonvoon + + * plugins-scripts/check_oracle.sh: Fixed sqlplus calls and + rearranged parameters for --tablespace & --cache + +2003-04-01 05:00 kdebisschop + + * configure.in: remove PATH_PROG call for autoconf/automake + components + +2003-03-31 13:49 kdebisschop + + * plugins/check_disk.c: checkpoint supresses iso9660 adds option + for checking only local adds choice of scale factor + +2003-03-27 22:53 tonvoon + + * plugins/check_nwstat.c: Extra Netware checks (Patch 710247 - + Dietmar Ruzicka) + +2003-03-26 05:37 tonvoon + + * configure.in: ipv6 check requires unistd.h for Darwin + +2003-03-26 03:57 tonvoon + + * configure.in, plugins/check_procs.c: Removal of ps_raw and + ps_vars + +2003-03-26 03:39 tonvoon + + * plugins/check_nagios.c: Uses same ps command as check_procs + +2003-03-25 06:33 kdebisschop + + * .cvsignore: subst is no longer used + +2003-03-24 19:05 undrgrid + + * .cvsignore, Makefile.am: Better stripping of prefix for Solaris + package install needs to remove /usr/local as package + installs there by default + +2003-03-24 17:44 undrgrid + + * Makefile.am, pkg/solaris/.cvsignore, pkg/solaris/pkginfo.in, + plugins/check_disk.c: Minor changes to build for Solaris packages + +2003-03-24 16:23 tonvoon + + * plugins/check_procs.c: Use max_state + +2003-03-24 02:57 tonvoon + + * tools/: mail_error, sfsnapshot: PATH set in correct place and + extra comments + +2003-03-24 02:44 tonvoon + + * tools/: mail_error, sfsnapshot: Bug fixes + +2003-03-24 02:21 tonvoon + + * tools/mail_error: Sends email if non-zero return code from + command + +2003-03-24 02:19 tonvoon + + * tools/sfsnapshot: Error code depending on number of files + generated + +2003-03-24 01:18 tonvoon + + * lib/ls-mntd-fs.m4: Using coreutils 4.5.11 version to fix Darwin + problem + +2003-03-24 00:40 tonvoon + + * REQUIREMENTS: Add NSClient requirement for check_nt + +2003-03-24 00:39 tonvoon + + * plugins/check_nt.c: Reference to web site to get NSClient + +2003-03-24 00:26 tonvoon + + * plugins/check_nt.c: Reference to web site to get NSClient + +2003-03-23 07:01 undrgrid + + * Makefile.am, autogen.sh, configure.in, lib/Makefile.am, + pkg/solaris/pkginfo.in, pkg/solaris/solpkg: Solaris package build + system + +2003-03-23 06:20 kdebisschop + + * plugins/check_disk.c: can once again exclude indiviual + path/partitions + +2003-03-23 06:11 kdebisschop + + * plugins/check_disk.c: add -X to exclude FS type, now works with + more than one path/dev specified + +2003-03-22 13:23 kdebisschop + + * plugins/utils.c: declaration must precede printf + +2003-03-21 20:21 tonvoon + + * configure.in: Stupid bug! + +2003-03-21 14:08 kdebisschop + + * plugins/check_disk.c: checkpoint, allows selecting devices and + paths now + +2003-03-21 14:04 kdebisschop + + * configure.in: instructions for posting plugin version number + +2003-03-19 23:44 kdebisschop + + * plugins/check_by_ssh.c: allow to specify -1 and -2 for protocol + version + +2003-03-19 22:42 tonvoon + + * configure.in: Tru64 df support (Paul Clayton) + +2003-03-19 13:01 kdebisschop + + * plugins/: utils.c, utils.h: make state_text a function + +2003-03-19 12:59 kdebisschop + + * lib/mountlist.c, plugins/check_disk.c: check_disk working with + mountlist.c + +2003-03-19 02:28 kdebisschop + + * Makefile.am, configure.in: subst.* was replaced by dist-hook + +2003-03-19 02:27 kdebisschop + + * subst.in, subst.sh: these were replaced by dist-hook + +2003-03-18 15:18 kdebisschop + + * configure.in: running the AFS macro causes newer AC/AM to barf + +2003-03-18 09:02 kdebisschop + + * configure.in: afs checking + +2003-03-18 08:50 kdebisschop + + * lib/: ls-mntd-fs.m4, afs.m4: use AC_DEFINE_UNQOUTED + +2003-03-18 08:47 kdebisschop + + * lib/ls-mntd-fs.m4: stop warning on autoheader 2.13 + +2003-03-18 07:57 kdebisschop + + * plugins/: netutils.c, netutils.h: common.h was doubly included + +2003-03-18 07:57 kdebisschop + + * plugins/common.h: use enum instead of define, remove some cruft + from old snprintf implementation + +2003-03-18 07:48 kdebisschop + + * configure.in, lib/Makefile.am, plugins/check_disk.c: use GNU + fileutils for check_disk + +2003-03-18 07:47 kdebisschop + + * lib/: afs.m4, fstypename.m4, fsusage.c, fsusage.h, fsusage.m4, + ls-mntd-fs.m4, mountlist.c, mountlist.h: from GNU fileutils for + check_disk + +2003-03-17 22:22 tonvoon + + * plugins-scripts/: check_oracle.sh: Allow default Oracle home from + oratab (reported by Walbert Oberngruber) + +2003-03-16 23:54 undrgrid + + * configure.in: Modified to automatically enable getaddrinfo + emulation if lwres is not used and getaddrinfo is not found in + the system. + +2003-03-16 23:28 undrgrid + + * plugins/: check_tcp.c, netutils.c, netutils.h: Applied patch + #660973 for tcp refusals + +2003-03-15 01:28 undrgrid + + * configure.in: Left over debug define + +2003-03-15 01:25 undrgrid + + * configure.in, lib/Makefile.am, lib/getaddrinfo.c, + lib/getaddrinfo.h, lib/gethostbyname.c, lib/gethostbyname.h, + plugins/Makefile.am, plugins/getaddrinfo.c, + plugins/getaddrinfo.h, plugins/gethostbyname.c, + plugins/gethostbyname.h, plugins/netutils.c, plugins/netutils.h, + plugins/utils.c, plugins/utils.h: Spent the day working on + backwards compatability using getaddrinfo() Moved getaddrinfo.? + and gethostbyname.? from lib/ to plugins/ due to problems with + compiling into the libnagiosplug.a as it required linking against + socket libraries which are unneeded except for network based + plugins. This code should hopefully happily work for all systems + and has been tested prior to commit on Debian GNU/Linux, SPARC + Solaris 7 and SPARC Solaris 9. + +2003-03-14 13:28 kdebisschop + + * plugins-scripts/check_ntp.pl: add timeout, fix taint chacking + diom + +2003-03-13 22:20 undrgrid + + * .cvsignore, configure.in, lib/Makefile.am: Working out issues + with getaddrinfo emulation build environment + +2003-03-13 21:14 tonvoon + + * plugins/: check_dns.c, check_http.c, check_tcp.c: Strip leading + spaces in perf data + +2003-03-13 21:10 tonvoon + + * plugins/check_smtp.c: Perf data without leading spaces and fix + ANSI C complaint about \n + +2003-03-13 20:33 tonvoon + + * plugins/check_tcp.c: Fix compiler warnings re progname + +2003-03-13 06:52 undrgrid + + * depcomp: Removed auto-tools script that automake adds + +2003-03-13 06:51 undrgrid + + * .cvsignore, configure.in, install-sh, missing, mkinstalldirs, + plugins/.cvsignore, plugins/Makefile.am, plugins/common.h, + plugins/common.h.in, plugins/netutils.h, plugins/netutils.h.in, + plugins/popen.h, plugins/popen.h.in, plugins/utils.c, + plugins/utils.h, plugins/utils.h.in, plugins/version.h.in: + Updated cvs ignore files to reflect changes Moved header files + from being ran through configure to standard Removed auto-tools + scripts that get added by automake + +2003-03-13 06:00 kdebisschop + + * plugins/negate.c: negate must be POSIXly correct in handling + options, else wrapped options get passed to it + +2003-03-13 05:59 undrgrid + + * configure.in: Removed --with-ipv6 configure option so it + determines IPv6 availablity completely on it's own per suggestion + by Karl + +2003-03-13 05:29 kdebisschop + + * plugins/negate.c: negate must be POSIXly correct in handling + options, else wrapped options get passed to it + +2003-03-12 22:13 undrgrid + + * plugins/check_tcp.c: doco standarization + +2003-03-12 19:50 undrgrid + + * configure.in, plugins-scripts/subst.in: Just a lil namespace + clean-up + +2003-03-12 17:42 undrgrid + + * configure.in: Minor fix to --with-ipv6 behavior + +2003-03-12 17:11 undrgrid + + * autogen.sh, configure.in, plugins/utils.c, plugins/utils.h.in: + Added autogen.sh script that rebuilds using autotools and runs + configure Modified configure.in to include some debug build + option info at the end of the scripts execution. Can be removed + by release time. Modified configure.in to include a --with-ipv6 + option Default build is without IPv6 support now to enable you + need to use the --with-ipv6 command line option to configure. + Modified plugins/utils.* to use USE_IPV6 + +2003-03-12 07:05 kdebisschop + + * plugins/check_disk.c: doco standarization + +2003-03-12 06:44 kdebisschop + + * plugins/check_disk.c: errors for statfs + +2003-03-12 06:41 kdebisschop + + * plugins/check_smtp.c: comment/doco cleanup for embeeded doc work, + control STMP command via options instead of defines + +2003-03-12 06:38 kdebisschop + + * configure.in: version increase, statfs work + +2003-03-12 02:47 undrgrid + + * plugins/.cvsignore: Add some more extra plugins + +2003-03-12 02:29 undrgrid + + * plugins/check_dig.c: Code clean-up + +2003-03-12 02:29 undrgrid + + * plugins/check_http.c: Clean up of output from plugin + +2003-03-12 02:24 undrgrid + + * plugins/: check_udp.c, check_ldap.c, check_http.c: Code clean-up + +2003-03-12 02:23 undrgrid + + * plugins/check_tcp.c: Code cleanup + +2003-03-12 00:45 tonvoon + + * plugins/check_dns.c: Removed is_host checks to speed up code. + Fixed timings so no spaces + +2003-03-12 00:08 tonvoon + + * plugins/check_dns.c: Timings in milliseconds and nicer output + +2003-03-11 22:51 tonvoon + + * plugins-scripts/.cvsignore: Add script ignores + +2003-03-11 22:36 tonvoon + + * plugins/negate.c: Remove getopt_long checks + +2003-03-11 22:34 tonvoon + + * plugins/negate.c: Fixed reading too many argv parameters and + changed to asprintf + +2003-03-11 22:29 tonvoon + + * plugins/negate.c: Fixed reading too many argv parameters and + changed to asprintf + +2003-03-11 22:22 tonvoon + + * plugins/: check_by_ssh.c, check_dig.c, check_disk.c, check_dns.c, + check_fping.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_nagios.c, check_nt.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_udp.c, check_ups.c, check_users.c, check_vsz.c: Remove + getopt_long checks + +2003-03-11 22:09 undrgrid + + * configure.in: Fixed some ping6 variables + +2003-03-11 18:32 undrgrid + + * configure.in: Minor change to Karl's statfs check Inclusion of + ICMPv6 ping tests to define PING6_COMMAND Minor fix to ps syntax + checking to fix bug I introduced last nite + +2003-03-11 07:04 undrgrid + + * Makefile.am, configure.in: Removed acconfig.h from EXTRA_DIST + Fixed problem with test in SWAP_FORMAT and SWAP_COMMAND + +2003-03-11 06:44 kdebisschop + + * configure.in, plugins/check_disk.c: use statfs for check_disk + (still needs fs scan) + +2003-03-11 06:03 undrgrid + + * acconfig.h, configure.in: Finishing clean-up of configure.in + Removing acconfig.h as it's no longer needed + +2003-03-10 23:58 undrgrid + + * acconfig.h, configure.in: Cleaned up configure for PS and PING to + produce cleaner config.h + +2003-03-09 18:13 undrgrid + + * plugins/common.h.in: Make sure sys/socket.h is explicitly + included if HAVE_SYS_SOCKET_H is defined + +2003-03-09 10:39 tonvoon + + * plugins/check_disk.c: Implement error-only option for check_disk + (Ian Duggan) + +2003-03-09 10:36 tonvoon + + * plugins/check_disk.c: Implement error-only option for check_disk + (Ian Duggan) + +2003-03-08 12:08 tonvoon + + * plugins/check_disk.c: Fix AIX /proc filesystem (Ian Duggan) + +2003-03-08 12:05 tonvoon + + * plugins/check_disk.c: Fix AIX /proc filesystem (Ian Duggan) + +2003-03-08 11:44 tonvoon + + * configure.in: snprintf checks in configure.in like samba + +2003-03-08 02:27 undrgrid + + * plugins/check_dns.c: Modified code to call is_addr() rather than + is_dotted_quad() with the new AF indepdent function routines + +2003-03-08 02:26 undrgrid + + * plugins/: netutils.c, netutils.h.in, utils.c, utils.h.in: AF + indepedent routines introduced. Modifed process_request() & + my_connect() parameters to make 'proto' type 'int' rather + than 'char *' and use IPPROTO_* POSIX values. Removed + is_dotted_quad() & my_inet_aton() functions Added is_addr(), + is_inet_addr(), is_inet6_addr() and resolve_host_or_addr() + functions to check whether it is a valid IP address Modified + is_host() to call is_addr() and is_hostname() + +2003-03-08 02:02 tonvoon + + * tools/sfsnapshot: Need to remove configure.in + +2003-03-08 01:59 tonvoon + + * lib/Makefile.am, lib/snprintf.c, plugins/Makefile.am, + plugins/snprintf.c: Move snprintf into lib + +2003-03-08 01:48 tonvoon + + * tools/sfsnapshot: Have to run through whole automake procedure as + datestamp in RELEASE variable + +2003-03-08 01:13 tonvoon + + * tools/sfsnapshot: Added automake parameters for config.sub and + config.guess + +2003-03-08 00:57 tonvoon + + * tools/sfsnapshot: Fixed production OUT variable + +2003-03-08 00:55 tonvoon + + * tools/sfsnapshot: Adds MD5SUM file, creates multiple branch + snapshots and doesn't rerun configure/automake/autoconf + unnecessarily + +2003-03-08 00:21 tonvoon + + * Makefile.am: Use Makefile's variables (to support a shortcut in + sfsnapshot) + +2003-03-07 22:11 undrgrid + + * configure.in, lib/Makefile.am, lib/getaddrinfo.c, + lib/getaddrinfo.h, lib/gethostbyname.c, lib/gethostbyname.h, + plugins/check_pgsql.c, plugins/common.h.in, plugins/netutils.c, + plugins/netutils.h.in, tools/setup: Added getaddrinfo.[ch] & + gethostbyname.[ch] to provide RFC2553 functions if missing in + system libs and lwres not present Moved all references to netdb.h + and sys/socket.h into common.h.in Modified automake call in + tools/setup to include adding missing files so config.sub + and config.guess will be available + +2003-03-07 20:16 tonvoon + + * plugins/check_nt.c: Make output for CPU load nicer + +2003-03-07 07:45 kdebisschop + + * plugins/check_smtp.c: millisecond timing and perf data + +2003-03-07 07:15 kdebisschop + + * plugins/: check_smtp.c: whole timer loop was on the wrong side of + connection close code + +2003-03-07 06:43 kdebisschop + + * plugins/check_udp.c: fix for -H invocation of hostname + +2003-03-07 06:40 kdebisschop + + * plugins/check_udp.c: fix for -H invocation of hostname + +2003-03-06 06:40 undrgrid + + * acinclude.m4, configure.in: Adds --with-lwres and + --enable-emulate-getaddrinfo but are not used in any of the code + at this time. Has a check for IPv6 support but only runs if using + the emulate-getaddrinfo routines, this needs to be modified. !!! + I need input from results of this run on various platforms to see + what results are seen in plugins/config.h so please help test !!! + +2003-03-05 07:27 kdebisschop + + * plugins-scripts/check_ntp.pl: add "m" to regex for minutes + +2003-03-05 05:59 sghosh + + * plugins/check_smtp.c: remove race condition for a long HELO + +2003-03-05 04:38 sghosh + + * command.cfg.in: corrected snmp commands + +2003-03-05 04:37 sghosh + + * plugins-scripts/check_ntp.pl: regex fix per Marc Poulin + +2003-03-05 00:17 tonvoon + + * plugins/check_http.c: check_http min size option (680467 - Dave + Viner) + +2003-03-04 23:56 tonvoon + + * plugins/check_nt.c: Make output message for CPU Load a bit nicer + +2003-03-04 23:35 tonvoon + + * tools/sfsnapshot: To create nagiosplug daily snapshots on SF + +2003-03-03 03:49 kdebisschop + + * plugins/check_ping.c: accept comma-delimted list of hosts for + checking if a multihomed host is alive + +2003-03-02 06:01 kdebisschop + + * plugins/check_ping.c: add logic to check multiple servers + +2003-03-02 04:59 kdebisschop + + * ChangeLog: update from CVS + +2003-03-02 04:58 kdebisschop + + * configure.in, nagios-plugins.spec.in: adjustments to remove beta + tagging + +2003-03-02 04:32 kdebisschop + + * ChangeLog: update from CVS + +2003-03-01 05:09 kdebisschop + + * nagios-plugins.spec.in: we were missing some docs in the RPM + +2003-02-23 17:11 sghosh + + * REQUIREMENTS: Novell requirements + +2003-02-23 17:10 sghosh + + * contrib/check_bgpstate.pl: removed community string in CRIT + message + +2003-02-22 19:06 tonvoon + + * configure.in: Solaris and Unixware labels round the wrong way for + swap command + +2003-02-22 13:01 kdebisschop + + * Makefile.am: provide target for nagios-plugins.spec + +2003-02-22 07:27 kdebisschop + + * Makefile.am: add CODING FAQ LEGAL to distribution tarball + +2003-02-21 21:59 tonvoon + + * plugins/check_http.c: Fixed coredump with unallocated string + +2003-02-21 21:46 tonvoon + + * plugins/check_dns.c: Strip leading spaces on dns return value + (689563 - Simon L Nielsen) + +2003-02-20 03:16 kdebisschop + + * plugins-scripts/check_disk_smb.pl: option regexs need to include + ^ and $ + +2003-02-19 22:56 tonvoon + + * lib/Makefile.am: Removing getloadavg.m4 from dist + +2003-02-19 08:36 kdebisschop + + * INSTALL, configure.in, lib/getloadavg.m4, tools/setup: remove + getloadavg.m4 + +2003-02-19 00:45 tonvoon + + * Makefile.am, configure.in, getloadavg.m4, lib/Makefile.am, + lib/getloadavg.c, lib/getloadavg.m4, plugins/Makefile.am, + plugins/getloadavg.c: Move getloadavg to lib directory. Must run + "aclocal -I lib" + +2003-02-18 23:00 kdebisschop + + * plugins/check_pgsql.c: spurious backslash escape + +2003-02-18 22:56 kdebisschop + + * configure.in: set tag for beta3, fix pgsql detection + +2003-02-18 22:24 kdebisschop + + * plugins/check_udp.c: never exited getopt loop + +2003-02-18 22:20 kdebisschop + + * plugins/check_tcp.c: failed if header was more than 1023 bytes + +2003-02-18 22:10 tonvoon + + * plugins/check_load.c: Fixed the output messages (Bug 688729 - + Jayjay) + +2003-02-18 21:58 tonvoon + + * Makefile.am: Add SUPPORT file to distribution + +2003-02-18 21:56 tonvoon + + * plugins/check_http.c: Fixed compiler warning and increased the + SSL random key for a Solaris PRNG problem + +2003-02-18 05:38 kdebisschop + + * configure.in: remainder of ps fix for UnixWare, and move [] in + if/elif to indicate m4 quoting instead of test invocation + +2003-02-18 04:05 sghosh + + * contrib/check_appletalk.pl: Appletalk ping plugin + +2003-02-18 04:04 sghosh + + * plugins/check_snmp.c: OID type prefix patch [Patches-679403] + +2003-02-18 03:46 sghosh + + * plugins/check_swap.c: support for Large swap sizes + +2003-02-18 03:17 sghosh + + * configure.in: regex fix to catch *BSD swapinfo and not HP-UX + error and memory/file swap in addition to device for HP-UX + +2003-02-17 22:01 kdebisschop + + * configure.in: typo in testing uname output + +2003-02-17 21:57 kdebisschop + + * configure.in: ping and swap for unixware + +2003-02-17 21:04 kdebisschop + + * configure.in: library search dirs are part of LDFLAGS + +2003-02-17 19:11 sghosh + + * REQUIREMENTS: location updates + +2003-02-16 08:41 tonvoon + + * plugins/Makefile.am: Fixed dependencies for check_nt + +2003-02-16 08:25 tonvoon + + * plugins/check_nt.c: Coredump if no variable set (reported by Marc + C. Poulin) + +2003-02-16 02:46 egalstad + + * contrib/check_dhcp.c: Interface patch byor Clemens Resen + +2003-02-16 02:18 sghosh + + * plugins-scripts/check_ntp.pl: all alphanumeric accepted for refid + on ntpq + +2003-02-12 22:32 tonvoon + + * plugins/.cvsignore: Added extra plugins + +2003-02-12 22:30 tonvoon + + * lib/.cvsignore: Add ignore files + +2003-02-12 22:29 tonvoon + + * plugins/negate.c: Remove unnecessary \ and fix coredump with no + parameters specified + +2003-02-12 22:27 tonvoon + + * plugins/check_http.c: Remove unnecessary \ - complaints from + Tru64's cc compiler + +2003-02-12 22:21 tonvoon + + * configure.in: Inadequate quoting for PS_FORMAT & removal of grep + "*** for Tru64 + +2003-02-12 04:36 sghosh + + * command.cfg.in: forced ntpq jitter check + +2003-02-12 04:32 sghosh + + * plugins-scripts/check_ifoperstatus.pl: added timeout alarm + +2003-02-12 04:30 sghosh + + * plugins-scripts/check_ntp.pl: fixed regex for stratum1 peer, + added logic for failed ntpq call(e.g. sntp host) + +2003-02-11 00:47 tonvoon + + * plugins/check_mysql.c: Patch by Dave Viner for seg fault on RH + 7.3 (655903) + +2003-02-10 23:59 tonvoon + + * configure.in: Update with references to REQUIREMENTS + +2003-02-10 23:58 tonvoon + + * Requirements: Remove file, superceded by REQUIREMENTS + +2003-02-10 23:34 tonvoon + + * plugins/: getopt.c, getopt.h, getopt1.c: Removing getopt files - + now in new lib directory + +2003-02-10 23:32 tonvoon + + * lib/: Makefile.am, getopt.c, getopt.h, getopt1.c: New directory + for common library files + +2003-02-10 23:28 tonvoon + + * plugins/common.h.in: Added in a define for HAVE_GETOPT_H for + backwards compatibility + +2003-02-10 23:27 tonvoon + + * plugins/Makefile.am: Remove unnecessary getopt references and + link in lib directory + +2003-02-10 23:26 tonvoon + + * configure.in: Removing checks for getopt.h - now always + available. Also support lib dir + +2003-02-10 23:24 tonvoon + + * Makefile.am: Adding lib directory for getopts change + +2003-02-10 23:08 tonvoon + + * configure.in: Fixed Tru64 ps command (Bug 669585 - Paula Arnold) + +2003-02-10 18:36 undrgrid + + * plugins/check_ssh.c: Added argc checks before attempting to + access argv[] + + Corrected return codes and output + +2003-02-10 14:18 undrgrid + + * plugins/check_ssh.c: Revised code to use resolving and connection + code in utils.c and netutils.c rather than its own functions. + Corrected code to properly handle input of server hostname and + port on commandline without option flags. + +2003-02-10 04:49 kdebisschop + + * contrib/check_fping_in.c: this plugin is in core as check_fping + +2003-02-09 18:59 undrgrid + + * tools/setup: Reordered program calls so autoheader was called + before automake thus getting rid of errors for header files not + being present when automake was called. Also puts it inline with + documentation in INSTALL & INSTALLING + +2003-02-09 14:20 sghosh + + * contrib/: check_adptraid.sh, check_compaq_insight.pl, + check_file_age.pl: new plugins + +2003-02-09 14:18 sghosh + + * contrib/: README.TXT, readme.txt: file rename + +2003-02-09 14:16 sghosh + + * contrib/: check_remote_nagios_status.pl, check_wins.pl, + sched_downtime.pl: more contribs + +2003-02-09 14:03 sghosh + + * contrib/tarballs/: fetchlog-0.92.tar.gz, fetchlog-0.94.tar.gz: + new version + +2003-02-09 12:54 kdebisschop + + * CODING, README: spell check + +2003-02-09 12:36 kdebisschop + + * FAQ: spell check + +2003-02-09 12:17 sghosh + + * SUPPORT: ispell + +2003-02-08 06:00 kdebisschop + + * plugins/check_pgsql.c: use enum instead of define + +2003-02-08 05:58 kdebisschop + + * FAQ: add item on submitting new plugins + +2003-02-08 05:57 kdebisschop + + * SUPPORT: suggest minimum standards for support requests + +2003-02-08 05:32 kdebisschop + + * plugins/check_http.c: submit request with one send + +2003-02-05 05:59 kdebisschop + + * configure.in: fix for SSL build on RedHat rawhide + +2003-02-05 05:58 kdebisschop + + * plugins/check_dns.c: allow check to proceed using servers from + resolv.conf + +2003-02-05 05:57 kdebisschop + + * plugins/check_http.c: fix segfault due to bad asprintf invocation + +2003-02-04 06:24 sghosh + + * plugins-scripts/Makefile.am: install user:grp perms [patch + 679703 -Detlef Boehm] + +2003-02-04 06:16 sghosh + + * plugins-scripts/check_flexlm.pl: lmstat output update + +2003-02-04 05:54 sghosh + + * plugins-scripts/check_ntp.pl: corrected ntpdate offset to seconds + +2003-02-03 21:43 tonvoon + + * plugins/check_snmp.c: Avoid core dump with null or invalid data + (679400 - Mathieu Masseboeuf) + +2003-02-03 21:33 tonvoon + + * plugins/Makefile.am: Patch for Mac OS X compile (652080 - Ton + Voon) + +2003-02-03 20:43 sghosh + + * contrib/tarballs/check_cit.tgz: Citrix plugin + +2003-02-03 20:35 sghosh + + * command.cfg.in: more sample command configurations + +2003-02-03 20:29 sghosh + + * configure.in, plugins-scripts/check_ntp.pl, + plugins-scripts/utils.pm.in: change ntpdc to ntpq (Jonathan + Rozes,Thomas Schimpke, bug-656237 ) + +2003-02-03 15:47 sghosh + + * plugins-scripts/check_ntp.pl: patch for desync peer and ntpdate + (James Fidell) + +2003-02-03 05:29 sghosh + + * plugins-scripts/check_ifstatus.pl: bugfix [bug 651021 mperry2] + +2003-02-03 05:07 sghosh + + * plugins/check_hpjd.c: added default community [bug-patch #600349 + jbaumgartner] + +2003-01-31 18:40 tonvoon + + * plugins/check_procs.c: Fix for zombie processes on Solaris (Bug + 677803 - Matthew Brown) + +2003-01-31 18:36 tonvoon + + * plugins/check_nt.c: Reapply all asprintf calls. Fix for %% + problem with -l flag. + +2003-01-31 01:26 tonvoon + + * plugins/check_nt.c: Removed all unnecessary asprintf calls. + Replaced with original check_nt.c to minimise amount of changes + (reported by Reuben Farrelly) + +2003-01-30 23:18 tonvoon + + * plugins/check_nt.c: Added reference to the official NSClient web + site + +2003-01-30 22:57 tonvoon + + * plugins/check_swap.c: Fixed long --allswap option + +2003-01-30 22:55 tonvoon + + * plugins/check_procs.c: Fixed progname + +2003-01-29 20:57 tonvoon + + * plugins/check_mrtgtraf.c: Fixed error and success codes (638656 - + Paul Dlug) + +2003-01-29 20:47 tonvoon + + * plugins-scripts/check_oracle.sh: Added cache and tablespace check + (621567 - John Marquart) + +2003-01-29 20:33 tonvoon + + * plugins/: Makefile.am, check_nt.c: Added in check_nt for bug + 646516 + +2003-01-29 06:38 kdebisschop + + * plugins/check_mysql.c: remove incorrect check_disk() declaration + +2003-01-29 06:16 kdebisschop + + * plugins/check_ldap.c: fix segfault when argc>=2 and the -H or -b + options are not supplied + +2003-01-29 06:15 kdebisschop + + * plugins/check_by_ssh.c: 1.8 + +2003-01-29 05:55 tonvoon + + * plugins/check_http.c: Better error if server requests client + based certificate (609382 - Olaf Greis) + +2003-01-29 05:27 tonvoon + + * contrib/check_dns_random.pl: Exit code added (604837 - Lachlan + Cameron-Smith) + +2003-01-29 05:10 tonvoon + + * plugins-scripts/check_oracle.sh: Added dummy login test (650970 - + Ton Voon) + +2003-01-29 04:28 tonvoon + + * plugins/check_vsz.c: Error when no params passed, better invalid + params message (652086 - Ton Voon) + +2003-01-29 04:11 tonvoon + + * plugins/check_procs.c: Fixed NULL status in Solaris (644783 - + Fabian Pehla) Fixed -p options (652082 - Ton Voon) + +2003-01-28 07:44 kdebisschop + + * contrib/checkciscotemp.pl: typo: had commented use Net::SNMP for + testing + +2003-01-28 07:42 kdebisschop + + * plugins/check_real.c: make sure host_name is set and remove NULL + string inits that can lead to segfaults + +2003-01-28 07:26 kdebisschop + + * plugins/check_mysql.c: missed argc check on port parameter + +2003-01-28 07:17 kdebisschop + + * contrib/checkciscotemp.pl: split and validate input more robustly + +2003-01-28 07:15 kdebisschop + + * plugins/check_http.c: remove NULL string inits that can lead to + segfaults + +2003-01-28 00:32 tonvoon + + * configure.in: ps support for Darwin / MacOSX + +2003-01-27 11:53 kdebisschop + + * plugins/check_http.c: do not pass host if none is provided + +2003-01-27 06:04 kdebisschop + + * plugins/check_http.c: we were sending extra CRLF + +2003-01-19 06:34 kdebisschop + + * plugins-scripts/check_rpc.pl: indicate new default state in + get_rpcinfo, also fix a bunch of indents for consistent format + +2003-01-17 05:56 sghosh + + * plugins-scripts/check_rpc.pl: bug fix for state and opt_c + initialization + +2003-01-17 05:37 sghosh + + * plugins/check_snmp.c: Counter32 tag parsing added + +2003-01-16 06:42 kdebisschop + + * plugins/: check_mysql.c, check_pgsql.c: semicolon needed where + progname define was replaced + +2003-01-16 06:29 kdebisschop + + * plugins/check_http.c: add option to let regex span newlines + +2003-01-16 06:28 kdebisschop + + * plugins/check_game.c: progname and print_usage need to be defined + +2003-01-16 06:22 kdebisschop + + * plugins/check_radius.c: semicolon needed where praogname define + was replced + +2003-01-16 06:10 kdebisschop + + * plugins/check_hpjd.c: semicolon needed where praogname define was + replced + +2003-01-16 05:22 kdebisschop + + * configure.in: find kerberos libs in latest Red Hat beta + +2003-01-16 05:21 kdebisschop + + * plugins/utils.c: restore max() macro + +2003-01-16 05:20 kdebisschop + + * plugins/check_tcp.c: cleanup progname assignment + +2003-01-16 05:19 kdebisschop + + * plugins-scripts/check_disk_smb.pl: accept $ for share and \\ for + users + +2003-01-16 05:17 kdebisschop + + * plugins/check_by_ssh.c: avoid segfault when host is not given + +2003-01-13 12:21 kdebisschop + + * contrib/: check_dhcp.c, check_fping_in.c, check_rbl.c: convert + PROGANE from a define to a const char + +2003-01-13 12:15 kdebisschop + + * plugins/: check_by_ssh.c, check_dig.c, check_disk.c, check_dns.c, + check_dummy.c, check_fping.c, check_hpjd.c, check_http.c, + check_ldap.c, check_load.c, check_mrtg.c, check_mrtgtraf.c, + check_mysql.c, check_nagios.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_udp.c, + check_ups.c, check_users.c, check_vsz.c, negate.c, urlize.c, + utils.c, utils.h.in: convert PROGANE from a define to a const + char + +2003-01-13 12:13 kdebisschop + + * plugins/popen.c: change exit status to be POSIX compliant + +2003-01-13 12:09 kdebisschop + + * plugins/check_nagios.c: check for a few null strings, change + PROGNAME from #define to const *char + +2003-01-13 04:50 kdebisschop + + * plugins/check_disk.c: add options for excluding devices and for + skipping OK devices in summary + +2003-01-03 03:24 kdebisschop + + * plugins/utils.c: protect against some null strings, make formats + more uniform + +2002-12-19 19:30 kdebisschop + + * plugins/check_tcp.c: expect is +OK for SPOP too + +2002-12-19 19:29 kdebisschop + + * plugins/check_tcp.c: server expect not getting set, expect is +OK + for POP + +2002-12-19 19:20 kdebisschop + + * plugins/check_http.c: remove spurious CRLF + +2002-11-29 12:02 stanleyhopcroft + + * contrib/check_citrix: + New plugin to check the ICA browse service (used by Citrix + Metaframe servers) from Ed Rolison and Tom De Blende. + +2002-11-25 12:00 kdebisschop + + * plugins/check_tcp.c: was segfaulting if no dtat was returned + +2002-11-24 13:43 kdebisschop + + * tools/snapshot: some fixes needed to move off old devel box + +2002-11-24 13:09 kdebisschop + + * tools/snapshot: make routine snapshots of nagios and plugin CVS + to expand testing + +2002-11-22 10:52 kdebisschop + + * plugins/check_ups.c: add replace battery condition, replace + unchecked strcat calls with asprintf (I do not think buffer + overflow was possible here, but lets be consistent) + +2002-11-22 02:46 kdebisschop + + * configure.in: get long args output to work on check_procs by + putting incantations with -w ahead of others + +2002-11-22 02:33 kdebisschop + + * configure.in: get long args output to work on linux check_procs, + actually works this time (needs OpenBSD testing) + +2002-11-22 01:33 kdebisschop + + * plugins/check_procs.c: add a few comments, trap a few place where + a NULL string might have been handled + +2002-11-22 01:31 kdebisschop + + * configure.in: get long args output to work on linux check_procs + (needs OpenBSD testing) + +2002-11-21 12:40 kdebisschop + + * plugins/check_dig.c: fix empty output on errors + +2002-11-20 11:56 kdebisschop + + * plugins/check_swap.c: add switch to evaluate each swap + individually + +2002-11-20 11:28 kdebisschop + + * plugins/check_dig.c: fix solaris SEGV, still need to print + meaningful error text + +2002-11-20 01:19 kdebisschop + + * plugins/check_by_ssh.c: in short options, t no no argument + +2002-11-20 01:09 kdebisschop + + * plugins/check_dig.c: replace some strcpy with strscpy + +2002-11-19 19:13 kdebisschop + + * plugins/Makefile.am: another try at portable symlinking + +2002-11-19 19:07 kdebisschop + + * plugins/Makefile.am: another try at portable symlinking + +2002-11-19 19:06 kdebisschop + + * plugins/check_time.c: explicitly cast recv() arg2 for SunOS5.6 + +2002-11-19 07:13 kdebisschop + + * plugins/Makefile.am: rewrite of install-exec-hook for solaris + +2002-11-18 21:58 sghosh + + * contrib/: check_javaproc.pl, nagios_sendim.pl: javaproc, sendim + +2002-11-18 14:46 sghosh + + * contrib-reporting/process_perfdata.pl: New directory to for + perfdata and reporting scripts + +2002-11-18 11:24 kdebisschop + + * plugins/check_swap.c: test total swap instead of individual disks + +2002-11-18 07:23 kdebisschop + + * plugins/check_disk.c: failed to handle multple disks + +2002-11-18 07:22 kdebisschop + + * plugins/utils.c: more readable max_state() code + +2002-11-16 12:57 kdebisschop + + * plugins/Makefile.am: fix too many sources problem for programs + tha are symlinks to check_tcp + +2002-11-16 04:59 kdebisschop + + * plugins/check_snmp.c: my take on Subhendu's patches, plus a few + comments for clarity + +2002-11-15 17:47 sghosh + + * plugins/check_snmp.c: memory bounds in options, no output + comparison case + +2002-11-15 04:51 kdebisschop + + * nagios-plugins.spec.in: make spec work again, now that release is + in source name again + +2002-11-15 00:51 kdebisschop + + * configure.in: release numbering fix + +2002-11-15 00:50 kdebisschop + + * plugins/check_snmp.c: fix label handling, replace accidentally + deleted elseif l.310 + +2002-11-14 18:25 kdebisschop + + * Makefile.am, acconfig.h, configure.in, nagios-plugins.spec.in, + plugins/utils.c: fix bug with gettimeofday test, improve + version/release handling, update rpm spec + +2002-11-14 18:23 kdebisschop + + * plugins/Makefile.am: fix typo in snprintf build + +2002-11-14 05:36 kdebisschop + + * plugins/Makefile.am: can't drop these sources -- neded for dist + +2002-11-14 05:27 kdebisschop + + * plugins/Makefile.am: fix build rule for snprintf + +2002-11-14 05:25 kdebisschop + + * plugins/check_http.c: pagesize count off by one + +2002-11-14 04:45 kdebisschop + + * plugins/check_http.c: clean up NULL from status on Solaris + +2002-11-14 04:00 kdebisschop + + * configure.in: typo in AC_DEFINE of PS_FORMAT for solaris + +2002-11-14 03:37 kdebisschop + + * plugins/Makefile.am: remove check_nt again + +2002-11-14 03:09 kdebisschop + + * plugins/Makefile.am: back out last change -- it was only work in + progress + +2002-11-14 02:26 kdebisschop + + * plugins/: Makefile.am, check_dns.c, check_ldap.c, check_mrtg.c, + check_mrtgtraf.c, check_nwstat.c, check_radius.c, utils.c, + version.h.in: remove call_getopt and ssprintf + +2002-11-13 11:50 kdebisschop + + * plugins/: check_disk.c, check_dns.c, check_fping.c, check_hpjd.c, + check_mrtg.c, check_nwstat.c, check_ping.c, check_vsz.c, + urlize.c, utils.c: remove call_getopt and asprintf + +2002-11-12 11:28 kdebisschop + + * plugins/check_dig.c: cleanup asprintf, old function decls + +2002-11-12 11:26 kdebisschop + + * plugins/: check_mysql.c, check_real.c, check_ups.c: remove + call_getopt + +2002-11-11 22:15 sghosh + + * plugins/check_snmp.c: should use asprintf + +2002-11-11 20:19 sghosh + + * plugins/check_snmp.c: more snmpv3 patches + +2002-11-11 19:29 sghosh + + * plugins/check_snmp.c: long opt for miblist, snmpv3 support + (rosenauer) + +2002-11-11 16:04 sghosh + + * plugins/check_snmp.c: option to specify a miblist - llow + +2002-11-11 15:43 sghosh + + * plugins/check_snmp.c: misc doc fix, missing verbose option + +2002-11-09 11:37 kdebisschop + + * plugins/: check_ups.c, check_users.c: remove call_getopt + +2002-11-09 04:22 kdebisschop + + * plugins/: check_by_ssh.c, check_dig.c, check_ping.c, + check_time.c: remove call_getopt + +2002-11-09 04:21 kdebisschop + + * plugins/check_snmp.c: cleaner handling of DEFAULT_PORT + +2002-11-09 03:43 kdebisschop + + * configure.in: add HPUX swap, try to cleanup getopt processing + +2002-11-09 03:39 kdebisschop + + * plugins/: check_pgsql.c, check_ping.c, check_snmp.c, negate.c, + utils.h.in: define and use usage3 where second part of message is + a an int/char + +2002-11-09 03:16 kdebisschop + + * plugins/snprintf.c: HAVE_C99_SNPRINTF is not tested, so remove + from ifdef + +2002-11-08 08:07 kdebisschop + + * plugins/check_snmp.c: user reports NULL still getting into + asprintf + +2002-11-08 08:06 kdebisschop + + * plugins/check_vsz.c: remove call_getopt + +2002-11-08 07:20 kdebisschop + + * acconfig.h, configure.in, plugins/common.h.in, plugins/utils.c, + plugins/utils.h.in: patches required to build on solaris with + asprintf and gettimeofday + +2002-11-08 07:18 kdebisschop + + * plugins/: check_http.c, check_load.c, check_ping.c, + check_procs.c, check_smtp.c, check_tcp.c: remove unused variables + +2002-11-08 07:17 kdebisschop + + * tools/oneliners: some useful onliners + +2002-11-07 14:30 kdebisschop + + * plugins/check_snmp.c: bugfixes to command format and (null) text + created by asprintf switch + +2002-11-07 07:07 kdebisschop + + * plugins/check_by_ssh.c: remove call_getopt, add [] arougn time + +2002-11-07 07:06 kdebisschop + + * configure.in: test snprintf function family for ifdefs in + snprintf.c + +2002-10-30 18:47 kdebisschop + + * plugins/check_tcp.c: replace fixed-lentgh buffer with asprintf + +2002-10-30 18:46 kdebisschop + + * plugins/check_udp.c: forgot to remove call_getopt + +2002-10-30 18:44 kdebisschop + + * plugins/: check_ssh.c, check_swap.c: forgot to remove call_getopt + declaration + +2002-10-30 18:29 kdebisschop + + * plugins/check_smtp.c: remove call_getopt, fix several buffer + overruns possible due to use of fixed size buffers + +2002-10-30 18:22 kdebisschop + + * tools/setup: debian builds not actively maintained, so suppress + error in setup script + +2002-10-30 05:07 sghosh + + * acconfig.h, configure.in, plugins-scripts/Makefile.am, + plugins-scripts/check_mailq.pl, plugins-scripts/utils.pm.in: + monitor mailq + +2002-10-28 13:05 kdebisschop + + * plugins-scripts/: check_breeze.pl, check_disk_smb.pl, + check_flexlm.pl, check_log.sh, check_ntp.pl, check_rpc.pl, + check_sensors.sh, check_wave.pl: remove pspace in shebang since + no sequent users replied + +2002-10-26 14:30 kdebisschop + + * nagios-plugins.spec.in: release should not be in tarball name + +2002-10-25 14:58 kdebisschop + + * nagios-plugins.spec.in: tweak source macro + +2002-10-25 13:35 kdebisschop + + * plugins/Makefile.am: remove check_nt + +2002-10-25 03:31 kdebisschop + + * Makefile.am, plugins/Makefile.am: include getloadavg sources, add + some Solaris pkg build support + +2002-10-22 10:13 kdebisschop + + * plugins/check_ssh.c: remove call_getopt, replace ssprintf with + asprintf,better server version reporting + +2002-10-22 09:54 kdebisschop + + * plugins/check_tcp.c: add check_spop + +2002-10-22 09:19 kdebisschop + + * plugins/check_procs.c: remove call_getopt, replace ssprintf with + asprintf + +2002-10-22 03:57 sghosh + + * contrib/check_procr.sh: From: Jerome Tytgat - checks to see if + named process is running + +2002-10-22 02:31 sghosh + + * README, plugins/check_nt.c: check_nt is downloadable from + nsclient.ready2run.nl + +2002-10-21 06:04 kdebisschop + + * plugins/check_swap.c: use asprintf instead of ssprintf + +2002-10-21 05:36 kdebisschop + + * plugins/Makefile.am: need to define SOURCES for check_tcp to also + build as check_ftp,check_imap,check_nntp,check_pop + +2002-10-21 05:05 kdebisschop + + * plugins/utils.c: use asprintf to do strscpy + +2002-10-21 05:04 kdebisschop + + * plugins/Makefile.am: roll check_ftp, check_imap, check_pop, and + check_nntp into check_tcp + +2002-10-21 05:03 kdebisschop + + * plugins/: check_ftp.c, check_imap.c, check_nntp.c, check_pop.c: + these are all combined into check_tcp now + +2002-10-21 04:55 kdebisschop + + * plugins/check_load.c: remove broken call_getopt + +2002-10-21 04:43 kdebisschop + + * plugins/check_snmp.c: cleanup process_arguments, print_help, and + print_usage + +2002-10-21 04:40 kdebisschop + + * plugins/check_pgsql.c: now we provide long opts if they do not + exist + +2002-10-20 21:22 kdebisschop + + * plugins/check_snmp.c: fixed scanning for multiple OIDs, which was + not working + +2002-10-20 19:49 kdebisschop + + * plugins/check_snmp.c: change ssprintf to asprintf back out change + at line 225 in r1.4 (values were mismatched to format string, + so output was nonsense) (I left a comment showing a construct + that should work, but it fails for PHBs: if my disk gets + nearly full, they want 'CRITICAL - 99%' not 'CRITICAL - Gauge32: + 99') (If someine has a rationale for the change, maybe it could + be done as an option? - it seems fairly clear that the Web + display should be sensible to PHBs so long as there's no real + loss) + +2002-10-18 07:41 kdebisschop + + * plugins/check_swap.c: remove old call_getopt + +2002-10-18 06:55 kdebisschop + + * plugins/check_load.c: remove old call_getopt code, fix bug taking + single float, allow colon as separators in additin to commas + +2002-10-18 05:41 kdebisschop + + * plugins/utils.c: handle null src in strscat + +2002-10-18 04:48 kdebisschop + + * plugins/check_tcp.c: millisecond timing + +2002-10-18 04:46 kdebisschop + + * plugins/utils.h.in: refine STD_LONG_OPTS + +2002-10-18 04:46 kdebisschop + + * plugins/check_http.c: provide on more decimal point printing time + +2002-10-18 04:45 kdebisschop + + * plugins/check_ping.c: remove broken call_getopt stuff + +2002-10-17 07:09 kdebisschop + + * plugins/check_tcp.c: using asprintf + +2002-10-17 07:06 kdebisschop + + * INSTALL, INSTALLING, tools/setup: revise now that aclocal is + remved from CVS + +2002-10-16 23:26 kdebisschop + + * configure.in: need some quoting on ifdef + +2002-10-16 23:17 kdebisschop + + * acinclude.m4, configure.in: finally a working fix for + AM/AC_FUNC_STRTOD nightmare + +2002-10-16 23:01 kdebisschop + + * configure.in: mismatched quote + +2002-10-16 22:54 kdebisschop + + * configure.in: missing commas + +2002-10-16 22:46 kdebisschop + + * configure.in: complains on paren in comment + +2002-10-16 22:43 kdebisschop + + * acinclude.m4: lost a paren + +2002-10-16 22:41 kdebisschop + + * acinclude.m4: old auto???? has AM_FUNC_STRTOD, now renamed + AC_FUNC_STRTOD + +2002-10-16 22:32 kdebisschop + + * plugins/: check_http.c, utils.c, utils.h.in: millisecond timimg + where supported + +2002-10-16 22:31 kdebisschop + + * configure.in, missing: build cleanly on RedHat 8.0 + +2002-10-16 11:46 kdebisschop + + * .cvsignore: ignore aclocal.m4 + +2002-10-16 11:34 kdebisschop + + * configure.in: AM_STRTOD was a typo + +2002-10-16 11:31 kdebisschop + + * aclocal.m4: automake invokes acloacl on each run - it cannot be + right to include this + +2002-10-16 11:18 kdebisschop + + * acconfig.h: better checks for vsnprintf stuff + +2002-10-16 11:14 kdebisschop + + * plugins/check_http.c, configure.in: use asprintf + +2002-10-16 11:14 kdebisschop + + * plugins/utils.c: use asprintf to construct strscat + +2002-10-16 05:57 kdebisschop + + * plugins/popen.h.in: timeout interval is extern + +2002-10-16 05:56 kdebisschop + + * plugins/: utils.h.in, utils.c: start support for gettimeofday and + tv_usec + +2002-10-16 05:54 kdebisschop + + * aclocal.m4: generated with automake 1.6 / autoconf 2.53 (maybe + should not be in CVS, however) + +2002-10-16 05:52 kdebisschop + + * plugins/snprintf.c: newer snprintf from samba.org + +2002-10-16 05:43 kdebisschop + + * Makefile.am: cosmetic line wrap before 80 chars + +2002-10-16 05:42 kdebisschop + + * depcomp, .cvsignore: needed for automake 1.6 / autoconf 2.53 + +2002-10-16 05:41 kdebisschop + + * configure.in: work with newer automake, begin swithc to asprintf + +2002-10-15 07:23 sghosh + + * plugins-scripts/check_ifoperstatus.pl: new exit states, more + conditional checking + +2002-10-07 20:05 sghosh + + * plugins/check_dns.c: patch for expected IP address + +2002-10-07 02:34 kdebisschop + + * plugins/popen.c: make sure we do not run past the end of an + unterminated string + +2002-10-07 02:19 kdebisschop + + * plugins/negate.c: use asprintf, inhibit splint warning + +2002-10-05 12:08 kdebisschop + + * getloadavg.m4, plugins/getloadavg.c: lets use library instead od + inconsistent command line interfaces + +2002-09-26 03:17 kdebisschop + + * plugins/urlize.c: use ssprintf instead of sprintf + +2002-09-25 09:01 kdebisschop + + * plugins/check_http.c: incorporate comment on my_recv from Russell + Scibetti + +2002-09-25 08:58 kdebisschop + + * plugins/check_http.c: incorporate comments from Russell Scibetti + +2002-09-24 06:16 kdebisschop + + * plugins/check_http.c: replace remaining occurences of sprintf + with snprintf + +2002-09-16 01:47 kdebisschop + + * INSTALL: needed for latest autoconf + +2002-09-16 01:47 kdebisschop + + * Makefile.am, aclocal.m4, configure.in, nagios-plugins.spec.in: + finish ckleanup of rpm spec porcessing + +2002-09-14 22:11 kdebisschop + + * nagios-plugins.spec, nagios-plugins.spec.in: complete spec based + on confugure.in + +2002-09-14 22:06 kdebisschop + + * make-tarball, rpm: automake makes the dist tarball, rpmbuild -ta + makes the rpm + +2002-09-14 03:27 kdebisschop + + * plugins/check_tcp.c: time data in performance string + +2002-09-14 03:23 kdebisschop + + * plugins/check_http.c: time data in performance string + +2002-09-14 03:13 kdebisschop + + * plugins-scripts/check_log.sh: patch from Matthew Peters + , plus turned up a few bugs on my own + +2002-09-12 03:43 kdebisschop + + * plugins/Makefile.am: negate wrapper + +2002-09-08 13:05 kdebisschop + + * plugins/negate.c: wrapper to invert return status + +2002-09-08 13:05 kdebisschop + + * plugins/utils.c: clears up warnings in splint + +2002-09-06 03:25 kdebisschop + + * plugins-scripts/check_rpc.pl: case on key to ERRORS hash + +2002-09-04 07:00 sghosh + + * configure.in: more Mysql patches + +2002-09-04 03:12 sghosh + + * plugins-scripts/check_ntp.pl: dispersion check now controlled by + warn and crit + +2002-09-04 03:11 sghosh + + * configure.in: Mysql dir fix + +2002-09-04 03:10 sghosh + + * contrib/: check_ifoperstatus.pl, check_ifstatus.pl: moved to + supported plugins-scripts + +2002-09-02 19:47 sghosh + + * plugins/check_smtp.c: new -f option for adding a FROM address for + RFC correctness + +2002-09-01 17:22 sghosh + + * INSTALL, INSTALLING: file rename for MacOS X + +2002-09-01 17:18 sghosh + + * plugins/check_smtp.c: Valid MAIL command + +2002-08-22 23:08 sghosh + + * contrib/check_snmp_process_monitor.pl: updates + +2002-08-22 15:43 sghosh + + * command.cfg.in: smsclient config + +2002-08-22 15:42 sghosh + + * contrib/: check_snmp_disk_monitor.pl, + check_snmp_process_monitor.pl: new plugins contrib + +2002-08-18 19:03 kdebisschop + + * plugins/check_by_ssh.c: typo in options passed to ssh for ipv6. + fix by setting a generic hook for 1-char pasthhru options + +2002-08-14 20:17 sghosh + + * plugins-scripts/check_disk_smb.pl: patch for admin shares + +2002-08-14 20:07 sghosh + + * command.cfg.in: qpage definitions + +2002-08-14 20:06 sghosh + + * plugins-scripts/check_ifstatus.pl: skip PPP interfaces + +2002-08-14 20:04 sghosh + + * plugins/check_smtp.c: added HELO command + +2002-08-14 20:04 sghosh + + * plugins/check_by_ssh.c: ipv4/ipv6 switch added + +2002-08-14 20:03 sghosh + + * plugins/check_hpjd.c: net-snmp v5x fix + +2002-08-14 20:02 sghosh + + * contrib/check_apc_ups.pl: fix for ePN + +2002-08-14 20:01 sghosh + + * contrib/: check_linux_raid.pl, check_nagios_db.pl: new plugins + +2002-08-14 20:00 sghosh + + * contrib/check_inodes-freebsd.pl: check inodes - freebsd - + candidate for merge with check_inodes + +2002-08-14 16:29 sghosh + + * contrib/check_smb.sh: new smb check - users + +2002-08-13 04:18 egalstad + + * plugins/check_game.c: Mod to display current/max number of + players in a game (Frank Kannemann) + +2002-08-13 00:09 egalstad + + * contrib/check_disk_snmp.pl: Updated to use getopt (Christoph + Maser) + +2002-08-01 06:06 sghosh + + * plugins/check_snmp.c: re-patched exit state comparison + +2002-08-01 05:54 sghosh + + * plugins/check_snmp.c: port option added, -c support net-snmpv5, + complete response string output + +2002-08-01 05:46 egalstad + + * contrib/check_digitemp.pl: Add Brian Lane's Digitemp (1-wire temp + sensor) plugin + +2002-07-16 05:13 egalstad + + * contrib/check_disk_snmp.pl: Christoph Maser's plugin to check + disk usage via SNMP3 + +2002-07-16 01:04 stanleyhopcroft + + * contrib/check_ms_spooler.pl: Primitive and in need of refinement + test of MS spooler (with smbclient) + +2002-07-04 23:02 sghosh + + * contrib/check_procl.sh: Jerome Tytgat - accumulated/percentage + CPU/MEM per process - bash plugin + +2002-07-04 05:05 sghosh + + * INSTALL: doc update + +2002-06-28 22:08 sghosh + + * INSTALL: note about autoconf/automake version + +2002-06-25 22:32 sghosh + + * contrib/check_rbl.c: Check if IP address is specified on RBL - + Tim Bell + +2002-06-25 14:55 sghosh + + * contrib/check_lmmon.pl: check motherboard/cpu temp via lmmon + +2002-06-24 22:29 sghosh + + * plugins/check_http.c: ignore return status codes if user + specified status line check + +2002-06-24 21:41 sghosh + + * plugins/check_snmp.c: printf bug for large numbers - Jeff Murray + +2002-06-20 05:27 sghosh + + * plugins-scripts/check_disk_smb.pl: logic fix for disk space + thresholds + +2002-06-19 06:11 sghosh + + * plugins/: check_dig.c, check_dns.c, check_fping.c, check_hpjd.c, + check_nagios.c, check_ping.c, check_snmp.c, check_vsz.c, + urlize.c, utils.c, utils.h.in: more POSIX return value comparison + related code fixes + +2002-06-19 04:09 sghosh + + * plugins/: check_disk.c, check_ping.c, check_procs.c: fixes for + using POSIX return codes + +2002-06-18 02:06 sghosh + + * plugins/common.h.in: updated to POSIX return codes + +2002-06-18 02:05 sghosh + + * contrib/check_cluster.c: Ethan's check_cluster + +2002-06-13 21:49 sghosh + + * plugins/check_smtp.c: conformance to RFC 821 + +2002-06-13 04:03 sghosh + + * configure.in: use xntpdc on Solaris for check_ntp + +2002-06-10 04:24 sghosh + + * plugins/check_smtp.c: patch to stop NOQUEUE syslog messages - + Karl Ewald + +2002-06-08 01:33 sghosh + + * plugins-scripts/check_ntp.pl: xntpdc/ntpdc patch - John Koyle + +2002-06-06 05:16 sghosh + + * plugins-scripts/: subst.in, utils.sh.in: corrected result codes - + for sh; corrected substition for libexec - Tom Bertelson + +2002-06-06 05:15 sghosh + + * plugins/check_disk.c: added option for mount point - Tom + Bertelson + +2002-06-06 05:15 sghosh + + * plugins-scripts/check_oracle.sh: Add test for Oracle name server, + can dynamicall determine ORACLE_HOME - tom Bertelson + +2002-06-06 05:14 sghosh + + * plugins-scripts/check_flexlm.pl: conditional on lmstat + +2002-06-06 05:13 sghosh + + * plugins-scripts/check_ntp.pl: conditional on ntpdc + +2002-05-29 01:57 sghosh + + * command.cfg.in: notes added + +2002-05-28 04:14 sghosh + + * command.cfg.in: option updates, more examples + +2002-05-28 03:41 sghosh + + * command.cfg.in: option updates, more examples + +2002-05-27 03:10 sghosh + + * plugins-scripts/check_ntp.pl: checked in too quickly + +2002-05-27 03:05 sghosh + + * doc/: README, developer-guidelines.html, + developer-guidelines.sgml: added developer guidelines. + +2002-05-27 03:03 sghosh + + * configure.in: typo, AIX 4.3 ps, smbclient, Net::SNMP fixes + +2002-05-27 03:01 sghosh + + * acconfig.h, plugins-scripts/utils.pm.in: new var - smbclient + +2002-05-27 02:56 sghosh + + * plugins-scripts/check_ntp.pl: logic reorg, ePN fix and support + for utils.pm + +2002-05-27 02:55 sghosh + + * plugins-scripts/check_disk_smb.pl: ePN fix and support for + utils.pm + +2002-05-23 17:39 sghosh + + * contrib/: check_log2.pl, check_vcs.pl: New plugins from Aaron + Bostick - Veritas Cluster, logfile + +2002-05-10 04:51 sghosh + + * plugins-scripts/check_rpc.pl: updates for ePN, patch for multiple + version check + +2002-05-10 04:49 sghosh + + * configure.in, plugins-scripts/utils.pm.in: added programs to + autoconf + +2002-05-10 04:49 sghosh + + * acconfig.h: Added programs for autoconf + +2002-05-09 20:03 sghosh + + * plugins-scripts/: Makefile.am, check_ifoperstatus.pl: migrated + check_ifoperstatus to standard plugin + +2002-05-08 16:35 sghosh + + * plugins/check_ping.c: patch for Suse 8.0 loss output + +2002-05-08 06:10 sghosh + + * plugins-scripts/utils.pm.in: is_hostname added, update CODES to + POSIX + +2002-05-08 06:07 sghosh + + * plugins/: check_hpjd.c, check_ups.c: updated notes + +2002-05-08 06:04 sghosh + + * configure.in: updated messages and check for host command + +2002-05-08 05:58 sghosh + + * plugins-scripts/: Makefile.am, check_ifstatus.pl: moved updated + check_ifstatus to standard plugin + +2002-05-07 06:35 sghosh + + * plugins-scripts/: check_breeze.pl, check_flexlm.pl, + check_ircd.pl, check_netdns.pl, check_ntp.pl, check_wave.pl: 2nd + fix for ePN + +2002-05-02 17:43 sghosh + + * plugins-scripts/: check_breeze.pl, check_disk_smb.pl, + check_flexlm.pl, check_ircd.pl, check_netdns.pl, check_ntp.pl, + check_rpc.pl, check_wave.pl: fix for embedded perl + +2002-05-02 17:22 sghosh + + * tools/: README, mini_epn.c, p1.pl: updated mini_epn and p1.pl + added to plugins distribution + +2002-05-01 22:12 sghosh + + * contrib/tarballs/fetchlog-0.92.tar.gz: remote log check (via snmp + possible) by Alexander Haderer + +2002-04-29 03:58 kdebisschop + + * plugins/getopt.h: failed to carry over from old plugins, listed + in EXTRA_DIST, needed for build + +2002-04-23 13:50 sghosh + + * plugins/check_ping.c: corrected program name and added rtt patch + for RH7.2+beta + +2002-04-18 22:59 egalstad + + * contrib/check_inodes.pl: add check_inodes contrib plugin by John + Jolet + +2002-04-18 05:38 egalstad + + * configure.in: configure script patch for ping syntax + +2002-04-07 06:13 sghosh + + * contrib/: check_backup.pl, check_dl_size.pl: plugins from Patrick + Greenwell + +2002-04-05 23:22 sghosh + + * acconfig.h: added HOST_COMMAND + +2002-04-05 23:19 sghosh + + * contrib/tarballs/check_spread.tar: plugin to check spread + messaging toolkit + +2002-04-03 03:58 sghosh + + * contrib/check_oracle_instance.pl: from Sven Dolderer - check + oracle instance + +2002-04-03 03:56 sghosh + + * plugins-scripts/check_nfs.pl: check_nfs functionality exists in + check_rpc + +2002-03-18 05:15 sghosh + + * plugins-scripts/subst.in: function to update perl plugin scripts + to find utils.pm + +2002-03-01 02:53 egalstad + + * plugins/: .cvsignore, config.h.in: Fix for stupid me + +2002-03-01 02:42 egalstad + + * contrib/check_breeze.pl, contrib/check_dhcp.c, + contrib/check_flexlm.pl, contrib/check_hltherm.c, + contrib/check_hprsc.pl, contrib/check_ipxping.c, + contrib/check_memory.tgz, contrib/check_mysql.c, + contrib/check_uptime.c, contrib/check_wave.pl, + contrib/readme.txt, contrib/tarballs/berger-ping.tar.gz, + contrib/tarballs/bowen-langley_plugins.tar.gz, + contrib/tarballs/check_bgp-1.0.tar.gz, + contrib/tarballs/check_breeze.tar.gz, + contrib/tarballs/check_flexlm.tar.gz, + contrib/tarballs/check_hltherm.tar.gz, + contrib/tarballs/check_hprsc.tar.gz, + contrib/tarballs/check_memory.tgz, + contrib/tarballs/check_radius.tar.gz, + contrib/tarballs/check_wave.tar.gz, + contrib/tarballs/hopcroft-plugins.tar.gz, + contrib/tarballs/radius.tar.gz, plugins/.cvsignore, + plugins/config.h.in: Contrib plugin cleanup + +2002-02-28 06:42 egalstad + + * .cvsignore, AUTHORS, CODING, COPYING, ChangeLog, FAQ, Helper.pm, + INSTALL, Makefile.am, NEWS, README, REQUIREMENTS, ROADMAP, + Requirements, acconfig.h, aclocal.m4, command.cfg.in, LEGAL, + configure.in, install-sh, make-tarball, missing, mkinstalldirs, + nagios-plugins.spec, opttest.pl, package.def, rpm, subst.in, + subst.sh, test.pl.in, contrib/check_apache.pl, + contrib/check_apc_ups.pl, contrib/check_bgpstate.pl, + contrib/check_dhcp.c, contrib/check_dlswcircuit.pl, + contrib/check_dns_random.pl, contrib/check_email_loop.pl, + contrib/check_fping_in.c, contrib/check_ftpget.pl, + contrib/check_ifoperstatus.pl, contrib/check_ifstatus.pl, + contrib/check_pop3.pl, contrib/check_qmailq.pl, + contrib/check_timeout.c, contrib/checkciscotemp.pl, + contrib/check_ipxping.c, contrib/check_joy.sh, + contrib/check_maxchannels.pl, contrib/check_maxwanstate.pl, + contrib/check_mem.pl, contrib/check_memory.tgz, + contrib/check_mysql.c, contrib/check_mysql.pl, + contrib/check_netapp.pl, contrib/check_nmap.py, + contrib/check_nwstat.pl, contrib/check_ora_table_space.pl, + contrib/check_rrd_data.pl, contrib/check_sap.sh, + contrib/check_sockets.pl, contrib/check_uptime.c, + contrib/maser-oracle.pl, contrib/mrtgext.pl, contrib/readme.txt, + contrib/restrict.pl, contrib/utils.py, contrib/check_nagios.pl, + contrib/urlize.pl, contrib/aix/check_crit_dsk, + contrib/aix/check_dsk, contrib/aix/check_failed, + contrib/aix/check_io, contrib/aix/check_kerberos, + contrib/aix/check_ping, contrib/aix/check_queue, + contrib/aix/pg_stat, contrib/tarballs/berger-ping.tar.gz, + contrib/tarballs/bowen-langley_plugins.tar.gz, + contrib/tarballs/check_bgp-1.0.tar.gz, + contrib/tarballs/check_breeze.tar.gz, + contrib/tarballs/check_flexlm.tar.gz, + contrib/tarballs/check_hltherm.tar.gz, + contrib/tarballs/check_hprsc.tar.gz, + contrib/tarballs/check_radius.tar.gz, + contrib/tarballs/check_wave.tar.gz, + contrib/tarballs/hopcroft-plugins.tar.gz, + contrib/tarballs/radius.tar.gz, plugins/.cvsignore, + plugins/Makefile.am, plugins/check_by_ssh.c, plugins/check_dig.c, + plugins/check_disk.c, plugins/check_dns.c, plugins/check_dummy.c, + plugins/check_fping.c, plugins/check_ftp.c, plugins/check_game.c, + plugins/check_hpjd.c, plugins/check_http.c, + plugins/check_ide-smart.c, plugins/check_imap.c, + plugins/check_ldap.c, plugins/check_load.c, plugins/check_mrtg.c, + plugins/check_mrtgtraf.c, plugins/check_mysql.c, + plugins/check_nntp.c, plugins/check_nt.c, plugins/check_nwstat.c, + plugins/check_overcr.c, plugins/check_pgsql.c, + plugins/check_ping.c, plugins/check_pop.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_udp.c, plugins/check_ups.c, plugins/check_users.c, + plugins/check_vsz.c, plugins/common.h.in, plugins/getopt.c, + plugins/getopt1.c, plugins/netutils.c, plugins/netutils.h.in, + plugins/popen.c, plugins/popen.h.in, plugins/snprintf.c, + plugins/urlize.c, plugins/check_nagios.c, plugins/utils.c, + plugins/utils.h.in, plugins/version.h.in, plugins/t/check_disk.t, + plugins/t/check_dns.t, plugins/t/check_fping.t, + plugins/t/check_ftp.t, plugins/t/check_hpjd.t, + plugins/t/check_http.t, plugins/t/check_imap.t, + plugins/t/check_load.t, plugins/t/check_mysql.t, + plugins/t/check_ping.t, plugins/t/check_pop.t, + plugins/t/check_procs.t, plugins/t/check_smtp.t, + plugins/t/check_snmp.t, plugins/t/check_swap.t, + plugins/t/check_tcp.t, plugins/t/check_time.t, + plugins/t/check_udp.t, plugins/t/check_users.t, + plugins/t/check_vsz.t, plugins/tests/check_disk, + plugins/tests/check_dns, plugins/tests/check_ftp, + plugins/tests/check_hpjd, plugins/tests/check_http, + plugins/tests/check_load, plugins/tests/check_ping, + plugins/tests/check_procs, plugins/tests/check_swap, + plugins/tests/check_users, plugins/tests/check_vsz, + plugins-scripts/.cvsignore, plugins-scripts/Makefile.am, + plugins-scripts/check_breeze.pl, + plugins-scripts/check_disk_smb.pl, + plugins-scripts/check_flexlm.pl, plugins-scripts/check_ircd.pl, + plugins-scripts/check_log.sh, plugins-scripts/check_netdns.pl, + plugins-scripts/check_nfs.pl, plugins-scripts/check_ntp.pl, + plugins-scripts/check_oracle.sh, plugins-scripts/check_rpc.pl, + plugins-scripts/check_sensors.sh, plugins-scripts/check_wave.pl, + plugins-scripts/subst.in, plugins-scripts/utils.pm.in, + plugins-scripts/utils.sh.in, plugins-scripts/t/check_rpc.t, + tools/setup, tools/tango: Initial import of existing plugin code + +2002-02-28 06:42 egalstad + + * .cvsignore, AUTHORS, CODING, COPYING, ChangeLog, FAQ, Helper.pm, + INSTALL, Makefile.am, NEWS, README, REQUIREMENTS, ROADMAP, + Requirements, acconfig.h, aclocal.m4, command.cfg.in, LEGAL, + configure.in, install-sh, make-tarball, missing, mkinstalldirs, + nagios-plugins.spec, opttest.pl, package.def, rpm, subst.in, + subst.sh, test.pl.in, contrib/check_apache.pl, + contrib/check_apc_ups.pl, contrib/check_bgpstate.pl, + contrib/check_dhcp.c, contrib/check_dlswcircuit.pl, + contrib/check_dns_random.pl, contrib/check_email_loop.pl, + contrib/check_fping_in.c, contrib/check_ftpget.pl, + contrib/check_ifoperstatus.pl, contrib/check_ifstatus.pl, + contrib/check_pop3.pl, contrib/check_qmailq.pl, + contrib/check_timeout.c, contrib/checkciscotemp.pl, + contrib/check_ipxping.c, contrib/check_joy.sh, + contrib/check_maxchannels.pl, contrib/check_maxwanstate.pl, + contrib/check_mem.pl, contrib/check_memory.tgz, + contrib/check_mysql.c, contrib/check_mysql.pl, + contrib/check_netapp.pl, contrib/check_nmap.py, + contrib/check_nwstat.pl, contrib/check_ora_table_space.pl, + contrib/check_rrd_data.pl, contrib/check_sap.sh, + contrib/check_sockets.pl, contrib/check_uptime.c, + contrib/maser-oracle.pl, contrib/mrtgext.pl, contrib/readme.txt, + contrib/restrict.pl, contrib/utils.py, contrib/check_nagios.pl, + contrib/urlize.pl, contrib/aix/check_crit_dsk, + contrib/aix/check_dsk, contrib/aix/check_failed, + contrib/aix/check_io, contrib/aix/check_kerberos, + contrib/aix/check_ping, contrib/aix/check_queue, + contrib/aix/pg_stat, contrib/tarballs/berger-ping.tar.gz, + contrib/tarballs/bowen-langley_plugins.tar.gz, + contrib/tarballs/check_bgp-1.0.tar.gz, + contrib/tarballs/check_breeze.tar.gz, + contrib/tarballs/check_flexlm.tar.gz, + contrib/tarballs/check_hltherm.tar.gz, + contrib/tarballs/check_hprsc.tar.gz, + contrib/tarballs/check_radius.tar.gz, + contrib/tarballs/check_wave.tar.gz, + contrib/tarballs/hopcroft-plugins.tar.gz, + contrib/tarballs/radius.tar.gz, plugins/.cvsignore, + plugins/Makefile.am, plugins/check_by_ssh.c, plugins/check_dig.c, + plugins/check_disk.c, plugins/check_dns.c, plugins/check_dummy.c, + plugins/check_fping.c, plugins/check_ftp.c, plugins/check_game.c, + plugins/check_hpjd.c, plugins/check_http.c, + plugins/check_ide-smart.c, plugins/check_imap.c, + plugins/check_ldap.c, plugins/check_load.c, plugins/check_mrtg.c, + plugins/check_mrtgtraf.c, plugins/check_mysql.c, + plugins/check_nntp.c, plugins/check_nt.c, plugins/check_nwstat.c, + plugins/check_overcr.c, plugins/check_pgsql.c, + plugins/check_ping.c, plugins/check_pop.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_udp.c, plugins/check_ups.c, plugins/check_users.c, + plugins/check_vsz.c, plugins/common.h.in, plugins/getopt.c, + plugins/getopt1.c, plugins/netutils.c, plugins/netutils.h.in, + plugins/popen.c, plugins/popen.h.in, plugins/snprintf.c, + plugins/urlize.c, plugins/check_nagios.c, plugins/utils.c, + plugins/utils.h.in, plugins/version.h.in, plugins/t/check_disk.t, + plugins/t/check_dns.t, plugins/t/check_fping.t, + plugins/t/check_ftp.t, plugins/t/check_hpjd.t, + plugins/t/check_http.t, plugins/t/check_imap.t, + plugins/t/check_load.t, plugins/t/check_mysql.t, + plugins/t/check_ping.t, plugins/t/check_pop.t, + plugins/t/check_procs.t, plugins/t/check_smtp.t, + plugins/t/check_snmp.t, plugins/t/check_swap.t, + plugins/t/check_tcp.t, plugins/t/check_time.t, + plugins/t/check_udp.t, plugins/t/check_users.t, + plugins/t/check_vsz.t, plugins/tests/check_disk, + plugins/tests/check_dns, plugins/tests/check_ftp, + plugins/tests/check_hpjd, plugins/tests/check_http, + plugins/tests/check_load, plugins/tests/check_ping, + plugins/tests/check_procs, plugins/tests/check_swap, + plugins/tests/check_users, plugins/tests/check_vsz, + plugins-scripts/.cvsignore, plugins-scripts/Makefile.am, + plugins-scripts/check_breeze.pl, + plugins-scripts/check_disk_smb.pl, + plugins-scripts/check_flexlm.pl, plugins-scripts/check_ircd.pl, + plugins-scripts/check_log.sh, plugins-scripts/check_netdns.pl, + plugins-scripts/check_nfs.pl, plugins-scripts/check_ntp.pl, + plugins-scripts/check_oracle.sh, plugins-scripts/check_rpc.pl, + plugins-scripts/check_sensors.sh, plugins-scripts/check_wave.pl, + plugins-scripts/subst.in, plugins-scripts/utils.pm.in, + plugins-scripts/utils.sh.in, plugins-scripts/t/check_rpc.t, + tools/setup, tools/tango: Initial revision + diff --git a/FAQ b/FAQ new file mode 100644 index 0000000..370ac99 --- /dev/null +++ b/FAQ @@ -0,0 +1,87 @@ +Frequently Asked Questions +************************** + +1. 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. + +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: + + check_radius (nagios-plugins 1.3.0-alpha1) 1.11 + + 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. + +3. Q: What information do I need to include when asking for help or + submitting a bug report? + + 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? + + 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. + + 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? + + 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. + +6. Q: I prefer to build my own RPMs. Do I need to install all of the + various dependencies? + + A: Beginning with the 1.2.9-1 release, you may run + + rpm --define 'custom 1' -ta nagios-plugins-.tar.gz + + In prior releases, you must unpack the tarball and build the + RPM using nagios-custom.spec with 'rpm -ba'. + +7. 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.) + +8. Q: I have a plugin to offer. What do I do to get it accepted? + + 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. diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..54caf7c --- /dev/null +++ b/INSTALL @@ -0,0 +1,229 @@ +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software +Foundation, Inc. + + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +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=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +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 +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +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). + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/LEGAL b/LEGAL new file mode 100644 index 0000000..147fc98 --- /dev/null +++ b/LEGAL @@ -0,0 +1,10 @@ + +All source code, binaries, documentation, and information contained +in this distribution are provided AS IS with NO WARRANTY OF ANY KIND, +INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY, AND FITNESS FOR +A PARTICULAR PURPOSE. + +Nagios and the Nagios logo are trademarks of Ethan Galstad. All +other trademarks, servicemarks, registered trademarks, and +registered servicemarks are the property of their respective owner(s). + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..cc46a46 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,51 @@ +## Process this file with automake to produce Makefile.in + +SUBDIRS = intl lib plugins plugins-scripts m4 po + +EXTRA_DIST = config.rpath \ + ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS BUGS CHANGES CODING FAQ LEGAL \ + REQUIREMENTS SUPPORT THANKS \ + NPTest.pm contrib pkg nagios-plugins.spec \ + config_test/Makefile config_test/run_tests config_test/child_test.c + +ACLOCAL_AMFLAGS = -I m4 + +localedir = $(datadir)/locale +DEFS = -DLOCALEDIR=\"$(localedir)\" + +dist-hook: + make THANKS nagios-plugins.spec pkg/fedora/nagios-plugins.spec + +test: + cd plugins; $(MAKE) test + cd plugins-scripts; $(MAKE) test + +nagios-plugins.spec: nagios-plugins.spec.in + sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;s/^%%{requires}$$//" $? > $@ + +pkg/fedora/nagios-plugins.spec: nagios-plugins.spec.in + $(top_srcdir)/mkinstalldirs pkg/fedora + sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;/^# Requires$$/r $(top_srcdir)/pkg/fedora/requires" $? > $@ + +# Solaris pkgmk +BUILDDIR = build-solaris +PACKDIR = build-pkg +PKGSCRIPT = pkg/solaris/solpkg + +solpkg: + if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi + if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi + $(MAKE) all + $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install + $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR) + cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR) + +THANKS: THANKS.in + @echo "This software is brought to you by the Nagios Plugins Development Team. However," > $@ + @echo "there have been many contributors to this project. Everyone below has helped in " >> $@ + @echo "raising bug reports, creating patches or contributing new plugins." >> $@ + @echo "" >> $@ + perl -e ' while (<>) { print STDERR "Duplicate: $$_",$$/ if ($$a{$$_}) ; $$a{$$_}++}; print sort by_last_field (keys %a); sub by_last_field { ($$a1) = $$a =~ /\s(\w+)$$/; ($$b1) = $$b =~ /\s(\w+)$$/; $$a1 cmp $$b1}' $? >> $@ + +pkgclean: + rm -rf $(BUILDDIR) $(PACKDIR) diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..ef512d0 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,731 @@ +# Makefile.in generated by automake 1.8 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# 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 = : +host_triplet = @host@ +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/command.cfg.in \ + $(srcdir)/config.h.in $(srcdir)/test.pl.in \ + $(top_srcdir)/configure $(top_srcdir)/intl/Makefile.in \ + $(top_srcdir)/pkg/solaris/pkginfo.in ABOUT-NLS AUTHORS COPYING \ + ChangeLog INSTALL NEWS THANKS config.guess config.rpath \ + config.sub configure.in depcomp install-sh missing \ + mkinstalldirs +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/afs.m4 \ + $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/exitfail.m4 \ + $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fstypename.m4 \ + $(top_srcdir)/m4/fsusage.m4 $(top_srcdir)/m4/getopt.m4 \ + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \ + $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ + $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.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/malloc.m4 $(top_srcdir)/m4/mountlist.m4 \ + $(top_srcdir)/m4/np_coreutils.m4 $(top_srcdir)/m4/np_curl.m4 \ + $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/realloc.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/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) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = command.cfg test.pl pkg/solaris/pkginfo \ + intl/Makefile +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +INSTALL = @INSTALL@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASENAME = @BASENAME@ +BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = -DLOCALEDIR=\"$(localedir)\" +DEPDIR = @DEPDIR@ +DEPLIBS = @DEPLIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXTRAS = @EXTRAS@ +EXTRA_NETOBJS = @EXTRA_NETOBJS@ +GENCAT = @GENCAT@ +GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ +GLIBC21 = @GLIBC21@ +GMSGFMT = @GMSGFMT@ +HAVE__BOOL = @HAVE__BOOL@ +HOSTNAME = @HOSTNAME@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_OPTS = @INSTALL_OPTS@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLBISON = @INTLBISON@ +INTLLIBS = @INTLLIBS@ +INTLOBJS = @INTLOBJS@ +INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ +KMEM_GROUP = @KMEM_GROUP@ +KRBINCLUDE = @KRBINCLUDE@ +LDAPINCLUDE = @LDAPINCLUDE@ +LDAPLIBS = @LDAPLIBS@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MATHLIBS = @MATHLIBS@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +MYSQLINCLUDE = @MYSQLINCLUDE@ +MYSQLLIBS = @MYSQLLIBS@ +NEED_SETGID = @NEED_SETGID@ +NEED_VA_LIST = @NEED_VA_LIST@ +OBJEXT = @OBJEXT@ +OPENSSL = @OPENSSL@ +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_DIG = @PATH_TO_DIG@ +PATH_TO_FPING = @PATH_TO_FPING@ +PATH_TO_HOST = @PATH_TO_HOST@ +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_NTPDATE = @PATH_TO_NTPDATE@ +PATH_TO_NTPDC = @PATH_TO_NTPDC@ +PATH_TO_NTPQ = @PATH_TO_NTPQ@ +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_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WARRANTY = @WARRANTY@ +XGETTEXT = @XGETTEXT@ +ac_ct_CC = @ac_ct_CC@ +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__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +check_mysql_LDFLAGS = @check_mysql_LDFLAGS@ +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_nagios_group = @with_nagios_group@ +with_nagios_user = @with_nagios_user@ +with_trusted_path = @with_trusted_path@ +SUBDIRS = intl lib plugins plugins-scripts m4 po +EXTRA_DIST = config.rpath \ + ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS BUGS CHANGES CODING FAQ LEGAL \ + REQUIREMENTS SUPPORT THANKS \ + NPTest.pm contrib pkg nagios-plugins.spec \ + config_test/Makefile config_test/run_tests config_test/child_test.c + +ACLOCAL_AMFLAGS = -I m4 +localedir = $(datadir)/locale + +# Solaris pkgmk +BUILDDIR = build-solaris +PACKDIR = build-pkg +PKGSCRIPT = pkg/solaris/solpkg +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +command.cfg: $(top_builddir)/config.status $(srcdir)/command.cfg.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +test.pl: $(top_builddir)/config.status $(srcdir)/test.pl.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +pkg/solaris/pkginfo: $(top_builddir)/config.status $(top_srcdir)/pkg/solaris/pkginfo.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +intl/Makefile: $(top_builddir)/config.status $(top_srcdir)/intl/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +uninstall-info-am: + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +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: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if (etags --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + else \ + include_option=--include; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -f $$subdir/TAGS && \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + 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) + $(am__remove_distdir) + mkdir $(distdir) + $(mkdir_p) $(distdir)/. $(distdir)/config_test $(distdir)/intl $(distdir)/m4 $(distdir)/pkg/solaris $(distdir)/plugins-scripts $(distdir)/po + @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 + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || mkdir "$(distdir)/$$subdir" \ + || exit 1; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="../$(top_distdir)" \ + distdir="../$(distdir)/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + --with-included-gettext \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && $(mkdir_p) "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile config.h +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -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-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-recursive + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-info-am + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ + check-am clean clean-generic clean-recursive ctags \ + ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ + dist-tarZ dist-zip distcheck distclean distclean-generic \ + distclean-hdr distclean-recursive distclean-tags \ + distcleancheck distdir distuninstallcheck 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 installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive \ + mostlyclean mostlyclean-generic mostlyclean-recursive pdf \ + pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-info-am + + +dist-hook: + make THANKS nagios-plugins.spec pkg/fedora/nagios-plugins.spec + +test: + cd plugins; $(MAKE) test + cd plugins-scripts; $(MAKE) test + +nagios-plugins.spec: nagios-plugins.spec.in + sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;s/^%%{requires}$$//" $? > $@ + +pkg/fedora/nagios-plugins.spec: nagios-plugins.spec.in + $(top_srcdir)/mkinstalldirs pkg/fedora + sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;/^# Requires$$/r $(top_srcdir)/pkg/fedora/requires" $? > $@ + +solpkg: + if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi + if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi + $(MAKE) all + $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install + $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR) + cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR) + +THANKS: THANKS.in + @echo "This software is brought to you by the Nagios Plugins Development Team. However," > $@ + @echo "there have been many contributors to this project. Everyone below has helped in " >> $@ + @echo "raising bug reports, creating patches or contributing new plugins." >> $@ + @echo "" >> $@ + perl -e ' while (<>) { print STDERR "Duplicate: $$_",$$/ if ($$a{$$_}) ; $$a{$$_}++}; print sort by_last_field (keys %a); sub by_last_field { ($$a1) = $$a =~ /\s(\w+)$$/; ($$b1) = $$b =~ /\s(\w+)$$/; $$a1 cmp $$b1}' $? >> $@ + +pkgclean: + rm -rf $(BUILDDIR) $(PACKDIR) +# 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/NEWS b/NEWS new file mode 100644 index 0000000..1c3c54c --- /dev/null +++ b/NEWS @@ -0,0 +1,2 @@ +New in 1.2.9: +* Added support for multiplatform builds diff --git a/NPTest.pm b/NPTest.pm new file mode 100644 index 0000000..b82148d --- /dev/null +++ b/NPTest.pm @@ -0,0 +1,554 @@ +package NPTest; + +# +# Helper Functions for testing Nagios Plugins +# + +require Exporter; +@ISA = qw(Exporter); +@EXPORT = qw(getTestParameter checkCmd skipMissingCmd); +@EXPORT_OK = qw(DetermineTestHarnessDirectory TestsFrom SetCacheFilename); + +use strict; +use warnings; + +use Cwd; +use File::Basename; + +use IO::File; +use Data::Dumper; + +use Test; + +use vars qw($VERSION); +$VERSION = do { my @r = (q$Revision: 1.2 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; # must be all one line, for MakeMaker + +=head1 NAME + +NPTest - Simplify the testing of Nagios Plugins + +=head1 DESCRIPTION + +This modules provides convenience functions to assist in the testing +of Nagios Plugins, making the testing code easier to read and write; +hopefully encouraging the development of more complete test suite for +the Nagios Plugins. It is based on the patterns of testing seen in the +1.4.0 release, and continues to use the L module as the basis of +testing. + +=head1 FUNCTIONS + +This module defines three public functions, C, +C and C. These are exported by +default via the C statement. + +=over + +=item C + +A flexible and user override-able method of collecting, storing and +retrieving test parameters. This function allows the test harness +developer to interactively request test parameter information from the +user, when the no means of obtaining the information automatically has +been successful. The user is provided with the option of accepting +test harness developer's default value for the parameter, if a suggested +default is provided. + +User supplied responses are stored in an external (file-based) +cache. These values are retrieved on subsequent runs alleviating the +user of reconfirming the previous entered responses. The user is able +to override the value of a parameter on any given run by setting the +associated environment variable. These environment variable based +overrides are not stored in the cache, allowing one-time and what-if +based tests on the command line without polluting the cache. + +The option exists to store parameters in a scoped means, allowing a +test harness to a localise a parameter should the need arise. This +allows a parameter of the same name to exist in a test harness +specific scope, while not affecting the globally scoped parameter. The +scoping identifier is the name of the test harness sans the trailing +".t". All cache searches first look to a scoped parameter before +looking for the parameter at global scope. Thus for a test harness +called "check_disk.t" requesting the parameter "mountpoint_valid", the +cache is first searched for "check_disk"/"mountpoint_valid", if this +fails, then a search is conducted for "mountpoint_valid". + +The facilitate quick testing setup, it is possible to accept all the +developer provided defaults by setting the environment variable +"NPTEST_ACCEPTDEFAULT" to "1" (or any other perl truth value). Note +that, such defaults are not stored in the cache, as there is currently +no mechanism to edit existing cache entries, save the use of text +editor or removing the cache file completely. + +=item C + +This function attempts to encompass the majority of test styles used +in testing Nagios Plugins. As each plug-in is a separate command, the +typical tests we wish to perform are against the exit status of the +command and the output (if any) it generated. Simplifying these tests +into a single function call, makes the test harness easier to read and +maintain and allows additional functionality (such as debugging) to be +provided withoutadditional effort on the part of the test harness +developer. + +It is possible to enable debugging via the environment variable +C. If this environment variable exists and its value in PERL's +boolean context evaluates to true, debugging is enabled. + +The function prototype can be expressed as follows: + + Parameter 1 : command => DEFINED SCALAR(string) + Parameter 2 : desiredExitStatus => ONE OF + SCALAR(integer) + ARRAYREF(integer) + HASHREF(integer,string) + UNDEFINED + Parameter 3 : desiredOutput => SCALAR(string) OR UNDEFINED + Parameter 4 : exceptions => HASH(integer,string) OR UNDEFINED + Returns : SCALAR(integer) as defined by Test::ok(...) + +The function treats the first parameter C<$command> as a command line +to execute as part of the test, it is executed only once and its exit +status (C<$?EE8>) and output are captured. + +At this point if debugging is enabled the command, its exit status and +output are displayed to the tester. + +C allows the testing of either the exit status or the +generated output or both, not testing either will result in neither +the C or C functions being called, +something you probably don't want. Note that each defined test +(C<$desiredExitStatus> and C<$desiredOutput>) results in a invocation +of either C or C, so remember this +when counting the number of tests to place in the C +call. + +Many Nagios Plugins test network services, some of which may not be +present on all systems. To cater for this, C allows the +tester to define exceptions based on the command's exit status. These +exceptions are provided to skip tests if the test case developer +believes the service is not being provided. For example, if a site +does not have a POP3 server, the test harness could map the +appropriate exit status to a useful message the person running the +tests, telling the reason the test is being skipped. + +Example: + +my %exceptions = ( 2 =E "No POP Server present?" ); + +$t += checkCmd( "./check_pop I", 0, undef, %exceptions ); + +Thus, in the above example, an exit status of 2 does not result in a +failed test case (as the exit status is not the desired value of 0), +but a skipped test case with the message "No POP Server present?" +given as the reason. + +Sometimes the exit status of a command should be tested against a set +of possible values, rather than a single value, this could especially +be the case in failure testing. C support two methods +of testing against a set of desired exit status values. + +=over + +=item * + +Firstly, if C<$desiredExitStatus> is a reference to an array of exit +stati, if the actual exit status of the command is present in the +array, it is used in the call to C when testing the +exit status. + +=item * + +Alternatively, if C<$desiredExitStatus> is a reference to a hash of +exit stati (mapped to the strings "continue" or "skip"), similar +processing to the above occurs with the side affect of determining if +any generated output testing should proceed. Note: only the string +"skip" will result in generated output testing being skipped. + +=back + +=item C + +If a command is missing and the test harness must C some +or all of the tests in a given test harness this function provides a +simple iterator to issue an appropriate message the requested number +of times. + +=back + +=head1 SEE ALSO + +L + +The rest of the code, as I have only commented on the major public +functions that test harness writers will use, not all the code present +in this helper module. + +=head1 AUTHOR + +Copyright (c) 2005 Peter Bray. All rights reserved. + +This package is free software and is provided "as is" without express +or implied warranty. It may be used, redistributed and/or modified +under the same terms as the Nagios Plugins release. + +=cut + +# +# Package Scope Variables +# + +my( %CACHE ) = (); + +# I'm not really sure wether to house a site-specific cache inside +# or outside of the extracted source / build tree - lets default to outside +my( $CACHEFILENAME ) = ( exists( $ENV{'NPTEST_CACHE'} ) && $ENV{'NPTEST_CACHE'} ) + ? $ENV{'NPTEST_CACHE'} : "/var/tmp/NPTest.cache"; # "../Cache.pdd"; + +# +# Testing Functions +# + +sub checkCmd +{ + my( $command, $desiredExitStatus, $desiredOutput, %exceptions ) = @_; + + my $output = `${command}`; + my $exitStatus = $? >> 8; + + $output = "" unless defined( $output ); + chomp( $output ); + + if ( exists( $ENV{'NPTEST_DEBUG'} ) && $ENV{'NPTEST_DEBUG'} ) + { + my( $pkg, $file, $line ) = caller(0); + + print "checkCmd: Called from line $line in $file\n"; + print "Testing : ${command}\n"; + print "Result : ${exitStatus} AND '${output}'\n"; + } + + my $testStatus; + + my $testOutput = "continue"; + + if ( defined( $desiredExitStatus ) ) + { + if ( ref $desiredExitStatus eq "ARRAY" ) + { + if ( scalar( grep { $_ == $exitStatus } @{$desiredExitStatus} ) ) + { + $desiredExitStatus = $exitStatus; + } + else + { + $desiredExitStatus = -1; + } + } + elsif ( ref $desiredExitStatus eq "HASH" ) + { + if ( exists( ${$desiredExitStatus}{$exitStatus} ) ) + { + if ( defined( ${$desiredExitStatus}{$exitStatus} ) ) + { + $testOutput = ${$desiredExitStatus}{$exitStatus}; + } + $desiredExitStatus = $exitStatus; + } + else + { + $desiredExitStatus = -1; + } + } + + if ( %exceptions && exists( $exceptions{$exitStatus} ) ) + { + $testStatus += skip( $exceptions{$exitStatus}, $exitStatus, $desiredExitStatus ); + } + else + { + $testStatus += ok( $exitStatus, $desiredExitStatus ); + } + } + + if ( defined( $desiredOutput ) ) + { + if ( $testOutput ne "skip" ) + { + $testStatus += ok( $output, $desiredOutput ); + } + else + { + $testStatus += skip( "Skipping output test as requested", $output, $desiredOutput ); + } + } + + return $testStatus; +} + + +sub skipMissingCmd +{ + my( $command, $count ) = @_; + + my $testStatus; + + for ( 1 .. $count ) + { + $testStatus += skip( "Missing ${command} - tests skipped", 1 ); + } + + return $testStatus; +} + +sub getTestParameter +{ + my( $param, $envvar, $default, $brief, $scoped ) = @_; + + # Apply default values for optional arguments + $scoped = ( defined( $scoped ) && $scoped ); + + my $testharness = basename( (caller(0))[1], ".t" ); # used for scoping + + if ( defined( $envvar ) && exists( $ENV{$envvar} ) && $ENV{$envvar} ) + { + return $ENV{$envvar} + } + + my $cachedValue = SearchCache( $param, $testharness ); + if ( defined( $cachedValue ) && $cachedValue ) + { + return $cachedValue; + } + + my $defaultValid = ( defined( $default ) && $default ); + my $autoAcceptDefault = ( exists( $ENV{'NPTEST_ACCEPTDEFAULT'} ) && $ENV{'NPTEST_ACCEPTDEFAULT'} ); + + if ( $autoAcceptDefault && $defaultValid ) + { + return $default; + } + + my $userResponse = ""; + + while ( $userResponse eq "" ) + { + print STDERR "\n"; + print STDERR "Test Harness : $testharness\n"; + print STDERR "Test Parameter : $param\n"; + print STDERR "Environment Variable : $envvar\n"; + print STDERR "Brief Description : $brief\n"; + print STDERR "Enter value ", ($defaultValid ? "[${default}]" : "[]"), " => "; + $userResponse = ; + $userResponse = "" if ! defined( $userResponse ); # Handle EOF + chomp( $userResponse ); + if ( $defaultValid && $userResponse eq "" ) + { + $userResponse = $default; + } + } + + print STDERR "\n"; + + # define all user responses at global scope + SetCacheParameter( $param, ( $scoped ? $testharness : undef ), $userResponse ); + + return $userResponse; +} + +# +# Internal Cache Management Functions +# + +sub SearchCache +{ + my( $param, $scope ) = @_; + + LoadCache(); + + if ( exists( $CACHE{$scope} ) && exists( $CACHE{$scope}{$param} ) ) + { + return $CACHE{$scope}{$param}; + } + + if ( exists( $CACHE{$param} ) ) + { + return $CACHE{$param}; + } +} + +sub SetCacheParameter +{ + my( $param, $scope, $value ) = @_; + + if ( defined( $scope ) ) + { + $CACHE{$scope}{$param} = $value; + } + else + { + $CACHE{$param} = $value; + } + + SaveCache(); +} + +sub LoadCache +{ + return if exists( $CACHE{'_cache_loaded_'} ); + + if ( -f $CACHEFILENAME ) + { + my( $fileHandle ) = new IO::File; + + if ( ! $fileHandle->open( "< ${CACHEFILENAME}" ) ) + { + print STDERR "NPTest::LoadCache() : Problem opening ${CACHEFILENAME} : $!\n"; + return; + } + + my( $fileContents ) = join( "\n", <$fileHandle> ); + + $fileHandle->close(); + + my( $contentsRef ) = eval $fileContents; + %CACHE = %{$contentsRef}; + + } + + $CACHE{'_cache_loaded_'} = 1; +} + + +sub SaveCache +{ + delete $CACHE{'_cache_loaded_'}; + + my( $fileHandle ) = new IO::File; + + if ( ! $fileHandle->open( "> ${CACHEFILENAME}" ) ) + { + print STDERR "NPTest::LoadCache() : Problem saving ${CACHEFILENAME} : $!\n"; + return; + } + + my( $dataDumper ) = new Data::Dumper( [ \%CACHE ] ); + + $dataDumper->Terse(1); + + print $fileHandle $dataDumper->Dump(); + + $fileHandle->close(); + + $CACHE{'_cache_loaded_'} = 1; +} + +# +# (Questionable) Public Cache Management Functions +# + +sub SetCacheFilename +{ + my( $filename ) = @_; + + # Unfortunately we can not validate the filename + # in any meaningful way, as it may not yet exist + $CACHEFILENAME = $filename; +} + + +# +# Test Harness Wrapper Functions +# + +sub DetermineTestHarnessDirectory +{ + my( $userSupplied ) = @_; + + # User Supplied + if ( defined( $userSupplied ) && $userSupplied ) + { + if ( -d $userSupplied ) + { + return $userSupplied; + } + else + { + return undef; # userSupplied is invalid -> FAIL + } + } + + # Simple Case : "t" is a subdirectory of the current directory + if ( -d "./t" ) + { + return "./t"; + } + + # To be honest I don't understand which case satisfies the + # original code in test.pl : when $tstdir == `pwd` w.r.t. + # $tstdir =~ s|^(.*)/([^/]+)/?$|$1/$2|; and if (-d "../../$2/t") + # Assuming pwd is "/a/b/c/d/e" then we are testing for "/a/b/c/e/t" + # if I understand the code correctly (a big assumption) + + # Simple Case : the current directory is "t" + my $pwd = cwd(); + + if ( $pwd =~ m|/t$| ) + { + return $pwd; + + # The alternate that might work better is + # chdir( ".." ); + # return "./t"; + # As the current test harnesses assume the application + # to be tested is in the current directory (ie "./check_disk ....") + } + + return undef; +} + +sub TestsFrom +{ + my( $directory, $excludeIfAppMissing ) = @_; + + $excludeIfAppMissing = 0 unless defined( $excludeIfAppMissing ); + + if ( ! opendir( DIR, $directory ) ) + { + print STDERR "NPTest::TestsFrom() - Failed to open ${directory} : $!\n"; + return (); + } + + my( @tests ) = (); + + my $filename; + my $application; + + while ( $filename = readdir( DIR ) ) + { + if ( $filename =~ m/\.t$/ ) + { + if ( $excludeIfAppMissing ) + { + $application = basename( $filename, ".t" ); + if ( ! -e $application ) + { + print STDERR "No application (${application}) found for test harness (${filename})\n"; + next; + } + } + push @tests, "${directory}/${filename}"; + } + } + + closedir( DIR ); + + return @tests; +} + + + +1; +# +# End of File +# diff --git a/README b/README new file mode 100644 index 0000000..5f305b9 --- /dev/null +++ b/README @@ -0,0 +1,101 @@ +Nagios Plugins README +--------------------- + +* For instructions on installing these plugins for use with Nagios, + 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 information on detailed changes that have been made or plugins + that have been added, read the Changelog file. + +* Some plugins require that you have additional programs and/or + libraries installed on your system before they can be used. Plugins + that are dependent on other programs/libraries that are missing are + usually not compiled. Read the REQUIREMENTS file for more information. + +* For a list of outstanding bugs for this release, see the BUGS file. + +* Individual plugins are self documenting. All plugins that comply with + the basic guidelines for development will provide detailed help when + invoked with the '-h' or '--help' options. + +* The file command.cfg contains example configurations for many of the + plugins + +* The win32 subdir contains plugins specific to the Win32 platform. + These are scripts or binaries. + +You can check for the latest plugins at: + http://sourceforge.net/projects/nagiosplug/ + +Send mail to nagiosplug-help@lists.sourceforge.net for assistance. Please +include the OS type and version that you are using. Also, run the plugin with +the '-vvv' option and provide the resulting version information. Of course, +there may be additional diagnostic information required as well. Use good +judgment. + +Send mail to nagiosplug-devel@lists.sourceforge.net for developer discussions. + +For patch submissions and bug reports, please use the appropriate resources at +http://sourceforge.net/projects/nagiosplug/ (navigate to the bug tool and/or +patch tool from the summary page). Patches should be relative to the current +CVS head (development), or to the head of the current stable branch. Also, +please include version information for your OS and the plugin(s) your are +patching/reporting. + + + + +Nagios Plugins Quick-and-Dirty Installation Instructions +-------------------------------------------------------- + +0) If you are using the CVS tree, you will need m4, gettext, automake, and autoconf. + To start out, run ./tools/setup + + For more detail, see the developer guidelines at + http://nagiosplug.sourceforge.net/developer-guidelines.html. + + +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 + + 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 + a web browser (default is '/nagios/cgi-bin') + + +2) Compile the plugins with the following command: + + make + + +3) Install the compiled plugins and plugin scripts with the following command: + + make install + + The installation procedure will attempt to place the plugins in a + 'libexec/' subdirectory in the base directory you specified with + the --prefix argument to the configure script. + + +4) Verify that your host configuration file (hosts.cfg) for Nagios contains + the correct paths to the new plugins. + + + +That's it. If you have any problems or questions, feel free send mail +to nagiosplug-help@lists.sourceforge.net + + + + +-- +Karl DeBisschop (kdebisschop@users.sourceforge.net) diff --git a/REQUIREMENTS b/REQUIREMENTS new file mode 100644 index 0000000..bd08aa1 --- /dev/null +++ b/REQUIREMENTS @@ -0,0 +1,78 @@ +Nagios Plugin Requirements +-------------------------- + +Some plugins require that you have additional programs and/or +libraries installed on your system before they can be used. Plugins +that are dependent on other programs/libraries that are missing are +usually not compiled. Requirements for various plugins are listed +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 + 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 + Last tested on qstat 2.3d BETA + +check_hpjd: + - 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 + Lib: libldap, liblber + Redhat Source: openldap-1.2.9-6.i386.rpm, openldap-devel-1.2.9-6.i386.rpm + +check_mysql: + - Requires the MySQL libraries available from + 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 + +check_pqsql: + - Requires the PostgreSQL libraries available from + 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 + +check_snmp: + - 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/ + +check_nwstat: + - Requires MRTGEXT NLM for Novell Servers + http://www.engr.wisc.edu/~drews/mrtg/ + +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/ + +OS Specific Issues +------------------ + +HP-UX 11.11 +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/SUPPORT b/SUPPORT new file mode 100644 index 0000000..5d85207 --- /dev/null +++ b/SUPPORT @@ -0,0 +1,75 @@ +SUPPORT + +Using the mailing lists and tracker databases at SourceForge are the +best ways to obtain direct support for the Nagios Plugins. There may +also be commercial support options available to you -- check +http://www.nagios.org/ to track the current status of commercial +support offerings. + +There are two mailing lists associated with Nagios Plugin development: +'help' (mailto:nagiosplug-help@lists.sourceforge.net), and 'devel' +(mailto:nagiosplug-devel@lists.sourceforge.net). Unless you are fairly +certain you have found a bug or that you are requesting a new feature, +please direct support requests to 'help'. + +Because these lists are handled entirely by volunteers, and because +these same volunteers are often plugin developers who can also use +their time to fix bug and provide feature requests, it is generally in +you interest to do a modest amount of legwork before posting to either +of these lists. + +Plugins that are in the contrib directories are provided as-is. We will +try to help, but sometimes the plugins have dependencies that the nagios-plugin +developers do not have access to. You may be able to try the authors +directly. + +In brief, always provide the version of the software that you are +using, and when requesting features or reporting bugs, first check to +see that the issue has not already been addressed in the CVS tree. + +GETTING HELP + +Requests to 'help' require posting the version number of the +plugin. The best place to include the version information is in the +subject. A good post would have a subject like: + + Can I use SSL with check_imap (nagios-plugins 1.3.0-beta2) 1.12 + +If you do not include the version of the plugin, you risk having your +post silently ignored. + +Be advised that the core plugins (and in fact many of the contributed +plugins) will provide a description of their use when invoked with the +'--help' option. Please read the help carefully and in it's entirety +before asking for support. + +REPORTING BUGS AND SUBMITTING PATCHES + +Bug reports, investigations of possible bugs, feature requests, and +patch submissions should be submitted to the development list at +mailto:nagiosplug-devel@lists.sourceforge.net. Please raise a tracker first +in Sourceforge, otherwise your email is likely to be missed over time. + +You should identify the version, preferably in the subject line. +However, to best use developer resources, it is suggested that you +reference your report to one of the following sources: + + 1) The most recent release, including beta's + + 2) The twice-daily snapshots (there's a link provided on + http://nagiosplug.sourceforge.net) + + 3) The current CVS tree from sourceforge + +(This does not mean you should run any of these sources in a +production environment - the latter two you clearly should +not. However, if you find a bug, you should determine whether it is +still present in one of these sources, preferably either (2) or (3) +which are most recent.) + +From experience, I know that most bugs can be fixed with only a few +more moments work than it takes to determine if the bug is still +present in the CVS tree. If you can save a developer the expense of +that time, you ensure that bugs are fixed more rapidly, and thus you +ensure your problem resolution is reflected in a stable release more +quickly. diff --git a/THANKS b/THANKS new file mode 100644 index 0000000..e7ca517 --- /dev/null +++ b/THANKS @@ -0,0 +1,172 @@ +This software is brought to you by the Nagios Plugins Development Team. However, +there have been many contributors to this project. Everyone below has helped in +raising bug reports, creating patches or contributing new plugins. + +dag rob?le +Randy O'Meara +David Alden +Rodger Allen +Paul Allen +Patrick Allen +Felipe Gustavo de Almeida +Michael Almond +Michael Anthon +Paula Arnold +Kondoros Attila +Daniel Austin +Bradley Baetz +Michael Bakker +Jeremy Baumgartner +Lutz Behnke +Simon Bellwood +Guy Van Den Bergh +Tom Bertelston +Jeffery Blank +Tom De Blende +Eric Bollengier +Richard Brodie +Matthew Brown +Jason Burnett +Carlos Canau +Jim Carroll +Ian Cass +Arnold Cavazos +Alex Chaffee +Eric Chen +Alwyn Cherrington +Ben Clewett +Charlie Cook +Garry Cook +Ollie Cook +David Croft +Robert Dale +Rok Debevc +Marcos Della +Phil Dibowitz +Jason Dixon +Paul Dlug +Andy Doran +Rainer Duffner +Ian Duggan +Edwin Eefting +Matthew Ericson +Andreas Ericsson +Ragnar Hojland Espinosa +Merijn Evertse +Karl Ewald +Paul Farrall +Reuben Farrelly +Paulo Fessel +Paulo Afonso Graner Fessel +James Fidell +Matt Garrett +Flo Gleixner +Kev Green +Steve Greenland +Olaf Greis +Steven Grimm +Jon Hallett +Steve Hanselman +Michael Haro +Gunnar Hellekson +Johannes Herlitz +Ian Holsman +Peter Hoogendijk +Chester Hosey +Valdimir Ivaschenko +Mark Jewiss +Frank Kannemann +Roy Sigurd Karlsbakk +Bo Kersey +John Koyle +Christoph Kron +Alexander Kulak +Bill Kunkel +Lynne Lawrence +Pedro Leite +Larry Low +Jacob Lundqvist +Guenther Mair +Michael Markstaller +John Marquart +Ernst-Dieter Martin +Jason Martin +Christopher Maser +Mathieu Masseboeuf +Alexander Matey +Richard Mayhew +Patrick McCormick +Mike McHenry +Jan-Piet Mens +Sven Meyer +Russell Miller +Janos Mohacsi +Gerd Mueller +Michael Musikhin +Jan-Frode Myklebust +Sivakumar Nellurandi +Truongchinh Nguyen +Simon L Nielsen +Thomas Nilsen +Walbert Oberngruber +Remi Paulmier +Fabian Pehla +Matt Perry +Matthew Peters +William Pietri +Tomasz Pilat +Myke Place +Marc Poulin +Matt Pounsett +Peter Pramberger +Arnaud Quette +Darian Rackham +Phil Randal +Abid Rasheed +Joe Rhett +Cliff Rice +Alain Richard +Didi Rieder +Steve Rigler +Kenny Root +Wolfgang Rosenauer +Jonathan Rozes +Sascha Runschke +Dietmar Ruzicka +Ralph Rye +Alen Salamun +Sven Schaffranneck +Thomas Schimpke +Benjamin Schmid +Cove Schneider +Russell Scibetti +Noel Sebastien +Lonny Selinger +Nathan Shafer +Tom Shields +Sean Shore +Antony Simmonds +John Sivak +Nikolay Sturm +Kjell Sundtjonn +Ziya Suzen +Ronald Tin +Ibere Tizio +Julien Touche +Jerome Tytgat +Laurent Vaslin +Carole Verdon +Ludse Verhoeven +Robert August Vincent +Dave Viner +John Warburton +Christian G Warden +Stuart Webster +Torsten Werner +Ben Whaley +Adrian Wieczorek +Paul Wiggins +Howard Wilkinson +Shawn Wills +Mario Witte +Jamie Zawinski diff --git a/acinclude.m4 b/acinclude.m4 new file mode 100644 index 0000000..788d68e --- /dev/null +++ b/acinclude.m4 @@ -0,0 +1,78 @@ +dnl @synopsis ACX_WHICH_GETHOSTBYNAME_R +dnl +dnl Provides a test to determine the correct way to call gethostbyname_r +dnl +dnl defines HAVE_GETHOSTBYNAME_R to the number of arguments required +dnl +dnl e.g. 6 arguments (linux) +dnl e.g. 5 arguments (solaris) +dnl e.g. 3 arguments (osf/1) +dnl +dnl @version $Id: acinclude.m4,v 1.5 2004/02/18 14:56:34 kdebisschop Exp $ +dnl @author Brian Stafford +dnl +dnl based on version by Caolan McNamara +dnl based on David Arnold's autoconf suggestion in the threads faq +dnl +AC_DEFUN([ACX_WHICH_GETHOSTBYNAME_R], +[AC_CACHE_CHECK(number of arguments to gethostbyname_r, + acx_which_gethostbyname_r, [ + AC_TRY_COMPILE([ +# include + ], [ + + char *name; + struct hostent *he; + struct hostent_data data; + (void) gethostbyname_r(name, he, &data); + + ],acx_which_gethostbyname_r=3, + [ +dnl acx_which_gethostbyname_r=0 + AC_TRY_COMPILE([ +# include + ], [ + 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) + ],acx_which_gethostbyname_r=6, + + [ +dnl acx_which_gethostbyname_r=0 + AC_TRY_COMPILE([ +# include + ], [ + char *name; + struct hostent *he; + char *buffer = NULL; + int buflen = 2048; + int h_errnop; + (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) + ],acx_which_gethostbyname_r=5,acx_which_gethostbyname_r=0) + + ] + + ) + ] + ) + ]) + +if test $acx_which_gethostbyname_r -gt 0 ; then + AC_DEFINE_UNQUOTED([HAVE_GETHOSTBYNAME_R], $acx_which_gethostbyname_r, + [Number of parameters to gethostbyname_r or 0 if not available]) +fi + +]) + +dnl @synopsis ACX_HELP_STRING(OPTION,DESCRIPTION) +AC_DEFUN([ACX_HELP_STRING], + [ $1 builtin([substr],[ ],len($1))[$2]]) + + +dnl @synopsis ACX_FEATURE(ENABLE_OR_WITH,NAME[,VALUE]) +AC_DEFUN([ACX_FEATURE], + [echo "builtin([substr],[ ],len(--$1-$2))--$1-$2: ifelse($3,,[$]translit($1-$2,-,_),$3)"]) + diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..03975d0 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,933 @@ +# generated automatically by aclocal 1.8 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 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. + +# 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. + +# -*- 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 + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# 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.8])]) + +# AM_AUX_DIR_EXPAND + +# 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. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 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 6 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE]) +AC_SUBST([$1_FALSE]) +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]) +fi])]) + +# serial 5 -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 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., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[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_$1_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 + : > 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 ;; + 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 + # (even with -Werror). So we grep stderr for any message + # that says an option was ignored. + if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking Speeds up one-time builds + --enable-dependency-tracking Do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH]) +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 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., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +#serial 2 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue + # Extract the definition of DEP_FILES from the Makefile without + # running `make'. + DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` + test -z "$DEPDIR" && continue + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n -e '/^U = / s///p' < "$mf"` + test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" + # We invoke sed twice because it is the simplest approach to + # changing $(DEPDIR) to its actual value in the expansion. + for file in `sed -n -e ' + /^DEP_FILES = .*\\\\$/ { + s/^DEP_FILES = // + :loop + s/\\\\$// + p + n + /\\\\$/ b loop + p + } + /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _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 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 + +# 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 -*- + +# 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 +# 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 11 + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.58])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG(AMTAR, tar) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl + +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# 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. + +# 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 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 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., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[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. +AC_MSG_CHECKING([for style of include used by $am_make]) +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 +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +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. + +# serial 3 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# AM_PROG_MKDIR_P +# --------------- +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. + +# 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., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +AC_DEFUN([AM_PROG_MKDIR_P], +[if mkdir -m 0755 -p -- . 2>/dev/null; then + mkdir_p='mkdir -m 0755 -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-m ./0755 ./-p ./--; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs) -m 0755' + else + mkdir_p='$(install_sh) -m 0755 -d' + fi +fi +AC_SUBST([mkdir_p])]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 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., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# +# Check to make sure that the build environment is sane. +# + +# 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 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# 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 +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +m4_include([m4/afs.m4]) +m4_include([m4/codeset.m4]) +m4_include([m4/exitfail.m4]) +m4_include([m4/extensions.m4]) +m4_include([m4/fstypename.m4]) +m4_include([m4/fsusage.m4]) +m4_include([m4/getopt.m4]) +m4_include([m4/gettext.m4]) +m4_include([m4/glibc21.m4]) +m4_include([m4/iconv.m4]) +m4_include([m4/intdiv0.m4]) +m4_include([m4/inttypes-pri.m4]) +m4_include([m4/inttypes.m4]) +m4_include([m4/inttypes_h.m4]) +m4_include([m4/lcmessage.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/malloc.m4]) +m4_include([m4/mountlist.m4]) +m4_include([m4/np_coreutils.m4]) +m4_include([m4/np_curl.m4]) +m4_include([m4/onceonly.m4]) +m4_include([m4/progtest.m4]) +m4_include([m4/realloc.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/unlocked-io.m4]) +m4_include([m4/xalloc.m4]) +m4_include([acinclude.m4]) diff --git a/command.cfg.in b/command.cfg.in new file mode 100644 index 0000000..3509380 --- /dev/null +++ b/command.cfg.in @@ -0,0 +1,275 @@ +############################################################################### +# COMMAND CONFIGURATION +# +# $Id: command.cfg.in,v 1.13 2004/12/02 04:48:37 mattkent Exp $ +# +# SYNTAX: +# command[]= +# +# = A short name used to identify the command +# = The actual command line. The command line doesn't have to +# be surrounded in quotes, but may contain quotes as needed within +# the command line. Take care to use single quotes at the +# outer edges of commands or you will have command line +# expansion problems when the command is executed by the shell. +# Any valid shell command can be used. Multiple commands can +# be separated with semicolons, piping is allowed. The +# command line can contain macros, but not are macros are valid +# at all time (notifications, service checks, etc). See the +# HTML documentaion for more informationon on using macros in +# commands. +# +# Note: Service check, service notification, host check, host notification, +# service event handler, and host event handler functions are all defined +# here. +# +# Note: Use the convertcfg program in the contrib directory of the Nagios +# distribution to convert this file into a object file format. +# +############################################################################### + +# Service notification command - send email with problem summary + +command[notify-by-email]=/bin/printf "$OUTPUT$" | /bin/mail -s '$SERVICESTATE$ alert for $HOSTALIAS$/$SERVICEDESC$' $CONTACTEMAIL$ + +# Service notification command - send email to alphanumeric pager +# gateway The notify-by-epager command assumes that each contact has a +# pager email gateway, and that the address has been entered into the +# appropriate contact field instead of an actual pager number. +# (i.e. 'pagejoe@nowhere.com' routes mail to Joe's alphanumeric pager) + +command[notify-by-epager]=/bin/echo "$OUTPUT$" | /bin/mail -s '$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$' $CONTACTPAGER$ + +# Host notification commands (one for email, one for alphanumeric +# pager with email gateway) + +command[host-notify-by-email]=/bin/echo -e "***** Nagios *****\n\nHost "$HOSTALIAS$" is $HOSTSTATE$!\n\nDate/Time: $DATETIME$\n" | /bin/mail -s 'Host $HOSTNAME$ is $HOSTSTATE$!' $CONTACTEMAIL$ + +command[host-notify-by-epager]=/bin/echo '$HOSTALIAS$ is $HOSTSTATE$!' | /bin/mail -s 'Host $HOSTNAME$ is $HOSTSTATE$!' $CONTACTPAGER$ + + +## Send notifications to a pager using modem with Qpage (www.qpage.com) + +command[notify-by-qpage]=/usr/bin/printf "Service: %s\nHost: %s\nAddress: %s\nState: %s\nInfo: %s\nDate: %s" '$SERVICEDESC$' '$HOSTNAME$' '$HOSTADDRESS$' '$SERVICESTATE$' '$OUTPUT$' '$DATETIME' | /usr/local/bin/qpage -l 0 -p $CONTACTPAGER$ + +command[host-notify-by-qpage]=/usr/bin/printf "Host: %s is %s\nInfo: %s\nDate: %s" '$HOSTALIAS$' '$HOSTSTATES$' '$OUTPUT$' '$DATETIME' | /usr/local/bin/qpage -l 0 -p $CONTACTPAGER$ + +## Send notifications using SMSclient (www.smsclient.org) +command[notify-by-smsclient]=/usr/bin/sms_client -q $CONTACTPAGER$ "$NOTIFICATIONTYPE$: $HOSTADDRESS$ $HOSTALIAS$: $SERVICEDESC$ is $SERVICESTATE$" +command[host-notify-by-smsclient]=/usr/bin/sms_client -q $CONTACTPAGER$ "Host $HOSTALIAS$ is $HOSTSTATE$; $OUTPUT$; $DATETIME$" + + + + +# These are some example service check commands. See the HTML +# documentation on the plugins for examples of how to configure +# command definitions. + +command[check_tcp]=@libexecdir@/check_tcp -H $HOSTADDRESS$ -p $ARG1$ +command[check_udp]=@libexecdir@/check_udp -H $HOSTADDRESS$ -p $ARG1$ +command[check_ftp]=@libexecdir@/check_ftp -H $HOSTADDRESS$ +command[check_pop]=@libexecdir@/check_pop -H $HOSTADDRESS$ +command[check_smtp]=@libexecdir@/check_smtp -H $HOSTADDRESS$ +command[check_nntp]=@libexecdir@/check_nntp -H $HOSTADDRESS$ +command[check_telnet]=@libexecdir@/check_tcp -H $HOSTADDRESS$ -p 23 +command[check_users]=@libexecdir@/check_users -w $ARG1$ -c $ARG2$ +command[check_ntp]=@libexecdir@/check_ntp -H $HOSTADDRESS$ +command[check_ntp_ntpq]=@libexecdir@/check_ntp -H $HOSTADDRESS$ -j 10 -k 15 +command[check_flexlm]=@libexecdir@/check_flexlm -F $ARG1$ +command[check_hpjd]=@libexecdir@/check_hpjd -H $HOSTADDRESS$ -C public +command[check_mrtg]=@libexecdir@/check_mrtg $ARG1$ 10 AVG $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ +command[traffic_average]=@libexecdir@/check_mrtgtraf $ARG1$ 10 AVG $ARG2$ $ARG3$ $ARG4$ $ARG5$ +command[check_load]=@libexecdir@/check_load $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ + +command[check_disk]=@libexecdir@/check_disk -w 85% -c 95% -p $ARG1$ +command[check_dns]=@libexecdir@/check_dns -H www.yahoo.com -s $HOSTADDRESS$ +command[check_http]=@libexecdir@/check_http -H $HOSTADDRESS$ -I $HOSTADDRESS$ +command[check_http2]=@libexecdir@/check_http -H $ARG1$ -I $HOSTADDRESS$ -w $ARG2$ -c $ARG3$ +command[check_pgsql]=@libexecdir@/check_pgsql -H $HOSTADDRESS$ +command[check_ping]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 10:20% -c 60:100% +command[check_procs]=@libexecdir@/check_procs -w $ARG1$ -c $ARG2$ +command[check_procs_zombie]=@libexecdir@/check_procs -w $ARG1$ -c $ARG2$ -s Z +command[check_procs_httpd]=@libexecdir@/check_procs -w 5:$ARG1$ -c 1:$ARG2$ -C httpd +command[check_procs_vsz]=@libexecdir@/check_procs -w 8096 -c 16182 -C httpd --metric VSZ +command[check_ups]=@libexecdir@/check_ups -H $HOSTADDRESS$ -u $ARG1$ + +# An example of using check_by_ssh as an active service check +command[ssh_disk]=@libexecdir@/check_by_ssh -H $HOSTADDRESS$ -C '@libexecdir@/check_disk -w 85% -c 95% -p $ARG1$' + +# +# UCD_SNMP equivalents for some of the commands above +# + +command[snmp_load]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.2021.10.1.5.1,.1.3.6.1.4.1.2021.10.1.5.2,.1.3.6.1.4.1.2021.10.1.5.3 -w :$ARG2$,:$ARG3$,:$ARG4$ -w :$ARG5$,:$ARG6$,:$ARG7$ -l load + +command[snmp_cpustats]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.2021.11.9.0,.1.3.6.1.4.1.2021.11.10.0,.1.3.6.1.4.1.2021.11.11.0 -l 'CPU usage (user system idle)' -u '%' + +command[snmp_procname]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o 1.3.6.1.4.1.2021.2.1.5.$ARG2$ -w $ARG3$:$ARG4$ -c $ARG5$:$ARG6$ + +command[snmp_disk]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o 1.3.6.1.4.1.2021.9.1.7.$ARG1$,1.3.6.1.4.1.2021.9.1.9.$ARG1$ -w $ARG2$:,:$ARG3$ -c $ARG4$:,:$ARG5$ -u 'kB free (','% used)' -l 'disk space' + +command[snmp_mem]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.2021.4.6.0,.1.3.6.1.4.1.2021.4.5.0 -w $ARG2$: -c $ARG3$: + +command[snmp_swap]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.2021.4.4.0,.1.3.6.1.4.1.2021.4.3.0 -w $ARG2$: -c $ARG3$: + +# +# Slightly more generic SNMP OIDs +# note: using partial textual OIDs here - use numeric oids if you don't have MIBDIRS defined per Net-SNMP (net-snmp.org) + +command[snmp_procs]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrSystem.hrSystemProcesses -w :$ARG2$ -c :$ARG3$ -l processes + +command[snmp_users]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrSystem.hrSystemNumUsers -w :$ARG2$ -c :$ARG3$ -l users + +command[snmp_mem2]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.101,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.101 -w $ARG2$ -c $ARG3$ + +command[snmp_swap2]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.102,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.102 -w $ARG2$ -c $ARG3$ + +command[snmp_mem3]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.101,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.101 -w $ARG2$ -c $ARG3$ + +command[snmp_swap3]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.102,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.102 -w $ARG2$ -c $ARG3$ + +command[snmp_disk2]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.$ARG2$ -w $ARG3$ -c $ARG4$ + +command[snmp_tcpopen]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o tcp.tcpCurrEstab.0 -w $ARG2$ -c $ARG3$ + +command[snmp_tcpstats]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o tcp.tcpActiveOpens.0,tcp.tcpPassiveOpens.0,tcp.tcpInSegs.0,tcp.tcpOutSegs.0,tcp.tcpRetransSegs.0 -l 'TCP stats' + + +# Some snmp based network device checks (requires Net::SNMP perl module) + +# check all admin-up interfaces +command[check_ifstatus]=@libexecdir@/check_ifstatus -H $HOSTADDRESS$ -C public + +# check particular interface by snmp ifIndex key +command[check_ifoperstatus_ifindex]=@libexecdir@/check_ifoperstatus -H $HOSTADDRESS$ -C public -k $ARG1$ + +# check particular interface by snmp ifDescr value (verify uniqueness before using) +command[check_ifoperstatus_ifdescr]=@libexecdir@/check_ifoperstatus -H $HOSTADDRESS$ -C public -d $ARG1$ + +# verify all you BGP session on a device are running (only returns warning due to some hardcoded option - to be fixed soon) +command[check_snmp_bgpstate]=@libexecdir@/check_bgpstate -H $HOSTADDRESS$ -C public + +# +# SNMP NetApp checks (Jason Truong) +# +# +#command[check_netapp_uptime]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C public -o .1.3.6.1.2.1.1.3.0 --delimiter=')' -l "Uptime is" +# +#command[check_netapp_cpuload]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C public -o .1.3.6.1.4.1.789.1.2.1.3.0 -w 90 -c 95 -u '%' -l "CPU LOAD " +# +#command[check_netapp_numdisks]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C public -o .1.3.6.1.4.1.789.1.6.4.1.0,.1.3.6.1.4.1.789.1.6.4.2.0,.1.3.6.1.4.1.789.1.6.4.8.0,.1.3.6.1.4.1.789.1.6.4.7.0 -u 'Total Disks','Active','Spare','Failed' -l "" +# + +# +# SNMP Compaq Insight Agent (oids courtesy of vol) +# +# the following 4 return the following codes: other=1, ok=2, degraded=3, failed=4 +# +#command[check_compaq_thermalCondition]=@libexec@/check_snmp -H $HOSTADDRESS$ -C public -o .1.3.6.1.4.1.232.6.2.1.0,.1.3.6.1.4.1.232.6.2.2.0,.1.3.6.1.4.1.232.6.2.3.0,.1.3.6.1.4.1.232.6.2.4.0 -u 'ThermalCondition','ThermalTemp','ThermalSystem','ThermalCPUFan' -w 2:2,2:2,2:2,2:2 -c 1:2,1:2,1:2,1:2 -l "Thermal status " +# +# + + + +# This command checks to see if a host is "alive" by pinging it. The +# check must result in a 100% packet loss or 5 second (5000ms) round +# trip average to produce an error. + +# This command checks to see if a host is "alive" by pinging it. +command[check-host-alive]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1 + +# This command checks to see if a printer is "alive" by pinging it. +command[check-printer-alive]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1 + +# This command checks to see if a switch is "alive" by pinging it. +command[check-switch-alive]=@libexecdir@/check_ping $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1 + +# This command checks to see if a router is "alive" by pinging it. +command[check-router-alive]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1 + +# Check if a host is alive by doing a fast ping instead of a regular ping +command[check-fast-alive]=@libexecdir@/check_fping -H $HOSTADDRESS$ + +# Check if the IMAP service is alive (default port=143) +command[check-imap]=@libexecdir@/check_imap -H $HOSTADDRESS$ + +# Check RPC services +command[check-rpc]=@libexecdir@/check_rpc -H $HOSTADDRESS$ -C $ARG1$ + +# Check if the NFS server is running (version 2 and version 3) +command[check-nfs]=@libexecdir@/check_rpc -H $HOSTADDRESS$ -C nfs -c2,3 + +# Check game servers +command[check_quake]=@libexecdir@/check_game qs $HOSTADDRESS$ +command[check_unreal]=@libexecdir@/check_game uns $HOSTADDRESS$ -p $ARG1$ -pf 8 + +# Check a port that should be open +command[check_nmap]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 30 -p $ARG1$ + +# Check a port that should be open and another that *could* be open, +# but no warning is given if optional port is closed. + +command[check_nmap_optional]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 60 -p $ARG1$ -o $ARG2$ + +# Specify range to nmap +command[check_nmap_range]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 60 -p $ARG1$ -r $ARG2$ + +# Specify both optional and range +command[check_nmap_opt_range]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 60 -p $ARG1$ -o $ARG2$ -r$ARG3$ + +# Check Radius +command[check_radius]=@libexecdir@/check_radius $ARG1$ $ARG2$ $HOSTADDRESS$ 1812 $ARG3$ + + +# Check HTTP proxy +# This is a command for checking squid or other proxy servers which uses check +# http to ensure an HTTP 200 comes back ..... i.e. squid actually +# serves the page and not an error message. +# Using check_http will allow verification of authenticated proxies +# +# Note:: This used to call "check_reply" which was pretty close to check_tcp +# The functionality of check_reply has been merged into check_tcp + +command[check_squid]=@libexecdir@/check_http -H $HOSTADDRESS$ -p $ARG1$ -u $ARG2$ -e 'HTTP/1.0 200 OK' + + +## Check RealAudio url +command[check_real_url]=@libexecdir@/check_real $HOSTADDRESS$ -p $ARG1$ -wt $ARG2$ -ct $ARG3$ -to 5 -u $ARG4$ + +## Check RealAudio server response +command[check_real]=@libexecdir@/check_real $HOSTADDRESS$ -p $ARG1$ -wt $ARG2$ -ct $ARG3$ -to 5 + +# NetWare checks via check_nwstat ( see "check_nwstat -h" for more options) +# how many current logins +command[check_netware_logins]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v "LOGINS" -w $ARG1$ -c $ARG2$ +# how many current connections +command[check_nwstat_conns]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v CONNS -w $ARG1$ -c $ARG2$ +# 1 minute avg cpu load +command[check_netware_1load]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v "LOAD1" -w 70 -c 90 +# 5 minute avg cpu load +command[check_netware_5load]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v "LOAD5" -w 70 -c 90 +# 15 minute avg cpu load +command[check_netware_15load]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v "LOAD15" -w 70 -c 90 +# Disk volume (% free) +command[check_nwstat_vol_p]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v VPF$ARG1$ -w $ARG2$ -c $ARG3$ +# Disk volume (KB free) +command[check_nwstat_vol_k]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v VKF$ARG1$ -w $ARG2$ -c $ARG3$ +# % Long term cache hits +command[check_nwstat_ltch]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v LTCH -w $ARG1$ -c $ARG2$ +# % (of max) used packet receive buffers +command[check_nwstat_puprb]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v PUPRB -w $ARG1$ -c $ARG2$ +# Check to see if the DS database is open +command[check_nwstat_dsdb]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v DSDB + + + +# Netware 5 abends +command[check_netware_abend]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v "ABENDS" -w 10 -c 30 +# Netware 5 number of current service procs +command[check_nwstat_csprocs]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v CSPROCS -w $ARG1$ -c $ARG2$ + + +# Still have to write sample entries for the following: +# +# check_ldap +# check_overcr diff --git a/config.guess b/config.guess new file mode 100755 index 0000000..ad5281e --- /dev/null +++ b/config.guess @@ -0,0 +1,1466 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + +timestamp='2005-08-03' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (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. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerppc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + *86) UNAME_PROCESSOR=i686 ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.h.in b/config.h.in new file mode 100644 index 0000000..c1c5940 --- /dev/null +++ b/config.h.in @@ -0,0 +1,856 @@ +/* config.h.in. Generated from configure.in by autoheader. */ + +/* Define if you have the Andrew File System. */ +#undef AFS + +/* URL of CGI programs */ +#undef CGIURL + +/* Define if 3-argument BSD swapctl exists */ +#undef CHECK_SWAP_SWAPCTL_BSD + +/* Define if 2-argument SVR4 swapctl exists */ +#undef CHECK_SWAP_SWAPCTL_SVR4 + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +#undef CRAY_STACKSEG_END + +/* Define to 1 if using `alloca.c'. */ +#undef C_ALLOCA + +/* Define to 1 if using `getloadavg.c'. */ +#undef C_GETLOADAVG + +/* Define to 1 for DGUX with . */ +#undef DGUX + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#undef ENABLE_NLS + +/* Define to 1 if the `getloadavg' function needs to be run setuid or setgid. + */ +#undef GETLOADAVG_PRIVILEGED + +/* Define to 1 if you have `alloca', as a function or macro. */ +#undef HAVE_ALLOCA + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +#undef HAVE_ALLOCA_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ARGZ_H + +/* Define to 1 if you have the `asprintf' function. */ +#undef HAVE_ASPRINTF + +/* Define if system has C99 compatible vsnprintf */ +#undef HAVE_C99_VSNPRINTF + +/* Define to 1 if you have the header file. */ +#undef HAVE_CRYPTO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_CTYPE_H + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#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 + don't. */ +#undef HAVE_DECL_FEOF_UNLOCKED + +/* 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 + don't. */ +#undef HAVE_DECL_GETC_UNLOCKED + +/* 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 + don't. */ +#undef HAVE_DECL_PUTC_UNLOCKED + +/* Define to 1 if you have the declaration of `swapctl', and to 0 if you + don't. */ +#undef HAVE_DECL_SWAPCTL + +/* Define to 1 if you have the declaration of `sysconf', and to 0 if you + don't. */ +#undef HAVE_DECL_SYSCONF + +/* Define to 1 if you have the header file. */ +#undef HAVE_DUSTAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ERRNO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ERR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_FEATURES_H + +/* Define to 1 if you have the `feof_unlocked' function. */ +#undef HAVE_FEOF_UNLOCKED + +/* Define to 1 if you have the `fgets_unlocked' function. */ +#undef HAVE_FGETS_UNLOCKED + +/* Define to 1 if you have the `floor' function. */ +#undef HAVE_FLOOR + +/* Define to 1 if you have the header file. */ +#undef HAVE_FS_INFO_H + +/* 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 + +/* Does system provide RFC 2553/Posix getaddrinfo? */ +#undef HAVE_GETADDRINFO + +/* Define to 1 if you have the `getcwd' function. */ +#undef HAVE_GETCWD + +/* Define to 1 if you have the `getc_unlocked' function. */ +#undef HAVE_GETC_UNLOCKED + +/* Define to 1 if you have the `getegid' function. */ +#undef HAVE_GETEGID + +/* Define to 1 if you have the `geteuid' function. */ +#undef HAVE_GETEUID + +/* Define to 1 if you have the `getgid' function. */ +#undef HAVE_GETGID + +/* Number of parameters to gethostbyname_r or 0 if not available */ +#undef HAVE_GETHOSTBYNAME_R + +/* Set when getipnodebyname is available */ +#undef HAVE_GETIPNODEBYNAME + +/* Define to 1 if you have the `getloadavg' function. */ +#undef HAVE_GETLOADAVG + +/* Define to 1 if you have the `getmntent' function. */ +#undef HAVE_GETMNTENT + +/* Define to 1 if you have the `getmntinfo' function. */ +#undef HAVE_GETMNTINFO + +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#undef HAVE_GETTEXT + +/* Define if gettimeofday is found */ +#undef HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the `getuid' function. */ +#undef HAVE_GETUID + +/* Define if you have the iconv() function. */ +#undef HAVE_ICONV + +/* Define if exists and doesn't clash with . */ +#undef HAVE_INTTYPES_H + +/* Define if exists, doesn't clash with , and + declares uintmax_t. */ +#undef HAVE_INTTYPES_H_WITH_UINTMAX + +/* Define to 1 if you have the header file. */ +#undef HAVE_KRB5_H + +/* Define if you have and nl_langinfo(CODESET). */ +#undef HAVE_LANGINFO_CODESET + +/* Define if your file defines LC_MESSAGES. */ +#undef HAVE_LC_MESSAGES + +/* Define to 1 if you have the `ldap_get_option' function. */ +#undef HAVE_LDAP_GET_OPTION + +/* Define to 1 if you have the `ldap_init' function. */ +#undef HAVE_LDAP_INIT + +/* Define to 1 if you have the `ldap_set_option' function. */ +#undef HAVE_LDAP_SET_OPTION + +/* Define to 1 if you have the `ldap_start_tls_s' function. */ +#undef HAVE_LDAP_START_TLS_S + +/* Define to 1 if you have the `crypt' library (-lcrypt). */ +#undef HAVE_LIBCRYPT + +/* Define to 1 if you have the `crypto' library (-lcrypto). */ +#undef HAVE_LIBCRYPTO + +/* Define to 1 if you have the `dgc' library (-ldgc). */ +#undef HAVE_LIBDGC + +/* Define to 1 if you have the `kstat' library (-lkstat). */ +#undef HAVE_LIBKSTAT + +/* 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 + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBPQ_FE_H + +/* Define to 1 if you have the `radiusclient' library (-lradiusclient). */ +#undef HAVE_LIBRADIUSCLIENT + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define to 1 if you have the `listmntent' function. */ +#undef HAVE_LISTMNTENT + +/* Define to 1 if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LWRES_NETDB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MACH_MACH_H + +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#undef HAVE_MALLOC + +/* Define to 1 if you have the header file. */ +#undef HAVE_MALLOC_H + +/* Define to 1 if you have the `memmove' function. */ +#undef HAVE_MEMMOVE + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `mempcpy' function. */ +#undef HAVE_MEMPCPY + +/* Define to 1 if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define to 1 if you have the header file. */ +#undef HAVE_MNTENT_H + +/* Define to 1 if you have the `munmap' function. */ +#undef HAVE_MUNMAP + +/* Define to 1 if you have the header file. */ +#undef HAVE_MYSQL_ERRMSG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MYSQL_MYSQL_H + +/* Define to 1 if you have the `next_dev' function. */ +#undef HAVE_NEXT_DEV + +/* Define to 1 if you have the header file. */ +#undef HAVE_NLIST_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NL_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_CRYPTO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_ERR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_PEM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_RSA_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_SSL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_X509_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_PEM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_PGSQL_LIBPQ_FE_H + +/* 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 you have the `putenv' function. */ +#undef HAVE_PUTENV + +/* Define to 1 if your system has a GNU libc compatible `realloc' function, + and to 0 otherwise. */ +#undef HAVE_REALLOC + +/* Define to 1 if you have the header file. */ +#undef HAVE_REGEX_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_RSA_H + +/* Define to 1 if you have the `select' function. */ +#undef HAVE_SELECT + +/* Define to 1 if you have the `setenv' function. */ +#undef HAVE_SETENV + +/* 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 you have the `snprintf' function. */ +#undef HAVE_SNPRINTF + +/* Define to 1 if you have the `socket' function. */ +#undef HAVE_SOCKET + +/* Define if SSL libraries are found */ +#undef HAVE_SSL + +/* Define to 1 if you have the header file. */ +#undef HAVE_SSL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDARG_H + +/* Define to 1 if stdbool.h conforms to C99. */ +#undef HAVE_STDBOOL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDDEF_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define if exists, doesn't clash with , and declares + uintmax_t. */ +#undef HAVE_STDINT_H_WITH_UINTMAX + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `stpcpy' function. */ +#undef HAVE_STPCPY + +/* Define to 1 if you have the `strcasecmp' function. */ +#undef HAVE_STRCASECMP + +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* 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 `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 `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 `se_nblks' is member of `struct swapent'. */ +#undef HAVE_STRUCT_SWAPENT_SE_NBLKS + +/* Define if we have a timeval structure */ +#undef HAVE_STRUCT_TIMEVAL + +/* Define if swap/swapinfo command is found */ +#undef HAVE_SWAP + +/* Define to 1 if the system has the type `swapent_t'. */ +#undef HAVE_SWAPENT_T + +/* Define to 1 if the system has the type `swaptbl_t'. */ +#undef HAVE_SWAPTBL_T + +/* 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_FILSYS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FS_S5PARAM_H + +/* 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_MNTENT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MOUNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STATFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STATVFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SWAP_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UCRED_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UNISTD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_VFS_H + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define to 1 if you have the `tsearch' function. */ +#undef HAVE_TSEARCH + +/* Define to 1 if you have the header file. */ +#undef HAVE_UIO_H + +/* 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 you have the `vasprintf' function. */ +#undef HAVE_VASPRINTF + +/* Whether va_copy() is available */ +#undef HAVE_VA_COPY + +/* Define to 1 if you have the `vsnprintf' function. */ +#undef HAVE_VSNPRINTF + +/* Define to 1 if you have the header file. */ +#undef HAVE_X509_H + +/* Define to 1 if the system has the type `_Bool'. */ +#undef HAVE__BOOL + +/* Define to 1 if you have the `__argz_count' function. */ +#undef HAVE___ARGZ_COUNT + +/* Define to 1 if you have the `__argz_next' function. */ +#undef HAVE___ARGZ_NEXT + +/* Define to 1 if you have the `__argz_stringify' function. */ +#undef HAVE___ARGZ_STRINGIFY + +/* Whether __va_copy() is available */ +#undef HAVE___VA_COPY + +/* Define as const if the declaration of iconv() needs const. */ +#undef ICONV_CONST + +/* Define if integer division by zero raises signal SIGFPE. */ +#undef INTDIV0_RAISES_SIGFPE + +/* Define if there is no specific function for reading the list of mounted + filesystems. fread will be used to read /etc/mnttab. (SVR2) */ +#undef MOUNTED_FREAD + +/* Define if (like SVR2) there is no specific function for reading the list of + mounted filesystems, and your system has these header files: + and . (SVR3) */ +#undef MOUNTED_FREAD_FSTYP + +/* Define if there are functions named next_dev and fs_stat_dev for reading + the list of mounted filesystems. (BeOS) */ +#undef MOUNTED_FS_STAT_DEV + +/* Define if there is a function named getfsstat for reading the list of + mounted filesystems. (DEC Alpha running OSF/1) */ +#undef MOUNTED_GETFSSTAT + +/* Define if there is a function named getmnt for reading the list of mounted + filesystems. (Ultrix) */ +#undef MOUNTED_GETMNT + +/* Define if there is a function named getmntent for reading the list of + mounted filesystems, and that function takes a single argument. (4.3BSD, + SunOS, HP-UX, Dynix, Irix) */ +#undef MOUNTED_GETMNTENT1 + +/* Define if there is a function named getmntent for reading the list of + mounted filesystems, and that function takes two arguments. (SVR4) */ +#undef MOUNTED_GETMNTENT2 + +/* Define if there is a function named getmntinfo for reading the list of + mounted filesystems. (4.4BSD, Darwin) */ +#undef MOUNTED_GETMNTINFO + +/* Define if there is a function named listmntent that can be used to list all + mounted filesystems. (UNICOS) */ +#undef MOUNTED_LISTMNTENT + +/* Define if there is a function named mntctl that can be used to read the + list of mounted filesystems, and there is a system header file that + declares `struct vmount.' (AIX) */ +#undef MOUNTED_VMOUNT + +/* Define if gettimeofday is needed */ +#undef NEED_GETTIMEOFDAY + +/* Define to 1 if your `struct nlist' has an `n_un' member. Obsolete, depend + on `HAVE_STRUCT_NLIST_N_UN_N_NAME */ +#undef NLIST_NAME_UNION + +/* path and args for nslookup */ +#undef NSLOOKUP_COMMAND + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Path to dig command, if present */ +#undef PATH_TO_DIG + +/* path to fping */ +#undef PATH_TO_FPING + +/* path to lmstat */ +#undef PATH_TO_LMSTAT + +/* path to qmail-qstat */ +#undef PATH_TO_MAILQ + +/* path to ntpdate binary */ +#undef PATH_TO_NTPDATE + +/* path to ntpq binary */ +#undef PATH_TO_NTPQ + +/* path to qstat/quakestat */ +#undef PATH_TO_QSTAT + +/* path to rpcinfo binary */ +#undef PATH_TO_RPCINFO + +/* path to smbclient binary */ +#undef PATH_TO_SMBCLIENT + +/* path to snmpget binary */ +#undef PATH_TO_SNMPGET + +/* path to snmpgetnext binary */ +#undef PATH_TO_SNMPGETNEXT + +/* path to uptime binary */ +#undef PATH_TO_UPTIME + +/* path and args for ICMPv6 ping command */ +#undef PING6_COMMAND + +/* Define if packet count must precede host */ +#undef PING6_PACKETS_FIRST + +/* path and args for ICMP ping command */ +#undef PING_COMMAND + +/* Define if ping has its own timeout option that should be set */ +#undef PING_HAS_TIMEOUT + +/* Define if packet count must precede host */ +#undef PING_PACKETS_FIRST + +/* Define if exists and defines unusable PRI* macros. */ +#undef PRI_MACROS_BROKEN + +/* Location of /proc/loadavg */ +#undef PROC_LOADAVG + +/* path to /proc/meminfo if name changes */ +#undef PROC_MEMINFO + +/* Number of columns in ps command */ +#undef PS_COLS + +/* Verbatim command to execute for ps in check_procs */ +#undef PS_COMMAND + +/* Format string for scanning ps output in check_procs */ +#undef PS_FORMAT + +/* Variable list for sscanf of 'ps' output */ +#undef PS_VARLIST + +/* "Problem on redhat with spopen" */ +#undef REDHAT_SPOPEN_ERROR + +/* Define as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE + +/* Define type of socket size */ +#undef SOCKET_SIZE_TYPE + +/* path to ssh binary */ +#undef SSH_COMMAND + +/* If using the C implementation of alloca, define 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 */ +#undef STACK_DIRECTION + +/* Define if the block counts reported by statfs may be truncated to 2GB and + the correct values may be stored in the f_spare array. (SunOS 4.1.2, 4.1.3, + and 4.1.3_U1 are reported to have this problem. SunOS 4.1.1 seems not to be + affected.) */ +#undef STATFS_TRUNCATES_BLOCK_COUNTS + +/* Define if there is no specific function for reading filesystems usage + information and you have the header file. (SVR2) */ +#undef STAT_READ_FILSYS + +/* Define if statfs takes 2 args and struct statfs has a field named f_bsize. + (4.3BSD, SunOS 4, HP-UX, AIX PS/2) */ +#undef STAT_STATFS2_BSIZE + +/* Define if statfs takes 2 args and struct statfs has a field named f_fsize. + (4.4BSD, NetBSD) */ +#undef STAT_STATFS2_FSIZE + +/* Define if statfs takes 2 args and the second argument has type struct + fs_data. (Ultrix) */ +#undef STAT_STATFS2_FS_DATA + +/* Define if statfs takes 3 args. (DEC Alpha running OSF/1) */ +#undef STAT_STATFS3_OSF1 + +/* Define if statfs takes 4 args. (SVR3, Dynix, Irix, Dolphin) */ +#undef STAT_STATFS4 + +/* Define if there is a function named statvfs. (SVR4) */ +#undef STAT_STATVFS + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 on System V Release 4. */ +#undef SVR4 + +/* Path to swap/swapinfo binary, with any args */ +#undef SWAP_COMMAND + +/* Conversion factor to MB */ +#undef SWAP_CONVERSION + +/* Format string for parsing swap output */ +#undef SWAP_FORMAT + +/* Define to 1 if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define to 1 if your declares `struct tm'. */ +#undef TM_IN_SYS_TIME + +/* Define to 1 for Encore UMAX. */ +#undef UMAX + +/* Define to 1 for Encore UMAX 4.3 that has instead of + . */ +#undef UMAX4_3 + +/* Enable IPv6 support */ +#undef USE_IPV6 + +/* Version number of package */ +#undef VERSION + +/* path and arguments for invoking 'who' */ +#undef WHO_COMMAND + +/* Define to 1 if on AIX 3. + System headers sometimes define this. + We just want to avoid a redefinition error message. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif + +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif + +/* 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 + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE + +/* Sun's netdb.h needs this for getaddrinfo */ +#undef __EXTENSIONS__ + +/* bsd specific code in check_dhcp.c */ +#undef __bsd__ + +/* hpux specific code in check_dhcp.c */ +#undef __hpux__ + +/* sun specific code in check_dhcp.c */ +#undef __linux__ + +/* sun specific code in check_dhcp.c */ +#undef __sun__ + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define to rpl_malloc if the replacement function should be used. */ +#undef malloc + +/* Define to `long' if does not define. */ +#undef off_t + +/* Define to `int' if does not define. */ +#undef pid_t + +/* Define to rpl_realloc if the replacement function should be used. */ +#undef realloc + +/* Define to `unsigned' if does not define. */ +#undef size_t + +/* 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 diff --git a/config.rpath b/config.rpath new file mode 100755 index 0000000..5ead758 --- /dev/null +++ b/config.rpath @@ -0,0 +1,513 @@ +#! /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-2002 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. +# +# 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. + +# All known linkers require a `.a' archive for static linking (except M$VC, +# which needs '.lib'). +libext=a +shlibext= + +host="$1" +host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +wl= +if test "$GCC" = yes; then + wl='-Wl,' +else + case "$host_os" in + aix3* | aix4* | aix5*) + wl='-Wl,' + ;; + hpux9* | hpux10* | hpux11*) + wl='-Wl,' + ;; + irix5* | irix6*) + wl='-Wl,' + ;; + 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 + ;; + osf3* | osf4* | osf5*) + wl='-Wl,' + ;; + solaris*) + wl='-Wl,' + ;; + sunos4*) + wl='-Qoption ld ' + ;; + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + if test "x$host_vendor" = xsni; then + wl='-LD' + else + wl='-Wl,' + fi + ;; + esac +fi + +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 + ;; + openbsd*) + with_gnu_ld=no + ;; +esac + +ld_shlibs=yes +if test "$with_gnu_ld" = yes; then + case "$host_os" in + aix3* | aix4* | aix5*) + # On AIX, the GNU linker is very broken + ld_shlibs=no + ;; + 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 can use + # them. + ld_shlibs=no + ;; + beos*) + if $LD --help 2>&1 | egrep ': 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' + ;; + 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 + : + else + ld_shlibs=no + fi + ;; + sunos4*) + hardcode_direct=yes + ;; + *) + if $LD --help 2>&1 | egrep ': 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' + 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 + if test "$aix_use_runtimelinking" = yes; then + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' + 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' + 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 + ;; + 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=yes + ;; + freebsd1*) + ld_shlibs=no + ;; + freebsd2.2*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + freebsd2*) + hardcode_direct=yes + hardcode_minus_L=yes + ;; + freebsd*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + hpux9* | hpux10* | hpux11*) + 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. + ;; + irix5* | irix6*) + 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=: + ;; + sco3.2v5*) + ;; + solaris*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + sunos4*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + 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 + ;; + 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 + ;; + sysv5uw7* | unixware7*) + ;; + *) + ld_shlibs=no + ;; + esac +fi + +# Check dynamic linker characteristics +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 + ;; + aix4* | aix5*) + shlibext=so + ;; + amigaos*) + shlibext=ixlibrary + ;; + beos*) + shlibext=so + ;; + 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" + ;; + 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 + ;; + darwin* | rhapsody*) + shlibext=dylib + ;; + freebsd1*) + ;; + freebsd*) + shlibext=so + ;; + gnu*) + shlibext=so + ;; + hpux9* | hpux10* | hpux11*) + shlibext=sl + ;; + irix5* | irix6*) + shlibext=so + case "$host_os" in + irix5*) + libsuff= shlibsuff= + ;; + *) + case $LD in + *-32|*"-32 ") libsuff= shlibsuff= ;; + *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 ;; + *-64|*"-64 ") 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-gnu*) + shlibext=so + ;; + netbsd*) + shlibext=so + ;; + newsos6) + shlibext=so + ;; + openbsd*) + shlibext=so + ;; + os2*) + libname_spec='$name' + shlibext=dll + ;; + 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 + ;; + solaris*) + shlibext=so + ;; + sunos4*) + shlibext=so + ;; + 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*MP*) + if test -d /usr/nec; then + shlibext=so + fi + ;; +esac + +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' +escaped_wl=`echo "X$wl" | 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=/' <. Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ + kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | 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 | maxq | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | ms1 \ + | msp430 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m32c) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | ms1-* \ + | msp430-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + m32c-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16c) + basic_machine=cr16c-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config_test/Makefile b/config_test/Makefile new file mode 100644 index 0000000..295696e --- /dev/null +++ b/config_test/Makefile @@ -0,0 +1,10 @@ + +all: child_test.c + gcc -o child_test child_test.c + +test: + ./run_tests 10 + +clean: + rm -f child_test + diff --git a/config_test/child_test.c b/config_test/child_test.c new file mode 100644 index 0000000..e7d8210 --- /dev/null +++ b/config_test/child_test.c @@ -0,0 +1,77 @@ +// Base code taken from http://www-h.eng.cam.ac.uk/help/tpl/unix/fork.html +// Fix for redhat suggested by Ptere Pramberger, peter@pramberger.at +#include +#include +#include +#include +#include +void popen_sigchld_handler (int); +int childtermd; + +int main(){ + char str[1024]; + int pipefd[2]; + pid_t pid; + int status, died; + + if (signal (SIGCHLD, popen_sigchld_handler) == SIG_ERR) { + printf ("Cannot catch SIGCHLD\n"); + _exit(-1); + } + + pipe (pipefd); + switch(pid=fork()){ + case -1: + 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 + 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% + _exit(0); + + default: // this is the code the parent runs + + 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 + close (pipefd[1]); + // Now read from the pipe + fgets(str, 1023, stdin); + //printf("1st line output is %s\n", str); + + //while (!childtermd); // Uncomment this line to fix + + died= wait(&status); + //printf("died=%d status=%d\n", died, status); + if (died > 0) _exit(0); + else _exit(1); + } +} + +void +popen_sigchld_handler (int signo) +{ + if (signo == SIGCHLD) { + //printf("Caught sigchld\n"); + childtermd = 1; + } +} diff --git a/config_test/run_tests b/config_test/run_tests new file mode 100755 index 0000000..e41db23 --- /dev/null +++ b/config_test/run_tests @@ -0,0 +1,16 @@ +#!/bin/ksh + +i=0 +success=0 +fail=0 +while [[ $i -lt $1 ]] ; do + ./child_test + if [[ $? -eq 0 ]] ; then + success=$(($success+1)) + else + fail=$((fail+1)) + fi + i=$(($i+1)) +done +print "Success=$success Fail=$fail" +[[ $fail -gt 0 ]] && exit 1 diff --git a/configure b/configure new file mode 100755 index 0000000..4a1a08f --- /dev/null +++ b/configure @@ -0,0 +1,26673 @@ +#! /bin/sh +# From configure.in . +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.58 for nagios-plugins 1.4.2. +# +# Copyright (C) 2003 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME='nagios-plugins' +PACKAGE_TARNAME='nagios-plugins' +PACKAGE_VERSION='1.4.2' +PACKAGE_STRING='nagios-plugins 1.4.2' +PACKAGE_BUGREPORT='' + +ac_unique_file="NPTest.pm" +ac_default_prefix=/usr/local/nagios +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_config_libobj_dir=lib +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 AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot 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 RANLIB ac_ct_RANLIB LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS POW_LIB PLUGIN_TEST SCRIPT_TEST WARRANTY SUPPORT with_nagios_user with_nagios_group INSTALL_OPTS with_trusted_path PKG_ARCH REV_DATESTAMP REV_TIMESTAMP PYTHON SH PERL HOSTNAME BASENAME SOCKETLIBS MATHLIBS PGLIBS PGINCLUDE RADIUSLIBS LDAPLIBS LDAPINCLUDE MYSQLINCLUDE MYSQLLIBS check_mysql_LDFLAGS KRBINCLUDE OPENSSL SSLINCLUDE check_tcp_ssl SSLLIBS PATH_TO_PS PATH_TO_PING PATH_TO_PING6 PATH_TO_NSLOOKUP PATH_TO_HOST PATH_TO_UPTIME PATH_TO_RPCINFO PATH_TO_NTPDATE PATH_TO_NTPDC PATH_TO_NTPQ 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 NEED_VA_LIST EXTRAS EXTRA_NETOBJS DEPLIBS MKINSTALLDIRS MSGFMT GMSGFMT XGETTEXT MSGMERGE ALLOCA GLIBC21 LIBICONV LTLIBICONV INTLBISON USE_NLS BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT INTLOBJS DATADIRNAME INSTOBJEXT GENCAT INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB STDBOOL_H HAVE__BOOL LTLIBOBJS' +ac_subst_files='' + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +ac_prev= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_option in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP + +# +# Report the --help message. +# +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.2 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of nagios-plugins 1.4.2:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-dependency-tracking Speeds up one-time builds + --enable-dependency-tracking Do not reject slow dependency extractors + --enable-emulate-getaddrinfo enable getaddrinfo emulation (default=no) + --disable-rpath do not hardcode runtime library paths + --disable-nls do not use Native Language Support + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-cgiurl=DIR sets URL for cgi programs + --with-nagios-user=USER set user name to run nagios + --with-nagios-group=GROUP set group name to run nagios + --with-trusted-path=PATH sets trusted path for executables called by scripts (default=/bin:/sbin:/usr/bin:/usr/sbin) + --with-perl=PATH sets path to perl executable + --with-pgsql=DIR sets path to pgsql installation + --with-mysql=DIR sets path to mysql installation (assumes lib/mysql and include subdirs + --with-lwres=DIR use lwres library for getaddrinfo (default=no) + --with-openssl=DIR sets path to openssl installation + --without-openssl disable openssl + --with-ping-command=SYNTAX sets syntax for ICMP ping + --with-ping6-command=SYNTAX sets syntax for ICMPv6 ping + --with-gnu-ld assume the C compiler uses GNU ld default=no + --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib + --without-libiconv-prefix don't search for libiconv in includedir and libdir + --with-included-gettext use the GNU gettext library included here + --with-libintl-prefix=DIR search for libintl in DIR/include and DIR/lib + --without-libintl-prefix don't search for libintl in includedir and libdir + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +case "$ac_dir" in +.) ac_abs_builddir=$ac_builddir;; +*) + case $ac_builddir in + .) ac_abs_builddir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; + *) ac_abs_builddir="$ac_dir"/$ac_builddir;; + esac;; +esac +case "$ac_dir" in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; + esac;; +esac +case "$ac_dir" in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; + esac;; +esac +case "$ac_dir" in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF +nagios-plugins configure 1.4.2 +generated by GNU Autoconf 2.58 + +Copyright (C) 2003 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit 0 +fi +exec 5>config.log +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.2, which was +generated by GNU Autoconf 2.58. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_sep= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +am__api_version="1.8" +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + 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;} + { (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. + +# 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' + +echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +test "$program_prefix" != NONE && + program_transform_name="s,^,$program_prefix,;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s,\$,$program_suffix,;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if mkdir -m 0755 -p -- . 2>/dev/null; then + mkdir_p='mkdir -m 0755 -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-m ./0755 ./-p ./--; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs) -m 0755' + else + mkdir_p='$(install_sh) -m 0755 -d' + fi +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 + +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 + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +all: + @echo 'ac_maketemp="$(MAKE)"' +_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 +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftest.make +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = 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 + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='nagios-plugins' + VERSION='1.4.2' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +install_sh=${install_sh-"$am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; 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_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_STRIP="strip" + 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_STRIP" && ac_cv_prog_ac_ct_STRIP=":" +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + STRIP=$ac_ct_STRIP +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. + + + + ac_config_headers="$ac_config_headers config.h" + +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + + +RELEASE=1 + + + + +# 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" + +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 + + + +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); } + +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 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval 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 + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +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); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+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.o conftest.obj +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 + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +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. */ +_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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + : > 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 ;; + 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 + # (even with -Werror). So we grep stderr for any message + # that says an option was ignored. + if grep 'ignoring option' 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 + + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + + +echo "$as_me:$LINENO: checking for AIX" >&5 +echo $ECHO_N "checking for AIX... $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 _AIX + yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +cat >>confdefs.h <<\_ACEOF +#define _ALL_SOURCE 1 +_ACEOF + +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest* + + +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 + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.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 + +#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 + + +if test "${ac_cv_header_minix_config_h+set}" = set; then + echo "$as_me:$LINENO: checking for minix/config.h" >&5 +echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6 +if test "${ac_cv_header_minix_config_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 +echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking minix/config.h usability" >&5 +echo $ECHO_N "checking minix/config.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 minix/config.h presence" >&5 +echo $ECHO_N "checking minix/config.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: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: minix/config.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 minix/config.h" >&5 +echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6 +if test "${ac_cv_header_minix_config_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_minix_config_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 +echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6 + +fi +if test $ac_cv_header_minix_config_h = yes; then + MINIX=yes +else + MINIX= +fi + + +if test "$MINIX" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define _POSIX_SOURCE 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _POSIX_1_SOURCE 2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _MINIX 1 +_ACEOF + +fi + + + + + + + + + + + + cat >>confdefs.h <<\_ACEOF +#define __EXTENSIONS__ 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. */ +_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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + : > 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 ;; + 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 + # (even with -Werror). So we grep stderr for any message + # that says an option was ignored. + if grep 'ignoring option' 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 +echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 +if test "${ac_cv_prog_gcc_traditional+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_pattern="Autoconf.*'x'" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +Autoconf TIOCGETP +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then + ac_cv_prog_gcc_traditional=yes +else + ac_cv_prog_gcc_traditional=no +fi +rm -f conftest* + + + if test $ac_cv_prog_gcc_traditional = no; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +Autoconf TCGETA +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then + ac_cv_prog_gcc_traditional=yes +fi +rm -f conftest* + + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 +echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +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 + + +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 + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +all: + @echo 'ac_maketemp="$(MAKE)"' +_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 +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftest.make +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = 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 +_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 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 +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 + case $LIBOBJS in + "error.$ac_objext" | \ + *" error.$ac_objext" | \ + "error.$ac_objext "* | \ + *" error.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS error.$ac_objext" ;; +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 + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_strtod=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +double strtod (); +int +main() +{ + { + /* Some versions of Linux strtod mis-parse strings with leading '+'. */ + char *string = " +69"; + char *term; + double value; + value = strtod (string, &term); + if (value != 69 || term != (string + 4)) + exit (1); + } + + { + /* Under Solaris 2.4, strtod returns the wrong value for the + terminating character under some conditions. */ + char *string = "NaN"; + char *term; + strtod (string, &term); + if (term != string && *(term - 1) == 0) + exit (1); + } + 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 + ac_cv_func_strtod=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_strtod=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_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 +if test $ac_cv_func_strtod = no; then + case $LIBOBJS in + "strtod.$ac_objext" | \ + *" strtod.$ac_objext" | \ + "strtod.$ac_objext "* | \ + *" strtod.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; +esac + +echo "$as_me:$LINENO: checking for pow" >&5 +echo $ECHO_N "checking for pow... $ECHO_C" >&6 +if test "${ac_cv_func_pow+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 pow to an innocuous variant, in case declares pow. + For example, HP-UX 11i declares gettimeofday. */ +#define pow innocuous_pow + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char pow (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef pow + +/* 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 pow (); +/* 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_pow) || defined (__stub___pow) +choke me +#else +char (*f) () = pow; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != pow; + ; + 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_pow=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_pow=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_pow" >&5 +echo "${ECHO_T}$ac_cv_func_pow" >&6 + +if test $ac_cv_func_pow = no; then + echo "$as_me:$LINENO: checking for pow in -lm" >&5 +echo $ECHO_N "checking for pow in -lm... $ECHO_C" >&6 +if test "${ac_cv_lib_m_pow+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $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 pow (); +int +main () +{ +pow (); + ; + 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_m_pow=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_m_pow=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_m_pow" >&5 +echo "${ECHO_T}$ac_cv_lib_m_pow" >&6 +if test $ac_cv_lib_m_pow = yes; then + POW_LIB=-lm +else + { echo "$as_me:$LINENO: WARNING: cannot find library containing definition of pow" >&5 +echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;} +fi + +fi + +fi + + +PLUGIN_TEST=`echo $srcdir/plugins/t/*.t|sed -e 's,\.*/plugins/,,g'` + +SCRIPT_TEST=`echo $srcdir/plugins-scripts/t/*.t|sed -e 's,\.*/plugins-scripts/,,g'` + +WARRANTY="The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of the plugins under the terms of the GNU General Public License.\nFor more information about these matters, see the file named COPYING.\n" + + +SUPPORT="Send email to nagios-users@lists.sourceforge.net if you have questions\nregarding use of this software. To submit patches or suggest improvements,\nsend email to nagiosplug-devel@lists.sourceforge.net.\nPlease include version information with all correspondence (when possible,\nuse output from the --version option of the plugin itself).\n" + + + +# Check whether --with-cgiurl or --without-cgiurl was given. +if test "${with_cgiurl+set}" = set; then + withval="$with_cgiurl" + with_cgiurl=$withval +else + with_cgiurl=/nagios/cgi-bin +fi; +CGIURL="$with_cgiurl" + +cat >>confdefs.h <<_ACEOF +#define CGIURL "$CGIURL" +_ACEOF + + + +# Check whether --with-nagios_user or --without-nagios_user was given. +if test "${with_nagios_user+set}" = set; then + withval="$with_nagios_user" + with_nagios_user=$withval +else + with_nagios_user=nagios +fi; + +# Check whether --with-nagios_group or --without-nagios_group was given. +if test "${with_nagios_group+set}" = set; then + withval="$with_nagios_group" + with_nagios_group=$withval +else + with_nagios_group=nagios +fi; + + +INSTALL_OPTS="-o $with_nagios_user -g $with_nagios_group" + + + +# Check whether --with-trusted_path or --without-trusted_path was given. +if test "${with_trusted_path+set}" = set; then + withval="$with_trusted_path" + with_trusted_path=$withval +else + with_trusted_path=/bin:/sbin:/usr/bin:/usr/sbin +fi; + + +EXTRAS= + +LDFLAGS="$LDFLAGS -L." + +ac_cv_uname_m=`uname -m` +ac_cv_uname_s=`uname -s` +ac_cv_uname_r=`uname -r` +ac_cv_uname_v=`uname -v` + +PKG_ARCH=`uname -p` +REV_DATESTAMP=`date '+%Y.%m.%d.%H.%M'` +REV_TIMESTAMP=`date '+%Y%m%d%H%M%S'` + + + + + +# Extract the first word of "python", so it can be a program name with args. +set dummy python; 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_PYTHON+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON + +if test -n "$PYTHON"; then + echo "$as_me:$LINENO: result: $PYTHON" >&5 +echo "${ECHO_T}$PYTHON" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "sh", so it can be a program name with args. +set dummy sh; 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_SH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $SH in + [\\/]* | ?:[\\/]*) + ac_cv_path_SH="$SH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +SH=$ac_cv_path_SH + +if test -n "$SH"; then + echo "$as_me:$LINENO: result: $SH" >&5 +echo "${ECHO_T}$SH" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; 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_PERL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERL="$PERL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PERL=$ac_cv_path_PERL + +if test -n "$PERL"; then + echo "$as_me:$LINENO: result: $PERL" >&5 +echo "${ECHO_T}$PERL" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + +# Check whether --with-perl or --without-perl was given. +if test "${with_perl+set}" = set; then + withval="$with_perl" + with_perl=$withval +else + with_perl=$PERL +fi; +PERL=$with_perl + + +# Extract the first word of "hostname", so it can be a program name with args. +set dummy hostname; 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_HOSTNAME+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $HOSTNAME in + [\\/]* | ?:[\\/]*) + ac_cv_path_HOSTNAME="$HOSTNAME" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_HOSTNAME="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +HOSTNAME=$ac_cv_path_HOSTNAME + +if test -n "$HOSTNAME"; then + echo "$as_me:$LINENO: result: $HOSTNAME" >&5 +echo "${ECHO_T}$HOSTNAME" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "basename", so it can be a program name with args. +set dummy basename; 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_BASENAME+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $BASENAME in + [\\/]* | ?:[\\/]*) + ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +BASENAME=$ac_cv_path_BASENAME + +if test -n "$BASENAME"; then + echo "$as_me:$LINENO: result: $BASENAME" >&5 +echo "${ECHO_T}$BASENAME" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + +case $host_vender-$host_os in +sun*) + +cat >>confdefs.h <<\_ACEOF +#define __EXTENSIONS__ 1 +_ACEOF + + ;; +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 +if test "${ac_cv_lib_dce_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldce $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +main (); + ; + 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_dce_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dce_main=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_dce_main" >&5 +echo "${ECHO_T}$ac_cv_lib_dce_main" >&6 +if test $ac_cv_lib_dce_main = yes; then + SOCKETLIBS="$SOCKETLIBS -ldce" +fi + +echo "$as_me:$LINENO: checking for main in -lnsl" >&5 +echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +main (); + ; + 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_nsl_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_nsl_main=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_nsl_main" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6 +if test $ac_cv_lib_nsl_main = yes; then + SOCKETLIBS="$SOCKETLIBS -lnsl" +fi + +echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 +echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_socket+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $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 socket (); +int +main () +{ +socket (); + ; + 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_socket_socket=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_socket_socket=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_socket_socket" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 +if test $ac_cv_lib_socket_socket = yes; then + SOCKETLIBS="$SOCKETLIBS -lsocket" +fi + +echo "$as_me:$LINENO: checking for main in -lresolv" >&5 +echo $ECHO_N "checking for main in -lresolv... $ECHO_C" >&6 +if test "${ac_cv_lib_resolv_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lresolv $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +main (); + ; + 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_resolv_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_resolv_main=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_resolv_main" >&5 +echo "${ECHO_T}$ac_cv_lib_resolv_main" >&6 +if test $ac_cv_lib_resolv_main = yes; then + SOCKETLIBS="$SOCKETLIBS -lresolv" +fi + + + +echo "$as_me:$LINENO: checking for floor in -lm" >&5 +echo $ECHO_N "checking for floor in -lm... $ECHO_C" >&6 +if test "${ac_cv_lib_m_floor+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $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 floor (); +int +main () +{ +floor (); + ; + 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_m_floor=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_m_floor=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_m_floor" >&5 +echo "${ECHO_T}$ac_cv_lib_m_floor" >&6 +if test $ac_cv_lib_m_floor = yes; then + MATHLIBS="-lm" +fi + + + +_SAVEDLIBS="$LIBS" +_SAVEDCPPFLAGS="$CPPFLAGS" + +# Check whether --with-pgsql or --without-pgsql was given. +if test "${with_pgsql+set}" = set; then + withval="$with_pgsql" + PGSQL=$withval +fi; + +echo "$as_me:$LINENO: checking for main in -lcrypt" >&5 +echo $ECHO_N "checking for main in -lcrypt... $ECHO_C" >&6 +if test "${ac_cv_lib_crypt_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypt $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +main (); + ; + 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_crypt_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_crypt_main=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_crypt_main" >&5 +echo "${ECHO_T}$ac_cv_lib_crypt_main" >&6 +if test $ac_cv_lib_crypt_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBCRYPT 1 +_ACEOF + + LIBS="-lcrypt $LIBS" + +fi + +if test "$ac_cv_lib_crypt_main" = "yes"; then + if test -n "$PGSQL"; then + LDFLAGS="$LDFLAGS -L$PGSQL/lib" + CPPFLAGS="$CPPFLAGS -I$PGSQL/include" + fi + +echo "$as_me:$LINENO: checking for PQsetdbLogin in -lpq" >&5 +echo $ECHO_N "checking for PQsetdbLogin in -lpq... $ECHO_C" >&6 +if test "${ac_cv_lib_pq_PQsetdbLogin+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpq -lcrypt $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 PQsetdbLogin (); +int +main () +{ +PQsetdbLogin (); + ; + 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_pq_PQsetdbLogin=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_pq_PQsetdbLogin=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_pq_PQsetdbLogin" >&5 +echo "${ECHO_T}$ac_cv_lib_pq_PQsetdbLogin" >&6 +if test $ac_cv_lib_pq_PQsetdbLogin = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPQ 1 +_ACEOF + + LIBS="-lpq $LIBS" + +fi + + if test "$ac_cv_lib_pq_PQsetdbLogin" = "yes"; then + +for ac_header in pgsql/libpq-fe.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 + + +for ac_header in postgresql/libpq-fe.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 + + +for ac_header in libpq-fe.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 + + if [ -n "$PGSQL" -a "$ac_cv_header_libpq_fe_h" = "yes" ]; then + PGLIBS="-L$PGSQL/lib -lpq -lcrypt" + PGINCLUDE="-I$PGSQL/include" + elif test "$ac_cv_header_pgsql_libpq_fe_h" = "yes"; then + PGLIBS="-lpq -lcrypt" + PGINCLUDE="-I/usr/include/pgsql" + elif test "$ac_cv_header_postgresql_libpq_fe_h" = "yes"; then + PGLIBS="-L$PGSQL/lib -lpq -lcrypt" + PGINCLUDE="-I/usr/include/postgresql" + elif test "$ac_cv_header_libpq_fe_h" = "yes"; then + PGLIBS="-L$PGSQL/lib -lpq -lcrypt" + PGINCLUDE="-I$PGSQL/include" + fi + if test -z "$PGINCLUDE"; then + { echo "$as_me:$LINENO: WARNING: Skipping PostgreSQL plugin (check_pgsql)" >&5 +echo "$as_me: WARNING: Skipping PostgreSQL plugin (check_pgsql)" >&2;} + { echo "$as_me:$LINENO: WARNING: install PostgreSQL headers to compile this plugin (see REQUIREMENTS)." >&5 +echo "$as_me: WARNING: install PostgreSQL headers to compile this plugin (see REQUIREMENTS)." >&2;} + else + + + EXTRAS="$EXTRAS check_pgsql" + fi + else + { echo "$as_me:$LINENO: WARNING: Skipping PostgreSQL plugin (check_pgsql)" >&5 +echo "$as_me: WARNING: Skipping PostgreSQL plugin (check_pgsql)" >&2;} + { echo "$as_me:$LINENO: WARNING: LIBS=\"$LIBS\" CPPFLAGS=\"$CPPFLAGS\"" >&5 +echo "$as_me: WARNING: LIBS=\"$LIBS\" CPPFLAGS=\"$CPPFLAGS\"" >&2;} + { echo "$as_me:$LINENO: WARNING: install PostgreSQL libs to compile this plugin (see REQUIREMENTS)." >&5 +echo "$as_me: WARNING: install PostgreSQL libs to compile this plugin (see REQUIREMENTS)." >&2;} + fi +else + { echo "$as_me:$LINENO: WARNING: Skipping PostgreSQL plugin (check_pgsql)" >&5 +echo "$as_me: WARNING: Skipping PostgreSQL plugin (check_pgsql)" >&2;} + { echo "$as_me:$LINENO: WARNING: install lib crypt and PostgreSQL libs to compile this plugin (see REQUIREMENTS)." >&5 +echo "$as_me: WARNING: install lib crypt and PostgreSQL libs to compile this plugin (see REQUIREMENTS)." >&2;} +fi +LIBS="$_SAVEDLIBS" +CPPFLAGS="$_SAVEDCPPFLAGS" + +_SAVEDLIBS="$LIBS" + +echo "$as_me:$LINENO: checking for rc_read_config in -lradiusclient" >&5 +echo $ECHO_N "checking for rc_read_config in -lradiusclient... $ECHO_C" >&6 +if test "${ac_cv_lib_radiusclient_rc_read_config+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lradiusclient $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 rc_read_config (); +int +main () +{ +rc_read_config (); + ; + 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_radiusclient_rc_read_config=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_radiusclient_rc_read_config=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_radiusclient_rc_read_config" >&5 +echo "${ECHO_T}$ac_cv_lib_radiusclient_rc_read_config" >&6 +if test $ac_cv_lib_radiusclient_rc_read_config = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRADIUSCLIENT 1 +_ACEOF + + LIBS="-lradiusclient $LIBS" + +fi + +if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then + EXTRAS="$EXTRAS check_radius" + RADIUSLIBS="-lradiusclient" + +else + { echo "$as_me:$LINENO: WARNING: Skipping radius plugin" >&5 +echo "$as_me: WARNING: Skipping radius plugin" >&2;} + { echo "$as_me:$LINENO: WARNING: install radius libs to compile this plugin (see REQUIREMENTS)." >&5 +echo "$as_me: WARNING: install radius libs to compile this plugin (see REQUIREMENTS)." >&2;} +fi +LIBS="$_SAVEDLIBS" + +_SAVEDLIBS="$LIBS" + +echo "$as_me:$LINENO: checking for main in -lldap" >&5 +echo $ECHO_N "checking for main in -lldap... $ECHO_C" >&6 +if test "${ac_cv_lib_ldap_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lldap -llber $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +main (); + ; + 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_ldap_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_ldap_main=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_ldap_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ldap_main" >&6 +if test $ac_cv_lib_ldap_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBLDAP 1 +_ACEOF + + LIBS="-lldap $LIBS" + +fi + +if test "$ac_cv_lib_ldap_main" = "yes"; then + LDAPLIBS="-lldap -llber"\ + LDAPINCLUDE="-I/usr/include/ldap" + + + +for ac_func in ldap_set_option +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 + + EXTRAS="$EXTRAS check_ldap" + + + + +for ac_func in ldap_init ldap_set_option ldap_get_option ldap_start_tls_s +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 + +else + { echo "$as_me:$LINENO: WARNING: Skipping LDAP plugin" >&5 +echo "$as_me: WARNING: Skipping LDAP plugin" >&2;} + { echo "$as_me:$LINENO: WARNING: install LDAP libs to compile this plugin (see REQUIREMENTS)." >&5 +echo "$as_me: WARNING: install LDAP libs to compile this plugin (see REQUIREMENTS)." >&2;} +fi +LIBS="$_SAVEDLIBS" + + +_SAVEDLIBS="$LIBS" +_SAVEDCPPFLAGS="$CPPFLAGS" + +# Check whether --with-mysql or --without-mysql was given. +if test "${with_mysql+set}" = set; then + withval="$with_mysql" + MYSQL=$withval +fi; +if test -n "$MYSQL"; then + MYSQLLIBDIR=$MYSQL/lib/mysql + CPPFLAGS="-I$MYSQL/include" + 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 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmysqlclient -L$MYSQLLIBDIR -lz $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 mysql_init (); +int +main () +{ +mysql_init (); + ; + 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_mysqlclient_mysql_init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_mysqlclient_mysql_init=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_mysqlclient_mysql_init" >&5 +echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_init" >&6 +if test $ac_cv_lib_mysqlclient_mysql_init = yes; then + MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR " +fi + + echo "$as_me:$LINENO: checking for mysql_close in -lmysqlclient" >&5 +echo $ECHO_N "checking for mysql_close in -lmysqlclient... $ECHO_C" >&6 +if test "${ac_cv_lib_mysqlclient_mysql_close+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmysqlclient $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 mysql_close (); +int +main () +{ +mysql_close (); + ; + 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_mysqlclient_mysql_close=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_mysqlclient_mysql_close=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_mysqlclient_mysql_close" >&5 +echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_close" >&6 +if test $ac_cv_lib_mysqlclient_mysql_close = yes; then + MYSQLLIBS="-lmysqlclient" +fi + +elif test -f /usr/lib/libmysqlclient.so; 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 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmysqlclient -lz $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 mysql_init (); +int +main () +{ +mysql_init (); + ; + 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_mysqlclient_mysql_init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_mysqlclient_mysql_init=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_mysqlclient_mysql_init" >&5 +echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_init" >&6 +if test $ac_cv_lib_mysqlclient_mysql_init = yes; then + MYSQLLIBS="-lmysqlclient -lz" +fi + + echo "$as_me:$LINENO: checking for mysql_close in -lmysqlclient" >&5 +echo $ECHO_N "checking for mysql_close in -lmysqlclient... $ECHO_C" >&6 +if test "${ac_cv_lib_mysqlclient_mysql_close+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmysqlclient $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 mysql_close (); +int +main () +{ +mysql_close (); + ; + 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_mysqlclient_mysql_close=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_mysqlclient_mysql_close=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_mysqlclient_mysql_close" >&5 +echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_close" >&6 +if test $ac_cv_lib_mysqlclient_mysql_close = yes; then + MYSQLLIBS="-lmysqlclient" +fi + +elif test -f /usr/lib/libmysqlclient.a; 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 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmysqlclient -lz $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 mysql_init (); +int +main () +{ +mysql_init (); + ; + 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_mysqlclient_mysql_init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_mysqlclient_mysql_init=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_mysqlclient_mysql_init" >&5 +echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_init" >&6 +if test $ac_cv_lib_mysqlclient_mysql_init = yes; then + MYSQLLIBS="-lmysqlclient -lz" +fi + + echo "$as_me:$LINENO: checking for mysql_close in -lmysqlclient" >&5 +echo $ECHO_N "checking for mysql_close in -lmysqlclient... $ECHO_C" >&6 +if test "${ac_cv_lib_mysqlclient_mysql_close+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmysqlclient $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 mysql_close (); +int +main () +{ +mysql_close (); + ; + 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_mysqlclient_mysql_close=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_mysqlclient_mysql_close=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_mysqlclient_mysql_close" >&5 +echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_close" >&6 +if test $ac_cv_lib_mysqlclient_mysql_close = yes; then + MYSQLLIBS="-lmysqlclient" +fi + +elif test -f /usr/lib/mysql/libmysqlclient.so; 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 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmysqlclient -L/usr/lib/mysql -lz $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 mysql_init (); +int +main () +{ +mysql_init (); + ; + 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_mysqlclient_mysql_init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_mysqlclient_mysql_init=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_mysqlclient_mysql_init" >&5 +echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_init" >&6 +if test $ac_cv_lib_mysqlclient_mysql_init = yes; then + MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L/usr/lib/mysql" +fi + + echo "$as_me:$LINENO: checking for mysql_close in -lmysqlclient" >&5 +echo $ECHO_N "checking for mysql_close in -lmysqlclient... $ECHO_C" >&6 +if test "${ac_cv_lib_mysqlclient_mysql_close+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmysqlclient -L/usr/lib/mysql $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 mysql_close (); +int +main () +{ +mysql_close (); + ; + 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_mysqlclient_mysql_close=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_mysqlclient_mysql_close=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_mysqlclient_mysql_close" >&5 +echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_close" >&6 +if test $ac_cv_lib_mysqlclient_mysql_close = yes; then + MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql" +fi + +elif test -f /usr/lib/mysql/libmysqlclient.a; 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 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmysqlclient -L/usr/lib/mysql -lz $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 mysql_init (); +int +main () +{ +mysql_init (); + ; + 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_mysqlclient_mysql_init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_mysqlclient_mysql_init=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_mysqlclient_mysql_init" >&5 +echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_init" >&6 +if test $ac_cv_lib_mysqlclient_mysql_init = yes; then + MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L/usr/lib/mysql" +fi + + echo "$as_me:$LINENO: checking for mysql_close in -lmysqlclient" >&5 +echo $ECHO_N "checking for mysql_close in -lmysqlclient... $ECHO_C" >&6 +if test "${ac_cv_lib_mysqlclient_mysql_close+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmysqlclient -L/usr/lib/mysql $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 mysql_close (); +int +main () +{ +mysql_close (); + ; + 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_mysqlclient_mysql_close=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_mysqlclient_mysql_close=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_mysqlclient_mysql_close" >&5 +echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_close" >&6 +if test $ac_cv_lib_mysqlclient_mysql_close = yes; then + MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql" +fi + +fi +if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then + + +for ac_header in mysql/mysql.h mysql/errmsg.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 + MYSQLINCLUDE="-I$MYSQL/include" +fi + +done + + if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then + EXTRAS="$EXTRAS check_mysql" + + + + else + { 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 headers to compile this plugin (see REQUIREMENTS)." >&5 +echo "$as_me: WARNING: install mysql client headers to compile this plugin (see REQUIREMENTS)." >&2;} + fi +else + { 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;} +fi +CPPFLAGS="$_SAVEDCPPFLAGS $MYSQLINCLUDE" +LIBS="$_SAVEDLIBS" + + +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 + +fi + +done + + +echo "$as_me:$LINENO: checking for IPv6 support" >&5 +echo $ECHO_N "checking for IPv6 support... $ECHO_C" >&6 +if test "${with_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. */ +#ifdef HAVE_UNISTD_H + #include + #endif + #include + #include +int +main () +{ +struct sockaddr_in6 sin6; + void *p; + + sin6.sin6_family = AF_INET6; + sin6.sin6_port = 587; + p = &sin6.sin6_addr; + ; + 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 + with_ipv6=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +with_ipv6=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $with_ipv6" >&5 +echo "${ECHO_T}$with_ipv6" >&6 + +if test x"$with_ipv6" != xno ; then + +cat >>confdefs.h <<\_ACEOF +#define USE_IPV6 1 +_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 +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 + FOUNDINCLUDE=yes +else + FOUNDINCLUDE=no +fi + +done + +if test "$FOUNDINCLUDE" = "no"; then + _SAVEDCPPFLAGS="$CPPFLAGS" + CPPFLAGS="$_SAVEDCPPFLAGS -I/usr/kerberos/include" + unset ac_cv_header_krb5_h + +for ac_header in krb5.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 + KRB5INCLUDE="-I/usr/kerberos/include" + FOUNDINCLUDE=yes +else + FOUNDINCLUDE=no +fi + +done + +fi + +if test "$FOUNDINCLUDE" = "no"; then + CPPFLAGS="$_SAVEDCPPFLAGS" +fi + +# Extract the first word of "openssl", so it can be a program name with args. +set dummy openssl; 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_OPENSSL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $OPENSSL in + [\\/]* | ?:[\\/]*) + ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_OPENSSL="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +OPENSSL=$ac_cv_path_OPENSSL + +if test -n "$OPENSSL"; then + echo "$as_me:$LINENO: result: $OPENSSL" >&5 +echo "${ECHO_T}$OPENSSL" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test "$OPENSSL" = "/usr/bin/openssl"; then + OPENSSL=/usr +elif test "$OPENSSL" = "/usr/sbin/openssl"; then + OPENSSL=/usr +elif test "$OPENSSL" = "/opt/bin/openssl"; then + OPENSSL=/opt +elif test "$OPENSSL" = "/opt/openssl/bin/openssl"; then + OPENSSL=/opt/openssl +elif test "$OPENSSL" = "/usr/slocal/bin/openssl"; then + OPENSSL=/usr/slocal +elif test "$OPENSSL" = "/usr/local/bin/openssl"; then + OPENSSL=/usr/local +elif test "$OPENSSL" = "/usr/local/ssl/bin/openssl"; then + OPENSSL=/usr/local/ssl +fi + +# Check whether --with-openssl or --without-openssl was given. +if test "${with_openssl+set}" = set; then + withval="$with_openssl" + OPENSSL=$withval +fi; + +_SAVEDCPPFLAGS="$CPPFLAGS" +_SAVEDLDFLAGS="$LDFLAGS" +if test X"$OPENSSL" = "Xno"; then + { echo "$as_me:$LINENO: WARNING: openssl disabled, you will not be able to use ssl options in some plugins" >&5 +echo "$as_me: WARNING: openssl disabled, you will not be able to use ssl options in some plugins" >&2;} + FOUNDSSL="dontbother" +else + unset FOUNDINCLUDE + if test "$OPENSSL" != "/usr"; then + CPPFLAGS="$CPPFLAGS -I$OPENSSL/include" + LDFLAGS="$LDFLAGS -R$OPENSSL/lib" + fi + + + + + + +for ac_header in openssl/ssl.h openssl/x509.h openssl/rsa.h openssl/pem.h openssl/crypto.h openssl/err.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 + SSLINCLUDE="-I$OPENSSL/include" + FOUNDINCLUDE=yes +else + FOUNDINCLUDE=no +fi + +done + + if test "$FOUNDINCLUDE" = "no"; then + + + + + + +for ac_header in ssl.h x509.h rsa.h pem.h crypto.h err.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 + SSLINCLUDE="-I$OPENSSL/include" + FOUNDINCLUDE=yes +else + FOUNDINCLUDE=no +fi + +done + + fi + + if test "$FOUNDINCLUDE" = "no"; then + CPPFLAGS="$_SAVEDCPPFLAGS" + fi + + _SAVEDLIBS="$LIBS" + +echo "$as_me:$LINENO: checking for CRYPTO_lock in -lcrypto" >&5 +echo $ECHO_N "checking for CRYPTO_lock in -lcrypto... $ECHO_C" >&6 +if test "${ac_cv_lib_crypto_CRYPTO_lock+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto -L$OPENSSL/lib $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 CRYPTO_lock (); +int +main () +{ +CRYPTO_lock (); + ; + 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_crypto_CRYPTO_lock=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_crypto_CRYPTO_lock=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_crypto_CRYPTO_lock" >&5 +echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_lock" >&6 +if test $ac_cv_lib_crypto_CRYPTO_lock = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBCRYPTO 1 +_ACEOF + + LIBS="-lcrypto $LIBS" + +fi + + if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then + echo "$as_me:$LINENO: checking for main in -lssl" >&5 +echo $ECHO_N "checking for main in -lssl... $ECHO_C" >&6 +if test "${ac_cv_lib_ssl_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lssl -L$OPENSSL/lib -lcrypto $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +main (); + ; + 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_ssl_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_ssl_main=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_ssl_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ssl_main" >&6 +if test $ac_cv_lib_ssl_main = yes; then + LDFLAGS="$LDFLAGS -L$OPENSSL/lib" SSLLIBS="-lssl -lcrypto" +else + echo "$as_me:$LINENO: checking for main in -lssl" >&5 +echo $ECHO_N "checking for main in -lssl... $ECHO_C" >&6 +if test "${ac_cv_lib_ssl_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lssl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +main (); + ; + 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_ssl_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_ssl_main=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_ssl_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ssl_main" >&6 +if test $ac_cv_lib_ssl_main = yes; then + LDFLAGS="$LDFLAGS -L$OPENSSL/lib" SSLLIBS="-lssl -lcrypto" +fi + +fi + + fi + LIBS="$_SAVEDLIBS" + + FOUNDSSL="no" + if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then + if test "$ac_cv_lib_ssl_main" = "yes"; then + if test "$FOUNDINCLUDE" = "yes"; then + FOUNDSSL="yes" + fi + fi + fi +fi + +if test "$FOUNDSSL" = "yes"; then + check_tcp_ssl="check_simap check_spop check_jabber check_nntps check_ssmtp" + + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SSL 1 +_ACEOF + + with_openssl="yes" +else + if test "$FOUNDSSL" = "no"; then + { echo "$as_me:$LINENO: WARNING: OpenSSL libs could not be found" >&5 +echo "$as_me: WARNING: OpenSSL libs could not be found" >&2;} + fi + with_openssl="no" + CPPFLAGS="$_SAVEDCPPFLAGS" + LDFLAGS="$_SAVEDLDFLAGS" +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 + 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 () +{ +if ((struct tm *) 0) +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_header_time=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_time=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 +if test $ac_cv_header_time = yes; then + +cat >>confdefs.h <<\_ACEOF +#define TIME_WITH_SYS_TIME 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 +if test "${ac_cv_header_sys_wait_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 +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif + +int +main () +{ + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 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 + ac_cv_header_sys_wait_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_sys_wait_h=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +if test $ac_cv_header_sys_wait_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_WAIT_H 1 +_ACEOF + +fi + + + + + + + + + + + + +for ac_header in signal.h strings.h string.h syslog.h uio.h errno.h regex.h sys/types.h sys/time.h sys/socket.h sys/loadavg.h +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 + + + + + + +for ac_header in features.h stdarg.h sys/unistd.h ctype.h 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 an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 +if test "${ac_cv_c_const+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 () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset x; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *ccp; + char **p; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + ccp = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++ccp; + p = (char**) ccp; + ccp = (char const *const *) p; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + } +#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_c_const=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_c_const=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6 +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + +fi + +echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 +if test "${ac_cv_struct_tm+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 () +{ +struct tm *tp; tp->tm_sec; + ; + 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_struct_tm=time.h +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_struct_tm=sys/time.h +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6 +if test $ac_cv_struct_tm = sys/time.h; then + +cat >>confdefs.h <<\_ACEOF +#define TM_IN_SYS_TIME 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +if test "${ac_cv_type_pid_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 ((pid_t *) 0) + return 0; +if (sizeof (pid_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_pid_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_pid_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +if test $ac_cv_type_pid_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +if test "${ac_cv_type_size_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 ((size_t *) 0) + return 0; +if (sizeof (size_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_size_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_size_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 +if test $ac_cv_type_size_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned +_ACEOF + +fi + +echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 +if test "${ac_cv_type_signal+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 +#ifdef signal +# undef signal +#endif +#ifdef __cplusplus +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); +#endif + +int +main () +{ +int 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 + ac_cv_type_signal=void +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_signal=int +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6 + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + + +echo "$as_me:$LINENO: checking for va_copy" >&5 +echo $ECHO_N "checking for va_copy... $ECHO_C" >&6 +if test "${ac_cv_HAVE_VA_COPY+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 +va_list ap1,ap2; +int +main () +{ +va_copy(ap1,ap2); + ; + 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_HAVE_VA_COPY=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_HAVE_VA_COPY=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_HAVE_VA_COPY" >&5 +echo "${ECHO_T}$ac_cv_HAVE_VA_COPY" >&6 +if test x"$ac_cv_HAVE_VA_COPY" = x"yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_VA_COPY 1 +_ACEOF + +else + echo "$as_me:$LINENO: checking for __va_copy" >&5 +echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6 +if test "${ac_cv_HAVE___VA_COPY+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 + va_list ap1,ap2; +int +main () +{ +__va_copy(ap1,ap2); + ; + 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_HAVE___VA_COPY=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_HAVE___VA_COPY=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_HAVE___VA_COPY" >&5 +echo "${ECHO_T}$ac_cv_HAVE___VA_COPY" >&6 + if test x"$ac_cv_HAVE___VA_COPY" = x"yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___VA_COPY 1 +_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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +struct timeval *tv; + struct timezone *tz; + ; + 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 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STRUCT_TIMEVAL 1 +_ACEOF + + 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 timeval *tv; + struct timezone *tz; + gettimeofday(tv, tz); + ; + 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 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETTIMEOFDAY 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +cat >>confdefs.h <<\_ACEOF +#define NEED_GETTIMEOFDAY 1 +_ACEOF + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +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 + + + + + + + + + + +for ac_func in memmove select socket strdup strstr strtod 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 +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 return type of socket size" >&5 +echo $ECHO_N "checking return type of socket size... $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 + #include + #include +int +main () +{ +int a = send(1, (const void *) buffer, (size_t *) 0, (int *) 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_socket_size_type="size_t" + echo "$as_me:$LINENO: result: size_t" >&5 +echo "${ECHO_T}size_t" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_socket_size_type="int" + echo "$as_me:$LINENO: result: int" >&5 +echo "${ECHO_T}int" >&6 +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + +cat >>confdefs.h <<_ACEOF +#define SOCKET_SIZE_TYPE $ac_cv_socket_size_type +_ACEOF + + +if test -f "/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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PATH_TO_PS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_PS in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_PS="$PATH_TO_PS" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_PS="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_PS=$ac_cv_path_PATH_TO_PS + +if test -n "$PATH_TO_PS"; then + echo "$as_me:$LINENO: result: $PATH_TO_PS" >&5 +echo "${ECHO_T}$PATH_TO_PS" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +echo "$as_me:$LINENO: checking for ps syntax" >&5 +echo $ECHO_N "checking for ps syntax... $ECHO_C" >&6 +if 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 +then + ac_cv_ps_varlist="procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos" + ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu comm args'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=9 + 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 +then + ac_cv_ps_varlist="procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos" + ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid vsz rss pcpu comm args'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=9 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +elif ps -axwo 'stat uid pid ppid vsz rss pcpu ucomm command' 2>/dev/null | \ + egrep -i "^ *STAT +UID +PID +PPID +VSZ +RSS +%CPU +UCOMM +COMMAND" > /dev/null +then + ac_cv_ps_varlist="procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos" + ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid vsz rss pcpu ucomm command'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=9 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +elif ps -weo 'stat comm vsz rss user uid pid ppid etime args' 2>/dev/null | \ + egrep -i "^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[ID]+ +P[PID]+ +[ELAPSD]+ +[RGSCOMDNA]+" >/dev/null +then + ac_cv_ps_varlist="procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos" + ac_cv_ps_command="$PATH_TO_PS -weo 'stat uid pid ppid vsz rss pcpu etime comm args'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %s %n" + ac_cv_ps_cols=10 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +elif ps waxco 'state command vsz rss uid user pid ppid' 2>/dev/null | \ + egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PID +PPID" >/dev/null +then + ac_cv_ps_varlist="procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos" + ac_cv_ps_command="$PATH_TO_PS waxco 'state uid pid ppid vsz rss pcpu command command'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=9 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +elif ps waxno 'state comm vsz rss uid user pid ppid args' 2>/dev/null | \ + egrep -i "^S +COMMAND +VSZ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+" >/dev/null +then + ac_cv_ps_varlist="procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos" + ac_cv_ps_command="$PATH_TO_PS waxno 'state uid pid ppid vsz rss pcpu comm args'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=9 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +elif ps -laxnwww 2>/dev/null | head -1 | \ + egrep -i "^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND" >/dev/null +then + ac_cv_ps_varlist="&procuid,&procpid,&procppid,&procvsz,&procrss,procstat,&pos,procprog" + ac_cv_ps_command="$PATH_TO_PS -laxnwww" + ac_cv_ps_format="%*s %d %d %d %*s %*s %*s %d %d %*s %s %*s %*s %n%s" + ac_cv_ps_cols=9 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +elif ps laxnwww 2>/dev/null | \ + egrep -i "^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND" >/dev/null +then + ac_cv_ps_varlist="&procuid,&procpid,&procppid,procstat,&procvsz,&procrss,&pos,procprog" + ac_cv_ps_command="$PATH_TO_PS laxnwww" + ac_cv_ps_format="%*s %d %d %d %*s %*s %d %d %*s %s %*s %*s %n%s" + ac_cv_ps_cols=9 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +elif ps -axo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \ + egrep -i "^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+" >/dev/null +then + ac_cv_ps_varlist="procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos" + ac_cv_ps_command="$PATH_TO_PS -axo 'stat uid pid ppid vsz rss pcpu comm args'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=9 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +elif ps -ao 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \ + egrep -i "^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[ID]+ +P[PID]+ +[RGSCOMDNA]+" >/dev/null +then + ac_cv_ps_varlist="procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos" + ac_cv_ps_command="$PATH_TO_PS -ao 'stat uid pid ppid vsz rss pcpu comm args'" + ac_cv_ps_format="%s%*[ +] %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=9 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +elif ps -eo 's comm vsz rss user uid pid ppid args' 2>/dev/null | \ + egrep -i "^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+" >/dev/null +then + ac_cv_ps_varlist="procstat,&procuid,&procpid,&procpid,&procvsz,&procrss,&procpcpu,procprog,&pos" + ac_cv_ps_command="$PATH_TO_PS -eo 's uid pid ppid vsz rss pcpu comm args'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=9 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +elif ps -eo 'stat uid pid ppid vsz pcpu comm args' 2>/dev/null | \ + egrep -i "^ *S[TAUES]* +UID +PID +PPID +VSZ +%CPU +COMMAND +COMMAND" >/dev/null +then + ac_cv_ps_varlist="procstat,&procuid,&procpid,&procpid,&procvsz,&procpcpu,procprog,&pos" + ac_cv_ps_command="$PATH_TO_PS -eo 'stat uid pid ppid vsz pcpu comm args'" + ac_cv_ps_format="%s %d %d %d %d %f %s %n" + ac_cv_ps_cols=8 + echo "$as_me:$LINENO: result: $ac_cv_ps_command - with no RSS" >&5 +echo "${ECHO_T}$ac_cv_ps_command - with no RSS" >&6 + +elif ps -Ao 's comm vsz rss uid user pid ppid args' 2>/dev/null | \ + egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+" >/dev/null +then + ac_cv_ps_varlist="procstat,&procuid,&procpid,&procpid,&procvsz,&procrss,&procpcpu,procprog,&pos" + ac_cv_ps_command="$PATH_TO_PS -Ao 's uid pid ppid vsz rss pcpu comm args'" + # There must be no space between the %s and %n due to a wierd problem in sscanf where + # it will return %n as longer than the line length + ac_cv_ps_format="%s %d %d %d %d %d %f %s%n" + ac_cv_ps_cols=9 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +elif ps -Ao 'status comm vsz rss uid user pid ppid args' 2>/dev/null | \ + egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+" >/dev/null +then + ac_cv_ps_varlist="procstat,&procuid,&procpid,&procpid,&procvsz,&procrss,&procpcpu,procprog,&pos" + ac_cv_ps_command="$PATH_TO_PS -Ao 'status uid pid ppid vsz rss pcpu comm args'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=9 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +elif ps -Ao 'state comm vsz rss uid user pid ppid args' 2>/dev/null | \ + egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+" >/dev/null +then + ac_cv_ps_varlist="procstat,&procuid,&procpid,&procpid,&procvsz,&procrss,&procpcpu,procprog,&pos" + ac_cv_ps_command="$PATH_TO_PS -Ao 'state uid pid ppid vsz rss pcpu comm args'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=9 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +elif ps -ao 'state command vsz rss user pid ppid args' 2>/dev/null | \ + egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+" >/dev/null +then + ac_cv_ps_varlist="procstat,&procuid,&procpid,&procpid,&procvsz,&procrss,&procpcpu,procprog,&pos" + ac_cv_ps_command="$PATH_TO_PS -ao 'state uid pid ppid vsz rss pcpu command args'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=8 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +elif ps -el 2>/dev/null | \ + egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null +then + ac_cv_ps_varlist="procstat,&procuid,&procpid,&procpid,&procvsz,&procrss,&pos,procprog" + ac_cv_ps_command="$PATH_TO_PS -el (IRIX 53)" + ac_cv_ps_format="%*s %s %d %d %d %*s %*s %*s %*s %d %d %*s %*s %*s %n%s" + ac_cv_ps_cols=8 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +elif ps -el 2>/dev/null | \ + egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +P +ADDR +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null +then + ac_cv_ps_varlist="procstat,&procuid,&procpid,&procpid,&pos,procprog" + ac_cv_ps_command="$PATH_TO_PS -el (IRIX 63)" + ac_cv_ps_format="%*s %s %d %d %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s" + ac_cv_ps_cols=6 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +elif ps -el 2>/dev/null | \ + egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null +then + ac_cv_ps_varlist="procstat,&procuid,&procpid,&procpid,&pos,procprog" + ac_cv_ps_command="$PATH_TO_PS -el (AIX 4.1 and HP-UX)" + ac_cv_ps_format="%*s %s %d %d %d %*s %*s %*s %*s %*s %*s %*s %*s %n%s" + ac_cv_ps_cols=6 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +elif ps glaxen 2>/dev/null | \ + egrep -i "^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND" >/dev/null +then + ac_cv_ps_varlist="&procuid,&procpid,&procpid,&procvsz,&procrss,procstat,&pos,procprog" + ac_cv_ps_command="$PATH_TO_PS glaxen" + ac_cv_ps_format="%*s %d %d %d %*s %*s %d %d %*s %s %*s %*s %n%s" + ac_cv_ps_cols=8 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +elif ps wwaxo 'state vsz rss uid pid ppid pcpu ucomm command' 2>/dev/null | \ + egrep -i "^STAT +VSZ +RSS +UID +PPID +%CPU +UCOMM +COMMAND" >/dev/null +then + ac_cv_ps_command="$PATH_TO_PS wwaxo 'state vsz rss uid pid ppid pcpu ucomm command'" + ac_cv_ps_varlist="procstat,&procvsz,&procrss,&procuid,&procpid,&procpid,&procpcpu,procprog,&pos" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=8 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +elif ps -Al 2>/dev/null | \ + egrep -i "^ *F +S +UID +PID +PPID +CLS +PRI +NI +C +ADDR +SZ +WCHAN +TTY +TIME +COMD" >/dev/null +then + ac_cv_ps_varlist="procstat,&procuid,&procpid,&procpid,&pos,procprog" + ac_cv_ps_command="$PATH_TO_PS -Al" + ac_cv_ps_format="%*s %s %d %d %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s" + ac_cv_ps_cols=8 + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 + +else + { echo "$as_me:$LINENO: WARNING: unable to find usable ps syntax - check_procs and check_nagios will not be compiled" >&5 +echo "$as_me: WARNING: unable to find usable ps syntax - check_procs and check_nagios will not be compiled" >&2;} +fi + +if test -n "$ac_cv_ps_varlist" ; then + +cat >>confdefs.h <<_ACEOF +#define PS_VARLIST $ac_cv_ps_varlist +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PS_COMMAND "$ac_cv_ps_command" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PS_FORMAT "$ac_cv_ps_format" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PS_COLS $ac_cv_ps_cols +_ACEOF + + EXTRAS="$EXTRAS check_procs check_nagios" +fi + +# Extract the first word of "ping", so it can be a program name with args. +set dummy ping; 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_PATH_TO_PING+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_PING in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_PING="$PATH_TO_PING" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_PING="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_PING=$ac_cv_path_PATH_TO_PING + +if test -n "$PATH_TO_PING"; then + echo "$as_me:$LINENO: result: $PATH_TO_PING" >&5 +echo "${ECHO_T}$PATH_TO_PING" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "ping6", so it can be a program name with args. +set dummy ping6; 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_PATH_TO_PING6+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_PING6 in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_PING6="$PATH_TO_PING6" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_PING6="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_PING6=$ac_cv_path_PATH_TO_PING6 + +if test -n "$PATH_TO_PING6"; then + echo "$as_me:$LINENO: result: $PATH_TO_PING6" >&5 +echo "${ECHO_T}$PATH_TO_PING6" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + +# Check whether --with-ping_command or --without-ping_command was given. +if test "${with_ping_command+set}" = set; then + withval="$with_ping_command" + with_ping_command=$withval +fi; + +echo "$as_me:$LINENO: checking for ICMP ping syntax" >&5 +echo $ECHO_N "checking for ICMP ping syntax... $ECHO_C" >&6 +ac_cv_ping_packets_first=no +ac_cv_ping_has_timeout=no +if test -n "$with_ping_command" +then + echo "$as_me:$LINENO: result: (command-line) $with_ping_command" >&5 +echo "${ECHO_T}(command-line) $with_ping_command" >&6 + if test -n "$ac_cv_ping_packets_first" + then + ac_cv_ping_packets_first=yes + fi + +elif [ "z$ac_cv_uname_s" = "zUnixWare" ] && \ + $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING -n -U -c %d %s" + ac_cv_ping_packets_first=yes + echo "$as_me:$LINENO: result: $with_ping_command" >&5 +echo "${ECHO_T}$with_ping_command" >&6 + +elif $PATH_TO_PING -n -U -w 10 -c 1 127.0.0.1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING -n -U -w %d -c %d %s" + ac_cv_ping_packets_first=yes + ac_cv_ping_has_timeout=yes + echo "$as_me:$LINENO: result: $with_ping_command" >&5 +echo "${ECHO_T}$with_ping_command" >&6 + +elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING -n -U -c %d %s" + ac_cv_ping_packets_first=yes + echo "$as_me:$LINENO: result: $with_ping_command" >&5 +echo "${ECHO_T}$with_ping_command" >&6 + +elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING -n -c %d %s" + ac_cv_ping_packets_first=yes + echo "$as_me:$LINENO: result: $with_ping_command" >&5 +echo "${ECHO_T}$with_ping_command" >&6 + +elif $PATH_TO_PING -n 127.0.0.1 -c 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING -n %s -c %d" + echo "$as_me:$LINENO: result: $with_ping_command" >&5 +echo "${ECHO_T}$with_ping_command" >&6 + +elif $PATH_TO_PING 127.0.0.1 -n 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING %s -n %d" + echo "$as_me:$LINENO: result: $with_ping_command" >&5 +echo "${ECHO_T}$with_ping_command" >&6 + +elif $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING -n -s %s 56 %d" + echo "$as_me:$LINENO: result: $with_ping_command" >&5 +echo "${ECHO_T}$with_ping_command" >&6 + +elif $PATH_TO_PING -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING -n -h %s -s 56 -c %d" + echo "$as_me:$LINENO: result: $with_ping_command" >&5 +echo "${ECHO_T}$with_ping_command" >&6 + +elif $PATH_TO_PING -n -s 56 -c 1 127.0.0.1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING -n -s 56 -c %d %s" + ac_cv_ping_packets_first=yes + echo "$as_me:$LINENO: result: $with_ping_command" >&5 +echo "${ECHO_T}$with_ping_command" >&6 + +elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING -n -c %d %s" + ac_cv_ping_packets_first=yes + echo "$as_me:$LINENO: result: $with_ping_command" >&5 +echo "${ECHO_T}$with_ping_command" >&6 + +else + { echo "$as_me:$LINENO: WARNING: unable to find usable ping syntax" >&5 +echo "$as_me: WARNING: unable to find usable ping syntax" >&2;} +fi + + +cat >>confdefs.h <<_ACEOF +#define PING_COMMAND "$with_ping_command" +_ACEOF + + +if test "x$ac_cv_ping_packets_first" != "xno" +then + +cat >>confdefs.h <<\_ACEOF +#define PING_PACKETS_FIRST 1 +_ACEOF + +fi + +if test "x$ac_cv_ping_has_timeout" != "xno" +then + +cat >>confdefs.h <<\_ACEOF +#define PING_HAS_TIMEOUT 1 +_ACEOF + +fi + + +# Check whether --with-ping6_command or --without-ping6_command was given. +if test "${with_ping6_command+set}" = set; then + withval="$with_ping6_command" + with_ping6_command=$withval +fi; + +if test x"$with_ipv6" != xno ; then +echo "$as_me:$LINENO: checking for ICMPv6 ping syntax" >&5 +echo $ECHO_N "checking for ICMPv6 ping syntax... $ECHO_C" >&6 +ac_cv_ping6_packets_first=no +if test -n "$with_ping6_command" +then + echo "$as_me:$LINENO: result: (command-line) $with_ping6_command" >&5 +echo "${ECHO_T}(command-line) $with_ping6_command" >&6 + if test -n "$ac_cv_ping6_packets_first" + then + ac_cv_ping6_packets_first=yes + fi + +elif test "x$PATH_TO_PING6" != "x"; then + if [ "z$ac_cv_uname_s" = "zUnixWare" ] && \ + $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s" + ac_cv_ping6_packets_first=yes + echo "$as_me:$LINENO: result: $with_ping6_command" >&5 +echo "${ECHO_T}$with_ping6_command" >&6 + + elif $PATH_TO_PING6 -n -U -w 10 -c 1 ::1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 -n -U -w %d -c %d %s" + ac_cv_ping6_packets_first=yes + ac_cv_ping_has_timeout=yes + echo "$as_me:$LINENO: result: $with_ping6_command" >&5 +echo "${ECHO_T}$with_ping6_command" >&6 + + elif $PATH_TO_PING6 -n -U -c 1 ::1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s" + ac_cv_ping6_packets_first=yes + echo "$as_me:$LINENO: result: $with_ping6_command" >&5 +echo "${ECHO_T}$with_ping6_command" >&6 + + elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 -n -c %d %s" + ac_cv_ping6_packets_first=yes + echo "$as_me:$LINENO: result: $with_ping6_command" >&5 +echo "${ECHO_T}$with_ping6_command" >&6 + + elif $PATH_TO_PING6 -n ::1 -c 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 -n %s -c %d" + echo "$as_me:$LINENO: result: $with_ping6_command" >&5 +echo "${ECHO_T}$with_ping6_command" >&6 + + elif $PATH_TO_PING6 ::1 -n 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 %s -n %d" + echo "$as_me:$LINENO: result: $with_ping6_command" >&5 +echo "${ECHO_T}$with_ping6_command" >&6 + + elif $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 -n -s %s 56 %d" + echo "$as_me:$LINENO: result: $with_ping6_command" >&5 +echo "${ECHO_T}$with_ping6_command" >&6 + + elif $PATH_TO_PING6 -n -h ::1 -s 56 -c 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 -n -h %s -s 56 -c %d" + echo "$as_me:$LINENO: result: $with_ping6_command" >&5 +echo "${ECHO_T}$with_ping6_command" >&6 + + elif $PATH_TO_PING6 -n -s 56 -c 1 ::1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 -n -s 56 -c %d %s" + ac_cv_ping6_packets_first=yes + echo "$as_me:$LINENO: result: $with_ping_command" >&5 +echo "${ECHO_T}$with_ping_command" >&6 + + elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 -n -c %d %s" + ac_cv_ping6_packets_first=yes + echo "$as_me:$LINENO: result: $with_ping6_command" >&5 +echo "${ECHO_T}$with_ping6_command" >&6 + + fi + +elif test "x$PATH_TO_PING" != "x"; then + if [ "z$ac_cv_uname_s" = "zUnixWare" ] && \ + $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s" + ac_cv_ping6_packets_first=yes + echo "$as_me:$LINENO: result: $with_ping6_command" >&5 +echo "${ECHO_T}$with_ping6_command" >&6 + + elif $PATH_TO_PING -A inet6 -n -U -c 1 ::1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s" + ac_cv_ping6_packets_first=yes + echo "$as_me:$LINENO: result: $with_ping6_command" >&5 +echo "${ECHO_T}$with_ping6_command" >&6 + + elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s" + ac_cv_ping6_packets_first=yes + echo "$as_me:$LINENO: result: $with_ping6_command" >&5 +echo "${ECHO_T}$with_ping6_command" >&6 + + elif $PATH_TO_PING -A inet6 -n ::1 -c 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING -A inet6 -n %s -c %d" + echo "$as_me:$LINENO: result: $with_ping6_command" >&5 +echo "${ECHO_T}$with_ping6_command" >&6 + + elif $PATH_TO_PING -A inet6 ::1 -n 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING -A inet6 %s -n %d" + echo "$as_me:$LINENO: result: $with_ping6_command" >&5 +echo "${ECHO_T}$with_ping6_command" >&6 + + elif $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING -A inet6 -n -s %s 56 %d" + echo "$as_me:$LINENO: result: $with_ping6_command" >&5 +echo "${ECHO_T}$with_ping6_command" >&6 + + elif $PATH_TO_PING -A inet6 -n -h ::1 -s 56 -c 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING -A inet6 -n -h %s -s 56 -c %d" + echo "$as_me:$LINENO: result: $with_ping6_command" >&5 +echo "${ECHO_T}$with_ping6_command" >&6 + + elif $PATH_TO_PING -A inet6 -n -s 56 -c 1 ::1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING -A inet6 -n -s 56 -c %d %s" + ac_cv_ping6_packets_first=yes + echo "$as_me:$LINENO: result: $with_ping_command" >&5 +echo "${ECHO_T}$with_ping_command" >&6 + + elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s" + ac_cv_ping6_packets_first=yes + echo "$as_me:$LINENO: result: $with_ping6_command" >&5 +echo "${ECHO_T}$with_ping6_command" >&6 + + fi + +fi + +if test "x$with_ping6_command" != "x"; then + +cat >>confdefs.h <<_ACEOF +#define PING6_COMMAND "$with_ping6_command" +_ACEOF + +else + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 +fi + +if test "x$ac_cv_ping6_packets_first" != "xno"; then + +cat >>confdefs.h <<\_ACEOF +#define PING6_PACKETS_FIRST 1 +_ACEOF + +fi +fi + +# Extract the first word of "nslookup", so it can be a program name with args. +set dummy nslookup; 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_PATH_TO_NSLOOKUP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_NSLOOKUP in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_NSLOOKUP="$PATH_TO_NSLOOKUP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_NSLOOKUP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_NSLOOKUP=$ac_cv_path_PATH_TO_NSLOOKUP + +if test -n "$PATH_TO_NSLOOKUP"; then + echo "$as_me:$LINENO: result: $PATH_TO_NSLOOKUP" >&5 +echo "${ECHO_T}$PATH_TO_NSLOOKUP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +echo "$as_me:$LINENO: checking for nslookup syntax" >&5 +echo $ECHO_N "checking for nslookup syntax... $ECHO_C" >&6 +if test -n "$PATH_TO_NSLOOKUP" +then + if $PATH_TO_NSLOOKUP -sil 127.0.0.1 2>&1 | grep "Invalid option: sil" >/dev/null + then + ac_cv_nslookup_command="$PATH_TO_NSLOOKUP" + echo "$as_me:$LINENO: result: $ac_cv_nslookup_command" >&5 +echo "${ECHO_T}$ac_cv_nslookup_command" >&6 + + else + ac_cv_nslookup_command="$PATH_TO_NSLOOKUP -sil" + echo "$as_me:$LINENO: result: $ac_cv_nslookup_command" >&5 +echo "${ECHO_T}$ac_cv_nslookup_command" >&6 + + fi + EXTRAS="$EXTRAS check_dns" + +else + { echo "$as_me:$LINENO: WARNING: nslookup command not found" >&5 +echo "$as_me: WARNING: nslookup command not found" >&2;} +fi + + +cat >>confdefs.h <<_ACEOF +#define NSLOOKUP_COMMAND "$ac_cv_nslookup_command" +_ACEOF + + +# Extract the first word of "host", so it can be a program name with args. +set dummy host; 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_PATH_TO_HOST+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_HOST in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_HOST="$PATH_TO_HOST" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_HOST="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_HOST=$ac_cv_path_PATH_TO_HOST + +if test -n "$PATH_TO_HOST"; then + echo "$as_me:$LINENO: result: $PATH_TO_HOST" >&5 +echo "${ECHO_T}$PATH_TO_HOST" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test -n "$ac_cv_path_PATH_TO_HOST" +then + EXTRAS="$EXTRAS check_dns" +fi + +# Extract the first word of "uptime", so it can be a program name with args. +set dummy uptime; 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_PATH_TO_UPTIME+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_UPTIME in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_UPTIME="$PATH_TO_UPTIME" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_UPTIME="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_UPTIME=$ac_cv_path_PATH_TO_UPTIME + +if test -n "$PATH_TO_UPTIME"; then + echo "$as_me:$LINENO: result: $PATH_TO_UPTIME" >&5 +echo "${ECHO_T}$PATH_TO_UPTIME" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +cat >>confdefs.h <<_ACEOF +#define PATH_TO_UPTIME "$PATH_TO_UPTIME" +_ACEOF + + +# Extract the first word of "rpcinfo", so it can be a program name with args. +set dummy rpcinfo; 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_PATH_TO_RPCINFO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_RPCINFO in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_RPCINFO="$PATH_TO_RPCINFO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_RPCINFO="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_RPCINFO=$ac_cv_path_PATH_TO_RPCINFO + +if test -n "$PATH_TO_RPCINFO"; then + echo "$as_me:$LINENO: result: $PATH_TO_RPCINFO" >&5 +echo "${ECHO_T}$PATH_TO_RPCINFO" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +cat >>confdefs.h <<_ACEOF +#define PATH_TO_RPCINFO "$PATH_TO_RPCINFO" +_ACEOF + + +# Extract the first word of "ntpdate", so it can be a program name with args. +set dummy ntpdate; 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_PATH_TO_NTPDATE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_NTPDATE in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_NTPDATE="$PATH_TO_NTPDATE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_NTPDATE="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_NTPDATE=$ac_cv_path_PATH_TO_NTPDATE + +if test -n "$PATH_TO_NTPDATE"; then + echo "$as_me:$LINENO: result: $PATH_TO_NTPDATE" >&5 +echo "${ECHO_T}$PATH_TO_NTPDATE" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +for ac_prog in ntpdc xntpdc +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_path_PATH_TO_NTPDC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_NTPDC in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_NTPDC="$PATH_TO_NTPDC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_NTPDC="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_NTPDC=$ac_cv_path_PATH_TO_NTPDC + +if test -n "$PATH_TO_NTPDC"; then + echo "$as_me:$LINENO: result: $PATH_TO_NTPDC" >&5 +echo "${ECHO_T}$PATH_TO_NTPDC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$PATH_TO_NTPDC" && break +done + +for ac_prog in ntpq +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_path_PATH_TO_NTPQ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_NTPQ in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_NTPQ="$PATH_TO_NTPQ" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_NTPQ="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_NTPQ=$ac_cv_path_PATH_TO_NTPQ + +if test -n "$PATH_TO_NTPQ"; then + echo "$as_me:$LINENO: result: $PATH_TO_NTPQ" >&5 +echo "${ECHO_T}$PATH_TO_NTPQ" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$PATH_TO_NTPQ" && break +done + +if (test -x "$PATH_TO_NTPDATE" || test -x "$PATH_TO_NTPQ") +then + +cat >>confdefs.h <<_ACEOF +#define PATH_TO_NTPQ "$PATH_TO_NTPQ" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PATH_TO_NTPDATE "$PATH_TO_NTPDATE" +_ACEOF + +else + { echo "$as_me:$LINENO: WARNING: Install NTP programs (http://www.ntp.org) if you want to monitor time synchronization" >&5 +echo "$as_me: WARNING: Install NTP programs (http://www.ntp.org) if you want to monitor time synchronization" >&2;} +fi + +# Extract the first word of "lmstat", so it can be a program name with args. +set dummy lmstat; 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_PATH_TO_LMSTAT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_LMSTAT in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_LMSTAT="$PATH_TO_LMSTAT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_LMSTAT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_LMSTAT=$ac_cv_path_PATH_TO_LMSTAT + +if test -n "$PATH_TO_LMSTAT"; then + echo "$as_me:$LINENO: result: $PATH_TO_LMSTAT" >&5 +echo "${ECHO_T}$PATH_TO_LMSTAT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test -x "$PATH_TO_LMSTAT" +then + +cat >>confdefs.h <<_ACEOF +#define PATH_TO_LMSTAT "$PATH_TO_LMSTAT" +_ACEOF + +else + { echo "$as_me:$LINENO: WARNING: Get lmstat from Globetrotter Software to monitor flexlm licenses" >&5 +echo "$as_me: WARNING: Get lmstat from Globetrotter Software to monitor flexlm licenses" >&2;} +fi + +# Extract the first word of "smbclient", so it can be a program name with args. +set dummy smbclient; 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_PATH_TO_SMBCLIENT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_SMBCLIENT in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_SMBCLIENT="$PATH_TO_SMBCLIENT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_SMBCLIENT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_SMBCLIENT=$ac_cv_path_PATH_TO_SMBCLIENT + +if test -n "$PATH_TO_SMBCLIENT"; then + echo "$as_me:$LINENO: result: $PATH_TO_SMBCLIENT" >&5 +echo "${ECHO_T}$PATH_TO_SMBCLIENT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test -x "$PATH_TO_SMBCLIENT" +then + +cat >>confdefs.h <<_ACEOF +#define PATH_TO_SMBCLIENT "$PATH_TO_SMBCLIENT" +_ACEOF + +else + { echo "$as_me:$LINENO: WARNING: Get smbclient from Samba.org to monitor SMB shares" >&5 +echo "$as_me: WARNING: Get smbclient from Samba.org to monitor SMB shares" >&2;} +fi + + +# Extract the first word of "who", so it can be a program name with args. +set dummy who; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PATH_TO_WHO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_WHO in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_WHO="$PATH_TO_WHO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_WHO="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_WHO=$ac_cv_path_PATH_TO_WHO + +if test -n "$PATH_TO_WHO"; then + echo "$as_me:$LINENO: result: $PATH_TO_WHO" >&5 +echo "${ECHO_T}$PATH_TO_WHO" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +if $PATH_TO_WHO -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null +then + ac_cv_path_to_who="$PATH_TO_WHO -q" +else + ac_cv_path_to_who="$PATH_TO_WHO" +fi + + +cat >>confdefs.h <<_ACEOF +#define WHO_COMMAND "$ac_cv_path_to_who" +_ACEOF + + +# Extract the first word of "snmpget", so it can be a program name with args. +set dummy snmpget; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PATH_TO_SNMPGET+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_SNMPGET in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_SNMPGET="$PATH_TO_SNMPGET" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_SNMPGET="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_SNMPGET=$ac_cv_path_PATH_TO_SNMPGET + +if test -n "$PATH_TO_SNMPGET"; then + echo "$as_me:$LINENO: result: $PATH_TO_SNMPGET" >&5 +echo "${ECHO_T}$PATH_TO_SNMPGET" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test -x "$PATH_TO_SNMPGET" +then + +cat >>confdefs.h <<_ACEOF +#define PATH_TO_SNMPGET "$PATH_TO_SNMPGET" +_ACEOF + + EXTRAS="$EXTRAS check_hpjd check_snmp" +else + { echo "$as_me:$LINENO: WARNING: Get snmpget from http://net-snmp.sourceforge.net to make check_hpjd and check_snmp plugins" >&5 +echo "$as_me: WARNING: Get snmpget from http://net-snmp.sourceforge.net to make check_hpjd and check_snmp plugins" >&2;} +fi + +# Extract the first word of "snmpgetnext", so it can be a program name with args. +set dummy snmpgetnext; 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_PATH_TO_SNMPGETNEXT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_SNMPGETNEXT in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_SNMPGETNEXT="$PATH_TO_SNMPGETNEXT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_SNMPGETNEXT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_SNMPGETNEXT=$ac_cv_path_PATH_TO_SNMPGETNEXT + +if test -n "$PATH_TO_SNMPGETNEXT"; then + echo "$as_me:$LINENO: result: $PATH_TO_SNMPGETNEXT" >&5 +echo "${ECHO_T}$PATH_TO_SNMPGETNEXT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test -x "$PATH_TO_SNMPGETNEXT" +then + +cat >>confdefs.h <<_ACEOF +#define PATH_TO_SNMPGETNEXT "$PATH_TO_SNMPGETNEXT" +_ACEOF + +fi + +if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null ) +then + echo "$as_me:$LINENO: checking for Net::SNMP perl module" >&5 +echo $ECHO_N "checking for Net::SNMP perl module... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 +else + { echo "$as_me:$LINENO: WARNING: Tried $PERL - install Net::SNMP perl module if you want to use the perl snmp plugins" >&5 +echo "$as_me: WARNING: Tried $PERL - install Net::SNMP perl module if you want to use the perl snmp plugins" >&2;} +fi + +# Extract the first word of "quakestat", so it can be a program name with args. +set dummy quakestat; 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_PATH_TO_QUAKESTAT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_QUAKESTAT in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_QUAKESTAT="$PATH_TO_QUAKESTAT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_QUAKESTAT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_QUAKESTAT=$ac_cv_path_PATH_TO_QUAKESTAT + +if test -n "$PATH_TO_QUAKESTAT"; then + echo "$as_me:$LINENO: result: $PATH_TO_QUAKESTAT" >&5 +echo "${ECHO_T}$PATH_TO_QUAKESTAT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "qstat", so it can be a program name with args. +set dummy qstat; 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_PATH_TO_QSTAT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_QSTAT in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_QSTAT="$PATH_TO_QSTAT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_QSTAT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_QSTAT=$ac_cv_path_PATH_TO_QSTAT + +if test -n "$PATH_TO_QSTAT"; then + echo "$as_me:$LINENO: result: $PATH_TO_QSTAT" >&5 +echo "${ECHO_T}$PATH_TO_QSTAT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +if test -x "$PATH_TO_QUAKESTAT" +then + ac_cv_path_to_qstat="$PATH_TO_QUAKESTAT" + EXTRAS="$EXTRAS check_game" + +elif test -x "$PATH_TO_QSTAT" +then + ac_cv_path_to_qstat="$PATH_TO_QSTAT" + EXTRAS="$EXTRAS check_game" +else + { echo "$as_me:$LINENO: WARNING: Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin" >&5 +echo "$as_me: WARNING: Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin" >&2;} +fi + +if test $ac_cv_path_to_qstat +then + +cat >>confdefs.h <<_ACEOF +#define PATH_TO_QSTAT "$ac_cv_path_to_qstat" +_ACEOF + +fi + +# Extract the first word of "fping", so it can be a program name with args. +set dummy fping; 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_PATH_TO_FPING+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_FPING in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_FPING="$PATH_TO_FPING" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_FPING="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_FPING=$ac_cv_path_PATH_TO_FPING + +if test -n "$PATH_TO_FPING"; then + echo "$as_me:$LINENO: result: $PATH_TO_FPING" >&5 +echo "${ECHO_T}$PATH_TO_FPING" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test -x "$PATH_TO_FPING" +then + +cat >>confdefs.h <<_ACEOF +#define PATH_TO_FPING "$PATH_TO_FPING" +_ACEOF + + EXTRAS="$EXTRAS check_fping" +else + { echo "$as_me:$LINENO: WARNING: Get fping from http://www.fping.com in order to make check_fping plugin" >&5 +echo "$as_me: WARNING: Get fping from http://www.fping.com in order to make check_fping plugin" >&2;} +fi + +# Extract the first word of "ssh", so it can be a program name with args. +set dummy ssh; 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_PATH_TO_SSH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_SSH in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_SSH="$PATH_TO_SSH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_SSH="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_SSH=$ac_cv_path_PATH_TO_SSH + +if test -n "$PATH_TO_SSH"; then + echo "$as_me:$LINENO: result: $PATH_TO_SSH" >&5 +echo "${ECHO_T}$PATH_TO_SSH" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +if test -x "$PATH_TO_SSH" +then + +cat >>confdefs.h <<_ACEOF +#define SSH_COMMAND "$PATH_TO_SSH" +_ACEOF + + EXTRAS="$EXTRAS check_by_ssh" +else + { echo "$as_me:$LINENO: WARNING: Get ssh in order to make check_by_ssh plugin" >&5 +echo "$as_me: WARNING: Get ssh in order to make check_by_ssh plugin" >&2;} +fi + + +# Extract the first word of "mailq", so it can be a program name with args. +set dummy mailq; 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_PATH_TO_MAILQ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_MAILQ in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_MAILQ="$PATH_TO_MAILQ" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_MAILQ="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_MAILQ=$ac_cv_path_PATH_TO_MAILQ + +if test -n "$PATH_TO_MAILQ"; then + echo "$as_me:$LINENO: result: $PATH_TO_MAILQ" >&5 +echo "${ECHO_T}$PATH_TO_MAILQ" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test -x "$PATH_TO_MAILQ" +then + +cat >>confdefs.h <<_ACEOF +#define PATH_TO_MAILQ "$PATH_TO_MAILQ" +_ACEOF + +else + { echo "$as_me:$LINENO: WARNING: Could not find mailq or eqivalent" >&5 +echo "$as_me: WARNING: Could not find mailq or eqivalent" >&2;} +fi + +# Extract the first word of "qmail-qstat", so it can be a program name with args. +set dummy qmail-qstat; 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_PATH_TO_QMAIL_QSTAT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_QMAIL_QSTAT in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_QMAIL_QSTAT="$PATH_TO_QMAIL_QSTAT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_QMAIL_QSTAT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_QMAIL_QSTAT=$ac_cv_path_PATH_TO_QMAIL_QSTAT + +if test -n "$PATH_TO_QMAIL_QSTAT"; then + echo "$as_me:$LINENO: result: $PATH_TO_QMAIL_QSTAT" >&5 +echo "${ECHO_T}$PATH_TO_QMAIL_QSTAT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test -x "$PATH_TO_QMAIL_QSTAT" +then + +cat >>confdefs.h <<_ACEOF +#define PATH_TO_MAILQ "$PATH_TO_QMAIL_QSTAT" +_ACEOF + +else + { echo "$as_me:$LINENO: WARNING: Could not find qmail-qstat or eqivalent" >&5 +echo "$as_me: WARNING: Could not find qmail-qstat or eqivalent" >&2;} +fi + +# Extract the first word of "swap", so it can be a program name with args. +set dummy swap; 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_PATH_TO_SWAP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_SWAP in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_SWAP="$PATH_TO_SWAP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_SWAP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_SWAP=$ac_cv_path_PATH_TO_SWAP + +if test -n "$PATH_TO_SWAP"; then + echo "$as_me:$LINENO: result: $PATH_TO_SWAP" >&5 +echo "${ECHO_T}$PATH_TO_SWAP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if (test -n "$PATH_TO_SWAP") +then +echo "$as_me:$LINENO: checking for $PATH_TO_SWAP format" >&5 +echo $ECHO_N "checking for $PATH_TO_SWAP format... $ECHO_C" >&6 +if $PATH_TO_SWAP -l 2>&1 >/dev/null +then + ac_cv_have_swap=yes + ac_cv_swap_command="$PATH_TO_SWAP -l" + if $PATH_TO_SWAP -l 2>/dev/null | \ + egrep -i "^lswap +path +pri +swaplo +blocks +free +maxswap" \ + >/dev/null + then + ac_cv_swap_format=" %*d %*s %*d,%*d %*d %*d %f %f" + ac_cv_swap_conv=2048 + echo "$as_me:$LINENO: result: using IRIX format swap" >&5 +echo "${ECHO_T}using IRIX format swap" >&6 + + elif $PATH_TO_SWAP -l 2>/dev/null | egrep -i "^path +dev +swaplo +blocks +free" >/dev/null + then + ac_cv_swap_format="%*s %*[0-9,-] %*d %f %f" + ac_cv_swap_conv=2048 + echo "$as_me:$LINENO: result: using Unixware format swap" >&5 +echo "${ECHO_T}using Unixware format swap" >&6 + else + ac_cv_have_swap="" + ac_cv_swap_command="" + fi +fi +fi + +# Extract the first word of "swapinfo", so it can be a program name with args. +set dummy swapinfo; 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_PATH_TO_SWAPINFO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_SWAPINFO in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_SWAPINFO="$PATH_TO_SWAPINFO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_SWAPINFO="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_SWAPINFO=$ac_cv_path_PATH_TO_SWAPINFO + +if test -n "$PATH_TO_SWAPINFO"; then + echo "$as_me:$LINENO: result: $PATH_TO_SWAPINFO" >&5 +echo "${ECHO_T}$PATH_TO_SWAPINFO" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if (test -n "$PATH_TO_SWAPINFO") +then +echo "$as_me:$LINENO: checking for $PATH_TO_SWAPINFO format" >&5 +echo $ECHO_N "checking for $PATH_TO_SWAPINFO format... $ECHO_C" >&6 +if $PATH_TO_SWAPINFO -k 2>&1 | egrep -i "^Device" >/dev/null +then + ac_cv_have_swap=yes + ac_cv_swap_command="$PATH_TO_SWAPINFO -k" + + if $PATH_TO_SWAPINFO -k 2>/dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null + then + ac_cv_swap_format="%*s %f %*d %f" + ac_cv_swap_conv=1024 + echo "$as_me:$LINENO: result: using FreeBSD format swapinfo" >&5 +echo "${ECHO_T}using FreeBSD format swapinfo" >&6 + fi + +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_format="%*s %f %*d %f" + ac_cv_swap_conv=1024 + echo "$as_me:$LINENO: result: using HP-UX format swapinfo" >&5 +echo "${ECHO_T}using HP-UX format swapinfo" >&6 +fi +fi + +# Extract the first word of "lsps", so it can be a program name with args. +set dummy lsps; 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_PATH_TO_LSPS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_LSPS in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_LSPS="$PATH_TO_LSPS" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_LSPS="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_LSPS=$ac_cv_path_PATH_TO_LSPS + +if test -n "$PATH_TO_LSPS"; then + echo "$as_me:$LINENO: result: $PATH_TO_LSPS" >&5 +echo "${ECHO_T}$PATH_TO_LSPS" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if (test -n "$PATH_TO_LSPS") +then +echo "$as_me:$LINENO: checking for $PATH_TO_LSPS format" >&5 +echo $ECHO_N "checking for $PATH_TO_LSPS format... $ECHO_C" >&6 +if $PATH_TO_LSPS -a 2>/dev/null | egrep -i "^Page Space" > /dev/null +then + ac_cv_have_swap=yes + ac_cv_swap_command="$PATH_TO_LSPS -a" + ac_cv_swap_format="%*s %*s %*s %f%*s %f %*s" + ac_cv_swap_conv=1 + echo "$as_me:$LINENO: result: using AIX lsps" >&5 +echo "${ECHO_T}using AIX lsps" >&6 +fi +fi + + + + +for ac_header in sys/stat.h sys/param.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 + + +for ac_header in sys/swap.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. */ + +#ifdef 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 whether swapctl is declared" >&5 +echo $ECHO_N "checking whether swapctl is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_swapctl+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 + #include + + +int +main () +{ +#ifndef swapctl + char *p = (char *) swapctl; +#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_swapctl=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_swapctl=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_swapctl" >&5 +echo "${ECHO_T}$ac_cv_have_decl_swapctl" >&6 +if test $ac_cv_have_decl_swapctl = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SWAPCTL 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SWAPCTL 0 +_ACEOF + + +fi + + +echo "$as_me:$LINENO: checking for swaptbl_t" >&5 +echo $ECHO_N "checking for swaptbl_t... $ECHO_C" >&6 +if test "${ac_cv_type_swaptbl_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 + #include + #include + + +int +main () +{ +if ((swaptbl_t *) 0) + return 0; +if (sizeof (swaptbl_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_swaptbl_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_swaptbl_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_swaptbl_t" >&5 +echo "${ECHO_T}$ac_cv_type_swaptbl_t" >&6 +if test $ac_cv_type_swaptbl_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_SWAPTBL_T 1 +_ACEOF + + +fi +echo "$as_me:$LINENO: checking for swapent_t" >&5 +echo $ECHO_N "checking for swapent_t... $ECHO_C" >&6 +if test "${ac_cv_type_swapent_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 + #include + #include + + +int +main () +{ +if ((swapent_t *) 0) + return 0; +if (sizeof (swapent_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_swapent_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_swapent_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_swapent_t" >&5 +echo "${ECHO_T}$ac_cv_type_swapent_t" >&6 +if test $ac_cv_type_swapent_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_SWAPENT_T 1 +_ACEOF + + +fi + +echo "$as_me:$LINENO: checking for struct swapent.se_nblks" >&5 +echo $ECHO_N "checking for struct swapent.se_nblks... $ECHO_C" >&6 +if test "${ac_cv_member_struct_swapent_se_nblks+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 + #include + + +int +main () +{ +static struct swapent ac_aggr; +if (ac_aggr.se_nblks) +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_swapent_se_nblks=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 + #include + #include + #include + #include + + +int +main () +{ +static struct swapent ac_aggr; +if (sizeof ac_aggr.se_nblks) +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_swapent_se_nblks=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_member_struct_swapent_se_nblks=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_swapent_se_nblks" >&5 +echo "${ECHO_T}$ac_cv_member_struct_swapent_se_nblks" >&6 +if test $ac_cv_member_struct_swapent_se_nblks = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SWAPENT_SE_NBLKS 1 +_ACEOF + + +fi + + +if test "$ac_cv_have_decl_swapctl" = "yes"; +then + EXTRAS="$EXTRAS check_swap" + echo "$as_me:$LINENO: checking for 2-arg (SVR4) swapctl" >&5 +echo $ECHO_N "checking for 2-arg (SVR4) swapctl... $ECHO_C" >&6 + if test "$ac_cv_type_swaptbl_t" = "yes" -a \ + "$ac_cv_type_swapent_t" = "yes"; + then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ac_cv_check_swap_swapctl_svr4="1"; + +cat >>confdefs.h <<\_ACEOF +#define CHECK_SWAP_SWAPCTL_SVR4 1 +_ACEOF + + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "$as_me:$LINENO: checking for 3-arg (*BSD) swapctl" >&5 +echo $ECHO_N "checking for 3-arg (*BSD) swapctl... $ECHO_C" >&6 + if test "$ac_cv_member_struct_swapent_se_nblks" = "yes"; + then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define CHECK_SWAP_SWAPCTL_BSD 1 +_ACEOF + + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + fi + echo "$as_me:$LINENO: checking for whether swapctl uses blocks or pages" >&5 +echo $ECHO_N "checking for whether swapctl uses blocks or pages... $ECHO_C" >&6 + if test "$ac_cv_check_swap_swapctl_svr4" = "1"; + then + echo "$as_me:$LINENO: result: page" >&5 +echo "${ECHO_T}page" >&6 + echo "$as_me:$LINENO: checking whether sysconf is declared" >&5 +echo $ECHO_N "checking whether sysconf is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_sysconf+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 sysconf + char *p = (char *) sysconf; +#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_sysconf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_sysconf=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_sysconf" >&5 +echo "${ECHO_T}$ac_cv_have_decl_sysconf" >&6 +if test $ac_cv_have_decl_sysconf = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SYSCONF 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SYSCONF 0 +_ACEOF + + +fi + + + echo "$as_me:$LINENO: checking for system page size" >&5 +echo $ECHO_N "checking for system page size... $ECHO_C" >&6 + if test "$ac_cv_have_decl_sysconf" = "yes"; + then + echo "$as_me:$LINENO: result: determined by sysconf(3)" >&5 +echo "${ECHO_T}determined by sysconf(3)" >&6 + ac_cv_swap_conv="(1048576/sysconf(_SC_PAGESIZE))" + else + { echo "$as_me:$LINENO: WARNING: don't know. guessing 4096k" >&5 +echo "$as_me: WARNING: don't know. guessing 4096k" >&2;} + ac_cv_swap_conv=256 + fi + else + echo "$as_me:$LINENO: result: blocks (assuming 512b)" >&5 +echo "${ECHO_T}blocks (assuming 512b)" >&6 + ac_cv_swap_conv=2048 + fi + +cat >>confdefs.h <<_ACEOF +#define SWAP_CONVERSION $ac_cv_swap_conv +_ACEOF + +fi + + +if test "x$ac_cv_have_swap" != "x" +then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SWAP 1 +_ACEOF + + EXTRAS="$EXTRAS check_swap" +fi +if test "x$ac_cv_swap_command" != "x" +then + +cat >>confdefs.h <<_ACEOF +#define SWAP_COMMAND "$ac_cv_swap_command" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define SWAP_FORMAT "$ac_cv_swap_format" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define SWAP_CONVERSION $ac_cv_swap_conv +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for /proc/meminfo" >&5 +echo $ECHO_N "checking for /proc/meminfo... $ECHO_C" >&6 +if cat /proc/meminfo > /dev/null 2>&1 +then + echo "$as_me:$LINENO: result: found /proc/meminfo" >&5 +echo "${ECHO_T}found /proc/meminfo" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PROC_MEMINFO 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PROC_MEMINFO "/proc/meminfo" +_ACEOF + + EXTRAS="$EXTRAS check_swap" +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "dig", so it can be a program name with args. +set dummy dig; 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_PATH_TO_DIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_TO_DIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_DIG="$PATH_TO_DIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_DIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PATH_TO_DIG=$ac_cv_path_PATH_TO_DIG + +if test -n "$PATH_TO_DIG"; then + echo "$as_me:$LINENO: result: $PATH_TO_DIG" >&5 +echo "${ECHO_T}$PATH_TO_DIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +cat >>confdefs.h <<_ACEOF +#define PATH_TO_DIG "$PATH_TO_DIG" +_ACEOF + +if test -n "$PATH_TO_DIG"; then + EXTRAS="$EXTRAS check_dig" +fi + +if test -f plugins/check_nt.c ; then + EXTRAS="$EXTRAS check_nt" +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*) + +cat >>confdefs.h <<\_ACEOF +#define __bsd__ 1 +_ACEOF + + ;; + *linux*) + +cat >>confdefs.h <<\_ACEOF +#define __linux__ 1 +_ACEOF + + ;; + *sun* | solaris*) + +cat >>confdefs.h <<\_ACEOF +#define __sun__ 1 +_ACEOF + + ;; + *hpux*) + +cat >>confdefs.h <<\_ACEOF +#define __hpux__ 1 +_ACEOF + + ;; +esac + + + + + + + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + + + + + + # Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; 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_MSGFMT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$MSGFMT" in + /*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_MSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test "$MSGFMT" != ":"; then + echo "$as_me:$LINENO: result: $MSGFMT" >&5 +echo "${ECHO_T}$MSGFMT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; 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_GMSGFMT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT=$ac_cv_path_GMSGFMT + +if test -n "$GMSGFMT"; then + echo "$as_me:$LINENO: result: $GMSGFMT" >&5 +echo "${ECHO_T}$GMSGFMT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + # Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; 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_XGETTEXT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test "$XGETTEXT" != ":"; then + echo "$as_me:$LINENO: result: $XGETTEXT" >&5 +echo "${ECHO_T}$XGETTEXT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + rm -f messages.po + + # Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; 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_MSGMERGE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$MSGMERGE" in + /*) + ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then + ac_cv_path_MSGMERGE="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" + ;; +esac +fi +MSGMERGE="$ac_cv_path_MSGMERGE" +if test "$MSGMERGE" != ":"; then + echo "$as_me:$LINENO: result: $MSGMERGE" >&5 +echo "${ECHO_T}$MSGMERGE" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +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 + + if test "$XGETTEXT" != ":"; then + if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && + (if $XGETTEXT --omit-header --copyright-holder= /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" + + +echo "$as_me:$LINENO: checking for library containing strerror" >&5 +echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 +if test "${ac_cv_search_strerror+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_strerror=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 strerror (); +int +main () +{ +strerror (); + ; + 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_strerror="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_strerror" = no; then + for ac_lib in cposix; 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 strerror (); +int +main () +{ +strerror (); + ; + 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_strerror="-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_strerror" >&5 +echo "${ECHO_T}$ac_cv_search_strerror" >&6 +if test "$ac_cv_search_strerror" != no; then + test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" + +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 + +echo "$as_me:$LINENO: checking for off_t" >&5 +echo $ECHO_N "checking for off_t... $ECHO_C" >&6 +if test "${ac_cv_type_off_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 ((off_t *) 0) + return 0; +if (sizeof (off_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_off_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_off_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 +echo "${ECHO_T}$ac_cv_type_off_t" >&6 +if test $ac_cv_type_off_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define off_t long +_ACEOF + +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 +echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6 +if test "${ac_cv_working_alloca_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 +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + ; + 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_working_alloca_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_working_alloca_h=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 +echo "${ECHO_T}$ac_cv_working_alloca_h" >&6 +if test $ac_cv_working_alloca_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA_H 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for alloca" >&5 +echo $ECHO_N "checking for alloca... $ECHO_C" >&6 +if test "${ac_cv_func_alloca_works+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. */ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# if HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +# endif +#endif + +int +main () +{ +char *p = (char *) alloca (1); + ; + 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_alloca_works=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_alloca_works=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 +echo "${ECHO_T}$ac_cv_func_alloca_works" >&6 + +if test $ac_cv_func_alloca_works = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA 1 +_ACEOF + +else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. + +ALLOCA=alloca.$ac_objext + +cat >>confdefs.h <<\_ACEOF +#define C_ALLOCA 1 +_ACEOF + + +echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 +echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6 +if test "${ac_cv_os_cray+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(CRAY) && ! defined(CRAY2) +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 +echo "${ECHO_T}$ac_cv_os_cray" >&6 +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; 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 CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + + done +fi + +echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 +echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 +if test "${ac_cv_c_stack_direction+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_c_stack_direction=0 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int +find_stack_direction () +{ + static char *addr = 0; + auto char dummy; + if (addr == 0) + { + addr = &dummy; + return find_stack_direction (); + } + else + return (&dummy > addr) ? 1 : -1; +} + +int +main () +{ + exit (find_stack_direction () < 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_c_stack_direction=1 +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_c_stack_direction=-1 +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_c_stack_direction" >&5 +echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 + +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF + + +fi + + + +for ac_header in stdlib.h 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 + +fi + +done + + +for ac_func in getpagesize +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 working mmap" >&5 +echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_fixed_mapped=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 +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + +#include +#include + +#if !STDC_HEADERS && !HAVE_STDLIB_H +char *malloc (); +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#if !HAVE_GETPAGESIZE +/* Assume that all systems that can run configure have sys/param.h. */ +# if !HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# if HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +int +main () +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + exit (1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + exit (1); + if (write (fd, data, pagesize) != pagesize) + exit (1); + close (fd); + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + exit (1); + data2 = (char *) malloc (2 * pagesize); + if (!data2) + exit (1); + data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + exit (1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit (1); + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + exit (1); + if (read (fd, data3, pagesize) != pagesize) + exit (1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + exit (1); + close (fd); + 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 + ac_cv_func_mmap_fixed_mapped=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_mmap_fixed_mapped=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_mmap_fixed_mapped" >&5 +echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MMAP 1 +_ACEOF + +fi +rm -f conftest.mmap + + + echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5 +echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6 +if test "${ac_cv_gnu_library_2_1+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 __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky GNU user" >/dev/null 2>&1; then + ac_cv_gnu_library_2_1=yes +else + ac_cv_gnu_library_2_1=no +fi +rm -f conftest* + + + +fi +echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 +echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6 + + GLIBC21="$ac_cv_gnu_library_2_1" + + + + + echo "$as_me:$LINENO: checking whether integer division by zero raises SIGFPE" >&5 +echo $ECHO_N "checking whether integer division by zero raises SIGFPE... $ECHO_C" >&6 +if test "${gt_cv_int_divbyzero_sigfpe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test "$cross_compiling" = yes; then + + # Guess based on the CPU. + case "$host_cpu" in + alpha* | i3456786 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; + esac + +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 + +static void +#ifdef __cplusplus +sigfpe_handler (int sig) +#else +sigfpe_handler (sig) int sig; +#endif +{ + /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ + exit (sig != SIGFPE); +} + +int x = 1; +int y = 0; +int z; +int nan; + +int main () +{ + signal (SIGFPE, sigfpe_handler); +/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ +#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) + signal (SIGTRAP, sigfpe_handler); +#endif +/* Linux/SPARC yields signal SIGILL. */ +#if defined (__sparc__) && defined (__linux__) + signal (SIGILL, sigfpe_handler); +#endif + + z = x / y; + nan = y / y; + exit (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 + gt_cv_int_divbyzero_sigfpe=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 ) +gt_cv_int_divbyzero_sigfpe=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: $gt_cv_int_divbyzero_sigfpe" >&5 +echo "${ECHO_T}$gt_cv_int_divbyzero_sigfpe" >&6 + case "$gt_cv_int_divbyzero_sigfpe" in + *yes) value=1;; + *) value=0;; + esac + +cat >>confdefs.h <<_ACEOF +#define INTDIV0_RAISES_SIGFPE $value +_ACEOF + + + + echo "$as_me:$LINENO: checking for inttypes.h" >&5 +echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 +if test "${jm_ac_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 + jm_ac_cv_header_inttypes_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +jm_ac_cv_header_inttypes_h=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $jm_ac_cv_header_inttypes_h" >&5 +echo "${ECHO_T}$jm_ac_cv_header_inttypes_h" >&6 + if test $jm_ac_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 "${jm_ac_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 + jm_ac_cv_header_stdint_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +jm_ac_cv_header_stdint_h=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $jm_ac_cv_header_stdint_h" >&5 +echo "${ECHO_T}$jm_ac_cv_header_stdint_h" >&6 + if test $jm_ac_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 = 1; 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 $jm_ac_cv_header_inttypes_h = no && test $jm_ac_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 + + fi + + + echo "$as_me:$LINENO: checking for inttypes.h" >&5 +echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 +if test "${gt_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 () +{ + + ; + 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_header_inttypes_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gt_cv_header_inttypes_h=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $gt_cv_header_inttypes_h" >&5 +echo "${ECHO_T}$gt_cv_header_inttypes_h" >&6 + if test $gt_cv_header_inttypes_h = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_INTTYPES_H 1 +_ACEOF + + fi + + + + if test $gt_cv_header_inttypes_h = yes; then + echo "$as_me:$LINENO: checking whether the inttypes.h PRIxNN macros are broken" >&5 +echo $ECHO_N "checking whether the inttypes.h PRIxNN macros are broken... $ECHO_C" >&6 +if test "${gt_cv_inttypes_pri_broken+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 PRId32 +char *p = PRId32; +#endif + +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_inttypes_pri_broken=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gt_cv_inttypes_pri_broken=yes +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5 +echo "${ECHO_T}$gt_cv_inttypes_pri_broken" >&6 + fi + if test "$gt_cv_inttypes_pri_broken" = yes; then + +cat >>confdefs.h <<_ACEOF +#define PRI_MACROS_BROKEN 1 +_ACEOF + + fi + + + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" + + +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi; +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo "$as_me:$LINENO: checking for ld used by GCC" >&5 +echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +fi +if test "${acl_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$acl_cv_path_LD" +if test -n "$LD"; then + echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${acl_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. +if $LD -v 2>&1 &5; then + acl_cv_prog_gnu_ld=yes +else + acl_cv_prog_gnu_ld=no +fi +fi +echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 +with_gnu_ld=$acl_cv_prog_gnu_ld + + + + echo "$as_me:$LINENO: checking for shared library run path origin" >&5 +echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 +if test "${acl_cv_rpath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + +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" + sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec" + sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec" + # Check whether --enable-rpath or --disable-rpath was given. +if test "${enable_rpath+set}" = set; then + enableval="$enable_rpath" + : +else + enable_rpath=yes +fi; + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. +if test "${with_libiconv_prefix+set}" = set; then + withval="$with_libiconv_prefix" + + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi + +fi; + LIBICONV= + LTLIBICONV= + INCICONV= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='iconv ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + 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" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$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 + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$hardcode_direct" = yes; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */lib | */lib/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" + ;; + esac + done + fi + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$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\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" + done + fi + + + + + + + + + + + + + + +for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ +stdlib.h string.h unistd.h sys/param.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 + + + + + + + + + + + + + + + + + + + + + + +for ac_func in feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ +geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ +strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next +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 + + + + + + + + am_save_CPPFLAGS="$CPPFLAGS" + + for element in $INCICONV; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + echo "$as_me:$LINENO: checking for iconv" >&5 +echo $ECHO_N "checking for iconv... $ECHO_C" >&6 +if test "${am_cv_func_iconv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + 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 () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + 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_func_iconv=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 + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + 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 () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + 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_lib_iconv=yes + am_cv_func_iconv=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 + +fi +echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 +echo "${ECHO_T}$am_cv_func_iconv" >&6 + if test "$am_cv_func_iconv" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ICONV 1 +_ACEOF + + fi + if test "$am_cv_lib_iconv" = yes; then + echo "$as_me:$LINENO: checking how to link with libiconv" >&5 +echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $LIBICONV" >&5 +echo "${ECHO_T}$LIBICONV" >&6 + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + + + + if test "$am_cv_func_iconv" = yes; then + echo "$as_me:$LINENO: checking for iconv declaration" >&5 +echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 + if test "${am_cv_proto_iconv+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 +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif + +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 + am_cv_proto_iconv_arg1="" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +am_cv_proto_iconv_arg1="const" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" +fi + + am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + echo "$as_me:$LINENO: result: ${ac_t:- + }$am_cv_proto_iconv" >&5 +echo "${ECHO_T}${ac_t:- + }$am_cv_proto_iconv" >&6 + +cat >>confdefs.h <<_ACEOF +#define ICONV_CONST $am_cv_proto_iconv_arg1 +_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 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 + + if test $ac_cv_header_locale_h = yes; then + + echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 +echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 +if test "${am_cv_val_LC_MESSAGES+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 () +{ +return LC_MESSAGES + ; + 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_val_LC_MESSAGES=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +am_cv_val_LC_MESSAGES=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 +echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 + if test $am_cv_val_LC_MESSAGES = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LC_MESSAGES 1 +_ACEOF + + fi + + fi + + for ac_prog in bison +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_INTLBISON+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$INTLBISON"; then + ac_cv_prog_INTLBISON="$INTLBISON" # 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_INTLBISON="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +INTLBISON=$ac_cv_prog_INTLBISON +if test -n "$INTLBISON"; then + echo "$as_me:$LINENO: result: $INTLBISON" >&5 +echo "${ECHO_T}$INTLBISON" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$INTLBISON" && break +done + + if test -z "$INTLBISON"; then + ac_verc_fail=yes + else + echo "$as_me:$LINENO: checking version of bison" >&5 +echo $ECHO_N "checking version of bison... $ECHO_C" >&6 + 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].*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac + echo "$as_me:$LINENO: result: $ac_prog_version" >&5 +echo "${ECHO_T}$ac_prog_version" >&6 + fi + if test $ac_verc_fail = yes; then + INTLBISON=: + 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. +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 + + + + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + + LIBINTL= + LTLIBINTL= + POSUB= + + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + + echo "$as_me:$LINENO: checking whether included gettext is requested" >&5 +echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6 + +# Check whether --with-included-gettext or --without-included-gettext was given. +if test "${with_included_gettext+set}" = set; then + withval="$with_included_gettext" + nls_cv_force_use_gnu_gettext=$withval +else + nls_cv_force_use_gnu_gettext=no +fi; + echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5 +echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6 + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + + + + + + + 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 + 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 +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +int +main () +{ +bindtextdomain ("", ""); +return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_domain_bindings + ; + 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 + gt_cv_func_gnugettext2_libc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gt_cv_func_gnugettext2_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 + + if test "$gt_cv_func_gnugettext2_libc" != "yes"; then + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libintl-prefix or --without-libintl-prefix was given. +if test "${with_libintl_prefix+set}" = set; then + withval="$with_libintl_prefix" + + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi + +fi; + LIBINTL= + LTLIBINTL= + INCINTL= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='intl ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + 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" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$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 + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$hardcode_direct" = yes; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */lib | */lib/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" + ;; + esac + done + fi + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$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\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" + done + 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 + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (); +int +main () +{ +bindtextdomain ("", ""); +return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_expand_alias (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 + gt_cv_func_gnugettext2_libintl=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gt_cv_func_gnugettext2_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 + LIBS="$LIBS $LIBICONV" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (); +int +main () +{ +bindtextdomain ("", ""); +return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_expand_alias (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 + LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + gt_cv_func_gnugettext2_libintl=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 + fi + 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 + fi + + if test "$gt_cv_func_gnugettext2_libc" = "yes" \ + || { test "$gt_cv_func_gnugettext2_libintl" = "yes" \ + && test "$PACKAGE" != gettext; }; then + gt_use_preinstalled_gnugettext=yes + else + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + INTLOBJS="\$(GETTOBJS)" + BUILD_INCLUDED_LIBINTL=yes + USE_INCLUDED_LIBINTL=yes + LIBINTL="\${top_builddir}/intl/libintl.a $LIBICONV" + LTLIBINTL="\${top_builddir}/intl/libintl.a $LTLIBICONV" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + CATOBJEXT=.gmo + fi + + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_NLS 1 +_ACEOF + + else + USE_NLS=no + fi + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if test "$gt_cv_func_gnugettext2_libintl" = "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 +echo "${ECHO_T}$LIBINTL" >&6 + + for element in $INCINTL; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + fi + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETTEXT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DCGETTEXT 1 +_ACEOF + + fi + + POSUB=po + fi + + + if test "$PACKAGE" = gettext; then + BUILD_INCLUDED_LIBINTL=yes + fi + + + + + + + nls_cv_header_intl= + nls_cv_header_libgt= + + DATADIRNAME=share + + + INSTOBJEXT=.mo + + + GENCAT=gencat + + + INTL_LIBTOOL_SUFFIX_PREFIX= + + + + INTLLIBS="$LIBINTL" + + + + + + + + +if echo $ac_cv_uname_r | egrep "\.EL$" >/dev/null 2>&1 ; then + echo "$as_me:$LINENO: checking for redhat spopen problem" >&5 +echo $ECHO_N "checking for redhat spopen problem... $ECHO_C" >&6 + ( cd config_test && make && make test ) > /dev/null 2>&1 + if test $? -eq 0 ; then + echo "$as_me:$LINENO: result: okay" >&5 +echo "${ECHO_T}okay" >&6 + else + echo "$as_me:$LINENO: result: error" >&5 +echo "${ECHO_T}error" >&6 + +cat >>confdefs.h <<\_ACEOF +#define REDHAT_SPOPEN_ERROR 1 +_ACEOF + + fi +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: false 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]; + +int +main () +{ + return !a + !b + !c + !d + !e + !f + !g + !h + !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 + 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 for AFS" >&5 +echo $ECHO_N "checking for AFS... $ECHO_C" >&6 + if test -d /afs; then + +cat >>confdefs.h <<\_ACEOF +#define AFS 1 +_ACEOF + + ac_result=yes + else + ac_result=no + fi + echo "$as_me:$LINENO: result: $ac_result" >&5 +echo "${ECHO_T}$ac_result" >&6 + + + : + + + + if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then + + : + + fi + + + + if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then + + : + + fi + + + + : + + + + + + : + + + : + + + + +for ac_header in sys/param.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 + + + + +for ac_header in fcntl.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 + + + + +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 + +fi + +done + + + + + + +for ac_func in listmntent getmntinfo +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 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. + +for ac_header in sys/ucred.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. */ +#include + +#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 + + + + + +for ac_header in mntent.h sys/mount.h sys/fs_types.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 + + getfsstat_includes="\ +$ac_includes_default +#if HAVE_SYS_PARAM_H +# include /* needed by powerpc-apple-darwin1.3.7 */ +#endif +#if HAVE_SYS_UCRED_H +# include /* needed for definition of NGROUPS */ +# include /* needed by powerpc-apple-darwin1.3.7 */ +#endif +#if HAVE_SYS_MOUNT_H +# include +#endif +#if HAVE_SYS_FS_TYPES_H +# include /* needed by powerpc-apple-darwin1.3.7 */ +#endif +" +echo "$as_me:$LINENO: checking for struct fsstat.f_fstypename" >&5 +echo $ECHO_N "checking for struct fsstat.f_fstypename... $ECHO_C" >&6 +if test "${ac_cv_member_struct_fsstat_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. */ +$getfsstat_includes + +int +main () +{ +static struct fsstat ac_aggr; +if (ac_aggr.f_fstypename) +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_fsstat_f_fstypename=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. */ +$getfsstat_includes + +int +main () +{ +static struct fsstat ac_aggr; +if (sizeof ac_aggr.f_fstypename) +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_fsstat_f_fstypename=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_member_struct_fsstat_f_fstypename=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_fsstat_f_fstypename" >&5 +echo "${ECHO_T}$ac_cv_member_struct_fsstat_f_fstypename" >&6 +if test $ac_cv_member_struct_fsstat_f_fstypename = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_FSSTAT_F_FSTYPENAME 1 +_ACEOF + + +fi + + +# Determine how to get the list of mounted filesystems. +ac_list_mounted_fs= + +# If the getmntent function is available but not in the standard library, +# make sure LIBS contains -lsun (on Irix4) or -lseq (on PTX). +# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware. +echo "$as_me:$LINENO: checking for getmntent in -lsun" >&5 +echo $ECHO_N "checking for getmntent in -lsun... $ECHO_C" >&6 +if test "${ac_cv_lib_sun_getmntent+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsun $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 getmntent (); +int +main () +{ +getmntent (); + ; + 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_sun_getmntent=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_sun_getmntent=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_sun_getmntent" >&5 +echo "${ECHO_T}$ac_cv_lib_sun_getmntent" >&6 +if test $ac_cv_lib_sun_getmntent = yes; then + LIBS="-lsun $LIBS" +else + echo "$as_me:$LINENO: checking for getmntent in -lseq" >&5 +echo $ECHO_N "checking for getmntent in -lseq... $ECHO_C" >&6 +if test "${ac_cv_lib_seq_getmntent+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lseq $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 getmntent (); +int +main () +{ +getmntent (); + ; + 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_seq_getmntent=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_seq_getmntent=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_seq_getmntent" >&5 +echo "${ECHO_T}$ac_cv_lib_seq_getmntent" >&6 +if test $ac_cv_lib_seq_getmntent = yes; then + LIBS="-lseq $LIBS" +else + echo "$as_me:$LINENO: checking for getmntent in -lgen" >&5 +echo $ECHO_N "checking for getmntent in -lgen... $ECHO_C" >&6 +if test "${ac_cv_lib_gen_getmntent+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgen $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 getmntent (); +int +main () +{ +getmntent (); + ; + 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_gen_getmntent=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_gen_getmntent=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_gen_getmntent" >&5 +echo "${ECHO_T}$ac_cv_lib_gen_getmntent" >&6 +if test $ac_cv_lib_gen_getmntent = yes; then + LIBS="-lgen $LIBS" +fi + +fi + +fi + + +for ac_func in getmntent +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 + + + +# This test must precede the ones for getmntent because Unicos-9 is +# reported to have the getmntent function, but its support is incompatible +# with other getmntent implementations. + +# NOTE: Normally, I wouldn't use a check for system type as I've done for +# `CRAY' below since that goes against the whole autoconf philosophy. But +# I think there is too great a chance that some non-Cray system has a +# function named listmntent to risk the false positive. + +if test -z "$ac_list_mounted_fs"; then + # Cray UNICOS 9 + echo "$as_me:$LINENO: checking for listmntent of Cray/Unicos-9" >&5 +echo $ECHO_N "checking for listmntent of Cray/Unicos-9... $ECHO_C" >&6 + if test "${fu_cv_sys_mounted_cray_listmntent+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + fu_cv_sys_mounted_cray_listmntent=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef _CRAY +yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then + test $ac_cv_func_listmntent = yes \ + && fu_cv_sys_mounted_cray_listmntent=yes + +fi +rm -f conftest* + + + +fi + + echo "$as_me:$LINENO: result: $fu_cv_sys_mounted_cray_listmntent" >&5 +echo "${ECHO_T}$fu_cv_sys_mounted_cray_listmntent" >&6 + if test $fu_cv_sys_mounted_cray_listmntent = yes; then + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_LISTMNTENT 1 +_ACEOF + + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # AIX. + echo "$as_me:$LINENO: checking for mntctl function and struct vmount" >&5 +echo $ECHO_N "checking for mntctl function and struct vmount... $ECHO_C" >&6 + if test "${fu_cv_sys_mounted_vmount+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 +_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 + fu_cv_sys_mounted_vmount=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fu_cv_sys_mounted_vmount=no +fi +rm -f conftest.err conftest.$ac_ext +fi + + echo "$as_me:$LINENO: result: $fu_cv_sys_mounted_vmount" >&5 +echo "${ECHO_T}$fu_cv_sys_mounted_vmount" >&6 + if test $fu_cv_sys_mounted_vmount = yes; then + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_VMOUNT 1 +_ACEOF + + fi +fi + +if test $ac_cv_func_getmntent = yes; then + + # This system has the getmntent function. + # Determine whether it's the one-argument variant or the two-argument one. + + if test -z "$ac_list_mounted_fs"; then + # 4.3BSD, SunOS, HP-UX, Dynix, Irix + echo "$as_me:$LINENO: checking for one-argument getmntent function" >&5 +echo $ECHO_N "checking for one-argument getmntent function... $ECHO_C" >&6 + if test "${fu_cv_sys_mounted_getmntent1+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. */ + +/* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */ +#include + +#include +#if !defined MOUNTED +# if defined _PATH_MOUNTED /* GNU libc */ +# define MOUNTED _PATH_MOUNTED +# endif +# if defined MNT_MNTTAB /* HP-UX. */ +# define MOUNTED MNT_MNTTAB +# endif +# if defined MNTTABNAME /* Dynix. */ +# define MOUNTED MNTTABNAME +# endif +#endif + +int +main () +{ + struct mntent *mnt = 0; char *table = MOUNTED; + ; + 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_getmntent1=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fu_cv_sys_mounted_getmntent1=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + echo "$as_me:$LINENO: result: $fu_cv_sys_mounted_getmntent1" >&5 +echo "${ECHO_T}$fu_cv_sys_mounted_getmntent1" >&6 + if test $fu_cv_sys_mounted_getmntent1 = yes; then + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_GETMNTENT1 1 +_ACEOF + + fi + fi + + if test -z "$ac_list_mounted_fs"; then + # SVR4 + echo "$as_me:$LINENO: checking for two-argument getmntent function" >&5 +echo $ECHO_N "checking for two-argument getmntent function... $ECHO_C" >&6 + if test "${fu_cv_sys_mounted_getmntent2+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 + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getmntent" >/dev/null 2>&1; then + fu_cv_sys_mounted_getmntent2=yes +else + fu_cv_sys_mounted_getmntent2=no +fi +rm -f conftest* + +fi + + echo "$as_me:$LINENO: result: $fu_cv_sys_mounted_getmntent2" >&5 +echo "${ECHO_T}$fu_cv_sys_mounted_getmntent2" >&6 + if test $fu_cv_sys_mounted_getmntent2 = yes; then + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_GETMNTENT2 1 +_ACEOF + + fi + fi + +fi + +if test -z "$ac_list_mounted_fs"; then + # DEC Alpha running OSF/1, and Apple Darwin 1.3. + # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h + + echo "$as_me:$LINENO: checking for getfsstat function" >&5 +echo $ECHO_N "checking for getfsstat function... $ECHO_C" >&6 + if test "${fu_cv_sys_mounted_getfsstat+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 HAVE_STRUCT_FSSTAT_F_FSTYPENAME +# define FS_TYPE(Ent) ((Ent).f_fstypename) +#else +# define FS_TYPE(Ent) mnt_names[(Ent).f_type] +#endif +$getfsstat_includes + +int +main () +{ +struct statfs *stats; + int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); + char *t = FS_TYPE (*stats); + ; + 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_mounted_getfsstat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fu_cv_sys_mounted_getfsstat=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + echo "$as_me:$LINENO: result: $fu_cv_sys_mounted_getfsstat" >&5 +echo "${ECHO_T}$fu_cv_sys_mounted_getfsstat" >&6 + if test $fu_cv_sys_mounted_getfsstat = yes; then + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_GETFSSTAT 1 +_ACEOF + + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # SVR3 + echo "$as_me:$LINENO: checking for FIXME existence of three headers" >&5 +echo $ECHO_N "checking for FIXME existence of three headers... $ECHO_C" >&6 + if test "${fu_cv_sys_mounted_fread_fstyp+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 +_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 + fu_cv_sys_mounted_fread_fstyp=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fu_cv_sys_mounted_fread_fstyp=no +fi +rm -f conftest.err conftest.$ac_ext +fi + + echo "$as_me:$LINENO: result: $fu_cv_sys_mounted_fread_fstyp" >&5 +echo "${ECHO_T}$fu_cv_sys_mounted_fread_fstyp" >&6 + if test $fu_cv_sys_mounted_fread_fstyp = yes; then + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_FREAD_FSTYP 1 +_ACEOF + + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # 4.4BSD and DEC OSF/1. + echo "$as_me:$LINENO: checking for getmntinfo function" >&5 +echo $ECHO_N "checking for getmntinfo function... $ECHO_C" >&6 + if test "${fu_cv_sys_mounted_getmntinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + test "$ac_cv_func_getmntinfo" = yes \ + && fu_cv_sys_mounted_getmntinfo=yes \ + || fu_cv_sys_mounted_getmntinfo=no + +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 + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_GETMNTINFO 1 +_ACEOF + + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # Ultrix + echo "$as_me:$LINENO: checking for getmnt function" >&5 +echo $ECHO_N "checking for getmnt function... $ECHO_C" >&6 + if test "${fu_cv_sys_mounted_getmnt+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 +_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 + fu_cv_sys_mounted_getmnt=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fu_cv_sys_mounted_getmnt=no +fi +rm -f conftest.err conftest.$ac_ext +fi + + echo "$as_me:$LINENO: result: $fu_cv_sys_mounted_getmnt" >&5 +echo "${ECHO_T}$fu_cv_sys_mounted_getmnt" >&6 + if test $fu_cv_sys_mounted_getmnt = yes; then + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_GETMNT 1 +_ACEOF + + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # BeOS + + +for ac_func in next_dev fs_stat_dev +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 + + +for ac_header in fs_info.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 BEOS mounted file system support functions" >&5 +echo $ECHO_N "checking for BEOS mounted file system support functions... $ECHO_C" >&6 + if test $ac_cv_header_fs_info_h = yes \ + && test $ac_cv_func_next_dev = yes \ + && test $ac_cv_func_fs_stat_dev = yes; then + fu_result=yes + else + fu_result=no + fi + echo "$as_me:$LINENO: result: $fu_result" >&5 +echo "${ECHO_T}$fu_result" >&6 + if test $fu_result = yes; then + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_FS_STAT_DEV 1 +_ACEOF + + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # SVR2 + echo "$as_me:$LINENO: checking whether it is possible to resort to fread on /etc/mnttab" >&5 +echo $ECHO_N "checking whether it is possible to resort to fread on /etc/mnttab... $ECHO_C" >&6 + if test "${fu_cv_sys_mounted_fread+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 +_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 + fu_cv_sys_mounted_fread=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fu_cv_sys_mounted_fread=no +fi +rm -f conftest.err conftest.$ac_ext +fi + + echo "$as_me:$LINENO: result: $fu_cv_sys_mounted_fread" >&5 +echo "${ECHO_T}$fu_cv_sys_mounted_fread" >&6 + if test $fu_cv_sys_mounted_fread = yes; then + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_FREAD 1 +_ACEOF + + fi +fi + +if test -z "$ac_list_mounted_fs"; then + { { echo "$as_me:$LINENO: error: could not determine how to read list of mounted filesystems" >&5 +echo "$as_me: error: could not determine how to read list of mounted filesystems" >&2;} + { (exit 1); exit 1; }; } + # FIXME -- no need to abort building the whole package + # Can't build mountlist.c or anything that needs its functions +fi + +if test $ac_list_mounted_fs = found; then + gl_cv_list_mounted_fs=yes +else + gl_cv_list_mounted_fs=no +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 + + + + : + + + + + + + + + +for ac_header in sys/mntent.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 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 $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 + + + + : + + + + + + + + +for ac_header in sys/mount.h sys/vfs.h sys/fs_types.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 "checking how to get filesystem 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 + + + 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 + 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 clearerr_unlocked + char *p = (char *) clearerr_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_clearerr_unlocked=yes +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 + + + + + + + + : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 +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 () +{ +if ((socklen_t *) 0) + return 0; +if (sizeof (socklen_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_socklen_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_socklen_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 +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 $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6 + if test "${curl_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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #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 + + curl_cv_socklen_t_equiv="$t" + 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 + done + + 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 + +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 +_ACEOF + +fi + + + + + + + ac_config_files="$ac_config_files Makefile lib/Makefile m4/Makefile plugins/Makefile plugins-scripts/Makefile plugins-scripts/subst plugins-scripts/utils.pm plugins-scripts/utils.sh command.cfg test.pl pkg/solaris/pkginfo intl/Makefile po/Makefile.in" +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 +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" 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__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 + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by nagios-plugins $as_me 1.4.2, which was +generated by GNU Autoconf 2.58. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +nagios-plugins config.status 1.4.2 +configured by $0, generated by GNU Autoconf 2.58, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2003 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS section. +# + +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it + # from automake. + eval 'ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + + +_ACEOF + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "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" ;; + "plugins-scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES plugins-scripts/Makefile" ;; + "plugins-scripts/subst" ) CONFIG_FILES="$CONFIG_FILES plugins-scripts/subst" ;; + "plugins-scripts/utils.pm" ) CONFIG_FILES="$CONFIG_FILES plugins-scripts/utils.pm" ;; + "plugins-scripts/utils.sh" ) CONFIG_FILES="$CONFIG_FILES plugins-scripts/utils.sh" ;; + "command.cfg" ) CONFIG_FILES="$CONFIG_FILES command.cfg" ;; + "test.pl" ) CONFIG_FILES="$CONFIG_FILES test.pl" ;; + "pkg/solaris/pkginfo" ) CONFIG_FILES="$CONFIG_FILES pkg/solaris/pkginfo" ;; + "intl/Makefile" ) CONFIG_FILES="$CONFIG_FILES intl/Makefile" ;; + "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; + "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "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;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@CYGPATH_W@,$CYGPATH_W,;t t +s,@PACKAGE@,$PACKAGE,;t t +s,@VERSION@,$VERSION,;t t +s,@ACLOCAL@,$ACLOCAL,;t t +s,@AUTOCONF@,$AUTOCONF,;t t +s,@AUTOMAKE@,$AUTOMAKE,;t t +s,@AUTOHEADER@,$AUTOHEADER,;t t +s,@MAKEINFO@,$MAKEINFO,;t t +s,@AMTAR@,$AMTAR,;t t +s,@install_sh@,$install_sh,;t t +s,@STRIP@,$STRIP,;t t +s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t +s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t +s,@mkdir_p@,$mkdir_p,;t t +s,@AWK@,$AWK,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@am__leading_dot@,$am__leading_dot,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@RELEASE@,$RELEASE,;t t +s,@INSTALL@,$INSTALL,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@DEPDIR@,$DEPDIR,;t t +s,@am__include@,$am__include,;t t +s,@am__quote@,$am__quote,;t t +s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t +s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t +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,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;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 +s,@WARRANTY@,$WARRANTY,;t t +s,@SUPPORT@,$SUPPORT,;t t +s,@with_nagios_user@,$with_nagios_user,;t t +s,@with_nagios_group@,$with_nagios_group,;t t +s,@INSTALL_OPTS@,$INSTALL_OPTS,;t t +s,@with_trusted_path@,$with_trusted_path,;t t +s,@PKG_ARCH@,$PKG_ARCH,;t t +s,@REV_DATESTAMP@,$REV_DATESTAMP,;t t +s,@REV_TIMESTAMP@,$REV_TIMESTAMP,;t t +s,@PYTHON@,$PYTHON,;t t +s,@SH@,$SH,;t t +s,@PERL@,$PERL,;t t +s,@HOSTNAME@,$HOSTNAME,;t t +s,@BASENAME@,$BASENAME,;t t +s,@SOCKETLIBS@,$SOCKETLIBS,;t t +s,@MATHLIBS@,$MATHLIBS,;t t +s,@PGLIBS@,$PGLIBS,;t t +s,@PGINCLUDE@,$PGINCLUDE,;t t +s,@RADIUSLIBS@,$RADIUSLIBS,;t t +s,@LDAPLIBS@,$LDAPLIBS,;t t +s,@LDAPINCLUDE@,$LDAPINCLUDE,;t t +s,@MYSQLINCLUDE@,$MYSQLINCLUDE,;t t +s,@MYSQLLIBS@,$MYSQLLIBS,;t t +s,@check_mysql_LDFLAGS@,$check_mysql_LDFLAGS,;t t +s,@KRBINCLUDE@,$KRBINCLUDE,;t t +s,@OPENSSL@,$OPENSSL,;t t +s,@SSLINCLUDE@,$SSLINCLUDE,;t t +s,@check_tcp_ssl@,$check_tcp_ssl,;t t +s,@SSLLIBS@,$SSLLIBS,;t t +s,@PATH_TO_PS@,$PATH_TO_PS,;t t +s,@PATH_TO_PING@,$PATH_TO_PING,;t t +s,@PATH_TO_PING6@,$PATH_TO_PING6,;t t +s,@PATH_TO_NSLOOKUP@,$PATH_TO_NSLOOKUP,;t t +s,@PATH_TO_HOST@,$PATH_TO_HOST,;t t +s,@PATH_TO_UPTIME@,$PATH_TO_UPTIME,;t t +s,@PATH_TO_RPCINFO@,$PATH_TO_RPCINFO,;t t +s,@PATH_TO_NTPDATE@,$PATH_TO_NTPDATE,;t t +s,@PATH_TO_NTPDC@,$PATH_TO_NTPDC,;t t +s,@PATH_TO_NTPQ@,$PATH_TO_NTPQ,;t t +s,@PATH_TO_LMSTAT@,$PATH_TO_LMSTAT,;t t +s,@PATH_TO_SMBCLIENT@,$PATH_TO_SMBCLIENT,;t t +s,@PATH_TO_WHO@,$PATH_TO_WHO,;t t +s,@PATH_TO_SNMPGET@,$PATH_TO_SNMPGET,;t t +s,@PATH_TO_SNMPGETNEXT@,$PATH_TO_SNMPGETNEXT,;t t +s,@PATH_TO_QUAKESTAT@,$PATH_TO_QUAKESTAT,;t t +s,@PATH_TO_QSTAT@,$PATH_TO_QSTAT,;t t +s,@PATH_TO_FPING@,$PATH_TO_FPING,;t t +s,@PATH_TO_SSH@,$PATH_TO_SSH,;t t +s,@PATH_TO_MAILQ@,$PATH_TO_MAILQ,;t t +s,@PATH_TO_QMAIL_QSTAT@,$PATH_TO_QMAIL_QSTAT,;t t +s,@PATH_TO_SWAP@,$PATH_TO_SWAP,;t t +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,@NEED_VA_LIST@,$NEED_VA_LIST,;t t +s,@EXTRAS@,$EXTRAS,;t t +s,@EXTRA_NETOBJS@,$EXTRA_NETOBJS,;t t +s,@DEPLIBS@,$DEPLIBS,;t t +s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t +s,@MSGFMT@,$MSGFMT,;t t +s,@GMSGFMT@,$GMSGFMT,;t t +s,@XGETTEXT@,$XGETTEXT,;t t +s,@MSGMERGE@,$MSGMERGE,;t t +s,@ALLOCA@,$ALLOCA,;t t +s,@GLIBC21@,$GLIBC21,;t t +s,@LIBICONV@,$LIBICONV,;t t +s,@LTLIBICONV@,$LTLIBICONV,;t t +s,@INTLBISON@,$INTLBISON,;t t +s,@USE_NLS@,$USE_NLS,;t t +s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t +s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t +s,@CATOBJEXT@,$CATOBJEXT,;t t +s,@INTLOBJS@,$INTLOBJS,;t t +s,@DATADIRNAME@,$DATADIRNAME,;t t +s,@INSTOBJEXT@,$INSTOBJEXT,;t t +s,@GENCAT@,$GENCAT,;t t +s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t +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,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +case "$ac_dir" in +.) ac_abs_builddir=$ac_builddir;; +*) + case $ac_builddir in + .) ac_abs_builddir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; + *) ac_abs_builddir="$ac_dir"/$ac_builddir;; + esac;; +esac +case "$ac_dir" in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; + esac;; +esac +case "$ac_dir" in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; + esac;; +esac +case "$ac_dir" in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;; + esac;; +esac + + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) 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. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # 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. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +# Compute $ac_file's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $ac_file | $ac_file:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ + X$ac_file : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X$ac_file | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'`/stamp-h$_am_stamp_count +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +case "$ac_dir" in +.) ac_abs_builddir=$ac_builddir;; +*) + case $ac_builddir in + .) ac_abs_builddir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; + *) ac_abs_builddir="$ac_dir"/$ac_builddir;; + esac;; +esac +case "$ac_dir" in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; + esac;; +esac +case "$ac_dir" in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; + esac;; +esac +case "$ac_dir" in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;; + esac;; +esac + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`(dirname "$mf") 2>/dev/null || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + else + continue + fi + grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue + # Extract the definition of DEP_FILES from the Makefile without + # running `make'. + DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` + test -z "$DEPDIR" && continue + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n -e '/^U = / s///p' < "$mf"` + test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" + # We invoke sed twice because it is the simplest approach to + # changing $(DEPDIR) to its actual value in the expansion. + for file in `sed -n -e ' + /^DEP_FILES = .*\\\\$/ { + s/^DEP_FILES = // + :loop + s/\\\\$// + p + n + /\\\\$/ b loop + p + } + /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`(dirname "$file") 2>/dev/null || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p $dirpart/$fdir + else + as_dir=$dirpart/$fdir + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 +echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} + { (exit 1); exit 1; }; }; } + + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + default-1 ) + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$ALL_LINGUAS"; then + 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" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assigment from automake. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + fi + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + GMOFILES= + UPDATEPOFILES= + DUMMYPOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done ;; + esac +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + + +echo " --with-perl: $with_perl" +echo " --with-cgiurl: $with_cgiurl" +echo " --with-nagios-user: $with_nagios_user" +echo " --with-nagios-group: $with_nagios_group" +echo " --with-trusted-path: $with_trusted_path" +echo " --with-ping-command: $with_ping_command" +echo " --with-ping6-command: $with_ping6_command" +echo " --with-lwres: $with_lwres" +echo " --with-ipv6: $with_ipv6" +echo " --with-openssl: $with_openssl" +echo " --enable-emulate-getaddrinfo: $enable_emulate_getaddrinfo" diff --git a/configure.in b/configure.in new file mode 100644 index 0000000..603ce46 --- /dev/null +++ b/configure.in @@ -0,0 +1,1567 @@ +dnl Process this file with autoconf to produce a configure script. +AC_REVISION ($Revision: 1.150 $) +AC_PREREQ(2.58) +AC_INIT(nagios-plugins,1.4.2) +AC_CONFIG_SRCDIR(NPTest.pm) +AM_INIT_AUTOMAKE +AM_CONFIG_HEADER(config.h) +AC_CANONICAL_HOST + +RELEASE=1 +AC_SUBST(RELEASE) + +AC_PREFIX_DEFAULT(/usr/local/nagios) + +dnl Figure out how to invoke "install" and what install options to use. +AC_PROG_INSTALL +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 +AC_PROG_GCC_TRADITIONAL +AC_PROG_RANLIB + +AC_PROG_MAKE_SET +AC_PROG_AWK + +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]) +dnl AM_WITH_REGEX + +PLUGIN_TEST=`echo $srcdir/plugins/t/*.t|sed -e 's,\.*/plugins/,,g'` +AC_SUBST(PLUGIN_TEST)dnl + +SCRIPT_TEST=`echo $srcdir/plugins-scripts/t/*.t|sed -e 's,\.*/plugins-scripts/,,g'` +AC_SUBST(SCRIPT_TEST)dnl + +WARRANTY="The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of the plugins under the terms of the GNU General Public License.\nFor more information about these matters, see the file named COPYING.\n" +AC_SUBST(WARRANTY) + +SUPPORT="Send email to nagios-users@lists.sourceforge.net if you have questions\nregarding use of this software. To submit patches or suggest improvements,\nsend email to nagiosplug-devel@lists.sourceforge.net.\nPlease include version information with all correspondence (when possible,\nuse output from the --version option of the plugin itself).\n" +AC_SUBST(SUPPORT) + +dnl CGIURL has changed for Nagios with 1.0 beta +AC_ARG_WITH(cgiurl, + ACX_HELP_STRING([--with-cgiurl=DIR], + [sets URL for cgi programs]), + with_cgiurl=$withval, + with_cgiurl=/nagios/cgi-bin) +CGIURL="$with_cgiurl" +AC_DEFINE_UNQUOTED(CGIURL,"$CGIURL",[URL of CGI programs]) + +AC_ARG_WITH(nagios_user, + ACX_HELP_STRING([--with-nagios-user=USER], + [set user name to run nagios]), + with_nagios_user=$withval, + with_nagios_user=nagios) +AC_ARG_WITH(nagios_group, + ACX_HELP_STRING([--with-nagios-group=GROUP], + [set group name to run nagios]), + with_nagios_group=$withval, + with_nagios_group=nagios) +AC_SUBST(with_nagios_user) +AC_SUBST(with_nagios_group) +INSTALL_OPTS="-o $with_nagios_user -g $with_nagios_group" +AC_SUBST(INSTALL_OPTS) + +AC_ARG_WITH(trusted_path, + ACX_HELP_STRING([--with-trusted-path=PATH], + [sets trusted path for executables called by scripts (default=/bin:/sbin:/usr/bin:/usr/sbin)]), + with_trusted_path=$withval, + with_trusted_path=/bin:/sbin:/usr/bin:/usr/sbin) +AC_SUBST(with_trusted_path) + +EXTRAS= +dnl PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/local/sbin:$PATH + +LDFLAGS="$LDFLAGS -L." + +ac_cv_uname_m=`uname -m` +ac_cv_uname_s=`uname -s` +ac_cv_uname_r=`uname -r` +ac_cv_uname_v=`uname -v` + +PKG_ARCH=`uname -p` +REV_DATESTAMP=`date '+%Y.%m.%d.%H.%M'` +REV_TIMESTAMP=`date '+%Y%m%d%H%M%S'` + +AC_SUBST(PKG_ARCH) +AC_SUBST(REV_DATESTAMP) +AC_SUBST(REV_TIMESTAMP) + +dnl Checks for programs. +AC_PATH_PROG(PYTHON,python) +AC_PATH_PROG(SH,sh) +AC_PATH_PROG(PERL,perl) + +dnl allow them to override the path of perl +AC_ARG_WITH(perl, + ACX_HELP_STRING([--with-perl=PATH], + [sets path to perl executable]), + with_perl=$withval,with_perl=$PERL) +AC_SUBST(PERL, $with_perl) + +AC_PATH_PROG(HOSTNAME,hostname) +AC_PATH_PROG(BASENAME,basename) + +dnl +dnl Check for miscellaneous stuff +dnl + +case $host_vender-$host_os in +sun*) + AC_DEFINE(__EXTENSIONS__,1,[Sun's netdb.h needs this for getaddrinfo]) + ;; +osf*) + AC_DEFINE(_OSF_SOURCE,1,[OSF needs this for getaddrinfo]) + ;; +esac + +dnl +dnl Checks for libraries. +dnl + +AC_CHECK_LIB(dce,main,SOCKETLIBS="$SOCKETLIBS -ldce") +AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl") +AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket") +AC_CHECK_LIB(resolv,main,SOCKETLIBS="$SOCKETLIBS -lresolv") +AC_SUBST(SOCKETLIBS) + +dnl +dnl check for math-related functions needing -lm +AC_CHECK_LIB(m,floor,MATHLIBS="-lm") +AC_SUBST(MATHLIBS) + +dnl Check for PostgreSQL libraries +_SAVEDLIBS="$LIBS" +_SAVEDCPPFLAGS="$CPPFLAGS" +AC_ARG_WITH(pgsql, + ACX_HELP_STRING([--with-pgsql=DIR], + [sets path to pgsql installation]), + PGSQL=$withval,) +AC_CHECK_LIB(crypt,main) +if test "$ac_cv_lib_crypt_main" = "yes"; then + if test -n "$PGSQL"; then + LDFLAGS="$LDFLAGS -L$PGSQL/lib" + CPPFLAGS="$CPPFLAGS -I$PGSQL/include" + fi + AC_CHECK_LIB(pq,PQsetdbLogin,,,-lcrypt) + if test "$ac_cv_lib_pq_PQsetdbLogin" = "yes"; then + AC_CHECK_HEADERS(pgsql/libpq-fe.h) + AC_CHECK_HEADERS(postgresql/libpq-fe.h) + AC_CHECK_HEADERS(libpq-fe.h) + if [[ -n "$PGSQL" -a "$ac_cv_header_libpq_fe_h" = "yes" ]]; then + PGLIBS="-L$PGSQL/lib -lpq -lcrypt" + PGINCLUDE="-I$PGSQL/include" + elif test "$ac_cv_header_pgsql_libpq_fe_h" = "yes"; then + PGLIBS="-lpq -lcrypt" + PGINCLUDE="-I/usr/include/pgsql" + elif test "$ac_cv_header_postgresql_libpq_fe_h" = "yes"; then + PGLIBS="-L$PGSQL/lib -lpq -lcrypt" + PGINCLUDE="-I/usr/include/postgresql" + elif test "$ac_cv_header_libpq_fe_h" = "yes"; then + PGLIBS="-L$PGSQL/lib -lpq -lcrypt" + PGINCLUDE="-I$PGSQL/include" + fi + if test -z "$PGINCLUDE"; then + AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)]) + AC_MSG_WARN([install PostgreSQL headers to compile this plugin (see REQUIREMENTS).]) + else + AC_SUBST(PGLIBS) + AC_SUBST(PGINCLUDE) + EXTRAS="$EXTRAS check_pgsql" + fi + else + AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)]) + AC_MSG_WARN([LIBS="$LIBS" CPPFLAGS="$CPPFLAGS"]) + AC_MSG_WARN([install PostgreSQL libs to compile this plugin (see REQUIREMENTS).]) + fi +else + AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)]) + AC_MSG_WARN([install lib crypt and PostgreSQL libs to compile this plugin (see REQUIREMENTS).]) +fi +LIBS="$_SAVEDLIBS" +CPPFLAGS="$_SAVEDCPPFLAGS" + +dnl Check for radius libraries +_SAVEDLIBS="$LIBS" +AC_CHECK_LIB(radiusclient,rc_read_config) +if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then + EXTRAS="$EXTRAS check_radius" + RADIUSLIBS="-lradiusclient" + AC_SUBST(RADIUSLIBS) +else + AC_MSG_WARN([Skipping radius plugin]) + AC_MSG_WARN([install radius libs to compile this plugin (see REQUIREMENTS).]) +fi +LIBS="$_SAVEDLIBS" + +dnl Check for LDAP libraries +_SAVEDLIBS="$LIBS" +AC_CHECK_LIB(ldap,main,,,-llber) +if test "$ac_cv_lib_ldap_main" = "yes"; then + LDAPLIBS="-lldap -llber"\ + LDAPINCLUDE="-I/usr/include/ldap" + AC_SUBST(LDAPLIBS) + AC_SUBST(LDAPINCLUDE) + AC_CHECK_FUNCS(ldap_set_option) + EXTRAS="$EXTRAS check_ldap" + AC_CHECK_FUNCS(ldap_init ldap_set_option ldap_get_option ldap_start_tls_s) +else + AC_MSG_WARN([Skipping LDAP plugin]) + AC_MSG_WARN([install LDAP libs to compile this plugin (see REQUIREMENTS).]) +fi +LIBS="$_SAVEDLIBS" + + +dnl Check for mysql libraries +_SAVEDLIBS="$LIBS" +_SAVEDCPPFLAGS="$CPPFLAGS" +AC_ARG_WITH(mysql, + ACX_HELP_STRING([--with-mysql=DIR], + [sets path to mysql installation (assumes lib/mysql and include subdirs]), + MYSQL=$withval,) +if test -n "$MYSQL"; then + MYSQLLIBDIR=$MYSQL/lib/mysql + CPPFLAGS="-I$MYSQL/include" + AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR ",,-L$MYSQLLIBDIR -lz) + AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient") +elif test -f /usr/lib/libmysqlclient.so; then + AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz) + AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient") +elif test -f /usr/lib/libmysqlclient.a; then + AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz) + AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient") +elif test -f /usr/lib/mysql/libmysqlclient.so; then + AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql -lz) + AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql) +elif test -f /usr/lib/mysql/libmysqlclient.a; then + AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql -lz) + AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql) +fi +if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then + AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h, MYSQLINCLUDE="-I$MYSQL/include" ) + if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then + EXTRAS="$EXTRAS check_mysql" + AC_SUBST(MYSQLINCLUDE) + AC_SUBST(MYSQLLIBS) + AC_SUBST(check_mysql_LDFLAGS) + else + AC_MSG_WARN([Skipping mysql plugin]) + AC_MSG_WARN([install mysql client headers to compile this plugin (see REQUIREMENTS).]) + fi +else + AC_MSG_WARN([Skipping mysql plugin]) + AC_MSG_WARN([install mysql client libs to compile this plugin (see REQUIREMENTS).]) +fi +CPPFLAGS="$_SAVEDCPPFLAGS $MYSQLINCLUDE" +LIBS="$_SAVEDLIBS" + +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 + #include + #endif + #include + #include ], + [struct sockaddr_in6 sin6; + void *p; + + sin6.sin6_family = AF_INET6; + sin6.sin6_port = 587; + p = &sin6.sin6_addr;], + [with_ipv6=yes], + [with_ipv6=no]) + ]) + +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) +if test "$FOUNDINCLUDE" = "no"; then + _SAVEDCPPFLAGS="$CPPFLAGS" + CPPFLAGS="$_SAVEDCPPFLAGS -I/usr/kerberos/include" + unset ac_cv_header_krb5_h + AC_CHECK_HEADERS(krb5.h, + KRB5INCLUDE="-I/usr/kerberos/include" + FOUNDINCLUDE=yes, + FOUNDINCLUDE=no) +fi +AC_SUBST(KRBINCLUDE) +if test "$FOUNDINCLUDE" = "no"; then + CPPFLAGS="$_SAVEDCPPFLAGS" +fi + +dnl Check for OpenSSL location +AC_PATH_PROG(OPENSSL,openssl) +if test "$OPENSSL" = "/usr/bin/openssl"; then + OPENSSL=/usr +elif test "$OPENSSL" = "/usr/sbin/openssl"; then + OPENSSL=/usr +elif test "$OPENSSL" = "/opt/bin/openssl"; then + OPENSSL=/opt +elif test "$OPENSSL" = "/opt/openssl/bin/openssl"; then + OPENSSL=/opt/openssl +elif test "$OPENSSL" = "/usr/slocal/bin/openssl"; then + OPENSSL=/usr/slocal +elif test "$OPENSSL" = "/usr/local/bin/openssl"; then + OPENSSL=/usr/local +elif test "$OPENSSL" = "/usr/local/ssl/bin/openssl"; then + OPENSSL=/usr/local/ssl +fi +AC_ARG_WITH(openssl, +AC_HELP_STRING([--with-openssl=DIR], [sets path to openssl installation]) +AC_HELP_STRING([--without-openssl], [disable openssl]), +OPENSSL=$withval) + +_SAVEDCPPFLAGS="$CPPFLAGS" +_SAVEDLDFLAGS="$LDFLAGS" +if test X"$OPENSSL" = "Xno"; then + AC_MSG_WARN([openssl disabled, you will not be able to use ssl options in some plugins]) + FOUNDSSL="dontbother" +else + dnl Check for OpenSSL header files + unset FOUNDINCLUDE + if test "$OPENSSL" != "/usr"; then + CPPFLAGS="$CPPFLAGS -I$OPENSSL/include" + LDFLAGS="$LDFLAGS -R$OPENSSL/lib" + fi + AC_CHECK_HEADERS(openssl/ssl.h openssl/x509.h openssl/rsa.h openssl/pem.h openssl/crypto.h openssl/err.h, + SSLINCLUDE="-I$OPENSSL/include" + FOUNDINCLUDE=yes, + FOUNDINCLUDE=no) + if test "$FOUNDINCLUDE" = "no"; then + AC_CHECK_HEADERS(ssl.h x509.h rsa.h pem.h crypto.h err.h, + SSLINCLUDE="-I$OPENSSL/include" + FOUNDINCLUDE=yes, + FOUNDINCLUDE=no) + fi + AC_SUBST(SSLINCLUDE) + if test "$FOUNDINCLUDE" = "no"; then + CPPFLAGS="$_SAVEDCPPFLAGS" + fi + + dnl Check for crypto lib + _SAVEDLIBS="$LIBS" + AC_CHECK_LIB(crypto,CRYPTO_lock,,,-L$OPENSSL/lib) + if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then + dnl Check for SSL lib + AC_CHECK_LIB(ssl,main,LDFLAGS="$LDFLAGS -L$OPENSSL/lib" SSLLIBS="-lssl -lcrypto",AC_CHECK_LIB(ssl,main,LDFLAGS="$LDFLAGS -L$OPENSSL/lib" SSLLIBS="-lssl -lcrypto"),-L$OPENSSL/lib -lcrypto) + fi + LIBS="$_SAVEDLIBS" + + FOUNDSSL="no" + dnl test headers and libs to decide whether check_http should use SSL + if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then + if test "$ac_cv_lib_ssl_main" = "yes"; then + if test "$FOUNDINCLUDE" = "yes"; then + FOUNDSSL="yes" + fi + fi + fi +fi + +if test "$FOUNDSSL" = "yes"; then + check_tcp_ssl="check_simap check_spop check_jabber check_nntps check_ssmtp" + AC_SUBST(check_tcp_ssl) + AC_SUBST(SSLLIBS) + AC_DEFINE(HAVE_SSL,1,[Define if SSL libraries are found]) + with_openssl="yes" +else + if test "$FOUNDSSL" = "no"; then + AC_MSG_WARN([OpenSSL libs could not be found]) + dnl else deliberately disabled + fi + with_openssl="no" + CPPFLAGS="$_SAVEDCPPFLAGS" + LDFLAGS="$_SAVEDLDFLAGS" +fi + +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 regex.h sys/types.h sys/time.h sys/socket.h sys/loadavg.h) +AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h stdlib.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_STRUCT_TM +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_TYPE_SIGNAL + +AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[ +AC_TRY_LINK([#include +va_list ap1,ap2;], [va_copy(ap1,ap2);], +ac_cv_HAVE_VA_COPY=yes, +ac_cv_HAVE_VA_COPY=no)]) +if test x"$ac_cv_HAVE_VA_COPY" = x"yes"; then + AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available]) +else + AC_CACHE_CHECK([for __va_copy],ac_cv_HAVE___VA_COPY,[ + AC_TRY_LINK([#include + va_list ap1,ap2;], [__va_copy(ap1,ap2);], + ac_cv_HAVE___VA_COPY=yes, + ac_cv_HAVE___VA_COPY=no)]) + if test x"$ac_cv_HAVE___VA_COPY" = x"yes"; then + AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available]) + 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;], + AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure]) + AC_TRY_COMPILE([#include ], + [struct timeval *tv; + struct timezone *tz; + gettimeofday(tv, tz);], + AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found]), + 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_MSG_CHECKING(return type of socket size) +AC_TRY_COMPILE([#include + #include + #include ], + [int a = send(1, (const void *) buffer, (size_t *) 0, (int *) 0);], + ac_cv_socket_size_type=["size_t"] + AC_MSG_RESULT(size_t), + ac_cv_socket_size_type=["int"] + AC_MSG_RESULT(int)) + +AC_DEFINE_UNQUOTED(SOCKET_SIZE_TYPE, $ac_cv_socket_size_type , + [Define type of socket size]) + +if test -f "/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 + +AC_PATH_PROG(PATH_TO_PS,ps) + +AC_MSG_CHECKING(for ps syntax) +dnl Some gnu/linux systems (debian for one) don't like -axwo and need axwo. +dnl so test for this first... +if 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 +then + ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" + ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu comm args'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=9 + AC_MSG_RESULT([$ac_cv_ps_command]) + +dnl For OpenBSD 3.2 & 3.3. Must come before ps -weo +dnl Should also work for FreeBSD 5.2.1 and 5.3 +dnl STAT UCOMM VSZ RSS USER PPID COMMAND +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 +then + ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" + ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid vsz rss pcpu comm args'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=9 + AC_MSG_RESULT([$ac_cv_ps_command]) + +dnl Some *BSDs have different format for ps. This is mainly to catch FreeBSD 4. +dnl Limitation: Only first 16 chars returned for ucomm field +dnl Must come before ps -weo +elif ps -axwo 'stat uid pid ppid vsz rss pcpu ucomm command' 2>/dev/null | \ + egrep -i ["^ *STAT +UID +PID +PPID +VSZ +RSS +%CPU +UCOMM +COMMAND"] > /dev/null +then + ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" + ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid vsz rss pcpu ucomm command'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=9 + AC_MSG_RESULT([$ac_cv_ps_command]) + +dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND +elif ps -weo 'stat comm vsz rss user uid pid ppid etime args' 2>/dev/null | \ + egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[ID]+ +P[PID]+ +[ELAPSD]+ +[RGSCOMDNA]+"] >/dev/null +then + ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]" + ac_cv_ps_command="$PATH_TO_PS -weo 'stat uid pid ppid vsz rss pcpu etime comm args'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %s %n" + ac_cv_ps_cols=10 + AC_MSG_RESULT([$ac_cv_ps_command]) + +dnl FreeBSD +elif ps waxco 'state command vsz rss uid user pid ppid' 2>/dev/null | \ + egrep -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PID +PPID"] >/dev/null +then + ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" + ac_cv_ps_command="$PATH_TO_PS waxco 'state uid pid ppid vsz rss pcpu command command'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=9 + AC_MSG_RESULT([$ac_cv_ps_command]) + +dnl BSD-like mode in RH 6.1 +elif ps waxno 'state comm vsz rss uid user pid ppid args' 2>/dev/null | \ + egrep -i ["^S +COMMAND +VSZ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null +then + ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" + ac_cv_ps_command="$PATH_TO_PS waxno 'state uid pid ppid vsz rss pcpu comm args'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=9 + AC_MSG_RESULT([$ac_cv_ps_command]) + +dnl SunOS 4.1.3: +dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND +dnl Need the head -1 otherwise test will work because arguments are found +elif ps -laxnwww 2>/dev/null | head -1 | \ + egrep -i ["^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND"] >/dev/null +then + ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]" + ac_cv_ps_command="$PATH_TO_PS -laxnwww" + ac_cv_ps_format="%*s %d %d %d %*s %*s %*s %d %d %*s %s %*s %*s %n%s" + ac_cv_ps_cols=9 + AC_MSG_RESULT([$ac_cv_ps_command]) + +dnl Debian Linux / procps v1.2.9: +dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND +dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2] +dnl +elif ps laxnwww 2>/dev/null | \ + egrep -i ["^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND"] >/dev/null +then + ac_cv_ps_varlist="[&procuid,&procpid,&procppid,procstat,&procvsz,&procrss,&pos,procprog]" + ac_cv_ps_command="$PATH_TO_PS laxnwww" + ac_cv_ps_format="%*s %d %d %d %*s %*s %d %d %*s %s %*s %*s %n%s" + ac_cv_ps_cols=9 + AC_MSG_RESULT([$ac_cv_ps_command]) + +dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs) +elif ps -axo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \ + egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null +then + ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" + ac_cv_ps_command="$PATH_TO_PS -axo 'stat uid pid ppid vsz rss pcpu comm args'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=9 + AC_MSG_RESULT([$ac_cv_ps_command]) + +dnl Tru64 - needs %*[ +] in PS_FORMAT +elif ps -ao 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \ + egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null +then + ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" + ac_cv_ps_command="$PATH_TO_PS -ao 'stat uid pid ppid vsz rss pcpu comm args'" + ac_cv_ps_format=["%s%*[ +] %d %d %d %d %d %f %s %n"] + ac_cv_ps_cols=9 + AC_MSG_RESULT([$ac_cv_ps_command]) + +elif ps -eo 's comm vsz rss user uid pid ppid args' 2>/dev/null | \ + egrep -i ["^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null +then + ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&procvsz,&procrss,&procpcpu,procprog,&pos]" + ac_cv_ps_command="$PATH_TO_PS -eo 's uid pid ppid vsz rss pcpu comm args'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=9 + AC_MSG_RESULT([$ac_cv_ps_command]) + +dnl AIX 4.3.3 and 5.1 do not have an rss field +elif ps -eo 'stat uid pid ppid vsz pcpu comm args' 2>/dev/null | \ + egrep -i ["^ *S[TAUES]* +UID +PID +PPID +VSZ +%CPU +COMMAND +COMMAND"] >/dev/null +then + ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&procvsz,&procpcpu,procprog,&pos]" + ac_cv_ps_command="$PATH_TO_PS -eo 'stat uid pid ppid vsz pcpu comm args'" + ac_cv_ps_format="%s %d %d %d %d %f %s %n" + ac_cv_ps_cols=8 + AC_MSG_RESULT([$ac_cv_ps_command - with no RSS]) + +dnl Solaris 2.6 +elif ps -Ao 's comm vsz rss uid user pid ppid args' 2>/dev/null | \ + egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null +then + ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&procvsz,&procrss,&procpcpu,procprog,&pos]" + ac_cv_ps_command="$PATH_TO_PS -Ao 's uid pid ppid vsz rss pcpu comm args'" + # There must be no space between the %s and %n due to a wierd problem in sscanf where + # it will return %n as longer than the line length + ac_cv_ps_format="%s %d %d %d %d %d %f %s%n" + ac_cv_ps_cols=9 + AC_MSG_RESULT([$ac_cv_ps_command]) + +elif ps -Ao 'status comm vsz rss uid user pid ppid args' 2>/dev/null | \ + egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null +then + ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&procvsz,&procrss,&procpcpu,procprog,&pos]" + ac_cv_ps_command="$PATH_TO_PS -Ao 'status uid pid ppid vsz rss pcpu comm args'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=9 + AC_MSG_RESULT([$ac_cv_ps_command]) + +elif ps -Ao 'state comm vsz rss uid user pid ppid args' 2>/dev/null | \ + egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null +then + ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&procvsz,&procrss,&procpcpu,procprog,&pos]" + ac_cv_ps_command="$PATH_TO_PS -Ao 'state uid pid ppid vsz rss pcpu comm args'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=9 + AC_MSG_RESULT([$ac_cv_ps_command]) + +dnl wonder who takes state instead of stat +elif ps -ao 'state command vsz rss user pid ppid args' 2>/dev/null | \ + egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null +then + ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&procvsz,&procrss,&procpcpu,procprog,&pos]" + ac_cv_ps_command="$PATH_TO_PS -ao 'state uid pid ppid vsz rss pcpu command args'" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=8 + AC_MSG_RESULT([$ac_cv_ps_command]) + +dnl IRIX 53 +elif ps -el 2>/dev/null | \ + egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null +then + ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&procvsz,&procrss,&pos,procprog]" + ac_cv_ps_command="$PATH_TO_PS -el (IRIX 53)" + ac_cv_ps_format="%*s %s %d %d %d %*s %*s %*s %*s %d %d %*s %*s %*s %n%s" + ac_cv_ps_cols=8 + AC_MSG_RESULT([$ac_cv_ps_command]) + +dnl IRIX 63 +elif ps -el 2>/dev/null | \ + egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +ADDR +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null +then + ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&pos,procprog]" + ac_cv_ps_command="$PATH_TO_PS -el (IRIX 63)" + ac_cv_ps_format="%*s %s %d %d %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s" + ac_cv_ps_cols=6 + AC_MSG_RESULT([$ac_cv_ps_command]) + +dnl AIX 4.1: +dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD +dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper +elif ps -el 2>/dev/null | \ + egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null +then + ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&pos,procprog]" + ac_cv_ps_command="$PATH_TO_PS -el (AIX 4.1 and HP-UX)" + ac_cv_ps_format="%*s %s %d %d %d %*s %*s %*s %*s %*s %*s %*s %*s %n%s" + ac_cv_ps_cols=6 + AC_MSG_RESULT([$ac_cv_ps_command]) + +dnl AIX? +elif ps glaxen 2>/dev/null | \ + egrep -i ["^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND"] >/dev/null +then + ac_cv_ps_varlist="[&procuid,&procpid,&procpid,&procvsz,&procrss,procstat,&pos,procprog]" + ac_cv_ps_command="$PATH_TO_PS glaxen" + ac_cv_ps_format="%*s %d %d %d %*s %*s %d %d %*s %s %*s %*s %n%s" + ac_cv_ps_cols=8 + AC_MSG_RESULT([$ac_cv_ps_command]) + +dnl MacOSX / Darwin +dnl TODO: MacOSX has commands with spaces which will cause problems to PS_FORMAT +dnl Some truncation will happen in UCOMM column +dnl STAT VSZ RSS UID PPID %CPU UCOMM COMMAND +dnl Ss 52756 22496 501 1 6.9 Window Manager /System/Library/CoreServices/WindowServer -daemon +elif ps wwaxo 'state vsz rss uid pid ppid pcpu ucomm command' 2>/dev/null | \ + egrep -i ["^STAT +VSZ +RSS +UID +PPID +%CPU +UCOMM +COMMAND"] >/dev/null +then + ac_cv_ps_command="$PATH_TO_PS wwaxo 'state vsz rss uid pid ppid pcpu ucomm command'" + ac_cv_ps_varlist="[procstat,&procvsz,&procrss,&procuid,&procpid,&procpid,&procpcpu,procprog,&pos]" + ac_cv_ps_format="%s %d %d %d %d %d %f %s %n" + ac_cv_ps_cols=8 + AC_MSG_RESULT([$ac_cv_ps_command]) + +dnl UnixWare +elif ps -Al 2>/dev/null | \ + egrep -i ["^ *F +S +UID +PID +PPID +CLS +PRI +NI +C +ADDR +SZ +WCHAN +TTY +TIME +COMD"] >/dev/null +then + ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&pos,procprog]" + ac_cv_ps_command="$PATH_TO_PS -Al" + ac_cv_ps_format="%*s %s %d %d %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s" + ac_cv_ps_cols=8 + AC_MSG_RESULT([$ac_cv_ps_command]) + +else + AC_MSG_WARN([unable to find usable ps syntax - check_procs and check_nagios will not be compiled]) +fi + +if test -n "$ac_cv_ps_varlist" ; then + AC_DEFINE_UNQUOTED(PS_VARLIST,$ac_cv_ps_varlist, + [Variable list for sscanf of 'ps' output]) + AC_DEFINE_UNQUOTED(PS_COMMAND,"$ac_cv_ps_command", + [Verbatim command to execute for ps in check_procs]) + AC_DEFINE_UNQUOTED(PS_FORMAT,"$ac_cv_ps_format", + [Format string for scanning ps output in check_procs]) + AC_DEFINE_UNQUOTED(PS_COLS,$ac_cv_ps_cols, + [Number of columns in ps command]) + EXTRAS="$EXTRAS check_procs check_nagios" +fi + +AC_PATH_PROG(PATH_TO_PING,ping) +AC_PATH_PROG(PATH_TO_PING6,ping6) + +AC_ARG_WITH(ping_command, + ACX_HELP_STRING([--with-ping-command=SYNTAX], + [sets syntax for ICMP ping]), + with_ping_command=$withval,) + +AC_MSG_CHECKING(for ICMP ping syntax) +ac_cv_ping_packets_first=no +ac_cv_ping_has_timeout=no +if test -n "$with_ping_command" +then + AC_MSG_RESULT([(command-line) $with_ping_command]) + if test -n "$ac_cv_ping_packets_first" + then + ac_cv_ping_packets_first=yes + fi + +elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ + $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING -n -U -c %d %s" + ac_cv_ping_packets_first=yes + AC_MSG_RESULT([$with_ping_command]) + +elif $PATH_TO_PING -n -U -w 10 -c 1 127.0.0.1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING -n -U -w %d -c %d %s" + ac_cv_ping_packets_first=yes + ac_cv_ping_has_timeout=yes + AC_MSG_RESULT([$with_ping_command]) + +elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING -n -U -c %d %s" + ac_cv_ping_packets_first=yes + AC_MSG_RESULT([$with_ping_command]) + +elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING -n -c %d %s" + ac_cv_ping_packets_first=yes + AC_MSG_RESULT([$with_ping_command]) + +elif $PATH_TO_PING -n 127.0.0.1 -c 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING -n %s -c %d" + AC_MSG_RESULT([$with_ping_command]) + +elif $PATH_TO_PING 127.0.0.1 -n 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING %s -n %d" + AC_MSG_RESULT([$with_ping_command]) + +elif $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING -n -s %s 56 %d" + AC_MSG_RESULT([$with_ping_command]) + +elif $PATH_TO_PING -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING -n -h %s -s 56 -c %d" + AC_MSG_RESULT([$with_ping_command]) + +elif $PATH_TO_PING -n -s 56 -c 1 127.0.0.1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING -n -s 56 -c %d %s" + ac_cv_ping_packets_first=yes + AC_MSG_RESULT([$with_ping_command]) + +elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null +then + with_ping_command="$PATH_TO_PING -n -c %d %s" + ac_cv_ping_packets_first=yes + AC_MSG_RESULT([$with_ping_command]) + +else + AC_MSG_WARN([unable to find usable ping syntax]) +fi + +AC_DEFINE_UNQUOTED(PING_COMMAND,"$with_ping_command", + [path and args for ICMP ping command]) + +if test "x$ac_cv_ping_packets_first" != "xno" +then + AC_DEFINE(PING_PACKETS_FIRST,1, + [Define if packet count must precede host]) +fi + +if test "x$ac_cv_ping_has_timeout" != "xno" +then + AC_DEFINE(PING_HAS_TIMEOUT,1, + [Define if ping has its own timeout option that should be set]) +fi + +AC_ARG_WITH(ping6_command, + ACX_HELP_STRING([--with-ping6-command=SYNTAX], + [sets syntax for ICMPv6 ping]), + with_ping6_command=$withval,) + +if test x"$with_ipv6" != xno ; then +AC_MSG_CHECKING(for ICMPv6 ping syntax) +ac_cv_ping6_packets_first=no +if test -n "$with_ping6_command" +then + AC_MSG_RESULT([(command-line) $with_ping6_command]) + if test -n "$ac_cv_ping6_packets_first" + then + ac_cv_ping6_packets_first=yes + fi + +elif test "x$PATH_TO_PING6" != "x"; then + if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ + $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s" + ac_cv_ping6_packets_first=yes + AC_MSG_RESULT([$with_ping6_command]) + + elif $PATH_TO_PING6 -n -U -w 10 -c 1 ::1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 -n -U -w %d -c %d %s" + ac_cv_ping6_packets_first=yes + ac_cv_ping_has_timeout=yes + AC_MSG_RESULT([$with_ping6_command]) + + elif $PATH_TO_PING6 -n -U -c 1 ::1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s" + ac_cv_ping6_packets_first=yes + AC_MSG_RESULT([$with_ping6_command]) + + elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 -n -c %d %s" + ac_cv_ping6_packets_first=yes + AC_MSG_RESULT([$with_ping6_command]) + + elif $PATH_TO_PING6 -n ::1 -c 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 -n %s -c %d" + AC_MSG_RESULT([$with_ping6_command]) + + elif $PATH_TO_PING6 ::1 -n 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 %s -n %d" + AC_MSG_RESULT([$with_ping6_command]) + + elif $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 -n -s %s 56 %d" + AC_MSG_RESULT([$with_ping6_command]) + + elif $PATH_TO_PING6 -n -h ::1 -s 56 -c 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 -n -h %s -s 56 -c %d" + AC_MSG_RESULT([$with_ping6_command]) + + elif $PATH_TO_PING6 -n -s 56 -c 1 ::1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 -n -s 56 -c %d %s" + ac_cv_ping6_packets_first=yes + AC_MSG_RESULT([$with_ping_command]) + + elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING6 -n -c %d %s" + ac_cv_ping6_packets_first=yes + AC_MSG_RESULT([$with_ping6_command]) + + fi + +elif test "x$PATH_TO_PING" != "x"; then + if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ + $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s" + ac_cv_ping6_packets_first=yes + AC_MSG_RESULT([$with_ping6_command]) + + elif $PATH_TO_PING -A inet6 -n -U -c 1 ::1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s" + ac_cv_ping6_packets_first=yes + AC_MSG_RESULT([$with_ping6_command]) + + elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s" + ac_cv_ping6_packets_first=yes + AC_MSG_RESULT([$with_ping6_command]) + + elif $PATH_TO_PING -A inet6 -n ::1 -c 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING -A inet6 -n %s -c %d" + AC_MSG_RESULT([$with_ping6_command]) + + elif $PATH_TO_PING -A inet6 ::1 -n 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING -A inet6 %s -n %d" + AC_MSG_RESULT([$with_ping6_command]) + + elif $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING -A inet6 -n -s %s 56 %d" + AC_MSG_RESULT([$with_ping6_command]) + + elif $PATH_TO_PING -A inet6 -n -h ::1 -s 56 -c 1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING -A inet6 -n -h %s -s 56 -c %d" + AC_MSG_RESULT([$with_ping6_command]) + + elif $PATH_TO_PING -A inet6 -n -s 56 -c 1 ::1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING -A inet6 -n -s 56 -c %d %s" + ac_cv_ping6_packets_first=yes + AC_MSG_RESULT([$with_ping_command]) + + elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \ + egrep -i "^round-trip|^rtt" >/dev/null + then + with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s" + ac_cv_ping6_packets_first=yes + AC_MSG_RESULT([$with_ping6_command]) + + fi + +fi + +if test "x$with_ping6_command" != "x"; then + AC_DEFINE_UNQUOTED(PING6_COMMAND,"$with_ping6_command", + [path and args for ICMPv6 ping command]) +else + AC_MSG_RESULT([none]) +fi + +if test "x$ac_cv_ping6_packets_first" != "xno"; then + AC_DEFINE(PING6_PACKETS_FIRST,1, + [Define if packet count must precede host]) +fi +fi + +AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup) + +AC_MSG_CHECKING(for nslookup syntax) +if test -n "$PATH_TO_NSLOOKUP" +then + if $PATH_TO_NSLOOKUP -sil 127.0.0.1 2>&1 | grep ["Invalid option: sil"] >/dev/null + then + ac_cv_nslookup_command="$PATH_TO_NSLOOKUP" + AC_MSG_RESULT([$ac_cv_nslookup_command]) + + else + ac_cv_nslookup_command="$PATH_TO_NSLOOKUP -sil" + AC_MSG_RESULT([$ac_cv_nslookup_command]) + + fi + EXTRAS="$EXTRAS check_dns" + +else + AC_MSG_WARN([nslookup command not found]) +fi + +AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$ac_cv_nslookup_command", + [path and args for nslookup]) + +AC_PATH_PROG(PATH_TO_HOST,host) +if test -n "$ac_cv_path_PATH_TO_HOST" +then + EXTRAS="$EXTRAS check_dns" +fi + +AC_PATH_PROG(PATH_TO_UPTIME,uptime) +AC_DEFINE_UNQUOTED(PATH_TO_UPTIME,"$PATH_TO_UPTIME",[path to uptime binary]) + +AC_PATH_PROG(PATH_TO_RPCINFO,rpcinfo) +AC_DEFINE_UNQUOTED(PATH_TO_RPCINFO,"$PATH_TO_RPCINFO",[path to rpcinfo binary]) + +AC_PATH_PROG(PATH_TO_NTPDATE,ntpdate) +AC_PATH_PROGS(PATH_TO_NTPDC,ntpdc xntpdc) +AC_PATH_PROGS(PATH_TO_NTPQ,ntpq) +if (test -x "$PATH_TO_NTPDATE" || test -x "$PATH_TO_NTPQ") +then + AC_DEFINE_UNQUOTED(PATH_TO_NTPQ,"$PATH_TO_NTPQ",[path to ntpq binary]) + AC_DEFINE_UNQUOTED(PATH_TO_NTPDATE,"$PATH_TO_NTPDATE",[path to ntpdate binary]) +else + AC_MSG_WARN([Install NTP programs (http://www.ntp.org) if you want to monitor time synchronization]) +fi + +AC_PATH_PROG(PATH_TO_LMSTAT,lmstat) +if test -x "$PATH_TO_LMSTAT" +then + AC_DEFINE_UNQUOTED(PATH_TO_LMSTAT,"$PATH_TO_LMSTAT",[path to lmstat]) +else + AC_MSG_WARN([Get lmstat from Globetrotter Software to monitor flexlm licenses]) +fi + +AC_PATH_PROG(PATH_TO_SMBCLIENT,smbclient) +if test -x "$PATH_TO_SMBCLIENT" +then + AC_DEFINE_UNQUOTED(PATH_TO_SMBCLIENT,"$PATH_TO_SMBCLIENT",[path to smbclient binary]) +else + AC_MSG_WARN([Get smbclient from Samba.org to monitor SMB shares]) +fi + + +AC_PATH_PROG(PATH_TO_WHO,who) + +if [$PATH_TO_WHO -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null] +then + ac_cv_path_to_who="$PATH_TO_WHO -q" +else + ac_cv_path_to_who="$PATH_TO_WHO" +fi + +AC_DEFINE_UNQUOTED(WHO_COMMAND,"$ac_cv_path_to_who", + [path and arguments for invoking 'who']) + +AC_PATH_PROG(PATH_TO_SNMPGET,snmpget) +if test -x "$PATH_TO_SNMPGET" +then + AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary]) + EXTRAS="$EXTRAS check_hpjd check_snmp" +else + AC_MSG_WARN([Get snmpget from http://net-snmp.sourceforge.net to make check_hpjd and check_snmp plugins]) +fi + +AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext) +if test -x "$PATH_TO_SNMPGETNEXT" +then + AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT",[path to snmpgetnext binary]) +fi + +if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null ) +then + AC_MSG_CHECKING(for Net::SNMP perl module) + AC_MSG_RESULT([found]) +else + AC_MSG_WARN([Tried $PERL - install Net::SNMP perl module if you want to use the perl snmp plugins]) +fi + +AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) +AC_PATH_PROG(PATH_TO_QSTAT,qstat) + +if test -x "$PATH_TO_QUAKESTAT" +then + ac_cv_path_to_qstat="$PATH_TO_QUAKESTAT" + EXTRAS="$EXTRAS check_game" + +elif test -x "$PATH_TO_QSTAT" +then + ac_cv_path_to_qstat="$PATH_TO_QSTAT" + EXTRAS="$EXTRAS check_game" +else + AC_MSG_WARN([Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin]) +fi + +if test $ac_cv_path_to_qstat +then + AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$ac_cv_path_to_qstat", + [path to qstat/quakestat]) +fi + +AC_PATH_PROG(PATH_TO_FPING,fping) +if test -x "$PATH_TO_FPING" +then + AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping]) + EXTRAS="$EXTRAS check_fping" +else + AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin]) +fi + +AC_PATH_PROG(PATH_TO_SSH,ssh) + +if test -x "$PATH_TO_SSH" +then + AC_DEFINE_UNQUOTED(SSH_COMMAND,"$PATH_TO_SSH",[path to ssh binary]) + EXTRAS="$EXTRAS check_by_ssh" +else + AC_MSG_WARN([Get ssh in order to make check_by_ssh plugin]) +fi + + +AC_PATH_PROG(PATH_TO_MAILQ,mailq) +if test -x "$PATH_TO_MAILQ" +then + AC_DEFINE_UNQUOTED(PATH_TO_MAILQ,"$PATH_TO_MAILQ",[path to mailq]) +else + AC_MSG_WARN([Could not find mailq or eqivalent]) +fi + +AC_PATH_PROG(PATH_TO_QMAIL_QSTAT,qmail-qstat) +if test -x "$PATH_TO_QMAIL_QSTAT" +then + AC_DEFINE_UNQUOTED(PATH_TO_MAILQ,"$PATH_TO_QMAIL_QSTAT",[path to qmail-qstat]) +else + AC_MSG_WARN([Could not find qmail-qstat or eqivalent]) +fi + +dnl SWAP info required is amount allocated/available and amount free +dnl The plugin works through all the swap devices and adds up the total swap +dnl available. +AC_PATH_PROG(PATH_TO_SWAP,swap) +if (test -n "$PATH_TO_SWAP") +then +AC_MSG_CHECKING([for $PATH_TO_SWAP format]) +if [$PATH_TO_SWAP -l 2>&1 >/dev/null] +then + ac_cv_have_swap=yes + ac_cv_swap_command="$PATH_TO_SWAP -l" + if [$PATH_TO_SWAP -l 2>/dev/null | \ + egrep -i "^lswap +path +pri +swaplo +blocks +free +maxswap" \ + >/dev/null] + then + ac_cv_swap_format=[" %*d %*s %*d,%*d %*d %*d %f %f"] + ac_cv_swap_conv=2048 + AC_MSG_RESULT([using IRIX format swap]) + + elif [$PATH_TO_SWAP -l 2>/dev/null | egrep -i "^path +dev +swaplo +blocks +free" >/dev/null] + then + ac_cv_swap_format=["%*s %*[0-9,-] %*d %f %f"] + ac_cv_swap_conv=2048 + AC_MSG_RESULT([using Unixware format swap]) + else + dnl if we don't know what format swap's output is + dnl we might as well pretend we didn't see it + ac_cv_have_swap="" + ac_cv_swap_command="" + fi +fi +dnl end if for PATH_TO_SWAP +fi + +AC_PATH_PROG(PATH_TO_SWAPINFO,swapinfo) +if (test -n "$PATH_TO_SWAPINFO") +then +AC_MSG_CHECKING([for $PATH_TO_SWAPINFO format]) +if [$PATH_TO_SWAPINFO -k 2>&1 | egrep -i "^Device" >/dev/null] +then + ac_cv_have_swap=yes + ac_cv_swap_command="$PATH_TO_SWAPINFO -k" + + if [$PATH_TO_SWAPINFO -k 2>/dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null] + then + ac_cv_swap_format=["%*s %f %*d %f"] + ac_cv_swap_conv=1024 + AC_MSG_RESULT([using FreeBSD format swapinfo]) + fi + +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_format=["%*s %f %*d %f"] + ac_cv_swap_conv=1024 + AC_MSG_RESULT([using HP-UX format swapinfo]) +fi +dnl end if for PATH_TO_SWAPINFO +fi + +AC_PATH_PROG(PATH_TO_LSPS,lsps) +if (test -n "$PATH_TO_LSPS") +then +AC_MSG_CHECKING([for $PATH_TO_LSPS format]) +if [$PATH_TO_LSPS -a 2>/dev/null | egrep -i "^Page Space" > /dev/null] +then + ac_cv_have_swap=yes + ac_cv_swap_command="$PATH_TO_LSPS -a" + ac_cv_swap_format=["%*s %*s %*s %f%*s %f %*s"] + ac_cv_swap_conv=1 + AC_MSG_RESULT([using AIX lsps]) +fi +dnl end if for PATH_TO_SWAPINFO +fi + +dnl +dnl test for swapctl system call, both the 2-arg and 3-arg variants +dnl fwict, the 2-arg is an SVR4 standard, whereas the 3-arg is shared +dnl in the various BSD's +dnl + +AC_CHECK_HEADERS([sys/stat.h sys/param.h]) +AC_CHECK_HEADERS([sys/swap.h], [], [], [ +#ifdef HAVE_SYS_PARAM_H +#include +#endif +]) +AC_CHECK_DECLS([swapctl],,,[ + #include + #include + #include + #include + #include + ]) +AC_CHECK_TYPES([swaptbl_t, swapent_t],,,[ + #include + #include + #include + #include + ]) +AC_CHECK_MEMBERS([struct swapent.se_nblks],,,[ + #include + #include + #include + #include + #include + ]) + +if test "$ac_cv_have_decl_swapctl" = "yes"; +then + EXTRAS="$EXTRAS check_swap" + AC_MSG_CHECKING([for 2-arg (SVR4) swapctl]) + if test "$ac_cv_type_swaptbl_t" = "yes" -a \ + "$ac_cv_type_swapent_t" = "yes"; + then + AC_MSG_RESULT([yes]) + ac_cv_check_swap_swapctl_svr4="1"; + AC_DEFINE([CHECK_SWAP_SWAPCTL_SVR4],1, + [Define if 2-argument SVR4 swapctl exists]) + else + AC_MSG_RESULT([no]) + AC_MSG_CHECKING([for 3-arg (*BSD) swapctl]) + if test "$ac_cv_member_struct_swapent_se_nblks" = "yes"; + then + AC_MSG_RESULT([yes]) + AC_DEFINE([CHECK_SWAP_SWAPCTL_BSD],1, + [Define if 3-argument BSD swapctl exists]) + else + AC_MSG_RESULT([no]) + fi + fi + AC_MSG_CHECKING([for whether swapctl uses blocks or pages]) + if test "$ac_cv_check_swap_swapctl_svr4" = "1"; + then + dnl + dnl the SVR4 spec returns values in pages + dnl + AC_MSG_RESULT([page]) + AC_CHECK_DECLS([sysconf]) + AC_MSG_CHECKING([for system page size]) + if test "$ac_cv_have_decl_sysconf" = "yes"; + then + AC_MSG_RESULT([determined by sysconf(3)]) + ac_cv_swap_conv="(1048576/sysconf(_SC_PAGESIZE))" + else + AC_MSG_WARN([don't know. guessing 4096k]) + ac_cv_swap_conv=256 + fi + else + dnl + dnl the BSD spec returns values in blocks + dnl + AC_MSG_RESULT([blocks (assuming 512b)]) + ac_cv_swap_conv=2048 + fi + AC_DEFINE_UNQUOTED(SWAP_CONVERSION,$ac_cv_swap_conv, + [Conversion factor to MB]) +fi +dnl +dnl end tests for the swapctl system calls +dnl + + +if test "x$ac_cv_have_swap" != "x" +then + AC_DEFINE(HAVE_SWAP,1,[Define if swap/swapinfo command is found]) + EXTRAS="$EXTRAS check_swap" +fi +if test "x$ac_cv_swap_command" != "x" +then + AC_DEFINE_UNQUOTED(SWAP_COMMAND,"$ac_cv_swap_command", + [Path to swap/swapinfo binary, with any args]) + AC_DEFINE_UNQUOTED(SWAP_FORMAT,"$ac_cv_swap_format", + [Format string for parsing swap output]) + AC_DEFINE_UNQUOTED(SWAP_CONVERSION,$ac_cv_swap_conv, + [Conversion factor to MB]) +fi + +dnl dunno why this does not work below - use hack (kbd) +dnl fine on linux, broken on solaris +dnl if /bin/test -e "/proc/meminfo" +AC_MSG_CHECKING([for /proc/meminfo]) +if [cat /proc/meminfo > /dev/null 2>&1] +then + AC_MSG_RESULT([found /proc/meminfo]) + AC_DEFINE(HAVE_PROC_MEMINFO,1,[Define if we have /proc/meminfo]) + AC_DEFINE_UNQUOTED(PROC_MEMINFO,"/proc/meminfo",[path to /proc/meminfo if name changes]) + EXTRAS="$EXTRAS check_swap" +else + AC_MSG_RESULT([no]) +fi + +AC_PATH_PROG(PATH_TO_DIG,dig) +AC_DEFINE_UNQUOTED(PATH_TO_DIG,"$PATH_TO_DIG",[Path to dig command, if present]) +if test -n "$PATH_TO_DIG"; then + EXTRAS="$EXTRAS check_dig" +fi + +if test -f plugins/check_nt.c ; then + EXTRAS="$EXTRAS check_nt" +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*) + AC_DEFINE(__bsd__,1,[bsd specific code in check_dhcp.c]) + ;; + *linux*) + AC_DEFINE(__linux__,1,[sun specific code in check_dhcp.c]) + ;; + *sun* | solaris*) + AC_DEFINE(__sun__,1,[sun specific code in check_dhcp.c]) + ;; + *hpux*) + AC_DEFINE(__hpux__,1,[hpux specific code in check_dhcp.c]) + ;; +esac + +AC_SUBST(EXTRAS) +AC_SUBST(EXTRA_NETOBJS) +AC_SUBST(DEPLIBS) + +AM_GNU_GETTEXT([no-libtool], [need-ngettext]) +AM_GNU_GETTEXT_VERSION(0.11.5) + +dnl Check for Redhat spopen problem +dnl Wierd problem where ECHILD is returned from a wait call in error +dnl Only appears to affect nslookup and dig calls. Only affects redhat around +dnl 2.6.9-11 (okay in 2.6.9-5). Redhat investigating root cause +dnl We patch plugins/popen.c +if echo $ac_cv_uname_r | egrep "\.EL$" >/dev/null 2>&1 ; then + AC_MSG_CHECKING(for redhat spopen problem) + ( cd config_test && make && make test ) > /dev/null 2>&1 + if test $? -eq 0 ; then + AC_MSG_RESULT(okay) + else + AC_MSG_RESULT(error) + AC_DEFINE(REDHAT_SPOPEN_ERROR, 1, "Problem on redhat with spopen") + fi +fi + +dnl External libraries - see ACKNOWLEDGEMENTS +np_COREUTILS +np_CURL + +AC_OUTPUT( + Makefile + lib/Makefile + m4/Makefile + plugins/Makefile + plugins-scripts/Makefile + plugins-scripts/subst + plugins-scripts/utils.pm + plugins-scripts/utils.sh + command.cfg + test.pl + pkg/solaris/pkginfo + intl/Makefile + po/Makefile.in +) + +ACX_FEATURE([with],[perl]) +ACX_FEATURE([with],[cgiurl]) +ACX_FEATURE([with],[nagios-user]) +ACX_FEATURE([with],[nagios-group]) +ACX_FEATURE([with],[trusted-path]) +ACX_FEATURE([with],[ping-command]) +ACX_FEATURE([with],[ping6-command]) +ACX_FEATURE([with],[lwres]) +ACX_FEATURE([with],[ipv6]) +ACX_FEATURE([with],[openssl]) +ACX_FEATURE([enable],[emulate-getaddrinfo]) diff --git a/contrib/README.TXT b/contrib/README.TXT new file mode 100644 index 0000000..bd9df3c --- /dev/null +++ b/contrib/README.TXT @@ -0,0 +1,56 @@ +Contrib Plugins README +---------------------- + +This directory contains plugins which have been contributed by various people, but that +have not yet been incorporated into the core plugins distribution. + +Most Perl plugins should work without modification. Some of the C plugins may require +a few tweaks to compile. + +If you have questions regarding the use of these plugins, try contacting the author(s) +or post a message to the nagiosplug-help mailing list (nagiosplug-help@lists.sourceforge.net) +requesting assistance. + + + +Contrib Tarballs +---------------- + +In addition to the plugins located in this directory, there are some additional tarballs +containing plugins in the tarballs/ subdirectory. They have not yet been organized. +A brief description of their contents follows. + + +berger-ping.tar.gz - Perl script version of the check_ping plugin and a corresponding + CGI (mtr.cgi) that uses mtr to traceroute a path to a host. + (Gary Berger) + +bowen-langley_plugins.tar.gz + - Several C plugins including check_inode, check_boot, etc. + (Adam Bown & Thomas Langley) + + +check_bgp-1.0.tar.gz - Perl script intended for monitoring BGP sessions on Cisco routers. + Uses Net::Telnet to telnet into a cisco router and + run "sh ip bgp" + +check_memory.tgz - C plugin to check available system memory + +check_radius.tar.gz - C program to check RADIUS authentication. This is a hacked version of + the Cistron Radiusd program radtest that acts as a plugin for Nagios. + The vast majority of the code was written by someone at Livingston + Enterprises and Cistron. NOTE: Due to the copyright restrictions in + this code, it cannot be distributed under the GPL license, and thus + will not appear in the core plugin distribution! + (Adam Jacob) + +radius.tar.gz - Code modifications necessary to make the radexample app + supplied with the radiusclient code work as a RADIUS plugin + for Nagios (Nick Shore) + +fetchlog-0.94.tar.gz - C program: The fetchlog utility displays the last new messages of a + logfile. It is similar like tail(1) but offers some extra functionality + for output formatting. fetchlog can be used standalone or as a Nagios + plugin to monitor local logfiles or together with Net-SNMP to monitor + remote logfiles. The README shows how to setup fetchlog for Nagios. + (Alexander Haderer) diff --git a/contrib/aix/check_failed b/contrib/aix/check_failed new file mode 100644 index 0000000..50cdf7e --- /dev/null +++ b/contrib/aix/check_failed @@ -0,0 +1,48 @@ +#!/usr/bin/perl +#====================== +# Created May 25, 2000 +#====================== + +# This scripts is for checking for failed root login attempts on +# any machine running AIX which has a failedlogin file in /etc/security +# The purpose is to thwart (good word) any unauthorised people from +# even trying to log in as root. This plugin has been developed for Nagios +# running on AIX. +# Lonny Selinger SpEnTBoY lonny@abyss.za.org +# May + + +my $server = $ARGV[0]; + +if (!$ARGV[0]) { + print "You must specify a server to check\n"; + print "usage: ./check_failed \n"; + exit (-1); + } else { + open (DATE, "/bin/date '+%b %d' |"); + while () { + $dline = $_; + @dresults = $dline; + chop $dresults[0]; + } + open (SULOG, "rsh $server -l root who /etc/security/failedlogin | grep root |"); + while () { + $line = $_; + @results = split (/\s+/,$line); + if ($line =~ /^root/) { + if (join(' ', @results[2,3]) eq $dresults[0]) { + print "FAILED root login on $dresults[0], node: $ARGV[0] from $results[5]\n"; + exit(2); + } + } + } +} +if (join(' ', @results[2,3]) ne $dresults[0]) { + print "No Failed Root Logins on This Node\n"; + exit(0); +} +exit(0); +close(SULOG); +close(DATE); + + diff --git a/contrib/aix/check_io b/contrib/aix/check_io new file mode 100644 index 0000000..58b25f6 --- /dev/null +++ b/contrib/aix/check_io @@ -0,0 +1,69 @@ +#! /bin/sh + +#================================================================= +# +# I/O Checker (KBPS) +# This Script uses iostat to monitor disk io +# Useful for notifications of disk thrashing. +# +# Authors: TheRocker +# SpEnTBoY +# +# Email: therocker@pawprints.2y.net +# lonny@abyss.za.org +# +#================================================================ + +NUMBER1=`rsh $1 -l root iostat -d | grep -e "hdisk" | tr -s ' ' | cut -d' ' -f2 | sort -2 -r | cut -c1 | line` +NUMBER2=`rsh $1 -l root iostat -d | grep -e "hdisk" | tr -s ' ' | cut -d' ' -f2 | sort -2 -r | cut -c2 | line` +TMPFILE=/tmp/iotest.hndl +TMPTOO=/tmp/iotwo.hndl + +#=========================================================== +# +# We do an evaluation on $NUMBER1 and $NUMBER2 to see if +# disk io is exceeding 40%. +# +#=========================================================== + +if [ "$NUMBER1" -gt 4 ] && [ "$NUMBER2" -gt 0 ] +then + + `rsh $1 -l root iostat -d | grep -v cd0 | tr -s ' '| cut -d' ' -f1,2 | grep -e "4[0-9]." >> $TMPFILE` + +#==================================================================== +# +# Of course, there may be more than one hard disk on the node +# so we use this bit of code to report on more than one instance +# of excessive disk IO. +# +#==================================================================== + + LINES=`wc -l /tmp/iotest.hndl | cut -c8` + LINESCTL=`wc -l /tmp/iotest.hndl | cut -c8 ` + echo "WARNING!!! Disk I/O Exceeding 40% on --> \c" + + while [ $LINESCTL != 0 ] + do + + cat $TMPFILE | tail -$LINESCTL > $TMPTOO + cat $TMPTOO > $TMPFILE + LINESCTL=$(( $LINESCTL -1 )) + LINES=$(( $LINES -1 )) + DATA=`head -1 /tmp/iotest.hndl` + echo "( $DATA ) " + + + done + echo "\n" + + rm -f $TMPFILE + rm -f $TMPTOO + exit 1 + +else + + print "No Disk I/O Exceeding 40%...OK" + exit 0 + +fi diff --git a/contrib/aix/check_kerberos b/contrib/aix/check_kerberos new file mode 100644 index 0000000..443ab10 --- /dev/null +++ b/contrib/aix/check_kerberos @@ -0,0 +1,49 @@ +#! /bin/sh + +#========================================================================= +# Kerberos Ticket Checker +# +# This script is handy if you allow kerberos tickets to expire +# on your nodes. The script will simply warn you when a node has +# kerberos tickets expiring on the current date. This will allow to +# re-initialize the tickets if you wish to do so. +# +# Nothing fancy here, all Nagios will show is the number of tickets +# that are going to (or already have) expired. +# +# An item of note: +# +# We made no provisions for the weekend. If tickets expire on the +# weekend and nobody is around, you won't see a warning on the +# Nagios console because we look for expired on the current day +# only. It's a good idea to have this warning emailed to the +# appropriate admin and if there is something critical that relies +# on Kerberos, you might want to send a page. +# +# Authors: TheRocker +# SpEnTBoY +# +# Email: therocker@pawprints.2y.net +# lonny@abyss.za.org +#========================================================================= + +TMPFILE=/tmp/kerbtmp.hndl +DATE=`date +%b' '%d` + +rsh $1 -l root /usr/lpp/ssp/kerberos/bin/klist | tr -s ' ' | cut -d' ' -f4,5,6 | grep -e "$DATE" > $TMPFILE + + +if [ -s $TMPFILE ] +then + + LINES=`wc -l /tmp/kerbtmp.hndl | cut -c7-8` + echo "Kerberos Tickets set to expire --> \c" + echo "$LINES \c" + echo "\n" + + rm -f $TMPFILE + exit 1 + +fi + echo "Kerberos Tickets are valid" + exit 0 diff --git a/contrib/aix/check_queue b/contrib/aix/check_queue new file mode 100644 index 0000000..9f709c5 --- /dev/null +++ b/contrib/aix/check_queue @@ -0,0 +1,67 @@ +#! /bin/sh + +#=============================================================== +# Print Queue Checker +# +# The print queue checker simply looks for an occurance of a +# DOWN queue. A note of warning, if you use remote queues in +# AIX to redirect print jobs from the AIX queue to an NT print +# server that print through DLC rather than IP, it will be very +# s - l - o - w. But it will work. +# +# Author: TheRocker +# Email: therocker@pawprints.2y.net +#=============================================================== + +TMPFILE=/tmp/qtmp.hndl +TMPTOO=/tmp/qtwo.hndl + +#======================================================================= +# +# This script will also work on AIX 4.2.1 BUT you have to change +# the following line. AIX 4.2.1 does not support the -W option +# with lpstat. For AIX 4.2.1 just remove the -W option and it should +# work just fine. +# +#======================================================================= + +`rsh $1 -l root lpstat -W | grep -e "DOWN" | tr -s ' ' | cut -d' ' -f1,3 > /tmp/qtmp.hndl 2> /tmp/q_err` + +if [ -s $TMPFILE ] +then + +#======================================================= +# +# If you've seen the other AIX scripts I wrote you may +# notice that I use this bit of code a lot. Well it +# works and appears to be all purpose. +# +#======================================================= + + LINES=`wc -l /tmp/qtmp.hndl | cut -c8` + LINESCTL=`wc -l /tmp/qtmp.hndl | cut -c8` + + echo "Print Queue DOWN --> \c" + + while [ $LINESCTL != 0 ] + do + + cat $TMPFILE | tail -$LINESCTL > $TMPTOO + cat $TMPTOO > $TMPFILE + LINESCTL=$(( $LINESCTL -1 )) + LINES=$(( $LINES -1 )) + DATA=`head -1 /tmp/qtmp.hndl` + echo "( $DATA ) \c" + + + done + + echo "\n" + + rm -f $TMPFILE + rm -f $TMPTOO + exit 2 + +fi + echo "Print Queues Running... OK" + exit 0 diff --git a/contrib/aix/pg_stat b/contrib/aix/pg_stat new file mode 100644 index 0000000..e0603ec --- /dev/null +++ b/contrib/aix/pg_stat @@ -0,0 +1,45 @@ +#!/bin/ksh + +#============================================================================== +# Script was originally created to collect stats and dump then to a log file +# every five minutes. But we like this better (the log file thing is still +# good if you want to track availability). +# +# Authors: SpEnTBoY +# TheRocker +# +# Email: lonny@abyss.za.org +# therocker@pawprints.2y.net +#============================================================================== + +#========================================================================================= +# +# The best way to do this is to use Kerberos but we use rsh here because our monitoring +# workstation doesn't have Kerberos installed. In order for this to work, the remote +# host ($1) must have a .rhosts file that contains a line like: +# +# monitorhost nagiosuser +# +#========================================================================================= + +PAGING2=`rsh $1 -l root lsps -a -s | grep -v Paging | tr -s ' '| cut -d' ' -f3 | cut -d'%' -f1` + + +if [ "$PAGING2" -gt "35" ] && [ "$PAGING2" -lt "50" ] +then + echo "Paging Space is over 35% ("$PAGING2")%" +exit 1 +fi + +if [ "$PAGING2" -gt "49" ] +then + echo "WARNING! Paging Space is over 50% ("$PAGING2")%" +exit 2 +fi + +if [ "$PAGING2" -lt "34" ] +then + echo "Paging Space is less than 34% ("$PAGING2")%" +exit 0 +fi + diff --git a/contrib/check_adptraid.sh b/contrib/check_adptraid.sh new file mode 100644 index 0000000..6409c56 --- /dev/null +++ b/contrib/check_adptraid.sh @@ -0,0 +1,75 @@ +#! /bin/sh +# +# Modified check_sensors to check the alarm status of an Adaptec 3200S RAID +# controller. +# +# Scott Lambert -- lambert@lambertfam.org +# +# Tested on FreeBSD 4.7 with the adptfbsd_323.tgz package installed. This +# package installs all it's programs into /usr/dpt. +# + +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin + +PROGNAME=`basename $0` +PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` +REVISION=`echo '$Revision: 1.1 $' | sed -e 's/[^0-9.]//g'` + +. $PROGPATH/utils.sh + +RAIDUTIL_CMD="/usr/dpt/raidutil -A ?" + +print_usage() { + echo "Usage: $PROGNAME" +} + +print_help() { + print_revision $PROGNAME $REVISION + echo "" + print_usage + echo "" + echo "This plugin checks alarm status of Adaptec 3200S RAID controller." + echo "" + support + exit 0 +} + +case "$1" in + --help) + print_help + exit 0 + ;; + -h) + print_help + exit 0 + ;; + --version) + print_revision $PROGNAME $REVISION + exit 0 + ;; + -V) + print_revision $PROGNAME $REVISION + exit 0 + ;; + *) + raidutiloutput=`$RAIDUTIL_CMD 2>&1` + status=$? + if test "$1" = "-v" -o "$1" = "--verbose"; then + echo ${raidutiloutput} + fi + if test ${status} -eq 127; then + echo "RAIDUTIL UNKNOWN - command not found (did you install raidutil?)" + exit -1 + elif test ${status} -ne 0 ; then + echo "WARNING - raidutil returned state $status" + exit 1 + fi + if echo ${raidutiloutput} | egrep On > /dev/null; then + echo RAID CRITICAL - RAID alarm detected! + exit 2 + else + echo raid ok + exit 0 + fi + ;; +esac diff --git a/contrib/check_apache.pl b/contrib/check_apache.pl new file mode 100644 index 0000000..b9e69a0 --- /dev/null +++ b/contrib/check_apache.pl @@ -0,0 +1,283 @@ +#!/usr/bin/perl +# +# (c)2001 Sebastian Hetze, Linux Information Systems AG +# send bug reports to +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# you should have received a copy of the GNU General Public License +# along with this program (or with Nagios); if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA +# +# +# Check apache status information provided by mod_status to find +# out about the load (number of servers working) and the +# performance (average response time for recent requests). +# +# Usage: +# check_apache -H [-lhV] [-w ] [-c ] [-u ] +# +# check_apache (if you cannot avoid it) +# + +use LWP::UserAgent; +use URI::URL; +use Getopt::Long; +Getopt::Long::Configure('bundling'); + +$version=0.01; + +my %ERRORS = ('UNKNOWN' , '-1', + 'OK' , '0', + 'WARNING', '1', + 'CRITICAL', '2'); + + +# +# some default values +# +$perf_w=500; +$perf_c=1000; +$load_w=20; +$load_c=30; +$TIMEOUT=15; + +# +# get command line options the regular way +# +GetOptions + ("V" => \$opt_V, "version" => \$opt_V, + "h" => \$opt_h, "help" => \$opt_h, + "l" => \$opt_l, "load" => \$opt_l, + "v" => \$verbose, "verbose" => \$verbose, + "w=s" => \$opt_w, "warning=s" => \$opt_w, + "c=s" => \$opt_c, "critical=s" => \$opt_c, + "H=s" => \$opt_H, "hostname=s" => \$opt_H, + "u=s" => \$opt_u, "url=s" => \$opt_u); + +# +# handle the verbose stuff first +# +if ($opt_V) { + print "\n"; + print "check_apache nagios plugin version $version\n"; + print "\n"; + print "The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\n"; + print "copies of the plugins under the terms of the GNU General Public License.\n"; + print "For more information about these matters, see the file named COPYING.\n"; + print "\n"; + print "Copyright (c) 2001 Sebastian Hetze Linux Information Systems AG\n"; + print "\n"; + print "\n"; + exit $ERRORS{'UNKNOWN'}; +} + +if ($opt_h) { + print_help(); + exit $ERRORS{'UNKNOWN'}; +} + +# +# now get options the weired way and set the defaults +# if nothing else is provided +# +$opt_H = shift unless ($opt_H); +print_usage() unless ($opt_H); + +if($opt_l) { + $autostring="?auto"; + ($opt_w) || ($opt_w = shift) || ($opt_w = $load_w); + $warn = $1 if ($opt_w =~ /([0-9]+)/); + ($opt_c) || ($opt_c = shift) || ($opt_c = $load_c); + $alert = $1 if ($opt_c =~ /([0-9]+)/); +} else { + $autostring=""; + ($opt_w) || ($opt_w = shift) || ($opt_w = $perf_w); + $warn = $1 if ($opt_w =~ /([0-9]+)/); + ($opt_c) || ($opt_c = shift) || ($opt_c = $perf_c); + $alert = $1 if ($opt_c =~ /([0-9]+)/); +} + +($opt_u) || ($opt_u = shift) || ($opt_u = "/server-status"); + + +# +# dont let us wait forever... +# +$SIG{'ALRM'} = sub { + print ("ERROR: No response from HTTP server (alarm)\n"); + exit $ERRORS{"UNKNOWN"}; +}; +alarm($TIMEOUT); + + +# +# now we set things up for the real work +# and fire up the request +# +$ua = new LWP::UserAgent; +$ua->agent("Nagios/0.1 " . $ua->agent); + + +$urlstring = "http://" . $opt_H . $opt_u . $autostring; +$url = url($urlstring); + +my $req = new HTTP::Request 'GET', $url; +my $res = $ua->request($req); + +# +# hopefully weve got something usefull +# +if ($res->is_success) { + if($opt_l) { + foreach $_ (split /^/m, $res->content) { + next if /^\s*$/; +# +# this is the load checking section +# we parse the whole content, just in case someone +# wants to use this some day in the future +# + if (/^Total Accesses:\s+([0-9.]+)/) { $accesses = $1; next; } + if (/^Total kBytes:\s+([0-9.]+)/) { $kbytes = $1; next; } + if (/^CPULoad:\s+([0-9.]+)\s+/) { $load = $1; next; } + if (/^Uptime:\s+([0-9.]+)\s+/) { $uptime = $1; next; } + if (/^ReqPerSec:\s+([0-9.]+)\s+/) { $rps = $1; next; } + if (/^BytesPerSec:\s+([0-9.]+)\s+/) { $bps = $1; next; } + if (/^BytesPerReq:\s+([0-9.]+)\s+/) { $bpr = $1; next; } + if (/^BusyServers:\s+([0-9.]+)\s+/) { $busy = $1; next; } + if (/^IdleServers:\s+([0-9.]+)\s+/) { $idle = $1; next; } + if (/^Scoreboard:\s+([SRWKDLG_.]+)\s+/) { $score = $1; next; } + print "Unknown Status\n"; + exit $ERRORS{"UNKNOWN"}; + } +# +# now we even parse the whole scoreboard, just for fun +# + foreach $scorepoint (split //m, $score) { + if($scorepoint eq '.') { $scores{'.'}+=1; next; } # Unused + if($scorepoint eq '_') { $scores{'_'}+=1; next; } # Waiting + if($scorepoint eq 'S') { $scores{'S'}+=1; next; } # Starting + if($scorepoint eq 'R') { $scores{'R'}+=1; next; } # Reading + if($scorepoint eq 'W') { $scores{'W'}+=1; next; } # Writing + if($scorepoint eq 'K') { $scores{'K'}+=1; next; } # Keepalive + if($scorepoint eq 'D') { $scores{'D'}+=1; next; } # DNS Lookup + if($scorepoint eq 'L') { $scores{'L'}+=1; next; } # Logging + if($scorepoint eq 'G') { $scores{'G'}+=1; next; } # Going + } + + if($busy>$alert) { + printf "HTTPD CRITICAL: %.0f servers running\n", $busy; + exit $ERRORS{"CRITICAL"}; + } + if($busy>$warn) { + printf "HTTPD WARNING: %.0f servers running\n", $busy; + exit $ERRORS{"WARNING"}; + } + printf "HTTPD ok: %.0f servers running, %d idle\n", $busy, $idle; + exit $ERRORS{"OK"}; + + } else { +# +# this is the performance check section +# We are a bit lazy here, no parsing of the initial data +# block and the scoreboard. +# However, you have the whole set of per server +# information to play with ;-) +# The actual performance is measured by adding up the +# milliseconds required to process the most recent +# requests of all instances and then taking the average. +# + foreach $tablerow (split //m, $res->content) { + ($empty,$Srv,$PID,$Acc,$M,$CPU,$SS,$Req,$Conn,$Child,$Slot,$Client,$VHost,$Request) + = split //, $tablerow; + if($Req) { + $lines+=1; + $req_sum+=$Req; + } + undef $Req; + } + $average=$req_sum/$lines; + if($average>$alert) { + printf "HTTPD CRITICAL: average response time %.0f + milliseconds\n", $average; + exit $ERRORS{"CRITICAL"}; + } + if($average>$warn) { + printf "HTTPD WARNING: average response time %.0f + milliseconds\n", $average; + exit $ERRORS{"WARNING"}; + } + if($average>0) { + printf "HTTPD ok: average response time %.0f milliseconds\n", + $average; + exit $ERRORS{"OK"}; + } + print "Unknown Status\n"; + exit $ERRORS{"UNKNOWN"}; + } +} else { + print "HTTP request failed\n"; + exit $ERRORS{"CRITICAL"}; +} + + +# +# ok, now we are almost through +# These last subroutines do the things for those that do not +# read source code. +# +sub print_usage () { + print "Usage: $0 -H [-lhV] [-w ] [-c ] [-u ]\n"; } + +sub print_help () { + print "\n"; + print "\n"; + print "check_apache nagios plugin version $version\n"; + print "\n"; + print "The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\n"; + print "copies of the plugins under the terms of the GNU General Public License.\n"; + print "For more information about these matters, see the file named COPYING.\n"; + print "\n"; + print "Copyright (c) 2001 Sebastian Hetze Linux Information Systems AG\n"; + print "\n"; + print "\n"; + print "This plugin checks the apache HTTP service on the specified host.\n"; + print "It uses the mod_status facilities provided by the apache server.\n"; + print "The monitoring server must be authorized in httpd.conf.\n"; + print "\n"; + print "\n"; + print_usage(); + print "\n"; + print "Options:\n"; + print " -H, --hostname=ADDRESS\n"; + print " host name argument for server.\n"; + print " -l, --load\n"; + print " check load instead of performance.\n"; + print " -h, --help\n"; + print " print detailed help screen.\n"; + print " -V, --version\n"; + print " print version information.\n"; + print " -w, --warning=INTEGER\n"; + print " load / performance level at which a warning message will be gererated.\n"; + print " -c, --critical=INTEGER\n"; + print " load / performance level at which a critical message will be gererated.\n"; + print " -u, --url=PATH\n"; + print " location to call mod_status.\n"; + print "\n"; + print " Defaults for performance checking are $perf_w/$perf_c msec.\n"; + print " Defaults for load checking are $load_w/$load_c servers running.\n"; + print "\n"; + print "\n"; +} +# +# the end +# diff --git a/contrib/check_apc_ups.pl b/contrib/check_apc_ups.pl new file mode 100644 index 0000000..f4c078e --- /dev/null +++ b/contrib/check_apc_ups.pl @@ -0,0 +1,307 @@ +#! /usr/bin/perl -wT +# +# Check_apc_ups - Check APC UPS status via SNMP +# Shamelessly copied from check_breeze.pl +# +# To do: +# - Send SNMP queries directly, instead of forking `snmpget`. +# - Make the status less verbose. Maybe we can send an "onLine, time +# remaining: hh:mm:ss" if all is well, and a list of specific problems +# if something is broken. + +use strict; +use Getopt::Long; +use vars qw($opt_V $opt_h $opt_H $opt_T $opt_t $opt_R $opt_r + $opt_L $opt_l $PROGNAME); +use lib utils.pm; +use utils qw(%ERRORS &print_revision &support &usage); + +sub print_help (); +sub print_usage (); +sub get_snmp_int_val ($); +sub escalate_exitval ($); + +$ENV{'PATH'}=''; +$ENV{'BASH_ENV'}=''; +$ENV{'ENV'}=''; + +Getopt::Long::Configure('bundling'); +GetOptions + ("V" => \$opt_V, "version" => \$opt_V, + "h" => \$opt_h, "help" => \$opt_h, + "T=s" => \$opt_T, "temp-critical" => \$opt_T, + "t=s" => \$opt_t, "temp-warning" => \$opt_t, + "R=s" => \$opt_R, "runtime-critical" => \$opt_R, + "r=s" => \$opt_r, "runtime-warning" => \$opt_r, + "L=s" => \$opt_L, "load-critical" => \$opt_L, + "l=s" => \$opt_l, "load-warning" => \$opt_l, + "H=s" => \$opt_H, "hostname=s" => \$opt_H); + +if ($opt_V) { + print_revision($PROGNAME,'$Revision: 1.2 $'); + exit $ERRORS{'OK'}; +} + +if ($opt_h) {print_help(); exit $ERRORS{'OK'};} + +($opt_H) || ($opt_H = shift) || usage("Host name/address not specified\n"); +my $host = $1 if ($opt_H =~ /([-.A-Za-z0-9]+)/); +($host) || usage("Invalid host: $opt_H\n"); + +# Defaults + +$opt_R *= 60 * 100 if (defined $opt_R); # Convert minutes to secs/100 +$opt_r *= 60 * 100 if (defined $opt_R); + +my $tempcrit = $opt_T || 60; +my $tempwarn = $opt_t || 40; +my $runtimecrit = $opt_R || 30 * 60 * 100; # Secs / 100 +my $runtimewarn = $opt_r || 60 * 60 * 100; +my $loadcrit = $opt_L || 85; +my $loadwarn = $opt_l || 50; + +if ($tempcrit !~ /\d+/) { usage ("Invalid critical temperature threshold.\n"); } +if ($tempwarn !~ /\d+/) { usage ("Invalid critical temperature threshold.\n"); } + +if ($runtimecrit !~ /\d+/) { + usage ("Invalid critical run time threshold.\n"); +} +if ($runtimewarn !~ /\d+/) { + usage ("Invalid warning run time threshold.\n"); +} + +if ($loadcrit !~ /\d+/ || $loadcrit < 0 || $loadcrit > 100) { + usage ("Invalid critical load threshold.\n"); +} +if ($loadwarn !~ /\d+/ || $loadwarn < 0 || $loadwarn > 100) { + usage ("Invalid warning load threshold.\n"); +} + + +# APC UPS OIDs +# APC MIBs are available at ftp://ftp.apcftp.com/software/pnetmib/mib +my $upsBasicOutputStatus = ".1.3.6.1.4.1.318.1.1.1.4.1.1.0"; +my $upsBasicBatteryStatus = ".1.3.6.1.4.1.318.1.1.1.2.1.1.0"; +my $upsAdvInputLineFailCause = ".1.3.6.1.4.1.318.1.1.1.3.2.5.0"; +my $upsAdvBatteryTemperature = ".1.3.6.1.4.1.318.1.1.1.2.2.2.0"; +my $upsAdvBatteryRunTimeRemaining = ".1.3.6.1.4.1.318.1.1.1.2.2.3.0"; +my $upsAdvBatteryReplaceIndicator = ".1.3.6.1.4.1.318.1.1.1.2.2.4.0"; +my $upsAdvOutputLoad = ".1.3.6.1.4.1.318.1.1.1.4.2.3.0"; +my $upsAdvTestDiagnosticsResults = ".1.3.6.1.4.1.318.1.1.1.7.2.3.0"; + +my @outputStatVals = ( + [ undef, undef ], # pad 0 + [ undef, undef ], # pad 1 + [ "onLine", $ERRORS{'OK'} ], # 2 + [ "onBattery", $ERRORS{'WARNING'} ], # 3 + [ "onSmartBoost", $ERRORS{'WARNING'} ], # 4 + [ "timedSleeping", $ERRORS{'WARNING'} ], # 5 + [ "softwareBypass", $ERRORS{'WARNING'} ], # 6 + [ "off", $ERRORS{'CRITICAL'} ], # 7 + [ "rebooting", $ERRORS{'WARNING'} ], # 8 + [ "switchedBypass", $ERRORS{'WARNING'} ], # 9 + [ "hardwareFailureBypass", $ERRORS{'CRITICAL'} ], # 10 + [ "sleepingUntilPowerReturn", $ERRORS{'CRITICAL'} ], # 11 + [ "onSmartTrim", $ERRORS{'WARNING'} ], # 12 +); + +my @failCauseVals = ( + undef, + "noTransfer", + "highLineVoltage", + "brownout", + "blackout", + "smallMomentarySag", + "deepMomentarySag", + "smallMomentarySpike", + "largeMomentarySpike", + "selfTest", + "rateOfVoltageChnage", +); + +my @battStatVals = ( + [ undef, undef ], # pad 0 + [ undef, undef ], # pad 1 + [ "batteryNormal", $ERRORS{'OK'} ], # 2 + [ "batteryLow", $ERRORS{'CRITICAL'} ], # 3 +); + +my @battReplVals = ( + [ undef, undef ], # pad 0 + [ "noBatteryNeedsReplacing", $ERRORS{'OK'} ], # 1 + [ "batteryNeedsReplacing", $ERRORS{'CRITICAL'} ], # 2 +); + +my @diagnosticsResultsVals = ( + [ undef, undef ], # pad 0 + [ "OK", $ERRORS{'OK'} ], # 1 + [ "failed", $ERRORS{'CRITICAL'} ], # 2 + [ "invalidTest", $ERRORS{'CRITICAL'} ], # 3 + [ "testInProgress", $ERRORS{'OK'} ], # 4 +); + +my $exitval = $ERRORS{'UNKNOWN'}; +my $data; +my $onbattery = 3; + +$data = get_snmp_int_val( $upsBasicOutputStatus ); + +print "Output status: "; +if (defined ($data) && defined ($outputStatVals[$data][0])) { + print "$outputStatVals[$data][0] | "; + escalate_exitval($outputStatVals[$data][1]); +} else { + print "unknown | "; +} + +$data = get_snmp_int_val( $upsAdvBatteryRunTimeRemaining ); + +print "Rem time: "; +if (defined ($data)) { + my $hrs = int($data / (60 * 60 * 100)); # Data is hundredths of a second + my $mins = int($data / (60 * 100)) % 60; + my $secs = ($data % 100) / 100; + printf "%d:%02d:%05.2f | ", $hrs, $mins, $secs; + if ($data <= $runtimecrit) { + escalate_exitval($ERRORS{'CRITICAL'}); + } elsif ($data <= $runtimewarn) { + escalate_exitval($ERRORS{'WARNING'}); + } else { + escalate_exitval($ERRORS{'OK'}); + } +} else { + print "unknown | "; +} + +$data = get_snmp_int_val( $upsBasicBatteryStatus ); + +print "Battery status: "; +if (defined ($data) && defined ($battStatVals[$data][0])) { + my $failcause = "unknown"; + my $fc = get_snmp_int_val( $upsAdvInputLineFailCause ); + if ($data == $onbattery) { + if (defined ($failCauseVals[$fc])) { $failcause = $failCauseVals[$fc]; } + print "$battStatVals[$data][0] ($failcause) | "; + } else { + print "$battStatVals[$data][0] | "; + } + escalate_exitval($battStatVals[$data][1]); +} else { + print "unknown | "; +} + +$data = get_snmp_int_val( $upsAdvBatteryTemperature ); + +print "Battery temp(C): "; +if (defined ($data)) { + print "$data | "; + if ($data >= $tempcrit) { + escalate_exitval($ERRORS{'CRITICAL'}); + } elsif ($data >= $tempwarn) { + escalate_exitval($ERRORS{'WARNING'}); + } else { + escalate_exitval($ERRORS{'OK'}); + } +} else { + print "unknown | "; +} + +$data = get_snmp_int_val( $upsAdvBatteryReplaceIndicator ); + +print "Battery repl: "; +if (defined ($data) && defined ($battReplVals[$data][0])) { + print "$battReplVals[$data][0] | "; + escalate_exitval($battReplVals[$data][1]); +} else { + print "unknown | "; +} + +$data = get_snmp_int_val( $upsAdvOutputLoad ); + +print "Output load (%): "; +if (defined ($data)) { + print "$data | "; + if ($data >= $loadcrit) { + escalate_exitval($ERRORS{'CRITICAL'}); + } elsif ($data >= $loadwarn) { + escalate_exitval($ERRORS{'WARNING'}); + } else { + escalate_exitval($ERRORS{'OK'}); + } +} else { + print "unknown | "; +} + +$data = get_snmp_int_val( $upsAdvTestDiagnosticsResults ); + +print "Diag result: "; +if (defined ($data) && defined ($diagnosticsResultsVals[$data][0])) { + print "$diagnosticsResultsVals[$data][0]\n"; + escalate_exitval($diagnosticsResultsVals[$data][1]); +} else { + print "unknown\n"; +} + + +exit $exitval; + + +sub print_usage () { + print "Usage: $PROGNAME -H -T temp -t temp -R minutes -r minutes\n"; + print " -L percent -l percent\n"; +} + +sub print_help () { + print_revision($PROGNAME,'$Revision: 1.2 $'); + print "Copyright (c) 2001 Gerald Combs/Jeffrey Blank/Karl DeBisschop + +This plugin reports the status of an APC UPS equipped with an SNMP management +module. + +"; + print_usage(); + print " +-H, --hostname=HOST + Name or IP address of host to check +-T --temp-critical + Battery degrees C above which a CRITICAL status will result (default: 60) +-t --temp-warning + Battery degrees C above which a WARNING status will result (default: 40) +-R --runtime-critical + Minutes remaining below which a CRITICAL status will result (default: 30) +-r --runtime-warning + Minutes remaining below which a WARNING status will result (default: 60) +-L --load-critical + Output load pct above which a CRITICAL status will result (default: 85 +-l --load-warning + Output load pct above which a WARNING status will result (default: 50 + +"; + support(); +} + +sub get_snmp_int_val ($) { + my $val=0; + my $oid = shift(@_); + + $val = `/usr/bin/snmpget $host public $oid 2> /dev/null`; + my @test = split(/ /,$val,3); + + return undef unless (defined ($test[2])); + + if ($test[2] =~ /\(\d+\)/) { # Later versions of UCD SNMP + ($val) = ($test[2] =~ /\((\d+)\)/); + } elsif ($test[2] =~ /: \d+/) { + ($val) = ($test[2] =~ /: (\d+)/); + } else { + $val = $test[2]; + } + + return $val; +} + +sub escalate_exitval ($) { + my $newval = shift(@_); + + if ($newval > $exitval) { $exitval = $newval; } +} diff --git a/contrib/check_appletalk.pl b/contrib/check_appletalk.pl new file mode 100644 index 0000000..b8fe16f --- /dev/null +++ b/contrib/check_appletalk.pl @@ -0,0 +1,210 @@ +#! /usr/bin/perl -wT +# +# check_atalk_ping plugin for nagios +# +# usage: +# check_atalk_ping atalkaddress +# +# Checks if an atalkhost responds to an atalk echo +# using "aecho" +# +# initial version: 23 October 2002 by Stefan Beck, IT Software Solutions +# current status: $Revision: 1.1 $ +# +# Copyright Notice: GPL +# +BEGIN { + if ( $0 =~ m/^(.*?)[\/\\]([^\/\\]+)$/ ) { + $runtimedir = $1; + $PROGNAME = $2; + } + delete $ENV{'LANG'}; +} + +use strict; +use lib utils.pm; + +use utils qw($TIMEOUT %ERRORS &print_revision &support); +use vars qw($PROGNAME); + +$PROGNAME = "check_atalk"; + +my ( + $verbose, $host, $warning_avg, $warning_loss, + $critical_avg, $critical_loss, $count, $cmd, + $avg, $loss, $line +); +my ( $opt_c, $opt_w, $opt_H, $opt_p ); +$opt_c = $opt_w = $opt_p = $opt_H = ''; + +sub print_help (); +sub print_usage (); +sub help (); +sub version (); + +# Just in case of problems, let's not hang NetSaint +$SIG{'ALRM'} = sub { + print "Plugin Timeout\n"; + exit 2; +}; +alarm($TIMEOUT); + +delete @ENV{ 'PATH', 'IFS', 'CDPATH', 'ENV', 'BASH_ENV' }; + +use Getopt::Long; +Getopt::Long::Configure( 'bundling', 'no_ignore_case' ); +GetOptions( + "V|version" => \&version, + "h|help" => \&help, + "p|packets=i" => \$opt_p, + "c|critical=s" => \$opt_c, + "w|warning=s" => \$opt_w, + "H|hostname=s" => \$opt_H +); + + +# appletalk hostname ot address +$opt_H = shift unless ($opt_H); +unless ($opt_H) { print_usage (); exit $ERRORS{'UNKNOWN'}; } +if ( $opt_H && $opt_H =~ m/^([-a-zA-Z\.\:0-9]+)$/ ) { + $host = $1; +} +else { + print "$opt_H is not a valid host name\n"; + exit $ERRORS{'UNKNOWN'}; +} + +# number of packets +$opt_p = 5 unless $opt_p; +if ( $opt_p && $opt_p =~ m/^([1-9]+[0-9]*)$/ ) { + $count = $1; +} +else { + print "$opt_p is not a valid packet number\n"; + exit $ERRORS{'UNKNOWN'}; +} + +if ( $opt_w && $opt_w =~ m/^([1-9]+[0-9]*),([1-9][0-9]*)%$/ ) { + $warning_avg = $1; + $warning_loss = $2; +} +else { + print "$opt_w is not a valid threshold\n"; + exit $ERRORS{'UNKNOWN'}; +} + +if ( $opt_c && $opt_c =~ m/^([1-9]+[0-9]*),([1-9][0-9]*)%$/ ) { + $critical_avg = $1; + $critical_loss = $2; +} +else { + print "$opt_c is not a valid threshold\n"; + exit $ERRORS{'UNKNOWN'}; +} + +$cmd = "/usr/bin/aecho -c $count $host 2>&1 |"; +print "$cmd\n" if ($verbose); +open CMD, $cmd; + +while () { + print $_ if ($verbose); + $line = $_; + + # 5 packets sent, 5 packets received, 0% packet loss + # round-trip (ms) min/avg/max = 0/0/0 + + if (/received, ([0-9]+)% packet loss/) { + $loss = $1; + } + if (/min\/avg\/max = [0-9]+\/([0-9]+)\/[0-9]+/) { + $avg = $1; + } +} + +sub print_help() { + print_revision( $PROGNAME, '$Revision: 1.1 $ ' ); + print "Copyright (c) 2002 Stefan Beck\n"; + print "\n"; + print "Check if an atalkhost responds to an atalk echo using\n"; + print " aecho -c \n"; + print "\n"; + print_usage (); + print "\n"; + print "-H, --hostname=HOST\n"; + print " host to ping\n"; + print "-w, --warning=THRESHOLD\n"; + print " warning threshold pair\n"; + print "-c, --critical=THRESHOLD\n"; + print " critical threshold pair\n"; + print "-p, --packets=INTEGER\n"; + print " number of ICMP ECHO packets to send (Default: 5)\n"; + print "\n"; + print + "THRESHOLD is ,% where is the round trip average +travel\n"; + print + "time (ms) which triggers a WARNING or CRITICAL state, and +is the\n"; + print "percentage of packet loss to trigger an alarm state.\n"; + print "\n"; + + support(); +} + +sub print_usage () { + print "$PROGNAME -H atalkhost -w ,% -c ,%\n"; + print " [-p packets] [-t timeout] [-L]\n"; + print "$PROGNAME [-h | --help]\n"; + print "$PROGNAME [-V | --version]\n"; +} + +sub version () { + print_revision( $PROGNAME, '$Revision: 1.1 $ ' ); + exit $ERRORS{'OK'}; +} + +sub help () { + print_help (); + exit $ERRORS{'OK'}; +} + +my $state = "OK"; +my $answer = undef; + +if ( defined $loss && defined $avg ) { + if ( $loss >= $critical_loss ) { + $state = "CRITICAL"; + } + elsif ( $avg >= $critical_avg ) { + $state = "CRITICAL"; + } + elsif ( $loss >= $warning_loss ) { + $state = "WARNING"; + } + elsif ( $avg >= $warning_avg ) { + $state = "WARNING"; + } + else { + $state = "OK"; + } + $answer = "Appletalk PING $state - Packet loss = $loss%, RTA = $avg +ms\n"; +} +else { + $state = "UNKNOWN"; + $answer = "UNKNOWN - $line"; +} +print $answer; +exit $ERRORS{$state}; + + + + +------------------------------------------------------- +This sf.net email is sponsored by:ThinkGeek +Welcome to geek heaven. +http://thinkgeek.com/sf +_______________________________________________ +Nagios-devel mailing list +Nagios-devel@lists.sourceforge.net +https://lists.sourceforge.net/lists/listinfo/nagios-devel diff --git a/contrib/check_arping.pl b/contrib/check_arping.pl new file mode 100644 index 0000000..87f835b --- /dev/null +++ b/contrib/check_arping.pl @@ -0,0 +1,120 @@ +#! /usr/bin/perl -w +# +# check_arping.pl - Nagios plugin to check host status via ARP ping +# +# usage: +# check_arping -H hostname -I interface -T timeout +# +# +# Copyright (C) 2003 Kenny Root +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# +# Report bugs to: kenny@the-b.org, nagiosplug-help@lists.sf.net + +use POSIX; +use strict; +use lib "/usr/lib/nagios/plugins" ; +use utils qw($TIMEOUT %ERRORS &print_revision &support); + +use Net::Arping; +use Getopt::Long; + +my $PROGNAME = "check_arping"; + +my($status, $state, $answer); +my($opt_V, $opt_h, $opt_t, $opt_I, $opt_H); + + +#Option checking +$status = GetOptions( + "V|version" => \$opt_V, + "help" => \$opt_h, + "I|interface=s" => \$opt_I, + "H|host=s" => \$opt_H, + "t|timeout=i" => \$opt_t); + +if ($status == 0) +{ + print_help() ; + exit $ERRORS{'OK'}; +} + + +if ($opt_V) { + print_revision($PROGNAME,'$Revision: 1.1 $ '); + exit $ERRORS{'OK'}; +} + +if ($opt_h) { + print_help(); + exit $ERRORS{'OK'}; +} + +if ($opt_t) { + if ($opt_t ne int($opt_t)) { + print "Timeout not in seconds!\n"; + print_help(); + exit $ERRORS{'OK'}; + } + $opt_t = int($opt_t); +} else { + $opt_t = 3; +} + +if (! utils::is_hostname($opt_H)){ + usage(); + exit $ERRORS{"UNKNOWN"}; +} + +my $ping = Net::Arping->new(); + +my $reply = $ping->arping(Host => $opt_H, Interface => $opt_I, Timeout => $opt_t); + +if ($reply eq "0") { + $state = "CRITICAL"; + print "$state: no reply from $opt_H on interface $opt_I in $opt_t seconds.\n"; + exit $ERRORS{$state}; +} else { + $state = "OK"; + $answer = "replied with MAC address $reply"; +} + +print "ARPING $state - $answer\n"; +exit $ERRORS{$state}; + + +sub usage { + print "\nMissing arguments!\n"; + print "\n"; + print "check_arping -I -H [-t ]\n"; + print "\n\n"; + support(); + exit $ERRORS{"UNKNOWN"}; +} + +sub print_help { + print "check_arping pings hosts that normally wouldn't allow\n"; + print "ICMP packets but are still on the local network.\n"; + print "\nUsage:\n"; + print " -H (--host) IP to query - (required)\n"; + print " -I (--interface) Interface to use.\n"; + print " -t (--timeout) Timeout in seconds.\n"; + print " -V (--version) Plugin version\n"; + print " -h (--help) usage help \n\n"; + print_revision($PROGNAME, '$Revision: 1.1 $'); + +} diff --git a/contrib/check_asterisk.pl b/contrib/check_asterisk.pl new file mode 100644 index 0000000..179d367 --- /dev/null +++ b/contrib/check_asterisk.pl @@ -0,0 +1,259 @@ +#!/usr/bin/perl -w + +use strict; +use IO::Socket; +use Getopt::Long; +$|=1; + +my ( + $host, $username, $password, $verbose, $help, $command, $mode, + $ipaddr, $respaddr, $sendto, $msg, $recvfrom, + $version, $response, $message, $line, + $sock, $port, $reply, + $warning, $critical, + %warnval, %critval, + %channels, + $runmode, + $key, + $s, +); +my $stop = 0; +my $mgr_port = 5038; +my $iax_port = 4569; +my $exitcode = 0; +my $cause = ""; + +my $iax_answer = 0; +my $iax_maxlen = 1024; +my $iax_timeout = 5; +my $iax_src_call = "8000"; #8000 most siginificant bit is IAX packet type full ... required for a poke etc... +my $iax_dst_call = "0000"; +my $iax_timestamp = "00000000"; +my $iax_outbound_seq = "00"; +my $iax_inbound_seq = "00"; +my $iax_type = "06"; #IAX_Control + +sub ok { + $s = shift; + $s =~ s/[\r\n]//g; + print "OK: $s\n"; + exit(0); +} + +sub warning { + $s = shift; + $s =~ s/[\r\n]//g; + print "WARNING: $s\n"; + exit(1); +} + +sub error { + $s = shift; + $s =~ s/[\r\n]//g; + print "ERROR: $s\n"; + exit(2); +} + +sub unknown { + $s = shift; + $s =~ s/[\r\n]//g; + print "UNKNOWN: $s\n"; + exit(3); +} + +sub syntax { + $s = shift; + unless ($s =~ m/Help:/) { + $s = "Error: (".$s.")" or $s = 'Unknown'; + } + print "$s\n" unless ($help); + print "Syntax: $0 -m mgr -h -u -p [-cwv]\n"; + print "Syntax: $0 -m iax -h [-v]\n"; + print "* --host -h Host\n"; + print "* --mode -m Mode - eithr 'mgr' or 'iax'\n"; + print " --username -u Username\n"; + print " --password -p Password\n"; + print " --port -P n Port (if not using $mgr_port for manager or $iax_port for IAX)\n"; + print " --warning xxx=n Return warning if > n channels of type xxx.\n"; + print " --critical xxx=n Return critical if > n channels of type xxx.\n"; + print " --verbose -v Verbose\n"; + print " --help -h This help\n"; + exit(3); +} + +Getopt::Long::Configure('bundling'); +GetOptions + ("p=s" => \$password, "password=s" => \$password, + "u=s" => \$username, "username=s" => \$username, + "h=s" => \$host, "host=s" => \$host, + "P=i" => \$port, "port=i" => \$port, + "H" => \$help, "help" => \$help, + "v" => \$verbose, "verbose" => \$verbose, + "m=s" => \$mode, "mode=s" => \$mode, + "critical=s" => \$critical, "warning=s" => \$warning); + +syntax("Help:") if ($help); +syntax("Missing host") unless (defined($host)); +syntax("Missing mode") unless (defined($mode)); +if ($mode =~ /^iax$/i) { + print "Running in IAX mode\n" if ($verbose); + $runmode = 1; +} elsif ($mode =~ /^mgr$/i) { + print "Running in Manager mode\n" if ($verbose); + $runmode = 2; +} else { + syntax("Unknown mode $mode") +} + +############################################################################## + +if ($runmode == 2) { + $port = $mgr_port; + syntax("Missing username") unless (defined($username)); + syntax("Missing password") unless (defined($password)); + if (defined($warning)) { + foreach $s (split(/,/, $warning)) { + syntax("Warning value given, $s, is invalid") + unless ($s =~ /^(\w+)=(\d+)$/); + $warnval{$1} = $2; + print "Clear to give WARNING after $2 connections on $1\n" if ($verbose); + } + } + if (defined($critical)) { + foreach $s (split(/,/, $critical)) { + syntax("Critical value given, $s, is invalid") + unless ($s =~ /^(\w+)=(\d+)$/); + $critval{$1} = $2; + print "Clear to give CRITICAL after $2 connections on $1\n" if ($verbose); + } + } + + print "Connecting to $host:$port\n" if ($verbose); + unless ($sock = IO::Socket::INET->new(PeerAddr => $host, PeerPort => $port, Proto => 'tcp')) { + print("Could not connect to asterisk server ".$host.":".$port."\n"); + exit(2); + } + print "Connected to $host:$port\n" if ($verbose); + $version = <$sock>; + print $version if ($verbose); + + print $sock "Action: Login\r\nUsername: $username\r\nSecret: $password\r\nEvents: off\r\n\r\n"; + print "Action: Login\r\nUsername: $username\r\nSecret: $password\r\n\r\n" if ($verbose); + $response = <$sock>; + $message = <$sock>; + $s = <$sock>; + print $response.$message if ($verbose); + print $s if ($verbose); + + exit(1) unless ($response =~ m/^Response:\s+(.*)$/i); + exit(1) unless ($1 =~ m/Success/i); + + print $sock "Action: Status\r\n\r\n"; + print "Action: Status\r\n\r\n" if ($verbose); + + $response = <$sock>; + $message = <$sock>; + print $response.$message if ($verbose); + + &unknown("Unknown answer $response (wanted Response: something)") unless ($response =~ m/^Response:\s+(.*)$/i); + &unknown("$response didn't say Success") unless ($1 =~ m/Success/i); + &unknown("Unknown answer $response (wanted Message: something)") unless ($message =~ m/^Message:\s+(.*)$/i); + &unknown("didn't understand message $message") unless ($1 =~ m/Channel status will follow/i); + + $stop=0; + while (($stop == 0) && ($line = <$sock>)) { + print "$line" if ($verbose); + if ($line =~ m/Channel:\s+(\w+)\//) { + $channels{$1}++; + print "Found $1 channel\n" if ($verbose); + } + if ($line =~ m/Event:\s*StatusComplete/i) { + $stop++; + } + } + +# Log out + print $sock "Action: Logoff\r\n\r\n"; + + undef($s); + foreach $key (keys %channels) { + $s .= " " . $key . " (" . $channels{$key} . ")"; + } + + foreach $key (keys %critval) { + print "key = $key\n" if ($verbose); + if (defined($channels{$key}) && ($channels{$key} > $critval{$key})) { + $exitcode = 2; + $cause .= $channels{$key} . " $key channels detected. "; + } + } + + if ($exitcode < 2) { + foreach $key (keys %warnval) { + print "key = $key\n" if ($verbose); + if (defined($channels{$key}) && ($channels{$key} > $warnval{$key})) { + $exitcode = 1; + $cause .= $channels{$key} . " $key channels detected. "; + } + } + } + + if ($exitcode == 0) { + print "OK "; + } elsif ($exitcode == 1) { + print "WARNING "; + } elsif ($exitcode == 2) { + print "CRITICAL "; + } elsif ($exitcode > 2) { + print "UNKNOWN "; + } + if (defined($s)) { + $cause .= " Channels:$s"; + } else { + $cause .= " (idle)"; + } + + print $cause; + + print "\n" if ($verbose); + + exit($exitcode); +} elsif ($runmode == 1) { + $port = $iax_port; + + socket(PING, PF_INET, SOCK_DGRAM, getprotobyname("udp")); + + $msg = pack "H24", $iax_src_call . $iax_dst_call . $iax_timestamp . + $iax_outbound_seq . $iax_inbound_seq . $iax_type . $iax_type; + + $ipaddr = inet_aton($host); + $sendto = sockaddr_in($port,$ipaddr); + + send(PING, $msg, 0, $sendto) == length($msg) or die "cannot send to $host : $port : $!\n"; + + eval { + local $SIG{ALRM} = sub { die("alarm time out"); }; + alarm $iax_timeout; + + while (1) { + $recvfrom = recv(PING, $msg, $iax_maxlen, 0) or die "recv: $!"; + ($port, $ipaddr) = sockaddr_in($recvfrom); + $respaddr = inet_ntoa($ipaddr); + $iax_answer++; + # print "Response from $respaddr : $port\n"; + } + + }; + + if ($iax_answer) { + if ($iax_answer == 1) { + $reply = "reply"; + } else { + $reply = "replies"; + } + &ok("Got $iax_answer $reply"); + } else { + &error("Got no reply"); + } +} + diff --git a/contrib/check_axis.sh b/contrib/check_axis.sh new file mode 100644 index 0000000..231d9da --- /dev/null +++ b/contrib/check_axis.sh @@ -0,0 +1,95 @@ +#!/bin/sh + +box=$1 +port=$2 +usr=$3 +pass=$4 + +if [ ! "$#" == "4" ]; then + echo -e "\nYou did not supply enough command line arguments. \nUsage: ./check_axis.sh \n \nCheck_axis.sh checks the status of LPT ports on Axis print servers. \nIt was written by Tom De Blende (tom.deblende@village.uunet.be) in 2002. \n" && exit "3" +fi + +tempfile=/tmp/status-$box.tmp +exit="3" + +ftp -in $box &>/dev/null < \&version, + "h|help" => \&help, + "v|verbose" => \$verbose, + "d|directory=s" => \$opt_d, + "s|minsize=s" => \$opt_s, + "t|timeout=s" => \$opt_t, + ); + +($opt_s) || ($opt_s = shift) || usage("Minimum File size not specified\n"); +usage("File size must be numeric value") unless ($opt_s =~ m/^[0-9]+$/); + +(($opt_t) && ($TIMEOUT = $opt_t)) || ($TIMEOUT = 120); +usage("TIMEOUT must be numeric value") unless ($TIMEOUT =~ m/^[0-9]+$/); + +# Don't hang if there are timeout issues +$SIG{'ALRM'} = sub { + print ("ERROR: No response from ftp server (alarm)\n"); + exit $ERRORS{'UNKNOWN'}; +}; +alarm($TIMEOUT); + +# Do stuff + +my $time = time; + +opendir(THISDIR, "$dir") or die "Can't open directory! $!"; +my @allfiles = grep !/^\./, readdir THISDIR; +closedir THISDIR; +while (my $file = $dir . pop @allfiles){ + my ($size, $mtime) = (stat($file))[7,9]; + if (((my $a = ($time - $mtime)) <= $within) and ($size >= $opt_s)){ + display_res("OK: File $file is <= $within and >=$opt_s bytes.\n","OK"); + } +} + +# If we got here nothing matched.... +display_res("CRITICAL: No files in $dir are <= $within and >= $minsize.", "CRITICAL"); + +exit; + +sub print_usage () { + print "Usage: $PROGNAME -s -t \n"; +} + +sub print_help () { + print_revision($PROGNAME,'$ Revision: 1.0 $ '); + print_usage(); + support(); +} + +sub version () { + print_revision($PROGNAME,'$ Revision: 1.0 $ '); + exit $ERRORS{'OK'}; +} + +sub help () { + print_help(); + exit $ERRORS{'OK'}; +} + +sub display_res ($$) { + my ($answer, $state) = @_; + print $answer; + exit $ERRORS{$state}; +} diff --git a/contrib/check_bgpstate.pl b/contrib/check_bgpstate.pl new file mode 100644 index 0000000..645d750 --- /dev/null +++ b/contrib/check_bgpstate.pl @@ -0,0 +1,215 @@ +#!/usr/bin/perl -w +# +# check_bgpstate.pl - nagios plugin +# +# Copyright (C) 2000 Christoph Kron +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# +# Report bugs to: ck@zet.net +# +# 11.01.2000 Version 1.0 + + + +use strict; + +use Net::SNMP; +use Getopt::Long; +&Getopt::Long::config('auto_abbrev'); + + +# whois programm for RIPE database queries +my $whois = '/usr/bin/whois'; +my $status; +my $TIMEOUT = 30; + +# critical bgp sessions +my %uplinks = ( 1273, 'Uplink ECRC', + 1755, 'Uplink EBONE', + 3300, 'Uplink AUCS' + ); + +my %ERRORS = ('UNKNOWN' , '-1', + 'OK' , '0', + 'WARNING', '1', + 'CRITICAL', '2'); + + +my %bgpPeerState = ( + '1',"idle", + '2',"connect", + '3',"active", + '4',"opensent", + '5',"openconfirm", + '6',"established" + ); +my $state = "UNKNOWN"; +my $answer = ""; +my $snmpkey; +my $snmpoid; +my $key; +my $community = "public"; +my $port = 161; +my @snmpoids; +my $snmpbgpPeerState = '1.3.6.1.2.1.15.3.1.2'; +my $snmpbgpPeerLocalAddr = '1.3.6.1.2.1.15.3.1.5'; +my $snmpbgpPeerRemoteAddr = '1.3.6.1.2.1.15.3.1.7'; +my $snmpbgpPeerRemoteAs = '1.3.6.1.2.1.15.3.1.9'; +my $hostname; +my $session; +my $error; +my $response; +my %bgpStatus; +my $bgpestablished =0 ; +my $bgpcritical =0; +my $bgpdown =0; +my $bgpidle =0; +my $bgpmessage; +my $asname; +my $remoteas; +my @output; + +sub usage { + printf "\nMissing arguments!\n"; + printf "\n"; + printf "Perl bgpstate plugin for Nagios\n"; + printf "monitors all BGP sessions\n"; + printf "usage: \n"; + printf "check_bgpstate.pl -c -p \n"; + printf "Copyright (C) 2000 Christoph Kron\n"; + printf "check_bgpstate.pl comes with ABSOLUTELY NO WARRANTY\n"; + printf "This programm is licensed under the terms of the "; + printf "GNU General Public License\n(check source code for details)\n"; + printf "\n\n"; + exit $ERRORS{"UNKNOWN"}; +} + +# Just in case of problems, let's not hang Nagios +$SIG{'ALRM'} = sub { + print ("ERROR: No snmp response from $hostname (alarm)\n"); + exit $ERRORS{"UNKNOWN"}; +}; +alarm($TIMEOUT); + + +$status = GetOptions("community=s",\$community, + "port=i",\$port); +if ($status == 0) +{ + &usage; +} + + #shift; + $hostname = shift || &usage; + + +push(@snmpoids, $snmpbgpPeerState); +push(@snmpoids, $snmpbgpPeerLocalAddr); +push(@snmpoids, $snmpbgpPeerRemoteAddr); +push(@snmpoids, $snmpbgpPeerRemoteAs); + +foreach $snmpoid (@snmpoids) { + + ($session, $error) = Net::SNMP->session( + -hostname => $hostname, + -community => $community, + -port => $port + ); + + if (!defined($session)) { + $state='UNKNOWN'; + $answer=$error; + print ("$state: $answer"); + exit $ERRORS{$state}; + } + + if (!defined($response = $session->get_table($snmpoid))) { + $answer=$session->error; + $session->close; + $state = 'CRITICAL'; + print ("$state: $answer,$snmpkey"); + exit $ERRORS{$state}; + } + + foreach $snmpkey (keys %{$response}) { + $snmpkey =~ m/.*\.(\d+\.\d+\.\d+\.\d+$)/; + $key = $1; +# printf "debug: $snmpkey: $key -> $response->{$snmpkey}\n"; + $bgpStatus{$key}{$snmpoid} = $response->{$snmpkey}; + } + $session->close; +} + +foreach $key (keys %bgpStatus) { + if ($bgpStatus{$key}{$snmpbgpPeerState} == 6 ) { + $bgpestablished++; + } + elsif ($bgpStatus{$key}{$snmpbgpPeerState} == 1 ) { + $bgpidle++; + } + else { + $bgpdown++ ; + if (exists($uplinks{$bgpStatus{$key}{$snmpbgpPeerRemoteAs}}) ) { + $bgpcritical++; + } + @output = `$whois -T aut-num AS$bgpStatus{$key}{$snmpbgpPeerRemoteAs}`; + + $asname = ""; + foreach (@output) { + if (m/as-name/) { + $asname = $_; + $asname =~ s/as-name://; + last; + } + if ( $asname =~ "" && m/descr/ ) { + $asname = $_; + $asname =~ s/descr://; + } + } + $asname =~ s/^\s*//; + $asname =~ s/\s*$//; + $bgpmessage .= sprintf("Peering with AS%s not established -> %s
", + $bgpStatus{$key}{$snmpbgpPeerRemoteAs}, + $asname); + } +} + + + if ($bgpdown > 0) { + if ($bgpcritical > 0) { + $state = 'CRITICAL'; + } + else { + $state = 'WARNING'; + } + $answer = sprintf("host '%s', sessions up: %d, down: %d, shutdown: %d
", + $hostname, + $bgpestablished, + $bgpdown, $bgpidle); + $answer = $answer . $bgpmessage . "\n"; + } + else { + $state = 'OK'; + $answer = sprintf("host '%s', sessions up: %d, down: %d, shutdown: %d\n", + $hostname, + $bgpestablished, + $bgpdown,$bgpidle); + } + +print ("$state: $answer"); +exit $ERRORS{$state}; + diff --git a/contrib/check_breeze.pl b/contrib/check_breeze.pl new file mode 100644 index 0000000..bb83765 --- /dev/null +++ b/contrib/check_breeze.pl @@ -0,0 +1,22 @@ +#!/usr/bin/perl + +# Plugin to test signal strength on Breezecom wireless equipment +# Contributed by Jeffrey Blank + +$Host=$ARGV[0]; +$sig_crit=$ARGV[1]; +$sig_warn=$ARGV[2]; +$sig=0; +$sig = `snmpget $Host public .1.3.6.1.4.1.710.3.2.3.1.3.0`; +@test=split(/ /,$sig); +$sig=@test[2]; +$sig=int($sig); +if ($sig>100){$sig=100} + +print "Signal Strength at: $sig%\n"; +if ($sig<$sig_crit) + {exit(2)} +if ($sig<$sig_warn) + {exit(1)} + +exit(0); diff --git a/contrib/check_cluster.c b/contrib/check_cluster.c new file mode 100644 index 0000000..06519e6 --- /dev/null +++ b/contrib/check_cluster.c @@ -0,0 +1,332 @@ +/***************************************************************************** + * + * CHECK_CLUSTER.C - Host and Service Cluster Plugin for NetSaint + * + * Copyright (c) 2000 Ethan Galstad (netsaint@netsaint.org) + * License: GPL + * Last Modified: 07-08-2000 + * + * License: + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + *****************************************************************************/ + + +#include +#include + +#define OK 0 +#define ERROR -1 + +#define TRUE 1 +#define FALSE 0 + +#define CHECK_SERVICES 1 +#define CHECK_HOSTS 2 + +#define MAX_INPUT_BUFFER 1024 + +#define STATE_OK 0 +#define STATE_WARNING 1 +#define STATE_CRITICAL 2 +#define STATE_UNKNOWN 3 + +typedef struct clustermember_struct{ + char *host_name; + char *svc_description; + struct clustermember_struct *next; + }clustermember; + + +int check_cluster_status(void); +int add_clustermember(char *,char *); +void free_memory(void); + +clustermember *clustermember_list=NULL; + +int total_services_ok=0; +int total_services_warning=0; +int total_services_unknown=0; +int total_services_critical=0; + +int total_hosts_up=0; +int total_hosts_down=0; +int total_hosts_unreachable=0; + +char status_log[MAX_INPUT_BUFFER]=""; +int warning_threshold=0; +int critical_threshold=0; + +int check_type=CHECK_SERVICES; + + +int main(int argc, char **argv){ + char input_buffer[MAX_INPUT_BUFFER]; + char *host_name; + char *svc_description; + int return_code=STATE_OK; + int error=FALSE; + + if(argc!=5){ + + printf("Invalid arguments supplied\n"); + printf("\n"); + + printf("Host/Service Cluster Plugin for NetSaint\n"); + printf("Copyright (c) 2000 Ethan Galstad (netsaint@netsaint.org)\n"); + printf("Last Modified: 07-08-2000\n"); + printf("License: GPL\n"); + printf("\n"); + printf("Usage: %s <--service | --host> \n",argv[0]); + printf("\n"); + printf("Options:\n"); + printf(" --service = Check service cluster status\n"); + printf(" --host = Check host cluster status\n"); + printf(" = This is the location of the NetSaint status log\n"); + printf(" = This is the number of hosts or services in\n"); + printf(" the cluster that must be in a non-OK state\n"); + printf(" in order to result in a warning status level\n"); + printf(" = This is the number of hosts or services in\n"); + printf(" the cluster that must be in a non-OK state\n"); + printf(" in order to result in a critical status level\n"); + printf("\n"); + printf("Notes:\n"); + printf("Members of the host or service cluster are read from STDIN.\n"); + printf("One host or service can be specified per line, services must\n"); + printf("be in the format of ;\n"); + printf("\n"); + + return STATE_UNKNOWN; + } + + /* see if we're checking a host or service clust */ + if(!strcmp(argv[1],"--host")) + check_type=CHECK_HOSTS; + else + check_type=CHECK_SERVICES; + + /* get the status log */ + strncpy(status_log,argv[2],sizeof(status_log)-1); + status_log[sizeof(status_log)-1]='\x0'; + + /* get the warning and critical thresholds */ + warning_threshold=atoi(argv[3]); + critical_threshold=atoi(argv[4]); + + + /* read all data from STDIN until there isn't anymore */ + while(fgets(input_buffer,sizeof(input_buffer)-1,stdin)){ + + if(feof(stdin)) + break; + + /*strip(input_buffer);*/ + + if(!strcmp(input_buffer,"")) + continue; + + if(!strcmp(input_buffer,"\n")) + continue; + + /* get the host name */ + if(check_type==CHECK_SERVICES) + host_name=(char *)strtok(input_buffer,";"); + else + host_name=(char *)strtok(input_buffer,"\n"); + if(host_name==NULL || !strcmp(host_name,"")){ + printf("Error: Host name is NULL!\n"); + continue; + } + + if(check_type==CHECK_SERVICES){ + + /* get the service description */ + svc_description=(char *)strtok(NULL,"\n"); + if(svc_description==NULL || !strcmp(svc_description,"")){ + printf("Error: Service description is NULL!\n"); + continue; + } + } + + /* add the cluster member to the list in memory */ + if(add_clustermember(host_name,svc_description)!=OK) + printf("Error: Could not add cluster member\n"); +#ifdef DEBUG + else + printf("Added cluster member\n"); +#endif + } + + + /* check the status of the cluster */ + if(check_cluster_status()==OK){ + + if(check_type==CHECK_SERVICES){ + if((total_services_warning+total_services_unknown+total_services_critical) >= critical_threshold) + return_code=STATE_CRITICAL; + else if((total_services_warning+total_services_unknown+total_services_critical) >= warning_threshold) + return_code=STATE_WARNING; + else + return_code=STATE_OK; + + printf("Service cluster %s: %d ok, %d warning, %d unknown, %d critical\n",(return_code==STATE_OK)?"ok":"problem",total_services_ok,total_services_warning,total_services_unknown,total_services_critical); + } + else{ + if((total_hosts_down+total_hosts_unreachable) >= critical_threshold) + return_code=STATE_CRITICAL; + else if((total_hosts_down+total_hosts_unreachable) >= warning_threshold) + return_code=STATE_WARNING; + else + return_code=STATE_OK; + + printf("Host cluster %s: %d up, %d down, %d unreachable\n",(return_code==STATE_OK)?"ok":"problem",total_hosts_up,total_hosts_down,total_hosts_unreachable); + } + } + else + return_code=STATE_UNKNOWN; + + free_memory(); + + return return_code; + } + + + +int add_clustermember(char *hst,char *svc){ + clustermember *new_clustermember; + + new_clustermember=(clustermember *)malloc(sizeof(clustermember)); + if(new_clustermember==NULL) + return ERROR; + + new_clustermember->host_name=NULL; + new_clustermember->svc_description=NULL; + + if(hst!=NULL){ + new_clustermember->host_name=(char *)malloc(strlen(hst)+1); + if(new_clustermember->host_name==NULL){ + free(new_clustermember); + return ERROR; + } + strcpy(new_clustermember->host_name,hst); + } + + if(svc!=NULL){ + new_clustermember->svc_description=(char *)malloc(strlen(svc)+1); + if(new_clustermember->svc_description==NULL){ + if(new_clustermember->host_name!=NULL) + free(new_clustermember->host_name); + free(new_clustermember); + return ERROR; + } + strcpy(new_clustermember->svc_description,svc); + } + + new_clustermember->next=clustermember_list; + clustermember_list=new_clustermember; + + return OK; + } + + +void free_memory(void){ + clustermember *this_clustermember; + clustermember *next_clustermember; + + for(this_clustermember=clustermember_list;this_clustermember!=NULL;this_clustermember=next_clustermember){ + next_clustermember=this_clustermember->next; + if(this_clustermember->host_name!=NULL) + free(this_clustermember->host_name); + if(this_clustermember->svc_description!=NULL) + free(this_clustermember->svc_description); + free(this_clustermember); + } + + return; + } + + + +int check_cluster_status(void){ + FILE *fp; + clustermember *temp_clustermember; + char input_buffer[MAX_INPUT_BUFFER]; + char matching_entry[MAX_INPUT_BUFFER]; + + fp=fopen(status_log,"r"); + if(fp==NULL){ + printf("Error: Could not open status log '%s' for reading\n",status_log); + return ERROR; + } + +#ifdef DEBUG + for(temp_clustermember=clustermember_list;temp_clustermember!=NULL;temp_clustermember=temp_clustermember->next){ + if(check_type==CHECK_HOSTS) + printf("Cluster member: '%s'\n",temp_clustermember->host_name); + else + printf("Cluster member: '%s'/'%s'\n",temp_clustermember->host_name,temp_clustermember->svc_description); + } +#endif + + for(fgets(input_buffer,MAX_INPUT_BUFFER-1,fp);!feof(fp);fgets(input_buffer,MAX_INPUT_BUFFER-1,fp)){ + + /* this is a host entry */ + if(strstr(input_buffer,"] HOST;") && check_type==CHECK_HOSTS){ + + /* this this a match? */ + for(temp_clustermember=clustermember_list;temp_clustermember!=NULL;temp_clustermember=temp_clustermember->next){ + + snprintf(matching_entry,sizeof(matching_entry)-1,";%s;",temp_clustermember->host_name); + + if(strstr(input_buffer,matching_entry)){ + if(strstr(input_buffer,";DOWN;")) + total_hosts_down++; + else if(strstr(input_buffer,";UNREACHABLE;")) + total_hosts_unreachable++; + else if(strstr(input_buffer,";UP;")) + total_hosts_up++; + } + } + + } + + /* this is a service entry */ + else if(strstr(input_buffer,"] SERVICE;") && check_type==CHECK_SERVICES){ + + /* this this a match? */ + for(temp_clustermember=clustermember_list;temp_clustermember!=NULL;temp_clustermember=temp_clustermember->next){ + + snprintf(matching_entry,sizeof(matching_entry)-1,";%s;%s;",temp_clustermember->host_name,temp_clustermember->svc_description); + + if(strstr(input_buffer,matching_entry)){ + if(strstr(input_buffer,";HOST DOWN;") || strstr(input_buffer,";UNREACHABLE;") || strstr(input_buffer,";CRITICAL;")) + total_services_critical++; + else if(strstr(input_buffer,";WARNING;")) + total_services_warning++; + else if(strstr(input_buffer,";UNKNOWN;")) + total_services_unknown++; + else if(strstr(input_buffer,";OK;") || strstr(input_buffer,";RECOVERY;")) + total_services_ok++; + } + } + + } + } + + fclose(fp); + + return OK; + } diff --git a/contrib/check_cluster2.c b/contrib/check_cluster2.c new file mode 100644 index 0000000..e60948d --- /dev/null +++ b/contrib/check_cluster2.c @@ -0,0 +1,232 @@ +/***************************************************************************** + * + * CHECK_CLUSTER2.C - Host and Service Cluster Plugin for Nagios 2.x + * + * Copyright (c) 2000-2004 Ethan Galstad (nagios@nagios.org) + * License: GPL + * Last Modified: 03-11-2004 + * + * License: + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + *****************************************************************************/ + + +#include +#include +#include +#include +#include + +#define OK 0 +#define ERROR -1 + +#define TRUE 1 +#define FALSE 0 + +#define CHECK_SERVICES 1 +#define CHECK_HOSTS 2 + +#define MAX_INPUT_BUFFER 1024 + +#define STATE_OK 0 +#define STATE_WARNING 1 +#define STATE_CRITICAL 2 +#define STATE_UNKNOWN 3 + +int total_services_ok=0; +int total_services_warning=0; +int total_services_unknown=0; +int total_services_critical=0; + +int total_hosts_up=0; +int total_hosts_down=0; +int total_hosts_unreachable=0; + +int warning_threshold=1; +int critical_threshold=1; + +int check_type=CHECK_SERVICES; + +char *data_vals=NULL; +char *label=NULL; + + +int process_arguments(int,char **); + + + +int main(int argc, char **argv){ + char input_buffer[MAX_INPUT_BUFFER]; + char *ptr; + int data_val; + int return_code=STATE_OK; + int error=FALSE; + + if(process_arguments(argc,argv)==ERROR){ + + printf("Invalid arguments supplied\n"); + printf("\n"); + + printf("Host/Service Cluster Plugin for Nagios 2\n"); + printf("Copyright (c) 2000-2004 Ethan Galstad (nagios@nagios.org)\n"); + printf("Last Modified: 03-11-2004\n"); + printf("License: GPL\n"); + printf("\n"); + printf("Usage: %s (-s | -h) [-l label] [-w threshold] [-c threshold] [-d val1,val2,...,valn]\n",argv[0]); + printf("\n"); + printf("Options:\n"); + printf(" -s, --service = Check service cluster status\n"); + printf(" -h, --host = Check host cluster status\n"); + printf(" -l, --label = Optional prepended text output (i.e. \"Host cluster\")\n"); + printf(" -w, --warning = Specifies the number of hosts or services in cluster that must be in\n"); + printf(" a non-OK state in order to return a WARNING status level\n"); + printf(" -c, --critical = Specifies the number of hosts or services in cluster that must be in\n"); + printf(" a non-OK state in order to return a CRITICAL status level\n"); + printf(" -d, --data = The status codes of the hosts or services in the cluster, separated\n"); + printf(" by commas\n"); + printf("\n"); + + return STATE_UNKNOWN; + } + + /* check the data values */ + for(ptr=strtok(data_vals,",");ptr!=NULL;ptr=strtok(NULL,",")){ + + data_val=atoi(ptr); + + if(check_type==CHECK_SERVICES){ + switch(data_val){ + case 0: + total_services_ok++; + break; + case 1: + total_services_warning++; + break; + case 2: + total_services_critical++; + break; + case 3: + total_services_unknown++; + break; + default: + break; + } + } + else{ + switch(data_val){ + case 0: + total_hosts_up++; + break; + case 1: + total_hosts_down++; + break; + case 2: + total_hosts_unreachable++; + break; + default: + break; + } + } + } + + + /* return the status of the cluster */ + if(check_type==CHECK_SERVICES){ + if((total_services_warning+total_services_unknown+total_services_critical) >= critical_threshold) + return_code=STATE_CRITICAL; + else if((total_services_warning+total_services_unknown+total_services_critical) >= warning_threshold) + return_code=STATE_WARNING; + else + return_code=STATE_OK; + printf("%s %s: %d ok, %d warning, %d unknown, %d critical\n",(label==NULL)?"Service cluster":label,(return_code==STATE_OK)?"ok":"problem",total_services_ok,total_services_warning,total_services_unknown,total_services_critical); + } + else{ + if((total_hosts_down+total_hosts_unreachable) >= critical_threshold) + return_code=STATE_CRITICAL; + else if((total_hosts_down+total_hosts_unreachable) >= warning_threshold) + return_code=STATE_WARNING; + else + return_code=STATE_OK; + printf("%s %s: %d up, %d down, %d unreachable\n",(label==NULL)?"Host cluster":label,(return_code==STATE_OK)?"ok":"problem",total_hosts_up,total_hosts_down,total_hosts_unreachable); + } + + return return_code; + } + + + +int process_arguments(int argc, char **argv){ + int c; + int option=0; + static struct option longopts[]={ + {"data", required_argument,0,'d'}, + {"warning", required_argument,0,'w'}, + {"critical", required_argument,0,'c'}, + {"label", required_argument,0,'l'}, + {"host", no_argument, 0,'h'}, + {"service", no_argument, 0,'s'}, + {0,0,0,0} + }; + + /* no options were supplied */ + if(argc<2) + return ERROR; + + while(1){ + + c=getopt_long(argc,argv,"hsw:c:d:l:",longopts,&option); + + if(c==-1 || c==EOF || c==1) + break; + + switch(c){ + + case 'h': /* host cluster */ + check_type=CHECK_HOSTS; + break; + + case 's': /* service cluster */ + check_type=CHECK_SERVICES; + break; + + case 'w': /* warning threshold */ + warning_threshold=atoi(optarg); + break; + + case 'c': /* warning threshold */ + critical_threshold=atoi(optarg); + break; + + case 'd': /* data values */ + data_vals=(char *)strdup(optarg); + break; + + case 'l': /* text label */ + label=(char *)strdup(optarg); + break; + + default: + return ERROR; + break; + } + } + + if(data_vals==NULL) + return ERROR; + + return OK; + } diff --git a/contrib/check_compaq_insight.pl b/contrib/check_compaq_insight.pl new file mode 100644 index 0000000..dfb0440 --- /dev/null +++ b/contrib/check_compaq_insight.pl @@ -0,0 +1,296 @@ +From mm@elabnet.de Mon Nov 18 09:59:04 2002 +Date: Mon, 18 Nov 2002 12:19:04 +0100 +From: Michael Markstaller +To: nagiosplug-devel@lists.sourceforge.net +Subject: [Nagiosplug-devel] Submission: check_insight / checking Compaq + Insight Agent status + +Hi, + +I've been looking to check the status/health of Compaq Insight Agents on +servers and found a spong plugin +(http://spong.sourceforge.net/downloads/plugins/spong-network/check_insi +ght) which I've slightly changed to work with Nagios. +I have pretty no idea of perl at all, just wanted to make it work for +me, so please don't shoot me for this copy-paste-code. I've tested some +basic things, it seems to work at least to report a warning if smthg is +degraded and OK of xcourse ;) +I'm also quite unsure if this is the right way to submit, so I'll just +try ;) +There're some "unknown" components on all servers I've checked so far, +if anybody has a documentation of what's exactly returned when getting +the OID 1.3.6.1.4.1.232.11.2.10.1.0 (CPQHOST_MIB isn't very descriptive) +I'd be happy to fix this. + +--- cut --- +#!/usr/bin/perl +# +# (c)2002 Michael Markstaller, Elaborated Networks GmbH +# send bug reports to +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# you should have received a copy of the GNU General Public License +# along with this program (or with Nagios); if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA +# +# +# Check Comapq Insight Management Agents Systems Status by SNMP +# based on the spong-plugin check_insight from: +# +http://spong.sourceforge.net/downloads/plugins/spong-network/check_insig +ht +# +# Usage: +# check_insight -H -C community +# + +use Net::SNMP; +use Getopt::Long; +Getopt::Long::Configure('bundling'); + +$version=0.01; + +my %ERRORS = ('UNKNOWN' , '-1', + 'OK' , '0', + 'WARNING', '1', + 'CRITICAL', '2'); + + +# +# some default values +# +$TIMEOUT=15; + +# +# get command line options the regular way +# +GetOptions + ("V" => \$opt_V, "version" => \$opt_V, + "h" => \$opt_h, "help" => \$opt_h, + "v" => \$verbose, "verbose" => \$verbose, + "H=s" => \$opt_H, "hostname=s" => \$opt_H, + "C=s" => \$opt_C, "community=s" => \$opt_C); + +# +# handle the verbose stuff first +# +if ($opt_V) { + print "\n"; + print "check_insight nagios plugin version $version\n"; + print "\n"; + print "The nagios plugins come with ABSOLUTELY NO WARRANTY. You +may redistribute\n"; + print "copies of the plugins under the terms of the GNU General +Public License.\n"; + print "For more information about these matters, see the file +named COPYING.\n"; + print "\n"; + print "(c)2002 Michael Markstaller, Elaborated Networks GmbH\n"; + print "\n"; + print "\n"; + exit $ERRORS{'UNKNOWN'}; +} + +if ($opt_h) { + print_help(); + exit $ERRORS{'UNKNOWN'}; +} + +# +# now get options the weired way and set the defaults +# if nothing else is provided +# +$opt_H = shift unless ($opt_H); +print_usage() unless ($opt_H); + +# +# dont let us wait forever... +# +$SIG{'ALRM'} = sub { + print ("ERROR: No response from server (alarm)\n"); + exit $ERRORS{"UNKNOWN"}; +}; +alarm($TIMEOUT); + + +# +# now we set things up for the real work +# and fire up the request +# + +######################################################################## +######## +my ($host) = ($opt_H); +my ($color, $summary, $message ) = ( "green", "", "" ); +($opt_C) || ($opt_C = shift) || ($opt_C = "public"); +my ($community) = $opt_C; + +# We use some look up tables for checking some config options. +my (@State) = ("Not Available", "Other", "OK", "Degraded", "Failed"); + +my (@MIBName) = ("", "Std", "Unknown", "Array", + "Netware", "SCSI", "Health","Unknown", + "Store", "SM2", "Thresh", "OS", "UPS", + "Unknown", "IDE", "Clusters", "Fibre", + "MIB", "NIC"); + +# These are the positions within the table to actually look at. +my (@MIBs) = (1, 2, 3, 5, 6, 10, 11, 14, 18); + +my ($oid) = "1.3.6.1.4.1.232.11.2.10.1.0"; # SysArray + +# Open the connection. +my ($session, $error) = Net::SNMP->session(Hostname => $host, + Community => $community); + +# If we can't open a connection, just return red straight away. +if (! defined $session) { + print ("ERROR: Unable to contact server '$opt_H'\n"); + exit $ERRORS{"UNKNOWN"}; +} + + +$session->translate; +my ($response) = $session->get_request($oid); + + if (!defined $response) { + # If there's no response, something screwy is going on, give up. + $summary = $session->error; + print ("ERROR: $summary\n"); + exit $ERRORS{"UNKNOWN"}; + $session->close; + } else { + $session->close; + + # I'm not convinced that this is the easiest way to go about this, +this is + # from some code which I've inherited and I've modified for use in +here. + # Hi George! + %h = %$response; + my ($d) = $h{$oid}; + + my (@list) = (); + + # Gobble the first two char's. + $d = substr $d,2; + + while (length($d) > 0) { + my ($v) = substr($d,0,2); + $v = hex($v); + $d = substr $d,2; + push @list, $v; + } + + # Value in $MIBs[1] is the overall status of the machine... + my ($cond) = $MIBs[1]; + $message .= "Status: $State[$cond] "; + + foreach my $v (@MIBs) { + $cond = $list[($v*4)+1]; # A little bit of magic. + + # We only bother printing the status out if it's actually +available, + # as if it's N/A or Unknown then it's probably because the machine + # isn't available. + $message .= "$MIBName[$v]: $State[$cond] " if $cond > 1; + next if $cond < 2; + + # What follows is some trickery to try and not to override a +previous + # message at the same or lower color. + if ($cond == 4) { + if ($color ne 'red') { + $color = 'red'; + $summary = "$MIBName[$v] is failed"; + } + } elsif ($cond == 3) { + if ($color ne 'red') { + $color = 'yellow'; + $summary = "$MIBName[$v] is degraded" if $summary eq ""; + } + } elsif ($cond < 2) { + if ($color eq 'green') { + $color = 'yellow'; + $summary = "$MIBName[$v] is unknown ($cond)" if $summary eq +""; + } + } + } + } + + $summary = "Ok" if $summary eq ""; + +# return ($color, $summary, $message); + +if ($color eq 'red') { + print ("red Output: $message\n"); + exit $ERRORS{"CRITICAL"}; + } elsif ($color eq 'yellow') { + print ("$summary $message\n"); + exit $ERRORS{"WARNING"}; + } elsif ($color eq 'green') { + print ("$message\n"); + exit $ERRORS{"OK"}; +} + + +sub print_usage () { + print "Usage: $0 -H -C \n"; } + +sub print_help () { + print "\n"; + print "\n"; + print "check_insight nagios plugin version $version\n"; + print "\n"; + print "The nagios plugins come with ABSOLUTELY NO WARRANTY. You +may redistribute\n"; + print "copies of the plugins under the terms of the GNU General +Public License.\n"; + print "For more information about these matters, see the file +named COPYING.\n"; + print "\n"; + print "(c)2002 Michael Markstaller, Elaborated Networks GmbH\n"; + print "\n"; + print "\n"; + print "This plugin checks the Compaq Insight Management agents +system status via SNMP on the specified host.\n"; + print "\n"; + print "\n"; + print_usage(); + print "\n"; + print "Options:\n"; + print " -H, --hostname=ADDRESS\n"; + print " host name argument for server.\n"; + print " -C, --community=STRING\n"; + print " SNMP Read-community string.\n"; + print " -h, --help\n"; + print " print detailed help screen.\n"; + print " -V, --version\n"; + print " print version information.\n"; + print "\n"; + print "\n"; +} +--- cut --- + +Michael + + +------------------------------------------------------- +This sf.net email is sponsored by: To learn the basics of securing +your web site with SSL, click here to get a FREE TRIAL of a Thawte +Server Certificate: http://www.gothawte.com/rd524.html +_______________________________________________ +Nagiosplug-devel mailing list +Nagiosplug-devel@lists.sourceforge.net +https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel diff --git a/contrib/check_cpqarray.c b/contrib/check_cpqarray.c new file mode 100644 index 0000000..badffeb --- /dev/null +++ b/contrib/check_cpqarray.c @@ -0,0 +1,430 @@ +/* + check_cpqarray, an extension for Netsaint / Nagios to check the + status of a Compaq SmartArray controller from the commandline. + Copyright (C) 2003 Guenther Mair + + based on the work and using main parts of + + CpqArray Deamon, a program to monitor and remotely configure a + SmartArray controller. + Copyright (C) 1999 Hugo Trippaers + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "/usr/src/linux/drivers/block/ida_ioctl.h" +#include "/usr/src/linux/drivers/block/ida_cmd.h" +#include "/usr/src/linux/drivers/block/cpqarray.h" + + +const char *controllers[] = +{ + "/dev/ida/c0d0", + "/dev/ida/c1d0", + "/dev/ida/c2d0", + "/dev/ida/c3d0", + "/dev/ida/c4d0", + "/dev/ida/c5d0", + "/dev/ida/c6d0", + "/dev/ida/c7d0" +}; + +const char *statusstr[] = { + "Logical drive /dev/ida/c%dd%d: OK\n", + "Logical drive /dev/ida/c%dd%d: FAILED\n", + "Logical drive /dev/ida/c%dd%d: not configured.\n", + "Logical drive /dev/ida/c%dd%d: using interim recovery mode, %3.2f%% done.\n", + "Logical drive /dev/ida/c%dd%d: ready for recovery operation.\n", + "Logical drive /dev/ida/c%dd%d: is currently recovering, %3.2f%% done.\n", + "Wrong physical drive was replaced.\n", + "A physical drive is not properly connected.\n", + "Hardware is overheating.\n", + "Hardware has overheated.\n", + "Logical drive /dev/ida/c%dd%d: currently expanding, %3.2f%% done.\n", + "Logical drive /dev/ida/c%dd%d: not yet available.\n", + "Logical drive /dev/ida/c%dd%d: queued for expansion.\n", +}; + +extern char *optarg; +extern int optind, opterr, optopt; + +int ctrls_found_num; +int exit_code = 0; +struct controller ctrls_found[8]; + +#define DEBUG(x) fprintf(stderr, x) + +struct opts +{ + char debug; +}; + +struct slog_disk +{ + int status; + float pvalue; +}; + +struct controller +{ + char ctrl_devicename[20]; + int num_logd_found; + struct slog_disk log_disk[16]; +}; + + + +int status_check (struct opts opts) +{ + int devicefd; + int ctrl_cntr; + int logd_cntr; + ida_ioctl_t io, io2; + int status, nr_blks, blks_tr; + float pvalue; + int counter; + + for ( ctrl_cntr=0; + ctrl_cntr < ctrls_found_num; + ctrl_cntr++) { + + devicefd = open (controllers[ctrl_cntr], O_RDONLY); + + for ( logd_cntr=0; + logd_cntr < ctrls_found[ctrl_cntr].num_logd_found; + logd_cntr++) { + + memset (&io, 0, sizeof (io)); + + io.cmd = SENSE_LOG_DRV_STAT; + io.unit = logd_cntr | UNITVALID; + + if (ioctl (devicefd, IDAPASSTHRU, &io) < 0) + { + perror ("SENSE_LOG_DRV_STAT ioctl"); + return 0; + } + + status=io.c.sense_log_drv_stat.status; + + if ((status == 3) || (status == 5) || (status == 7)) { + /* is a progress indicator required? + */ + memset (&io2, 0, sizeof (io)); + + io2.cmd = ID_LOG_DRV; + io2.unit = logd_cntr | UNITVALID; + + if (ioctl (devicefd, IDAPASSTHRU, &io2) < 0) + { + perror ("ID_LOG_DRV ioctl"); + /* return 0; no return this isn't fatal for now */ + } + else + { + nr_blks = io2.c.id_log_drv.nr_blks; + blks_tr = io.c.sense_log_drv_stat.blks_to_recover; + + pvalue = ((float)(nr_blks - blks_tr)/(float)nr_blks) * 100; + } + } + else { + pvalue = 0.0; + } + + if (opts.debug) { + fprintf(stdout, "DEBUG: Status of controller %d unit %d is %d\n", + ctrl_cntr, logd_cntr, status); + fprintf(stdout, "DEBUG: "); + fprintf(stdout, statusstr[status], + ctrl_cntr, logd_cntr, pvalue); + fprintf(stdout, "\n"); + } + + printf(statusstr[status], ctrl_cntr, logd_cntr, pvalue); + + switch(status) + { + case 1: + case 2: + case 6: + case 7: + case 9: + /* CRITICAL */ + exit_code = 2; + break; + case 3: + case 4: + case 5: + case 8: + case 10: + case 11: + case 12: + /* WARNING (only if not yet at CRITICAL LEVEL) */ + if (exit_code < 2) exit_code = 1; + break; + case 0: + default: + /* do nothing */ + break; + } + + ctrls_found[ctrl_cntr].log_disk[logd_cntr].pvalue = pvalue; + ctrls_found[ctrl_cntr].log_disk[logd_cntr].status = status; + } + close (devicefd); + } + + return 1; +} + +int discover_controllers (struct opts opts) +{ + int cntr; + int foundone = 0; + + for (cntr = 0; cntr < 8; cntr++) + { + /* does this device exist ? */ + if ((access (controllers[cntr], R_OK | F_OK)) == 0) + { + /* it does :) */ + if (interrogate_controller (opts, cntr)) + { + foundone = 1; + if (opts.debug) + fprintf (stderr, "DEBUG: %s is a existing controller\n", + controllers[cntr]); + } + } + else if (opts.debug) + { + fprintf (stderr, "DEBUG: Device %s could not be opened\n", controllers[cntr]); + perror ("DEBUG: reason"); + } + } + return foundone; +} + +void boardid2str (unsigned long board_id, char *name) +{ + switch (board_id) + { + case 0x0040110E: /* IDA */ + strcpy (name, "Compaq IDA"); + break; + case 0x0140110E: /* IDA-2 */ + strcpy (name, "Compaq IDA-2"); + break; + case 0x1040110E: /* IAES */ + strcpy (name, "Compaq IAES"); + break; + case 0x2040110E: /* SMART */ + strcpy (name, "Compaq SMART"); + break; + case 0x3040110E: /* SMART-2/E */ + strcpy (name, "Compaq SMART-2/E"); + break; + case 0x40300E11: /* SMART-2/P or SMART-2DH */ + strcpy (name, "Compaq SMART-2/P (2DH)"); + break; + case 0x40310E11: /* SMART-2SL */ + strcpy (name, "Compaq SMART-2SL"); + break; + case 0x40320E11: /* SMART-3200 */ + strcpy (name, "Compaq SMART-3200"); + break; + case 0x40330E11: /* SMART-3100ES */ + strcpy (name, "Compaq SMART-3100ES"); + break; + case 0x40340E11: /* SMART-221 */ + strcpy (name, "Compaq SMART-221"); + break; + case 0x40400E11: /* Integrated Array */ + strcpy (name, "Compaq Integrated Array"); + break; + case 0x40500E11: /* Smart Array 4200 */ + strcpy (name, "Compaq Smart Array 4200"); + break; + case 0x40510E11: /* Smart Array 4250ES */ + strcpy (name, "Compaq Smart Array 4250ES"); + break; + case 0x40580E11: /* Smart Array 431 */ + strcpy (name, "Compaq Smart Array 431"); + break; + default: + /* + * Well, its a SMART-2 or better, don't know which + * kind. + */ + strcpy (name, "Unknown Controller Type"); + } +} + +int interrogate_controller (struct opts opts, int contrnum) +{ + int devicefd; + ida_ioctl_t io; + char buffer[30]; + int foundone = 0; + int cntr; + + devicefd = open (controllers[contrnum], O_RDONLY); + /* no checks, did that before */ + + /* clear io */ + memset (&io, 0, sizeof (io)); + + io.cmd = ID_CTLR; + + if (ioctl (devicefd, IDAPASSTHRU, &io) < 0) + { + if (opts.debug) perror ("DEBUG: ioctl"); + return 0; + } + + boardid2str (io.c.id_ctlr.board_id, buffer); + + strncpy (ctrls_found[ctrls_found_num].ctrl_devicename, + buffer, 20); + + ctrls_found[ctrls_found_num].num_logd_found = 0; + + for (cntr = 0; cntr < io.c.id_ctlr.nr_drvs; cntr++) + { + if (interrogate_logical (opts, devicefd, cntr)) + { + /* logical drive found, this could be used later one */ + foundone = 1; + } + } + + switch (ctrls_found[ctrls_found_num].num_logd_found) + { + case 0: + printf("Found a %s with no logical drives.\n", buffer); + break; + case 1: + printf("Found a %s with one Logical drive.\n", buffer, + ctrls_found[ctrls_found_num].num_logd_found); + break; + default: + printf("Found a %s with %d Logical drives.\n", buffer, + ctrls_found[ctrls_found_num].num_logd_found); + break; + } + + ctrls_found_num++; + + close (devicefd); + return 1; +} + +int interrogate_logical (struct opts opts, int devicefd, int unit_nr) +{ + ida_ioctl_t io; + ida_ioctl_t io2; + int nr_blks, blks_tr; + + if (opts.debug) printf ("DEBUG: interrogating unit %d\n", unit_nr); + + memset (&io, 0, sizeof (io)); + + io.cmd = ID_LOG_DRV; + io.unit = unit_nr | UNITVALID; + + if (ioctl (devicefd, IDAPASSTHRU, &io) < 0) + { + perror ("FATAL: ID_LOG_DRV ioctl"); + return 0; + } + + memset (&io2, 0, sizeof (io2)); + + io2.cmd = SENSE_LOG_DRV_STAT; + io2.unit = unit_nr | UNITVALID; + + if (ioctl (devicefd, IDAPASSTHRU, &io2) < 0) + { + perror ("FATAL: SENSE_LOG_DRV_STAT ioctl"); + return 0; + } + + ctrls_found[ctrls_found_num].num_logd_found++; + /* ctrls_found[ctrls_found_num].log_disk[unit_nr].status = + * io2.c.sense_log_drv_stat.status; + + * nr_blks = io2.c.id_log_drv.nr_blks; + * blks_tr = io.c.sense_log_drv_stat.blks_to_recover; + * ctrls_found[ctrls_found_num].log_disk[unit_nr].pvalue = + * ((float)(nr_blks - blks_tr)/(float)nr_blks) * 100; + */ + ctrls_found[ctrls_found_num].log_disk[unit_nr].status = 0; + ctrls_found[ctrls_found_num].log_disk[unit_nr].pvalue = 0; + + return 1; +} + + +void print_usage() +{ + printf("cpqarrayd [options]\n"); + printf(" -h prints this text\n"); + printf(" -d enables debugging\n"); +} + + +int main(int argc, char *argv[]) +{ + char option; + struct opts opts; /* commandline options */ + + memset(&opts, 0, sizeof(struct opts)); + + /* check options */ + while ((option = getopt (argc, argv, "dh:")) != EOF) + { + switch (option) + { + case 'd': + opts.debug = 1; + break; + case '?': + case 'h': + default: + print_usage(); + exit(0); + break; + } + } + + /* Check for existance of array controllers */ + if (!discover_controllers(opts)) { + printf("No array controller found!\n\n"); + exit(1); + } + + status_check(opts); + + return exit_code; +} diff --git a/contrib/check_digitemp.pl b/contrib/check_digitemp.pl new file mode 100755 index 0000000..d2b40a1 --- /dev/null +++ b/contrib/check_digitemp.pl @@ -0,0 +1,252 @@ +#!/usr/bin/perl -w + +# check_digitemp.pl Copyright (C) 2002 by Brian C. Lane +# +# This is a NetSaint plugin script to check the temperature on a local +# machine. Remote usage may be possible with SSH +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# =========================================================================== +# Howto Install in NetSaint (tested with v0.0.7) +# +# 1. Copy this script to /usr/local/netsaint/libexec/ or wherever you have +# placed your NetSaint plugins +# +# 2. Create a digitemp config file in /usr/local/netsaint/etc/ +# eg. digitemp -i -s/dev/ttyS0 -c /usr/local/netsaint/etc/digitemp.conf +# +# 3. Make sure that the webserver user has permission to access the serial +# port being used. +# +# 4. Add a command to /usr/local/netsaint/etc/commands.cfg like this: +# command[check-temp]=$USER1$/check_digitemp.pl -w $ARG1$ -c $ARG2$ \ +# -t $ARG3$ -f $ARG4$ +# (fold into one line) +# +# 5. Tell NetSaint to monitor the temperature by adding a service line like +# this to your hosts.cfg file: +# service[kermit]=Temperature;0;24x7;3;5;1;home-admins;120;24x7;1;1;1;; \ +# check-temp!65!75!1!/usr/local/netsaint/etc/digitemp.conf +# (fold into one line) +# 65 is the warning temperature +# 75 is the critical temperature +# 1 is the sensor # (as reported by digitemp -a) to monitor +# digitemp.conf is the path to the config file +# +# 6. If you use Centigrade instead of Fahrenheit, change the commands.cfg +# line to include the -C argument. You can then pass temperature limits in +# Centigrade in the service line. +# +# =========================================================================== +# Howto Install in Nagios (tested with v1.0b4) +# +# 1. Copy this script to /usr/local/nagios/libexec/ or wherever you have +# placed your Nagios plugins +# +# 2. Create a digitemp config file in /usr/local/nagios/etc/ +# eg. digitemp -i -s/dev/ttyS0 -c /usr/local/nagios/etc/digitemp.conf +# +# 3. Make sure that the webserver user has permission to access the serial +# port being used. +# +# 4. Add a command to /usr/local/nagios/etc/checkcommands.cfg like this: +# +# #DigiTemp temperature check command +# define command{ +# command_name check_temperature +# command_line $USER1$/check_digitemp.pl -w $ARG1$ -c $ARG2$ \ +# -t $ARG3$ -f $ARG4$ +# (fold above into one line) +# } +# +# 5. Tell NetSaint to monitor the temperature by adding a service line like +# this to your service.cfg file: +# +# #DigiTemp Temperature check Service definition +# define service{ +# use generic-service +# host_name kermit +# service_description Temperature +# is_volatile 0 +# check_period 24x7 +# max_check_attempts 3 +# normal_check_interval 5 +# retry_check_interval 2 +# contact_groups home-admins +# notification_interval 240 +# notification_period 24x7 +# notification_options w,u,c,r +# check_command check_temperature!65!75!1! \ +# /usr/local/nagios/etc/digitemp.conf +# (fold into one line) +# } +# +# 65 is the warning temperature +# 75 is the critical temperature +# 1 is the sensor # (as reported by digitemp -a) to monitor +# digitemp.conf is the path to the config file +# +# 6. If you use Centigrade instead of Fahrenheit, change the checkcommands.cfg +# line to include the -C argument. You can then pass temperature limits in +# Centigrade in the service line. +# +# =========================================================================== + +# Modules to use +use strict; +use Getopt::Std; + +# Define all our variable usage +use vars qw($opt_c $opt_f $opt_t $opt_w $opt_F $opt_C + $temperature $conf_file $sensor $temp_fmt + $crit_level $warn_level $null + %exit_codes + $percent $fmt_pct + $verb_err $command_line); + + +# Predefined exit codes for NetSaint +%exit_codes = ('UNKNOWN' ,-1, + 'OK' , 0, + 'WARNING' , 1, + 'CRITICAL', 2,); + +# Default to Fahrenheit input and result (use -C to change this) +$temp_fmt = 3; + + +# Get the options +if ($#ARGV le 0) +{ + &usage; +} else { + getopts('f:t:FCc:w:'); +} + +# Shortcircuit the switches +if (!$opt_w or $opt_w == 0 or !$opt_c or $opt_c == 0) +{ + print "*** You must define WARN and CRITICAL levels!"; + &usage; +} + +# Check if levels are sane +if ($opt_w >= $opt_c) +{ + print "*** WARN level must not be greater than CRITICAL when checking temperature!"; + &usage; +} + + +$warn_level = $opt_w; +$crit_level = $opt_c; + +# Default sensor to read is #0 +if(!$opt_t) +{ + $sensor = 0; +} else { + $sensor = $opt_t; +} + +# Default config file is /etc/digitemp.conf +if(!$opt_f) +{ + $conf_file = "/etc/digitemp.conf"; +} else { + $conf_file = $opt_f; +} + +# Check for config file +if( !-f $conf_file ) { + print "*** You must have a digitemp.conf file\n"; + &usage; +} + + +if($opt_C) +{ + $temp_fmt = 2; +} + +# Read the output from digitemp +# Output in form 0\troom\tattic\tdrink +open( DIGITEMP, "/usr/local/bin/digitemp -c $conf_file -t $sensor -q -o $temp_fmt |" ); + +# Process the output from the command +while( ) +{ +# print "$_\n"; + chomp; + + if( $_ =~ /^nanosleep/i ) + { + print "Error reading sensor #$sensor\n"; + close(DIGITEMP); + exit $exit_codes{'UNKNOWN'}; + } else { + # Check for an error from digitemp, and report it instead + if( $_ =~ /^Error.*/i ) { + print $_; + close(DIGITEMP); + exit $exit_codes{'UNKNOWN'}; + } else { + ($null,$temperature) = split(/\t/); + } + } +} +close( DIGITEMP ); + +if( $temperature and $temperature >= $crit_level ) +{ + print "Temperature CRITICAL - Sensor #$sensor = $temperature "; + if( $temp_fmt == 3 ) { print "F\n"; } else { print "C\n"; } + exit $exit_codes{'CRITICAL'}; +} elsif ($temperature and $temperature >= $warn_level ) { + print "Temperature WARNING - Sensor #$sensor = $temperature "; + if( $temp_fmt == 3 ) { print "F\n"; } else { print "C\n"; } + exit $exit_codes{'WARNING'}; +} elsif( $temperature ) { + print "Temperature OK - Sensor #$sensor = $temperature "; + if( $temp_fmt == 3 ) { print "F\n"; } else { print "C\n"; } + exit $exit_codes{'OK'}; +} else { + print "Error parsing result for sensor #$sensor\n"; + exit $exit_codes{'UNKNOWN'}; +} + +# Show usage +sub usage() +{ + print "\ncheck_digitemp.pl v1.0 - NetSaint Plugin\n"; + print "Copyright 2002 by Brian C. Lane \n"; + print "See source for License\n"; + print "usage:\n"; + print " check_digitemp.pl -t -f -w -c \n\n"; + print "options:\n"; + print " -f DigiTemp Config File\n"; + print " -t DigiTemp Sensor #\n"; + print " -F Temperature in Fahrenheit\n"; + print " -C Temperature in Centigrade\n"; + print " -w temperature temperature >= to warn\n"; + print " -c temperature temperature >= when critical\n"; + + exit $exit_codes{'UNKNOWN'}; +} diff --git a/contrib/check_disk_snmp.pl b/contrib/check_disk_snmp.pl new file mode 100644 index 0000000..a09343d --- /dev/null +++ b/contrib/check_disk_snmp.pl @@ -0,0 +1,74 @@ +#!/usr/bin/perl +# cm@financial.com 07/2002 +use strict; +use Net::SNMP; +use Getopt::Std; + +my %opts =( + u => 'nobody', # snmp user + l => 'authNoPriv', # snmp security level + a => 'MD5', # snmp authentication protocol + A => 'nopass', # authentication protocol pass phrase. + x => 'DES', # privacy protocol + m => 'localhost', # host + d => 1, # devicenumber + w => 70, # warnratio + c => 85, # critical ratio + h => 0, + ); + +getopts('m:u:l:a:A:x:d:w:c:h',\%opts); + +if ( $opts{'h'} ) { + print "Usage: $0 [ -u ] [ -l ] [ -a ] [ -A ] [ -x ] [ -m ] [ -d ] [ -w ] [ -c = $opts{'c'}) { + print "Errorratio must be higher then Warnratio!\n"; + exit 1; +} + +my ($session, $error) = Net::SNMP->session( + -hostname => $opts{'m'}, + -nonblocking => 0x0, + -username => $opts{'u'}, + -authpassword => $opts{'A'}, + -authprotocol => $opts{'a'}, + -version => '3', + ); + +if ($@) { + print "SNMP-Error occured"; + exit 1; +} +my $result=undef; + + +my $deviceSize=".1.3.6.1.2.1.25.2.3.1.5.$opts{'d'}"; +my $deviceUsed=".1.3.6.1.2.1.25.2.3.1.6.$opts{'d'}"; +my $deviceName=".1.3.6.1.2.1.25.2.3.1.3.$opts{'d'}"; +my @OID=($deviceSize, $deviceUsed, $deviceName); +$result = $session->get_request( + -varbindlist => \@OID, + ); + +if (!defined($result)) { + printf("ERROR: %s.\n", $session->error); + $session->close; + exit 1; +} + +my $ratio=$result->{$deviceUsed}*100/$result->{$deviceSize}; + +if ($ratio > $opts{'c'}){ + printf("CRITICAL: %s usage %.2f%%\n", $result->{$deviceName}, $ratio); + exit 2; +} +if ($ratio > $opts{'w'}){ + printf("WARNING: %s usage %.2f%%\n", $result->{$deviceName}, $ratio); + exit 1; +} + +printf("OK: %s usage %.2f%%\n", $result->{$deviceName}, $ratio); +exit 0; diff --git a/contrib/check_dlswcircuit.pl b/contrib/check_dlswcircuit.pl new file mode 100755 index 0000000..f6ef931 --- /dev/null +++ b/contrib/check_dlswcircuit.pl @@ -0,0 +1,221 @@ +#!/usr/bin/perl -w +# +# check_dlswcircuit.pl - nagios plugin +# +# Checks if a Cisco Dlsw circuit is connected. +# +# +# Copyright (C) 2000 Carsten Foss & Christoph Kron +# +# Basically this is an adapted version of Christoph Kron's (ck@zet.net) check_ifoperstatus.pl plugin. +# most of the thanks should go to him. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Arguments : -s -d -c -p +# - +# Source & Dest Mac/Sap arguments must be given in Hex as this example : 40.00.01.37.45.01.ss (Where ss is the sap) +# +# Sample command line : check_dlswcircuit.pl -s 40.00.01.37.45.01.04 -d 40.00.02.37.45.02.04 -c secret 1.2.3.4 +# +# Sample host.cfg entry : +#service[Dlsw-xx]=NCP1-NCP2;0;24x7;3;5;1;router-admins;240;24x7;1;1;0;;check_dlswcircuit!-s 40.00.01.37.45.01.04!-d 40.00..01.37.45.02.04!-c secret!1.2.3.4 +# remember to add the service to commands.cfg , something like this: +# command[check_dlswcircuit]=$USER1$/check_dlswcircuit.pl $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ +# +# Report bugs to: cfo@dmdata.dk +# +# 11.03.2000 Version 1.0 + +use strict; + +use Net::SNMP; +use Getopt::Long; +&Getopt::Long::config('auto_abbrev'); + + +my $status; +my $TIMEOUT = 15; + +my %ERRORS = ('UNKNOWN' , '-1', + 'OK' , '0', + 'WARNING', '1', + 'CRITICAL', '2'); + +my %dlswCircuitStatus = ( + '1','disconnected', + '2','circuitStart', + '3','resolvePending', + '4','circuitPending', + '5','circuitEstablished', + '6','connectPending', + '7','contactPending', + '8','connected', + '9','disconnectPending', + '10','haltPending', + '11','haltPendingNoack', + '13','circuitRestart', + '14','restartPending'); + +my $state = "UNKNOWN"; +my $answer = ""; +my $smac = ""; +my $dmac = ""; +my $community = "public"; +my $port = 161; +#Dlsw Circuit Oid enterprises.9.10.9.1.5.2.1.17.6.0.96.148.47.230.166.4.6.64.0.1.55.69.2.4 = 8 +my $enterpriseOid = "1.3.6.1.4.1"; +my $ciscoDlswCircuitOid = ".9.10.9.1.5.2.1.17."; +my $unknownOid = "6."; +my $smacOid = ""; +my $dmacOid = ""; +my $tmpOid = ""; +my @tmparg; +my $snmpoid; +my @snmpoids; +my $hostname; +my $session; +my $error; +my $response; +my $p = ""; +my $q = ""; + +sub usage { + printf "\nMissing arguments!\n"; + printf "\n"; + printf "Perl Check Cisco Dlsw Circuit State plugin for Nagios\n"; + printf "checks operational status of specified DLSW Circuit\n"; + printf "usage: \n"; + printf "check_dlswcircuit.pl -s -d -c -p "; + printf "\nCopyright (C) 2000 Carsten Foss\n"; + printf "check_dlswcircuit.pl comes with ABSOLUTELY NO WARRANTY\n"; + printf "This programm is licensed under the terms of the "; + printf "GNU General Public License\n(check source code for details)\n"; + printf "\n\n"; + exit $ERRORS{"UNKNOWN"}; +} + +# Just in case of problems, let's not hang Nagios +$SIG{'ALRM'} = sub { + print ("ERROR: No snmp response from $hostname (alarm)\n"); + exit $ERRORS{"UNKNOWN"}; +}; +alarm($TIMEOUT); + + +$status = GetOptions("sourcemac=s",\$smac,"destmac=s",\$dmac, + "community=s",\$community, + "port=i",\$port); +if ($status == 0) +{ + &usage; +} + +# +#Convert Source Mac & Sap +# + @tmparg = split(/\./,$smac); + #print "-$smac-\n"; + #print "@tmparg\n"; + #print "$#tmparg\n"; + if($#tmparg != 6) + { + print "SourceMac/Sap format $smac not valid\n"; + &usage; + } + while($p = shift @tmparg) + { + $q = hex($p); + $smacOid = $smacOid.$q; + $smacOid = $smacOid.'.'; + } + + #print "@tmparg1\n"; + #print "$smacOid\n"; + +# +#Convert Dest Mac & Sap +# + @tmparg = split(/\./,$dmac); + #print "-$dmac-\n"; + #print "@tmparg\n"; + #print "$#tmparg\n"; + if($#tmparg != 6) + { + print "DestMac/Sap format $dmac not valid\n"; + &usage; + } + + while($p = shift @tmparg) + { + $q = hex($p); + $dmacOid = $dmacOid.$q; + $dmacOid = $dmacOid.'.'; + } +# Remove Trailing Dot + $dmacOid = substr($dmacOid,0,length($dmacOid)-1); + + + #print "@tmparg1\n"; + #print "$dmacOid\n"; +#Build the Dlsw Oic to use + $snmpoid = $enterpriseOid.$ciscoDlswCircuitOid.$unknownOid.$smacOid.$unknownOid.$dmacOid ; + #print "$snmpoid\n"; + + #shift; + $hostname = shift || &usage; + + ($session, $error) = Net::SNMP->session( + -hostname => $hostname, + -community => $community, + -port => $port + ); + + if (!defined($session)) { + $state='UNKNOWN'; + $answer=$error; + print ("$state: $answer"); + exit $ERRORS{$state}; + } + + push(@snmpoids,$snmpoid); + #push(@snmpoids,$snmpLocIfDescr); + + if (!defined($response = $session->get_request(@snmpoids))) { + $answer=$session->error; + $session->close; + $state = 'CRITICAL'; + print ("$state: $answer,$community,$smac - $dmac"); + exit $ERRORS{$state}; + } + + $answer = sprintf("dlsw circuit %s - %s at host '%s',is %s\n", + $smac, + $dmac, + $hostname, + $dlswCircuitStatus{$response->{$snmpoid}} + ); + + $session->close; + + if ( $response->{$snmpoid} == 8 ) { + $state = 'OK'; + } + else { + $state = 'CRITICAL'; + } + +print ("$state: $answer"); +exit $ERRORS{$state}; diff --git a/contrib/check_dns_random.pl b/contrib/check_dns_random.pl new file mode 100644 index 0000000..4bed412 --- /dev/null +++ b/contrib/check_dns_random.pl @@ -0,0 +1,74 @@ +#!/usr/bin/perl +# ------------------------------------------------------------------------------ +# File Name: check_dns_random.pl +# Author: Richard Mayhew - South Africa +# Date: 2000/01/26 +# Version: 1.0 +# Description: This script will check to see if dns resolves hosts +# randomly from a list using the check_dns plugin. +# Email: netsaint@splash.co.za +# ------------------------------------------------------------------------------ +# Copyright 1999 (c) Richard Mayhew +# Credits go to Ethan Galstad for coding Nagios +# If any changes are made to this script, please mail me a copy of the +# changes :) +# License GPL +# ------------------------------------------------------------------------------ +# Date Author Reason +# ---- ------ ------ +# 1999/09/26 RM Creation +# ------------------------------------------------------------------------------ + +# -----------------------------------------------------------------[ Require ]-- +require 5.004; + +# --------------------------------------------------------------------[ Uses ]-- +use Socket; +use strict; + +# --------------------------------------------------------------[ Enviroment ]-- +$ENV{PATH} = "/bin"; +$ENV{BASH_ENV} = ""; +$|=1; + +my $host = shift || &usage; + +my $domainfile = "/usr/local/nagios/etc/domains.list"; +my $wc = `/usr/bin/wc -l $domainfile`; +my $check = "/usr/local/nagios/libexec/check_dns"; +my $x = 0; +my $srv_file = ""; +my $z = ""; +my $y = ""; + +open(DOMAIN,"<$domainfile") or die "Error Opening $domainfile File!\n"; + while () { + $srv_file .= $_; +} + close(DOMAIN); + my @data = split(/\n/,$srv_file); + +chomp $wc; +$wc =~ s/ //g; +$wc =~ s/domains//g; + +$x = rand $wc; +($z,$y) = split(/\./,$x); + +system($check, $data[$z], $host); +exit ($? / 256); + +sub usage +{ + print "Minimum arguments not supplied!\n"; + print "\n"; + print "Perl Check Random DNS plugin for Nagios\n"; + print "Copyright (c) 2000 Richard Mayhew\n"; + print "\n"; + print "Usage: check_dns_random.pl \n"; + print "\n"; + print " = DNS server you would like to query.\n"; + exit -1; + +} + diff --git a/contrib/check_email_loop.pl b/contrib/check_email_loop.pl new file mode 100644 index 0000000..7e0a9f0 --- /dev/null +++ b/contrib/check_email_loop.pl @@ -0,0 +1,295 @@ +#!/usr/bin/perl +# +# (c)2000 Benjamin Schmid, blueshift@gmx.net (emergency use only ;-) +# Copyleft by GNU GPL +# +# +# check_email_loop Nagios Plugin +# +# This script sends a mail with a specific id in the subject via +# an given smtp-server to a given email-adress. When the script +# is run again, it checks for this Email (with its unique id) on +# a given pop3 account and send another mail. +# +# +# Example: check_email_loop.pl -poph=mypop -popu=user -pa=password +# -smtph=mailer -from=returnadress@yoursite.com +# -to=remaileradress@friend.com -pendc=2 -lostc=0 +# +# This example will send eacht time this check is executed a new +# mail to remaileradress@friend.com using the SMTP-Host mailer. +# Then it looks for any back-forwarded mails in the POP3 host +# mypop. In this Configuration CRITICAL state will be reached if +# more than 2 Mails are pending (meaning that they did not came +# back till now) or if a mails got lost (meaning a mail, that was +# send later came back prior to another mail). +# +# Michael Markstaller, mm@elabnet.de various changes/additions +# MM 021003: fixed some unquoted strings +# MM 021116: fixed/added pendwarn/lostwarn +# MM 030515: added deleting of orphaned check-emails +# changed to use "top" instead of get to minimize traffic (required changing match-string from "Subject: Email-ping [" to "Email-Ping [" + +use Net::POP3; +use Net::SMTP; +use strict; +use Getopt::Long; +&Getopt::Long::config('auto_abbrev'); + +# ---------------------------------------- + +my $TIMEOUT = 120; +my %ERRORS = ('UNKNOWN' , '-1', + 'OK' , '0', + 'WARNING', '1', + 'CRITICAL', '2'); + +my $state = "UNKNOWN"; +my ($sender,$receiver, $pophost, $popuser, $poppasswd, $smtphost,$keeporphaned); +my ($poptimeout,$smtptimeout,$pinginterval,$maxmsg)=(60,60,5,50); +my ($lostwarn, $lostcrit,$pendwarn, $pendcrit,$debug); + +# Internal Vars +my ($pop,$msgcount,@msglines,$statinfo,@messageids,$newestid); +my (%other_smtp_opts); +my ($matchcount,$statfile) = (0,"check_email_loop.stat"); + +# Subs declaration +sub usage; +sub messagematchs; +sub nsexit; + +# Just in case of problems, let's not hang Nagios +$SIG{'ALRM'} = sub { + print ("ERROR: $0 Time-Out $TIMEOUT s \n"); + exit $ERRORS{"UNKNOWN"}; +}; +alarm($TIMEOUT); + + +# Evaluate Command Line Parameters +my $status = GetOptions( + "from=s",\$sender, + "to=s",\$receiver, + "debug", \$debug, + "pophost=s",\$pophost, + "popuser=s",\$popuser, + "passwd=s",\$poppasswd, + "poptimeout=i",\$poptimeout, + "smtphost=s",\$smtphost, + "smtptimeout=i",\$smtptimeout, + "statfile=s",\$statfile, + "interval=i",\$pinginterval, + "lostwarn=i",\$lostwarn, + "lostcrit=i",\$lostcrit, + "pendwarn=i",\$pendwarn, + "pendcrit=i",\$pendcrit, + "maxmsg=i",\$maxmsg, + "keeporphaned=s",\$keeporphaned, + ); +usage() if ($status == 0 || ! ($pophost && $popuser && $poppasswd && + $smtphost && $receiver && $sender )); + +# Try to read the ids of the last send emails out of statfile +if (open STATF, "$statfile") { + @messageids = ; + chomp @messageids; + close STATF; +} + +# Try to open statfile for writing +if (!open STATF, ">$statfile") { + nsexit("Failed to open mail-ID database $statfile for writing",'CRITICAL'); +} + +# Ok - check if it's time to release another mail + +# ... + +# creating new serial id +my $serial = time(); +$serial = "ID#" . $serial . "#$$"; + + +# sending new ping email +%other_smtp_opts={}; +if ( $debug == 1 ) { + $other_smtp_opts{'Debug'} = 1; +} + +my $smtp = Net::SMTP->new($smtphost,Timeout=>$smtptimeout, %other_smtp_opts) + || nsexit("SMTP connect timeout ($smtptimeout s)",'CRITICAL'); +($smtp->mail($sender) && + $smtp->to($receiver) && + $smtp->data() && + $smtp->datasend("To: $receiver\nSubject: E-Mail Ping [$serial]\n\n". + "This is a automatically sended E-Mail.\n". + "It ist not intended for human reader.\n\n". + "Serial No: $serial\n") && + $smtp->dataend() && + $smtp->quit + ) || nsexit("Error delivering message",'CRITICAL'); + +# no the interessting part: let's if they are receiving ;-) + +$pop = Net::POP3->new( $pophost, + Timeout=>$poptimeout) + || nsexit("POP3 connect timeout (>$poptimeout s, host: $pophost)",'CRITICAL'); + +$msgcount=$pop->login($popuser,$poppasswd); + +$statinfo="$msgcount mails on POP3"; + +nsexit("POP3 login failed (user:$popuser)",'CRITICAL') if (!defined($msgcount)); + +# Check if more than maxmsg mails in pop3-box +nsexit(">$maxmsg Mails ($msgcount Mails on POP3); Please delete !",'WARNING') if ($msgcount > $maxmsg); + +# Count messages, that we are looking 4: +while ($msgcount > 0) { + @msglines = @{$pop->top($msgcount,1)}; + for (my $i=0; $i < scalar @messageids; $i++) { + if (messagematchsid(\@msglines,$messageids[$i])) { + $matchcount++; + # newest received mail than the others, ok remeber id. + $newestid = $messageids[$i] if ($messageids[$i] > $newestid || !defined $newestid); + $pop->delete($msgcount); # remove E-Mail from POP3 server + splice @messageids, $i, 1;# remove id from List + last; # stop looking in list + } + } + # Delete orphaned Email-ping msg + my @msgsubject = grep /^Subject/, @msglines; + chomp @msgsubject; + # Scan Subject if email is an Email-Ping. In fact we match and delete also successfully retrieved messages here again. + if (!defined $keeporphaned && $msgsubject[0] =~ /E-Mail Ping \[/) { + $pop->delete($msgcount); # remove E-Mail from POP3 server + } + + $msgcount--; +} + +$pop->quit(); # necessary for pop3 deletion! + +# traverse through the message list and mark the lost mails +# that mean mails that are older than the last received mail. +if (defined $newestid) { + $newestid =~ /\#(\d+)\#/; + $newestid = $1; + for (my $i=0; $i < scalar @messageids; $i++) { + $messageids[$i] =~ /\#(\d+)\#/; + my $akid = $1; + if ($akid < $newestid) { + $messageids[$i] =~ s/^ID/LI/; # mark lost + } + } +} + +# Write list to id-Database +foreach my $id (@messageids) { + print STATF "$id\n"; +} +print STATF "$serial\n"; # remember send mail of this session +close STATF; + +# ok - count lost and pending mails; +my @tmp = grep /^ID/, @messageids; +my $pendingm = scalar @tmp; +@tmp = grep /^LI/, @messageids; +my $lostm = scalar @tmp; + +# Evaluate the Warnin/Crit-Levels +if (defined $pendwarn && $pendingm > $pendwarn) { $state = 'WARNING'; } +if (defined $lostwarn && $lostm > $lostwarn) { $state = 'WARNING'; } +if (defined $pendcrit && $pendingm > $pendcrit) { $state = 'CRITICAL'; } +if (defined $lostcrit && $lostm > $lostcrit) { $state = 'CRITICAL'; } + +if ((defined $pendwarn || defined $pendcrit || defined $lostwarn + || defined $lostcrit) && ($state eq 'UNKNOWN')) {$state='OK';} + + +# Append Status info +$statinfo = $statinfo . ", $matchcount mail(s) came back,". + " $pendingm pending, $lostm lost."; + +# Exit in a Nagios-compliant way +nsexit($statinfo); + +# ---------------------------------------------------------------------- + +sub usage { + print "check_email_loop 1.1 Nagios Plugin - Real check of a E-Mail system\n"; + print "=" x 75,"\nERROR: Missing or wrong arguments!\n","=" x 75,"\n"; + print "This script sends a mail with a specific id in the subject via an given\n"; + print "smtp-server to a given email-adress. When the script is run again, it checks\n"; + print "for this Email (with its unique id) on a given pop3 account and sends \n"; + print "another mail.\n"; + print "\nThe following options are available:\n"; + print " -from=text email adress of send (for mail returnr on errors)\n"; + print " -to=text email adress to which the mails should send to\n"; + print " -pophost=text IP or name of the POP3-host to be checked\n"; + print " -popuser=text Username of the POP3-account\n"; + print " -passwd=text Password for the POP3-user\n"; + print " -poptimeout=num Timeout in seconds for the POP3-server\n"; + print " -smtphost=text IP oder name of the SMTP host\n"; + print " -smtptimeout=num Timeout in seconds for the SMTP-server\n"; + print " -statfile=text File to save ids of messages ($statfile)\n"; + print " -interval=num Time (in minutes) that must pass by before sending\n"; + print " another Ping-mail (gibe a new try);\n"; + print " -lostwarn=num WARNING-state if more than num lost emails\n"; + print " -lostcrit=num CRITICAL \n"; + print " -pendwarn=num WARNING-state if more than num pending emails\n"; + print " -pendcrit=num CRITICAL \n"; + print " -maxmsg=num WARNING if more than num emails on POP3 (default 50)\n"; + print " -keeporphaned Set this to NOT delete orphaned E-Mail Ping msg from POP3\n"; + print " -debug send SMTP tranaction info to stderr\n\n"; + print " Options may abbreviated!\n"; + print " LOST mails are mails, being sent before the last mail arrived back.\n"; + print " PENDING mails are those, which are not. (supposed to be on the way)\n"; + print "\nExample: \n"; + print " $0 -poph=host -pa=pw -popu=popts -smtph=host -from=root\@me.com\n "; + print " -to=remailer\@testxy.com -lostc=0 -pendc=2\n"; + print "\nCopyleft 19.10.2000, Benjamin Schmid / 2003 Michael Markstaller, mm\@elabnet.de\n"; + print "This script comes with ABSOLUTELY NO WARRANTY\n"; + print "This programm is licensed under the terms of the "; + print "GNU General Public License\n\n"; + exit $ERRORS{"UNKNOWN"}; +} + +# --------------------------------------------------------------------- + +sub nsexit { + my ($msg,$code) = @_; + $code=$state if (!defined $code); + print "$code: $msg\n" if (defined $msg); + exit $ERRORS{$code}; +} + +# --------------------------------------------------------------------- + +sub messagematchsid { + my ($mailref,$id) = (@_); + my (@tmp); + my $match = 0; + + # ID + $id =~ s/^LI/ID/; # evtl. remove lost mail mark + @tmp = grep /E-Mail Ping \[/, @$mailref; + chomp @tmp; + if (($tmp[0] =~ /$id/)) + { $match = 1; } + + # Sender: +# @tmp = grep /^From:\s+/, @$mailref; +# if (@tmp && $sender ne "") +# { $match = $match && ($tmp[0]=~/$sender/); } + + # Receiver: +# @tmp = grep /^To: /, @$mailref; +# if (@tmp && $receiver ne "") +# { $match = $match && ($tmp[0]=~/$receiver/); } + + return $match; +} + +# --------------------------------------------------------------------- diff --git a/contrib/check_fan_cpq_present b/contrib/check_fan_cpq_present new file mode 100644 index 0000000..7d905ff --- /dev/null +++ b/contrib/check_fan_cpq_present @@ -0,0 +1,133 @@ +#!/usr/bin/perl +# +# +# check_most.pl -i -p -c community -o [warn] [critical] +# +# NetSaint host script to get the disk usage from NT snmp +# +# Changes and Modifications +# ========================= +# 3-Aug-2000 - Xavier Dusart +# Created +# 2003 - Rainer Duffner + +BEGIN { + if ($0 =~ m/^(.*?)[\/\\]([^\/\\]+)$/) { + $runtimedir = $1; + $PROGNAME = $2; + } +} + + + +require 5.004; +use POSIX; +#use strict; +use Getopt::Std ; +use BER; +require 'SNMP_Session.pm'; +use vars qw($opt_H $opt_p $opt_C $opt_f $opt_h $PROGNAME); +use lib $main::runtimedir; +use utils qw($TIMEOUT %ERRORS &print_revision &usage &support); +use snmputil qw(%CPQ_LOCALE %CPQ_FAN_PRESENT %CPQ_FAN_OVERALL_COND %CPQ_FAN_SPEED); + +delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; # Make %ENV safer + +getopts('H:p:C:f:hV') ; + +my $ip_address=undef ; + +if ($opt_h) {&help();} + +if ($opt_H =~ m/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z][-a-zA-Z0-9]*(\.[a-zA-Z][-a-zA +-Z0-9]*)*)$/) { + $ip_address = $opt_H ; + } +else { + usage(); + print "IP-Address format wrong\n"; + exit $ERRORS{'UNKNOWN'}; + } + +#if ($opt_p =~ m/^[0-9] + +my $port = $opt_p; + +my $community = $opt_C; + +my $fan = $opt_f ; + +#my $err_counter=0 ; +#my $err_status=""; + + my $fan_locale_oid = encode_oid (1,3,6,1,4,1,232,6,2,6,7,1,3,0,$fan ); +# not used for the moment - gives no usable output +# if reused, enter at end of list to avoid renumbering ! + my $fan_present_oid = encode_oid (1,3,6,1,4,1,232,6,2,6,7,1,4,0,$fan ); + my $fan_speed_oid = encode_oid (1,3,6,1,4,1,232,6,2,6,7,1,6,0,$fan ); + my $fan_condition_oid = encode_oid (1,3,6,1,4,1,232,6,2,6,7,1,9,0,$fan ); + my $count=1 ; + my $label ; + my @r_array=(); + my $q ; + my $diff ; + $warning=$warning/100 ; + $crititcal=$critical/100 ; + + +# get temperature, temperature_threshold bfore shutdown + my $session=SNMP_Session->open ($ip_address, $community, $port) || die "couldn't open SNMP-session to host" ; + + if ($session->get_request_response ($fan_present_oid, $fan_locale_oid, $fan_speed_oid, $fan_condition_oid )) { + (my $bindings) = $session->decode_get_response ($session->{pdu_buffer}); + while ($bindings ne '') { + ($binding, $bindings) = &decode_sequence ($bindings) ; + ($oid,$value) = &decode_by_template ($binding,"%O%@"); + $r_array[$count]=&pretty_print($value); + $count++; + } + } else { + print "No response from agent\n"; + exit $ERRORS{'CRITICAL'}; + } + $result_fan_present= $r_array[1]; + $result_fan_locale= $r_array[2]; + $result_fan_speed= $r_array[3]; + $result_fan_condition=$r_array[4]; + + + if ( $result_fan_present != 3 || $result_fan_speed !=2 ) { + print "Fan ". $fan . " ".$CPQ_LOCALE{$result_fan_locale}. " (".$result_fan_locale.") - Critical: Fan ".$CPQ_FAN_PRESENT{$result_fan_present}.". Speed: ". $CPQ_FAN_SPEED{$result_fan_speed}.". Overall condition: ". $CPQ_FAN_OVERALL_COND{$result_fan_condition} ."\n" ; + exit $ERRORS{'CRITICAL'} ; + } + else { + print "Fan " .$fan . " ".$CPQ_LOCALE{$result_fan_locale}. " (".$result_fan_locale.") - OK: Fan ".$CPQ_FAN_PRESENT{$result_fan_present}.". Speed: ". $CPQ_FAN_SPEED{$result_fan_speed}.". Overall condition: ". $CPQ_FAN_OVERALL_COND{$result_fan_condition} ."\n" ; + exit $ERRORS{'OK'} ; + } + + +sub print_usage () { + print "Usage: $PROGNAME -H -p -C -f \n"; + } + +sub print_help () { + print_revision($PROGNAME,'$Revision: 1.1 $\n '); + print "Copyright (c) 2003 Rainer Duffner\n "; + print_usage(); + print "\n"; + print " = IP-Address or DNS-Name of the W2K-Server\n"; + print " = SNMP-Port (normaly 161)\n"; + print " = SNMP v1 community\n"; + print " = Fannumber (1, 2, 3 etc.)\n"; + } + +sub version () { + print_revision($PROGNAME,'$Revision: 1.1 $ '); + exit $ERRORS{'OK'}; +} + +sub help () { + print_help(); + exit $ERRORS{'OK'}; +} + diff --git a/contrib/check_fan_fsc_present b/contrib/check_fan_fsc_present new file mode 100644 index 0000000..d7af0fe --- /dev/null +++ b/contrib/check_fan_fsc_present @@ -0,0 +1,135 @@ +#!/usr/bin/perl +# +# +# check_most.pl -i -p -c community -o [warn] [critical] +# +# NetSaint host script to get the disk usage from NT snmp +# +# Changes and Modifications +# ========================= +# 3-Aug-2000 - Xavier Dusart +# Created +# 2003 - Rainer Duffner + +BEGIN { + if ($0 =~ m/^(.*?)[\/\\]([^\/\\]+)$/) { + $runtimedir = $1; + $PROGNAME = $2; + } +} + + + +require 5.004; +use POSIX; +#use strict; +use Getopt::Std ; +use BER; +require 'SNMP_Session.pm'; +use vars qw($opt_H $opt_p $opt_C $opt_f $opt_h $PROGNAME); +use lib $main::runtimedir; +use utils qw($TIMEOUT %ERRORS &print_revision &usage &support); +use snmputil qw(%FSC_LOCALE %FSC_FAN_STATUS); + +delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; # Make %ENV safer + +getopts('H:p:C:f:hV') ; + +my $ip_address=undef ; + +if ($opt_h) {&help();} + +if ($opt_H =~ m/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z][-a-zA-Z0-9]*(\.[a-zA-Z][-a-zA +-Z0-9]*)*)$/) { + $ip_address = $opt_H ; + } +else { + usage(); + print "IP-Address format wrong\n"; + exit $ERRORS{'UNKNOWN'}; + } + +#if ($opt_p =~ m/^[0-9] + +my $port = $opt_p; + +my $community = $opt_C; + +my $fan = $opt_f ; + +#my $err_counter=0 ; +#my $err_status=""; + + my $fan_locale_oid = encode_oid (1,3,6,1,4,1,231,2,10,2,2,5,2,2,1,4,0,$fan-1 ); +# not used for the moment - gives no usable output +# if reused, enter at end of list to avoid renumbering ! + my $fan_cur_speed_oid = encode_oid (1,3,6,1,4,1,231,2,10,2,2,5,2,2,1,8,0,$fan-1 ); + my $fan_nom_max_speed_oid = encode_oid (1,3,6,1,4,1,231,2,10,2,2,5,2,2,1,9,0,$fan-1 ); + my $fan_cur_max_speed_oid = encode_oid (1,3,6,1,4,1,231,2,10,2,2,5,2,2,1,10,0,$fan-1 ); + my $fan_condition_oid = encode_oid (1,3,6,1,4,1,231,2,10,2,2,5,2,2,1,3,0,$fan-1 ); + my $count=1 ; + my $label ; + my @r_array=(); + my $q ; + my $diff ; + $warning=$warning/100 ; + $crititcal=$critical/100 ; + + +# get temperature, temperature_threshold bfore shutdown + my $session=SNMP_Session->open ($ip_address, $community, $port) || die "couldn't open SNMP-session to host" ; + + if ($session->get_request_response ($fan_locale_oid, $fan_cur_speed_oid, $fan_nom_max_speed_oid, $fan_cur_max_speed_oid, $fan_condition_oid )) { + (my $bindings) = $session->decode_get_response ($session->{pdu_buffer}); + while ($bindings ne '') { + ($binding, $bindings) = &decode_sequence ($bindings) ; + ($oid,$value) = &decode_by_template ($binding,"%O%@"); + $r_array[$count]=&pretty_print($value); + $count++; + } + } else { + print "No response from agent\n"; + exit $ERRORS{'CRITICAL'}; + } + $result_fan_locale= $r_array[1]; + $result_fan_cur_speed= $r_array[2]; + $result_fan_nom_max_speed= $r_array[3]; + $result_fan_cur_max_speed= $r_array[4]; + $result_fan_condition=$r_array[5]; + + + if ( $result_fan_condition != "3" ) { + print "Fan ". $fan . " ".$FSC_LOCALE{$result_fan_locale}. " (".$result_fan_locale.") - Critical: Cur./Nom./Cur-Max-Speed: ". $result_fan_cur_speed."/". $result_fan_nom_max_speed."/".$result_fan_cur_max_speed.". Overall condition: ". $FSC_FAN_STATUS{$result_fan_condition} ."\n" ; + exit $ERRORS{'CRITICAL'} ; + } + else { + print "Fan " .$fan . " ".$FSC_LOCALE{$result_fan_locale}. " (".$result_fan_locale.") - OK: Cur./Nom./Cur-Max-Speed: ". $result_fan_cur_speed."/". $result_fan_nom_max_speed."/".$result_fan_cur_max_speed.". Overall condition: ". $FSC_FAN_STATUS{$result_fan_condition} ."\n" ; + exit $ERRORS{'OK'} ; + } + + +sub print_usage () { + print "Usage: $PROGNAME -H -p -C -f \n"; + } + +sub print_help () { + print_revision($PROGNAME,'$Revision: 1.1 $\n '); + print "Copyright (c) 2003 Rainer Duffner\n "; + print_usage(); + print "\n"; + print " = IP-Address or DNS-Name of the W2K-Server\n"; + print " = SNMP-Port (normaly 161)\n"; + print " = SNMP v1 community\n"; + print " = Fannumber (1, 2, 3 etc.)\n"; + } + +sub version () { + print_revision($PROGNAME,'$Revision: 1.1 $ '); + exit $ERRORS{'OK'}; +} + +sub help () { + print_help(); + exit $ERRORS{'OK'}; +} + diff --git a/contrib/check_flexlm.pl b/contrib/check_flexlm.pl new file mode 100644 index 0000000..8fa0e33 --- /dev/null +++ b/contrib/check_flexlm.pl @@ -0,0 +1,82 @@ +#!/usr/local/bin/perl +# +# usage: +# check_flexlm.pl license_file +# +# Check available flexlm license managers. +# Use lmstat to check the status of the license server +# described by the license file given as argument. +# Check and interpret the output of lmstat +# and create returncodes and output. +# +# Contrary to the nagios concept, this script takes +# a file, not a hostname as an argument and returns +# the status of hosts and services described in that +# file. Use these hosts.cfg entries as an example +# +#host[anchor]=any host will do;some.address.com;;check-host-alive;3;120;24x7;1;1;1; +#service[anchor]=yodel;24x7;3;5;5;unix-admin;60;24x7;1;1;1;;check_flexlm!/opt/lic/licfiles/yodel_lic +#service[anchor]=yeehaw;24x7;3;5;5;unix-admin;60;24x7;1;1;1;;check_flexlm!/opt/lic/licfiles/yeehaw_lic +#command[check_flexlm]=/some/path/libexec/check_flexlm.pl $ARG1$ +# +# Notes: +# - you need the lmstat utility which comes with flexlm. +# - set the correct path in the variable $lmstat. +# +# initial version: 9-10-99 Ernst-Dieter Martin edmt@infineon.com +# current status: looks like working +# +# Copyright Notice: Do as you please, credit me, but don't blame me +# + +# Just in case of problems, let's not hang Nagios +$SIG{'ALRM'} = sub { + print "No Answer from Client\n"; + exit 2; +}; +alarm(20); + +$lmstat = "/opt/lic/sw/cadadm/default/bin/lmstat"; + +$licfile = shift; + +#print "$licfile \n"; + +open CMD,"$lmstat -c $licfile |"; + +$serverup = 0; + +while ( ) { + if ( /^License server status: [0-9]*@([-0-9a-zA-Z_]*),[0-9]*@([-0-9a-zA-Z_]*),[0-9]*@([-0-9a-zA-Z_]*)/ ) { + $ls1 = $1; + $ls2 = $2; + $ls3 = $3; + $lf1 = $lf2 = $lf3 = 0; + $servers = 3; + } elsif ( /^License server status: [0-9]*@([-0-9a-zA-Z_]*)/ ) { + $ls1 = $1; + $ls2 = $ls3 = ""; + $lf1 = $lf2 = $lf3 = 0; + $servers = 1; + } elsif ( / *$ls1: license server UP/ ) { + print "$ls1 UP, "; + $lf1 = 1 + } elsif ( / *$ls2: license server UP/ ) { + print "$ls2 UP, "; + $lf2 = 1 + } elsif ( / *$ls3: license server UP/ ) { + print "$ls3 UP, "; + $lf3 = 1 + } elsif ( / *([^:]*: UP .*)/ ) { + print " license server for $1\n"; + $serverup = 1; + } +} +if ( $serverup == 0 ) { + print " license server not running\n"; + exit 2; +} + +exit 0 if ( $servers == $lf1 + $lf2 + $lf3 ); +exit 1 if ( $servers == 3 && $lf1 + $lf2 + $lf3 == 2 ); +exit 2; diff --git a/contrib/check_frontpage b/contrib/check_frontpage new file mode 100644 index 0000000..33a5829 --- /dev/null +++ b/contrib/check_frontpage @@ -0,0 +1,151 @@ +#! /usr/bin/perl -w +# +# $Id: check_frontpage,v 1.1 2005/01/27 04:45:00 stanleyhopcroft Exp $ +# +# Check that FrontPage extensions appear to be working on a specified host. +# Currently only checks that the hit counter is not returning an error. +# +# Probably not a good idea to use this on a host that someone's counting +# the hits on, so create a separate vhost for frontpage extensions testing, +# or just install the extensions on the default/root host for your server, and +# point it against that hostname, running it against all vhosts on a server is +# probably rather wasteful. +# +# Kev Green, oRe Net (http://www.orenet.co.uk/). + + +use strict; +use lib "/usr/lib/nagios/plugins"; +use utils qw($TIMEOUT %ERRORS &print_revision &support); +use vars qw($PROGNAME); +use Getopt::Long; +use LWP; +use vars qw($opt_V $opt_h $verbose $opt_w $opt_c $opt_H); +my ($tt,$url,$response,$stime, $etime,$warning,$critical,$mimetype,$failtype,$temp,$message); +my $rt = 0; + +$PROGNAME = "check_frontpage"; +sub print_help (); +sub print_usage (); + +$ENV{'PATH'}=''; +$ENV{'BASH_ENV'}=''; +$ENV{'ENV'}=''; + +Getopt::Long::Configure('bundling'); +GetOptions + ("V" => \$opt_V, "version" => \$opt_V, + "h" => \$opt_h, "help" => \$opt_h, + "v" => \$verbose, "verbose" => \$verbose, + "w=s" => \$opt_w, "warning=s" => \$opt_w, + "c=s" => \$opt_c, "critical=s" => \$opt_c, + "H=s" => \$opt_H, "hostname=s" => \$opt_H); + +if ($opt_V) { + print_revision($PROGNAME,'$Revision: 1.1 $'); #' + exit $ERRORS{'OK'}; +} + +if ($opt_h) { + print_help(); + exit $ERRORS{'OK'}; +} + +$opt_H = shift unless ($opt_H); +print_usage() unless $opt_H; +my $host = $1 if ($opt_H =~ m/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z][-a-zA-Z0-9]+(\.[a-zA-Z0-9][-a-zA-Z0-9]+)*)$/); +print_usage() unless $host; + +($opt_c) || ($opt_c = shift) || ($opt_c = 120); +if ($opt_c =~ /([0-9]+)/) { + $critical = $1; +} else { + $critical = 10; +} + +($opt_w) || ($opt_w = shift) || ($opt_w = 60); +if ($opt_w =~ /([0-9]+)/) { + $warning = $1; +} else { + $warning = 5; +} + +# Guts go here, once we're through argument parsing and have warning and +# critical thresholds. +my $browser = LWP::UserAgent->new; + +my @urls = ( + # This is the "Hit Counter", which continues to work if frontpage extensions + # are 'uninstall'ed from the site, but not when they are 'fulluninstall'ed. + { + url => "_vti_bin/fpcount.exe?Page=_borders/right.htm|Image=4", + mimetype => "image/gif", + message => "None, or broken frontpage extensions on server, or virtual site 'fulluninstall'ed?", + failtype => "CRITICAL" + }, + # This is the "FrontPage Configuration Information" file, which is removed + # when you 'uninstall' the extensions from a site. + { + url => "_vti_inf.html", + mimetype => "text/html", + message => "Someone 'uninstall'ed extensions on virtual site?", + failtype => "WARNING" + } +); + +print "FRONTPAGE: "; + +foreach $temp (@urls) { + $url = $temp->{'url'}; + $mimetype = $temp->{'mimetype'}; + $failtype = $temp->{'failtype'}; + $message = $temp->{'message'}; + $stime = time(); + $response=$browser->get("http://".$host."/".$url); + $etime = time(); + $tt = $etime - $stime; + +# If we got a server error, or unknown output type, report back as critical. + if ($response->status_line !~ "^200") { + print $message." (".$response->status_line.")\r\n"; + exit $ERRORS{$failtype}; + } elsif ($response->content_type !~ $mimetype) { + print $message." (Wrong Content-type: ".$response->content_type.")\r\n"; + exit $ERRORS{$failtype}; + } else { + # Because we're dealing with multiple URL's + $rt += $tt; + } + +# Decide if the response time was critical or not. +# + if ($rt > $critical) { + print "Response time ".$rt." over critical threshold ".$critical."\r\n"; + exit($ERRORS{'CRITICAL'}); + } elsif ($rt > $warning) { + print "Response time ".$rt." over warning threshold ".$warning."\r\n"; + exit($ERRORS{'WARNING'}); + } +} +printf(" %s - %s second response time, ",$response->status_line, $rt); + +# If all the required URL's give the right responses quick enough, then we +# should be okay. +exit($ERRORS{'OK'}); + +sub print_usage () { + print "Usage: $PROGNAME -H [-w ] [-c ]\n"; + exit; +} + +sub print_help () { + print_revision($PROGNAME,'$Revision: 1.1 $'); + print "Copyright (c) 2003 Kev Green\n"; + print "\n"; + print "FrontPage remains a copyright/trademark of Microsoft Corporation.\n"; + print_usage(); + print "\n"; + print " = Unknown.\n"; + print " = Server error from FrontPage extensions.\n\n"; + support(); +} diff --git a/contrib/check_hltherm.c b/contrib/check_hltherm.c new file mode 100644 index 0000000..85c989f --- /dev/null +++ b/contrib/check_hltherm.c @@ -0,0 +1,209 @@ +/****************************************************************************************** + * + * CHECK_HLTHERM.C + * + * Program: Hot Little Therm temperature plugin for Nagios + * License: GPL + * Copyright (c) 1999-2002 Ethan Galstad (nagios@nagios.org) + * + * Last Modified: 02-28-2002 + * + * Command line: check_hltherm [-l label] [-s scale] [-lower] + * + * Description: + * + * This plugin checks the temperature of a given temperature probe on a + * Hot Little Therm digital thermometer. The plugin uses the 'therm' utility + * that is included with the HLT software to check the probe temperature. Both + * the HLT digital thermometer and software are produced by Spiderplant. See + * their website at http://www.spiderplant.com/hlt for more information. + * + *****************************************************************************************/ + +#include "config.h" +#include "common.h" +#include "popen.h" + +#define DEFAULT_TIMEOUT 10 /* default timeout in seconds */ + +#define HLTHERM_COMMAND "/usr/local/bin/therm" /* this should be moved out to the configure script */ + + +static void timeout_alarm_handler(int); /* author must provide */ +int process_arguments(int, char **); + +int timeout_interval=DEFAULT_TIMEOUT; + +double wtemp=0.0L; +double ctemp=0.0L; + +int check_lower_temps=FALSE; + +char probe[MAX_INPUT_BUFFER]=""; +char label[MAX_INPUT_BUFFER]="Temperature"; +char scale[MAX_INPUT_BUFFER]="Degrees"; + +FILE *fp; + + +int main(int argc, char **argv){ + int result=STATE_OK; + char command[MAX_INPUT_BUFFER]; + double temp=0.0L; + char input_buffer[MAX_INPUT_BUFFER]; + int found=0; + + /* process command line arguments */ + result=process_arguments(argc,argv); + + /* display usage if there was a problem */ + if(result==ERROR){ + printf("Incorrect arguments supplied\n"); + printf("\n"); + printf("Hot Little Therm temperature plugin for Nagios\n"); + printf("Copyright (c) 1999-2002 Ethan Galstad (nagios@nagios.org)\n"); + printf("Last Modified: 02-28-2002\n"); + printf("License: GPL\n"); + printf("\n"); + printf("Usage: %s [-l label] [-s scale] [-lower]\n",argv[0]); + printf("\n"); + printf("Options:\n"); + printf(" = Temperature necessary to result in a WARNING state\n"); + printf(" = Temperature necessary to result in a CRITICAL state\n"); + printf(" [label] = A descriptive label for the probe. Example: \"Outside Temp\"\n"); + printf(" [scale] = A descriptive label for the temperature scale. Example: \"Celsius\"\n"); + printf(" [-lower] = Evaluate temperatures with lower values being more critical\n"); + printf("\n"); + printf("This plugin checks the temperature of a given temperature probe on a\n"); + printf("Hot Little Therm digital thermometer. The plugin uses the 'therm' utility\n"); + printf("included with the HLT software to check the probe temperature. Both the\n"); + printf("HLT digital thermometer and software are produced by Spiderplant. See\n"); + printf("their website at http://www.spiderplant.com/hlt for more information.\n"); + printf("\n"); + return STATE_UNKNOWN; + } + + + result=STATE_OK; + + /* Set signal handling and alarm */ + if(signal(SIGALRM,timeout_alarm_handler)==SIG_ERR){ + printf("Cannot catch SIGALRM"); + return STATE_UNKNOWN; + } + + /* handle timeouts gracefully */ + alarm(timeout_interval); + + /* create the command line we're going to use */ + snprintf(command,sizeof(command),"%s %s",HLTHERM_COMMAND,probe); + command[sizeof(command)-1]='\x0'; + + /* run the command to check the temperature on the probe */ + fp=spopen(command); + if(fp==NULL){ + printf("Could not open pipe: %s\n",command); + return STATE_UNKNOWN; + } + + if(fgets(input_buffer,MAX_INPUT_BUFFER-1,fp)){ + found=1; + temp=(double)atof(input_buffer); + } + + /* close the pipe */ + spclose(fp); + + if(result==STATE_OK){ + + if(found==0){ + printf("Therm problem - Could not read program output\n"); + result=STATE_CRITICAL; + } + else{ + if(check_lower_temps==TRUE){ + if(temp<=ctemp) + result=STATE_CRITICAL; + else if(temp<=wtemp) + result=STATE_WARNING; + } + else{ + if(temp>=ctemp) + result=STATE_CRITICAL; + else if(temp>=wtemp) + result=STATE_WARNING; + } + + printf("Therm %s: %s = %2.1f %s\n",(result==STATE_OK)?"ok":"problem",label,temp,scale); + } + } + + return result; + } + + +/* process command-line arguments */ +int process_arguments(int argc, char **argv){ + int x; + + /* not enough options were supplied */ + if(argc<4) + return ERROR; + + /* first option is always the probe name */ + strncpy(probe,argv[1],sizeof(probe)-1); + probe[sizeof(probe)-1]='\x0'; + + /* 2nd and 3rd options are temperature thresholds */ + wtemp=(double)atof(argv[2]); + ctemp=(double)atof(argv[3]); + + /* process all remaining arguments */ + for(x=5;x<=argc;x++){ + + /* we got the lower temperature option */ + if(!strcmp(argv[x-1],"-lower")) + check_lower_temps=TRUE; + + /* we got the label */ + else if(!strcmp(argv[x-1],"-l")){ + if(x \$chk_fs, + "show-filesystems" => \$show_fs, + "check-filesystemID" => \$chk_fsid, + "check-cpu" => \$chk_cpu, + "host=s" => \$target_host, + "community=s" => \$target_community, + "filesystemID1=i" => \$fsid1_opt, + "filesystem=s" => \$fs_opt, + "protocol:s" => \$proto_opt, + "warning=i" => \$warning_opt, + "critical=i" => \$critical_opt); + +$proto_opt = 1 + unless $proto_opt == 1 || + $proto_opt == '2c' || + $proto_opt == 3; + +if ($chk_fs) { + walk_data($snmpwalk, $target_host, $target_community, $mounted_OID,$proto_opt ); + walk_data($snmpwalk, $target_host, $target_community, $totalspace_OID,$proto_opt ); + walk_data($snmpwalk, $target_host, $target_community, $freespace_OID,$proto_opt ); check_filesystem($fs_opt, $warning_opt, $critical_opt); +} elsif ($show_fs) { + walk_data($snmpwalk, $target_host, $target_community, $filesystemID1_OID,$proto_opt); + walk_data($snmpwalk, $target_host, $target_community, $mounted_OID,$proto_opt ); + walk_data($snmpwalk, $target_host, $target_community, $path_OID,$proto_opt); + show_filesystem(); +} elsif ($chk_fsid){ + $totalspace_fsID_OID = "$totalspace_OID.$fsid1_opt"; + $freespace_fsID_OID = "$freespace_OID.$fsid1_opt"; + walk_data($snmpwalk, $target_host, $target_community, $totalspace_fsID_OID,$proto_opt); + walk_data($snmpwalk, $target_host, $target_community, $freespace_fsID_OID,$proto_opt); + check_filesystemID1($fsid1_opt, $warning_opt, $critical_opt); +} elsif ($chk_cpu) { + get_cpu_load($snmpwalk, $target_host, $target_community, $cpu_5min_OID,$proto_opt); + check_cpu_5min($cpu, $warning_opt, $critical_opt); +} else { + print "\n\nUsage:\n"; + print "Checking 5-min CPU Load:\n"; + print " $0 --check-cpu -warning --critical --host --community --protocol \n\n"; + print "Checking local filesystem mounted on a host:\n"; + print " $0 --show-filesystems --host --community --protocol \n\n"; + print "Checking by filesystem name:\n"; + print " $0 --check-filesystem --filesystem --warning <% used space> --critical <% used space> --host --community --protocol \n\n"; + print "Checking by filesystem ID:\n"; + print " $0 --check-filesystemID --filesystemID --warning <% used space> --critical <% used space> --host --community --protocol \n\n"; +} + +sub get_cpu_load { + my ($snmpwalk, $target_host, $target_community, $OID,$vers) = @_; + die "cannot fork: $!" unless defined($pid = open(SNMPWALK, "-|")); + + if ($pid) { # parent + while () { + my @snmpdata = split(/:/,$_); + $cpu = $snmpdata[1]/100; + } + close(SNMPWALK) or warn "kid exited $?"; + } else { # child + exec($snmpwalk,'-c',$target_community,'-v',$vers,$target_host,$OID) or die "can't exec program: $!"; + } +} + +sub walk_data { +#This function queries the SNMP daemon for the specific OID + my ($snmpwalk, $target_host, $target_community, $OID,$vers) = @_; + + die "cannot fork: $!" unless defined($pid = open(SNMPWALK, "-|")); + + if ($pid) { # parent + while () { + $output = $_; + sort_walk_data($output); + } + close(SNMPWALK) or warn "kid exited $?"; + } else { # child + exec($snmpwalk,'-c',$target_community,'-v',$vers,$target_host,$OID) or die "can't exec program: $!"; + } +} + +sub sort_walk_data { + my ($snmp_data) = @_; + @fields = split(/\./,$snmp_data); + $item = $fields[8]; + $filesystemID1 = $fields[9]; + @fields2 = split(/=/,$fields[10]); +# $filesystemID2 = $fields2[0]; + $value = $fields2[1]; + chomp($value); + if ($value =~ /"/) { + @fields3 = split(/"/,$value); + $value = $fields3[1]; + } + if ($item == 3) { + $mounted{$filesystemID1} = "$value"; + } elsif ($item == 4) { + $totalspace{$filesystemID1} = "$value"; + } elsif ($item == 6) { + $freespace{$filesystemID1} = "$value"; + } elsif ($item == 10) { + $filesystempath{$filesystemID1} = "$value"; + } +} + +sub show_filesystem { + print "\n\nfilesystemID1\tmounted filesystem\tfilesystem path\n"; + foreach $element (keys %mounted) { + print "$element\t$mounted{$element}\t\t$filesystempath{$element}\n"; + } + print "\n\n"; +} + +sub check_filesystem { + +# Warning = percentage of used space >= $warning and < $critical +# Critical = percentage of used space > $warning and >= $critical +# OK = percentage of used space < $warning and < $critical + + my ($mounted_filesystem, $warning, $critical) = @_; + foreach $element (keys %mounted) { + if ($mounted{$element} eq $mounted_filesystem) { + my $warning_result = $totalspace{$element}*(100-$warning)/100; + my $critical_result = $totalspace{$element}*(100-$critical)/100; + my $result_percent = $freespace{$element}*100/$totalspace{$element}; + if (($freespace{$element} <= $warning_result) && ($freespace{$element} > $critical_result)) { + printf "Only %d M (%d%s) free\n",$freespace{$element}/1024,$result_percent,"%"; + exit 1; + } elsif ($freespace{$element} <= $critical_result) { + printf "Only %d M (%d%s) free\n",$freespace{$element}/1024,$result_percent,"%"; + exit 2; + } else { + printf "Disk ok - %d M (%d%s) free\n",$freespace{$element}/1024,$result_percent,"%"; + exit 0; + } + } + } + print "$mounted_filesystem doesn't exist in $target_host\n\n"; + exit -1; +} + +sub check_filesystemID1{ +# Warning = percentage of used space >= $warning and < $critical +# Critical = percentage of used space > $warning and >= $critical +# OK = percentage of used space < $warning and < $critical + + my ($fsid1, $warning, $critical) = @_; + foreach $element (keys %totalspace) { + if ($element eq $fsid1) { + my $warning_result = $totalspace{$element}*(100-$warning)/100; + my $critical_result = $totalspace{$element}*(100-$critical)/100; + my $result_percent = $freespace{$element}*100/$totalspace{$element}; + if (($freespace{$element} <= $warning_result) && ($freespace{$element} >= $critical_result)) { + printf "Only %d M (%d%s) free\n",$freespace{$element}/1024,$result_percent,"%"; + exit 1; + } elsif ($freespace{$element} <= $critical_result) { + printf "Only %d M (%d%s) free\n",$freespace{$element}/1024,$result_percent,"%"; + exit 2; + } else { + printf "Disk ok - %d M (%d%s) free\n",$freespace{$element}/1024,$result_percent,"%"; + exit 0; + } + } + } + print "$fsid1 doesn't exist in $target_host\n\n"; + exit -1; +} + +sub check_cpu_5min { + my ($cpu, $warn, $crit) = @_; + if ($cpu >= $crit) { + print "Critical- 5-min load: $cpu\n"; + exit 2; + } elsif ($cpu >= $warn) { + print "Warning - 5-min load: $cpu\n"; + exit 1; + } else { + print "Load ok - 5-min load: $cpu\n"; + exit 0; + } +} + + + diff --git a/contrib/check_http-with-client-certificate.c b/contrib/check_http-with-client-certificate.c new file mode 100644 index 0000000..8878378 --- /dev/null +++ b/contrib/check_http-with-client-certificate.c @@ -0,0 +1,1567 @@ +/**************************************************************************** + * + * Program: HTTP plugin for Nagios + * License: GPL + * + * License Information: + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + *****************************************************************************/ + +/**************************************************************************** + * + * check_http is derived from the original check_http provided by + * Ethan Galstad/Karl DeBisschop + * + * This provides some additional functionality including: + * - check server certificate against supplied hostname (Host: header) if any + * - check server certificate against local CA certificates (as browsers do) + * - authenticate with client certificate (and optional passphrase) + * - specify HTTP returncodes to return a status of WARNING or OK instead of + * CRITICAL (only global for 3xx or 4xx errors) + * - check only against HTTP status line and exit immediately if not matched + * + *****************************************************************************/ + +const char *progname = "check_http"; +#define REVISION "$Revision: 1.1 $" +#define CVSREVISION "1.24" +#define COPYRIGHT "2003" +#define AUTHORS "Fabian Pehla" +#define EMAIL "fabian@pehla.de" + +#include "config.h" +#include "common.h" +#include "netutils.h" +#include "utils.h" + + +#define HELP_TXT_SUMMARY "\ +This plugin tests the HTTP service on the specified host. It can test\n\ +normal (http) and secure (https) servers, follow redirects, search for\n\ +strings and regular expressions, check connection times, and report on\n\ +certificate expiration times.\n" + +#define HELP_TXT_OPTIONS "\ +-H -I [-p ] [-u ]\n\ + [-w ] [-c ] [-t ]\n\ + [-S] [-C ] [-a ] [-A ]\n\ + [-Z ] [-e ] [-E ]\n\ + [-s ] [-r ] [-R ]\n\ + [-f (ok|warn|critical|follow)] [-g (ok|warn|critical)]\n" + +#define HELP_TXT_LONGOPTIONS "\ + -H, --hostname=\n\ + FQDN host name argument for use in HTTP Host:-Header (virtual host)\n\ + If used together wich the -S option, the server certificate will\n\ + be checked against this hostname\n\ + -I, --ip-address=
\n\ + IP address or hostname for TCP connect (use IP to avoid DNS lookup)\n\ + -p, --port=\n\ + Port number (default: %d)\n\ + -u, --url-path=\n\ + URL to request from host (default: %s)\n\ + -S, --ssl\n\ + Use SSL (default port: %d)\n\ + -C, --server-certificate-days=\n\ + Minimum number of days a server certificate must be valid\n\ + No other check can be combined with this option\n\ + -a, --basic-auth=\n\ + Colon separated username and password for basic authentication\n\ + -A, --client-certificate=\n\ + File containing X509 client certificate and key\n\ + -K, --passphrase=\n\ + Passphrase for the client certificate key\n\ + This option can only be used in combination with the -A option\n\ + -Z, --ca-certificate=\n\ + File containing certificates of trusted CAs\n\ + The server certificate will be checked against these CAs\n\ + -e, --http-expect=\n\ + String to expect in HTTP response line (Default: %s)\n\ + -E, --http-expect-only=\n\ + String to expect in HTTP response line\n\ + No other checks are made, this either matches the response\n\ + or exits immediately\n\ + -s, --content-string=\n\ + String to expect in content\n\ + -r, --content-ereg=\n\ + Regular expression to expect in content\n\ + -R, --content-eregi=\n\ + Case insensitive regular expression to expect in content\n\ + -f, --onredirect=(ok|warning|critical|follow)\n\ + Follow a redirect (3xx) or return with a user defined state\n\ + Default: OK\n\ + -g, --onerror=(ok|warning|critical)\n\ + Status to return on a client error (4xx)\n\ + -m, --min=INTEGER\n\ + Minimum page size required (bytes)\n\ + -t, --timeout=\n\ + Seconds before connection times out (default: %d)\n\ + -c, --critical=\n\ + Response time to result in critical status (seconds)\n\ + -w, --warning=\n\ + Response time to result in warning status (seconds)\n\ + -V, --version\n\ + Print version information\n\ + -v, --verbose\n\ + Show details for command-line debugging (do not use with nagios server)\n\ + -h, --help\n\ + Print detailed help screen\n" + + + +#define HTTP_PORT 80 +#define DEFAULT_HTTP_URL_PATH "/" +#define DEFAULT_HTTP_EXPECT "HTTP/1." +#define DEFAULT_HTTP_METHOD "GET" +#define DEFAULT_HTTP_REDIRECT_STATE STATE_OK +#define DEFAULT_HTTP_CLIENT_ERROR_STATE STATE_WARNING + +#define HTTP_TEMPLATE_REQUEST "%s%s %s HTTP/1.0\r\n" +#define HTTP_TEMPLATE_HEADER_USERAGENT "%sUser-Agent: %s/%s (nagios-plugins %s)\r\n" +#define HTTP_TEMPLATE_HEADER_HOST "%sHost: %s\r\n" +#define HTTP_TEMPLATE_HEADER_AUTH "%sAuthorization: Basic %s\r\n" + +/* fill in printf with protocol_text(use_ssl), state_text(state), page->status, elapsed_time */ +#define RESULT_TEMPLATE_STATUS_RESPONSE_TIME "%s %s: %s - %7.3f seconds response time|time=%7.3f\n" +#define RESULT_TEMPLATE_RESPONSE_TIME "%s %s: %7.3f seconds response time|time=%7.3f\n" + +#ifdef HAVE_SSL + +#ifdef HAVE_SSL_H +#include +#include +#include +#include +#include +#include +#include +#endif + +#ifdef HAVE_OPENSSL_SSL_H +#include +#include +#include +#include +#include +#include +#include +#endif + +#define HTTPS_PORT 443 +#endif + +#ifdef HAVE_REGEX_H +#include +#define REGEX_REGS 2 +#define MAX_REGEX_SIZE 256 +#endif + +#define chk_protocol(protocol) ( strstr( protocol, "https" ) ? TRUE : FALSE ); +#define protocol_std_port(use_ssl) ( use_ssl ? HTTPS_PORT : HTTP_PORT ); +#define protocol_text(use_ssl) ( use_ssl ? "HTTPS" : "HTTP" ) + +#define MAX_IPV4_HOSTLENGTH 64 +#define HTTP_HEADER_LOCATION_MATCH "%*[Ll]%*[Oo]%*[Cc]%*[Aa]%*[Tt]%*[Ii]%*[Oo]%*[Nn]: " +#define HTTP_HEADER_PROTOCOL_MATCH "%[HTPShtps]://" +#define HTTP_HEADER_HOSTNAME_MATCH "%[a-zA-Z0-9.-]" +#define HTTP_HEADER_PORT_MATCH ":%[0-9]" +#define HTTP_HEADER_URL_PATH_MATCH "%[/a-zA-Z0-9._-=@,]" + +/* +************************************************************************ +* GLOBAL VARIABLE/POINTER DEFINITIONS * +************************************************************************ +*/ + +/* misc variables */ +int verbose = FALSE; + +/* time thresholds to determine exit code */ +int use_warning_interval = FALSE; +double warning_interval = 0; +int use_critical_interval = FALSE; +double critical_interval = 0; +double elapsed_time = 0; +struct timeval start_tv; + +/* variables concerning the server host */ +int use_server_hostname = FALSE; +char *server_hostname = ""; // hostname for use in HTTPs Host: header +char *server_host = ""; // hostname or ip address for tcp connect +int use_server_port = FALSE; +int server_port = HTTP_PORT; + +int use_basic_auth = FALSE; +char basic_auth[MAX_INPUT_BUFFER] = ""; + +/* variables concerning server responce */ +struct pageref { + char *content; + size_t size; + char *status; + char *header; + char *body; +}; + +/* variables concerning ssl connections */ +int use_ssl = FALSE; +#ifdef HAVE_SSL +int server_certificate_min_days_valid = 0; +int check_server_certificate = FALSE; +X509 *server_certificate; // structure containing server certificate +int use_client_certificate = FALSE; +char *client_certificate_file = NULL; +int use_client_certificate_passphrase = FALSE; +char *client_certificate_passphrase = NULL; +int use_ca_certificate = FALSE; +char *ca_certificate_file = NULL; + +BIO *bio_err = 0; // error write context +#endif + + +/* variables concerning check behaviour */ +char *http_method = DEFAULT_HTTP_METHOD; +char *http_url_path = ""; +int use_http_post_data = FALSE; +char *http_post_data = ""; +int use_min_content_length = FALSE; +int min_content_length = 0; +int use_http_expect_only = FALSE; +char http_expect[MAX_INPUT_BUFFER] = DEFAULT_HTTP_EXPECT; +int check_content_string = FALSE; +char content_string[MAX_INPUT_BUFFER] = ""; +int http_redirect_state = DEFAULT_HTTP_REDIRECT_STATE; +int http_client_error_state = DEFAULT_HTTP_CLIENT_ERROR_STATE; + +#ifdef HAVE_REGEX_H +regex_t regex_preg; +regmatch_t regex_pmatch[REGEX_REGS]; +int check_content_regex = FALSE; +char content_regex[MAX_REGEX_SIZE] = ""; +int regex_cflags = REG_NOSUB | REG_EXTENDED | REG_NEWLINE; +int regex_error = 0; +char regex_error_buffer[MAX_INPUT_BUFFER] = ""; +#endif + + + +/* +************************************************************************ +* FUNCTION PROTOTYPES * +************************************************************************ +*/ + +void print_usage( void ); +void print_help( void ); +int process_arguments (int, char **); +int http_request( int sock, struct pageref *page); + +int parse_http_response( struct pageref *page ); +int check_http_response( struct pageref *page ); +int check_http_content( struct pageref *page ); +int prepare_follow_redirect( struct pageref *page ); + +static char *base64 (char *bin, int len); + +#ifdef HAVE_SSL +int ssl_terminate( int state, char *string ); +static int passwd_cb( char *buf, int num, int rwflag, void *userdata ); +static void sigpipe_handle( int x ); +SSL_CTX * initialize_ssl_ctx( void ); +void destroy_ssl_ctx( SSL_CTX *ctx ); +int fetch_server_certificate( SSL *ssl ); +int check_server_certificate_chain( SSL *ssl ); +int check_server_certificate_hostname( void ); +int check_server_certificate_expires( void ); +int https_request( SSL_CTX *ctx, SSL *ssl, struct pageref *page ); +#endif + +/* +************************************************************************ +* IMPLEMENTATION * +************************************************************************ +*/ + +/* + * main() + * + * PSEUDOCODE OF HOW MAIN IS SUPPOSED TO WORK + * + * process command line arguments including sanity check + * initialize alarm signal handling + * if use_ssl + * build ssl context + * LOOP: + * make tcp connection + * if use_ssl + * make ssl connection + * if use_server_hostname + * check if certificate matches hostname + * if check_server_certificate + * check expiration date of server certificate + * return STATUS + * else + * request http page + * handle ssl rehandshake + * close ssl connection + * else + * request http page + * close tcp connection + * analyze http page + * if follow on redirect + * repeat LOOP + * end of LOOP + * destroy ssl context + */ +int +main (int argc, char **argv) +{ + int result = STATE_UNKNOWN; + int sock; + struct pageref page; +#ifdef HAVE_SSL + SSL_CTX *ctx; + SSL *ssl; + BIO *sbio; +#endif + + if ( process_arguments(argc, argv) == ERROR ) + usage( "check_http: could not parse arguments\n" ); + +#ifdef HAVE_SSL + /* build SSL context if required: + * a) either we use ssl from the beginning OR + * b) or we follor redirects wich may lead os to a ssl page + */ + if ( use_ssl || ( http_redirect_state == STATE_DEPENDENT ) ) + ctx=initialize_ssl_ctx(); +#endif + + /* Loop around 3xx onredirect=follow */ + do { + + /* + * initialize alarm signal handling, set socket timeout, start timer + * socket_timeout and socket_timeout_alarm_handler are defined in + * netutils.c + */ + (void) signal( SIGALRM, socket_timeout_alarm_handler ); + (void) alarm( socket_timeout ); + gettimeofday( &start_tv, NULL ); + + /* make a tcp connection */ + result = my_tcp_connect( server_host, server_port, &sock ); + + /* result of tcp connect */ + if ( result == STATE_OK ) + { +#ifdef HAVE_SSL + /* make a ssl connection */ + if ( use_ssl ) { + ssl=SSL_new( ctx ); + sbio=BIO_new_socket( sock, BIO_NOCLOSE ); + SSL_set_bio( ssl, sbio, sbio); + if ( SSL_connect( ssl ) <= 0 ) + ssl_terminate( STATE_CRITICAL, "check_http: SSL connect error" ); + + /* fetch server certificate */ + result = fetch_server_certificate( ssl ); + + /* verify server certificate against CAs */ + if ( ( result == STATE_OK ) && use_ca_certificate ) { + result = check_server_certificate_chain( ssl ); + } + + /* check if certificate matches hostname */ + if ( ( result == STATE_OK ) && use_server_hostname ) { + result = check_server_certificate_hostname(); + } + + if ( result == STATE_OK ) { + /* check server certificate expire date */ + if ( check_server_certificate ) { + result = check_server_certificate_expires(); + /* OR: perform http request */ + } else { + result = https_request( ctx, ssl, (struct pageref *) &page ); + } + } + SSL_shutdown( ssl ); + SSL_free( ssl ); + } else { +#endif + /* HTTP implementation */ + result = http_request( sock, (struct pageref *) &page ); +#ifdef HAVE_SSL + } +#endif + /* stop timer and calculate elapsed_time */ + elapsed_time = delta_time( start_tv ); + + /* close the tcp connection */ + close( sock ); + + /* reset the alarm */ + alarm( 0 ); + + /* analyze http page */ + /* TO DO */ + if ( result == STATE_OK ) + result = parse_http_response( (struct pageref *) &page ); + + if ( result == STATE_OK ) + result = check_http_response( (struct pageref *) &page ); + + switch ( result ) { + case STATE_OK: + /* weiter geht's */ + result = check_http_content( (struct pageref *) &page ); + break; + case STATE_DEPENDENT: + /* try to determine redirect parameters */ + result = prepare_follow_redirect( (struct pageref *) &page ); + break; + } + + } else { + /* some error occured while trying to make a tcp connect */ + exit( result ); + } + + } while ( result == STATE_DEPENDENT ); // end of onredirect loop + + /* destroy SSL context */ +#ifdef HAVE_SSL + if ( use_ssl || ( http_redirect_state == STATE_DEPENDENT ) ) + destroy_ssl_ctx( ctx ); +#endif + + /* if we ever get to this point, everything went fine */ + printf( RESULT_TEMPLATE_STATUS_RESPONSE_TIME, + protocol_text( use_ssl ), + state_text( result ), + page.status, + elapsed_time, + elapsed_time ); + + return result; +} + + +void +print_help( void ) +{ + print_revision( progname, REVISION ); + printf + ( "Copyright (c) %s %s <%s>\n\n%s\n", + COPYRIGHT, AUTHORS, EMAIL, HELP_TXT_SUMMARY ); + print_usage(); + printf( "NOTE: One or both of -H and -I must be specified\n" ); + printf( "\nOptions:\n" HELP_TXT_LONGOPTIONS "\n", + HTTP_PORT, DEFAULT_HTTP_URL_PATH, HTTPS_PORT, + DEFAULT_HTTP_EXPECT, DEFAULT_SOCKET_TIMEOUT ); +#ifdef HAVE_SSL + //printf( SSLDESCRIPTION ); +#endif +} + + +void +print_usage( void ) +{ + printf( "Usage:\n" " %s %s\n" +#ifdef HAVE_GETOPT_H + " %s (-h | --help) for detailed help\n" + " %s (-V | --version) for version information\n", +#else + " %s -h for detailed help\n" + " %s -V for version information\n", +#endif + progname, HELP_TXT_OPTIONS, progname, progname ); +} + + +/* +* process_arguments() +* +* process command line arguments either using getopt_long or getopt +* (parsing long argumants manually) +*/ +int +process_arguments( int argc, char **argv ) +{ + int c, i = 1; + extern char *optarg; + +#ifdef HAVE_GETOPT_H + int option_index = 0; + static struct option long_options[] = { + STD_LONG_OPTS, + {"file", required_argument, 0, 'F'}, + {"ip-address", required_argument, 0, 'I'}, + {"port", required_argument, 0, 'p'}, + {"url-path", required_argument, 0, 'u'}, + {"post-data", required_argument, 0, 'P'}, + {"ssl", no_argument, 0, 'S'}, + {"server-certificate-days", required_argument, 0, 'C'}, + {"basic-auth", required_argument, 0, 'a'}, + {"client-certificate", required_argument, 0, 'A'}, + {"passphrase", required_argument, 0, 'K'}, + {"ca-certificate", required_argument, 0, 'Z'}, + {"http-expect", required_argument, 0, 'e'}, + {"http-expect-only", required_argument, 0, 'E'}, + {"content-string", required_argument, 0, 's'}, + {"content-ereg-linespan", required_argument, 0, 'l'}, + {"content-ereg", required_argument, 0, 'r'}, + {"content-eregi", required_argument, 0, 'R'}, + {"onredirect", required_argument, 0, 'f'}, + {"onerror", required_argument, 0, 'g'}, + {"min", required_argument, 0, 'm'}, + {0, 0, 0, 0} + }; +#endif + + + /* convert commonly used arguments to their equivalent standard options */ + for (c = 1; c < argc; c++) { + if ( strcmp( "-to", argv[c]) == 0 ) + strcpy( argv[c], "-t" ); + if ( strcmp( "-hn", argv[c]) == 0 ) + strcpy( argv[c], "-H" ); + if ( strcmp( "-wt", argv[c]) == 0 ) + strcpy( argv[c], "-w" ); + if ( strcmp( "-ct", argv[c]) == 0 ) + strcpy( argv[c], "-c" ); + } + +#define OPTCHARS "Vvht:c:w:H:F:I:p:u:P:SC:a:A:K:Z:e:E:s:r:R:f:g:lm:" + + + while (1) { + +#ifdef HAVE_GETOPT_H + c = getopt_long( argc, argv, OPTCHARS, long_options, &option_index ); +#else + c = getopt( argc, argv, OPTCHARS ); +#endif + + if ( ( c == -1 ) || ( c == EOF ) ) { + break; + } + + switch (c) { + case '?': /* usage */ + usage2( "unknown argument", optarg ); + break; + + /* Standard options */ + case 'h': /* help */ + print_help(); + exit( STATE_OK ); + break; + case 'V': /* version */ + print_revision( progname, REVISION ); + exit( STATE_OK ); + break; + case 'v': /* verbose */ + verbose = TRUE; + break; + case 't': /* timeout period */ + if ( !is_intnonneg( optarg ) ) + usage2( "timeout interval must be a non-negative integer", optarg ); + /* socket_timeout is defined in netutils.h and defaults to + * DEFAULT_SOCKET_TIMEOUT from common.h + */ + socket_timeout = atoi( optarg ); + break; + case 'c': /* critical time threshold */ + if ( !is_nonnegative( optarg ) ) + usage2( "invalid critical threshold", optarg ); + critical_interval = strtod( optarg, NULL ); + use_critical_interval = TRUE; + break; + case 'w': /* warning time threshold */ + if ( !is_nonnegative( optarg ) ) + usage2( "invalid warning threshold", optarg ); + warning_interval = strtod( optarg, NULL ); + use_warning_interval = TRUE; + break; + case 'H': /* Host Name (virtual host) */ + /* this rejects FQDNs, so we leave it for now... + *if ( !is_hostname( optarg ) ) + * usage2( "invalid hostname", optarg ); + */ + asprintf( &server_hostname, "%s", optarg ); + use_server_hostname = TRUE; + break; + case 'F': /* File (dummy) */ + break; + /* End of standard options */ + + + case 'I': /* Server IP-address or Hostname */ + /* this rejects FQDNs, so we leave it for now... + *if ( !is_host( optarg ) ) + * usage2( "invalid ip address or hostname", optarg ) + */ + asprintf( &server_host, "%s", optarg ); + break; + case 'p': /* Server port */ + if ( !is_intnonneg( optarg ) ) + usage2( "invalid port number", optarg ); + server_port = atoi( optarg ); + use_server_port = TRUE; + break; + case 'S': /* use SSL */ +#ifdef HAVE_SSL + use_ssl = TRUE; + if ( use_server_port == FALSE ) + server_port = HTTPS_PORT; +#else + usage( "check_http: invalid option - SSL is not available\n" ); +#endif + break; + case 'C': /* Server certificate warning time threshold */ +#ifdef HAVE_SSL + if ( !is_intnonneg( optarg ) ) + usage2( "invalid certificate expiration period", optarg ); + server_certificate_min_days_valid = atoi( optarg ); + check_server_certificate = TRUE; +#else + usage( "check_http: invalid option - SSL is not available\n" ); +#endif + break; + case 'a': /* basic authorization info */ + strncpy( basic_auth, optarg, MAX_INPUT_BUFFER - 1 ); + basic_auth[MAX_INPUT_BUFFER - 1] = 0; + use_basic_auth = TRUE; + break; + case 'A': /* client certificate */ +#ifdef HAVE_SSL + asprintf( &client_certificate_file, "%s", optarg ); + use_client_certificate = TRUE; +#else + usage( "check_http: invalid option - SSL is not available\n" ); +#endif + break; + case 'K': /* client certificate passphrase */ +#ifdef HAVE_SSL + asprintf( &client_certificate_passphrase, "%s", optarg ); + use_client_certificate_passphrase = TRUE; +#else + usage( "check_http: invalid option - SSL is not available\n" ); +#endif + case 'Z': /* valid CA certificates */ +#ifdef HAVE_SSL + asprintf( &ca_certificate_file, "%s", optarg ); + use_ca_certificate = TRUE; +#else + usage( "check_http: invalid option - SSL is not available\n" ); +#endif + break; + case 'u': /* URL PATH */ + asprintf( &http_url_path, "%s", optarg ); + break; + case 'P': /* POST DATA */ + asprintf( &http_post_data, "%s", optarg ); + use_http_post_data = TRUE; + asprintf( &http_method, "%s", "POST" ); + break; + case 'e': /* expected string in first line of HTTP response */ + strncpy( http_expect , optarg, MAX_INPUT_BUFFER - 1 ); + http_expect[MAX_INPUT_BUFFER - 1] = 0; + break; + case 'E': /* expected string in first line of HTTP response and process no other check*/ + strncpy( http_expect , optarg, MAX_INPUT_BUFFER - 1 ); + http_expect[MAX_INPUT_BUFFER - 1] = 0; + use_http_expect_only = TRUE; + break; + case 's': /* expected (sub-)string in content */ + strncpy( content_string , optarg, MAX_INPUT_BUFFER - 1 ); + content_string[MAX_INPUT_BUFFER - 1] = 0; + check_content_string = TRUE; + break; + case 'l': /* regex linespan */ +#ifdef HAVE_REGEX_H + regex_cflags &= ~REG_NEWLINE; +#else + usage( "check_http: call for regex which was not a compiled option\n" ); +#endif + break; + case 'R': /* expected case insensitive regular expression in content */ +#ifdef HAVE_REGEX_H + regex_cflags |= REG_ICASE; +#else + usage( "check_http: call for regex which was not a compiled option\n" ); +#endif + case 'r': /* expected regular expression in content */ +#ifdef HAVE_REGEX_H + strncpy( content_regex , optarg, MAX_REGEX_SIZE - 1 ); + content_regex[MAX_REGEX_SIZE - 1] = 0; + check_content_regex = TRUE; + regex_error = regcomp( ®ex_preg, content_regex, regex_cflags ); + if ( regex_error != 0 ) { + regerror( regex_error, ®ex_preg, regex_error_buffer, MAX_INPUT_BUFFER ); + printf( "Could Not Compile Regular Expression: %s", regex_error_buffer ); + return ERROR; + } +#else + usage( "check_http: call for regex which was not a compiled option\n" ); +#endif + break; + case 'f': /* onredirect (3xx errors) */ + if ( !strcmp( optarg, "follow" ) ) + http_redirect_state = STATE_DEPENDENT; + if ( !strcmp( optarg, "unknown" ) ) + http_redirect_state = STATE_UNKNOWN; + if ( !strcmp( optarg, "ok" ) ) + http_redirect_state = STATE_OK; + if ( !strcmp( optarg, "warning" ) ) + http_redirect_state = STATE_WARNING; + if ( !strcmp( optarg, "critical" ) ) + http_redirect_state = STATE_CRITICAL; + break; + case 'g': /* onerror (4xx errors) */ + if ( !strcmp( optarg, "unknown" ) ) + http_client_error_state = STATE_UNKNOWN; + if ( !strcmp( optarg, "ok" ) ) + http_client_error_state = STATE_OK; + if ( !strcmp( optarg, "warning" ) ) + http_client_error_state = STATE_WARNING; + if ( !strcmp( optarg, "critical" ) ) + http_client_error_state = STATE_CRITICAL; + break; + case 'm': /* min */ + if ( !is_intnonneg( optarg ) ) + usage2( "invalid page size", optarg ); + min_content_length = atoi( optarg ); + use_min_content_length = TRUE; + break; + } // end switch + } // end while(1) + + c = optind; + + + /* Sanity checks on supplied command line arguments */ + + /* 1. if both host and hostname are not defined, try to + * fetch one more argument which is possibly supplied + * without an option + */ + if ( ( strcmp( server_host, "" ) ) && (c < argc) ) { + asprintf( &server_host, "%s", argv[c++] ); + } + + /* 2. check if another artument is supplied + */ + if ( ( strcmp( server_hostname, "" ) == 0 ) && (c < argc) ) { + asprintf( &server_hostname, "%s", argv[c++] ); + } + + /* 3. if host is still not defined, just copy hostname, + * which is then guaranteed to be defined by now + */ + if ( strcmp( server_host, "") == 0 ) { + if ( strcmp( server_hostname, "" ) == 0 ) { + usage ("check_http: you must specify a server address or host name\n"); + } else { + asprintf( &server_host, "%s", server_hostname ); + } + } + + /* 4. check if content checks for a string and a regex + * are requested for only one of both is possible at + * a time + */ + if ( check_content_string && check_content_regex ) + usage( "check_http: you can only check for string OR regex at a time\n" ); + + /* 5. check for options which require use_ssl */ + if ( check_server_certificate && !use_ssl ) + usage( "check_http: you must use -S to check server certificate\n" ); + if ( use_client_certificate && !use_ssl ) + usage( "check_http: you must use -S to authenticate with a client certificate\n" ); + if ( use_ca_certificate && !use_ssl ) + usage( "check_http: you must use -S to check server certificate against CA certificates\n" ); + + /* 6. check for passphrase without client certificate */ + if ( use_client_certificate_passphrase && !use_client_certificate ) + usage( "check_http: you must supply a client certificate to use a passphrase\n" ); + + + /* Finally set some default values if necessary */ + if ( strcmp( http_method, "" ) == 0 ) + asprintf( &http_method, "%s", DEFAULT_HTTP_METHOD ); + if ( strcmp( http_url_path, "" ) == 0 ) { + asprintf( &http_url_path, "%s", DEFAULT_HTTP_URL_PATH ); + } + + return TRUE; +} + + +int +http_request( int sock, struct pageref *page ) +{ + char *buffer = ""; + char recvbuff[MAX_INPUT_BUFFER] = ""; + int buffer_len = 0; + int content_len = 0; + size_t sendsize = 0; + size_t recvsize = 0; + char *content = ""; + size_t size = 0; + char *basic_auth_encoded = NULL; + + asprintf( &buffer, HTTP_TEMPLATE_REQUEST, buffer, http_method, http_url_path ); + + asprintf( &buffer, HTTP_TEMPLATE_HEADER_USERAGENT, buffer, progname, REVISION, PACKAGE_VERSION ); + + if ( use_server_hostname ) { + asprintf( &buffer, HTTP_TEMPLATE_HEADER_HOST, buffer, server_hostname ); + } + + if ( use_basic_auth ) { + basic_auth_encoded = base64( basic_auth, strlen( basic_auth ) ); + asprintf( &buffer, HTTP_TEMPLATE_HEADER_AUTH, buffer, basic_auth_encoded ); + } + + /* either send http POST data */ + if ( use_http_post_data ) { + /* based on code written by Chris Henesy */ + asprintf( &buffer, "Content-Type: application/x-www-form-urlencoded\r\n" ); + asprintf( &buffer, "Content-Length: %i\r\n\r\n", buffer, content_len ); + asprintf( &buffer, "%s%s%s", buffer, http_post_data, "\r\n" ); + sendsize = send( sock, buffer, strlen( buffer ), 0 ); + if ( sendsize < strlen( buffer ) ) { + printf( "ERROR: Incomplete write\n" ); + return STATE_CRITICAL; + } + /* or just a newline */ + } else { + asprintf( &buffer, "%s%s", buffer, "\r\n" ); + sendsize = send( sock, buffer, strlen( buffer ) , 0 ); + if ( sendsize < strlen( buffer ) ) { + printf( "ERROR: Incomplete write\n" ); + return STATE_CRITICAL; + } + } + + + /* read server's response */ + + do { + recvsize = recv( sock, recvbuff, MAX_INPUT_BUFFER - 1, 0 ); + if ( recvsize > (size_t) 0 ) { + recvbuff[recvsize] = '\0'; + asprintf( &content, "%s%s", content, recvbuff ); + size += recvsize; + } + } while ( recvsize > (size_t) 0 ); + + asprintf( &page->content, "%s", content ); + page->size = size; + + /* return a CRITICAL status if we couldn't read any data */ + if ( size == (size_t) 0) + ssl_terminate( STATE_CRITICAL, "No data received" ); + + return STATE_OK; +} + + +int +parse_http_response( struct pageref *page ) +{ + char *content = ""; //local copy of struct member + char *status = ""; //local copy of struct member + char *header = ""; //local copy of struct member + size_t len = 0; //temporary used + char *pos = ""; //temporary used + + asprintf( &content, "%s", page->content ); + + /* find status line and null-terminate it */ + // copy content to status + status = content; + + // find end of status line and copy pointer to pos + content += (size_t) strcspn( content, "\r\n" ); + pos = content; + + // advance content pointer behind the newline of status line + content += (size_t) strspn( content, "\r\n" ); + + // null-terminate status line at pos + status[strcspn( status, "\r\n")] = 0; + strip( status ); + + // copy final status to struct member + page->status = status; + + + /* find header and null-terminate it */ + // copy remaining content to header + header = content; + + // loop until line containing only newline is found (end of header) + while ( strcspn( content, "\r\n" ) > 0 ) { + //find end of line and copy pointer to pos + content += (size_t) strcspn( content, "\r\n" ); + pos = content; + + if ( ( strspn( content, "\r" ) == 1 && strspn( content, "\r\n" ) >= 2 ) || + ( strspn( content, "\n" ) == 1 && strspn( content, "\r\n" ) >= 2 ) ) + content += (size_t) 2; + else + content += (size_t) 1; + } + // advance content pointer behind the newline + content += (size_t) strspn( content, "\r\n" ); + + // null-terminate header at pos + header[pos - header] = 0; + + // copy final header to struct member + page->header = header; + + + // copy remaining content to body + page->body = content; + + if ( verbose ) { + printf( "STATUS: %s\n", page->status ); + printf( "HEADER: \n%s\n", page->header ); + printf( "BODY: \n%s\n", page->body ); + } + + return STATE_OK; +} + + +int +check_http_response( struct pageref *page ) +{ + char *msg = ""; + + /* check response time befor anything else */ + if ( use_critical_interval && ( elapsed_time > critical_interval ) ) { + asprintf( &msg, RESULT_TEMPLATE_RESPONSE_TIME, + protocol_text( use_ssl ), + state_text( STATE_CRITICAL ), + elapsed_time, + elapsed_time ); + terminate( STATE_CRITICAL, msg ); + } + if ( use_warning_interval && ( elapsed_time > warning_interval ) ) { + asprintf( &msg, RESULT_TEMPLATE_RESPONSE_TIME, + protocol_text( use_ssl ), + state_text( STATE_WARNING ), + elapsed_time, + elapsed_time ); + terminate( STATE_WARNING, msg ); + } + + + /* make sure the status line matches the response we are looking for */ + if ( strstr( page->status, http_expect ) ) { + /* The result is only checked against the expected HTTP status line, + so exit immediately after this check */ + if ( use_http_expect_only ) { + if ( ( server_port == HTTP_PORT ) +#ifdef HAVE_SSL + || ( server_port == HTTPS_PORT ) ) +#else + ) +#endif + asprintf( &msg, "Expected HTTP response received from host\n" ); + else + asprintf( &msg, "Expected HTTP response received from host on port %d\n", server_port ); + terminate( STATE_OK, msg ); + } + } else { + if ( ( server_port == HTTP_PORT ) +#ifdef HAVE_SSL + || ( server_port == HTTPS_PORT ) ) +#else + ) +#endif + asprintf( &msg, "Invalid HTTP response received from host\n" ); + else + asprintf( &msg, "Invalid HTTP response received from host on port %d\n", server_port ); + terminate( STATE_CRITICAL, msg ); + } + + /* check the return code */ + /* server errors result in a critical state */ + if ( strstr( page->status, "500" ) || + strstr( page->status, "501" ) || + strstr( page->status, "502" ) || + strstr( page->status, "503" ) || + strstr( page->status, "504" ) || + strstr( page->status, "505" )) { + asprintf( &msg, RESULT_TEMPLATE_STATUS_RESPONSE_TIME, + protocol_text( use_ssl ), + state_text( http_client_error_state ), + page->status, + elapsed_time, + elapsed_time ); + terminate( STATE_CRITICAL, msg ); + } + + /* client errors result in a warning state */ + if ( strstr( page->status, "400" ) || + strstr( page->status, "401" ) || + strstr( page->status, "402" ) || + strstr( page->status, "403" ) || + strstr( page->status, "404" ) || + strstr( page->status, "405" ) || + strstr( page->status, "406" ) || + strstr( page->status, "407" ) || + strstr( page->status, "408" ) || + strstr( page->status, "409" ) || + strstr( page->status, "410" ) || + strstr( page->status, "411" ) || + strstr( page->status, "412" ) || + strstr( page->status, "413" ) || + strstr( page->status, "414" ) || + strstr( page->status, "415" ) || + strstr( page->status, "416" ) || + strstr( page->status, "417" ) ) { + asprintf( &msg, RESULT_TEMPLATE_STATUS_RESPONSE_TIME, + protocol_text( use_ssl ), + state_text( http_client_error_state ), + page->status, + elapsed_time, + elapsed_time ); + terminate( http_client_error_state, msg ); + } + + /* check redirected page if specified */ + if (strstr( page->status, "300" ) || + strstr( page->status, "301" ) || + strstr( page->status, "302" ) || + strstr( page->status, "303" ) || + strstr( page->status, "304" ) || + strstr( page->status, "305" ) || + strstr( page->status, "306" ) || + strstr( page->status, "307" ) ) { + if ( http_redirect_state == STATE_DEPENDENT ) { + /* returning STATE_DEPENDENT means follow redirect */ + return STATE_DEPENDENT; + } else { + asprintf( &msg, RESULT_TEMPLATE_STATUS_RESPONSE_TIME, + protocol_text( use_ssl ), + state_text( http_redirect_state ), + page->status, + elapsed_time, + elapsed_time ); + terminate( http_redirect_state, msg ); + } + } + + return STATE_OK; +} + +int +check_http_content( struct pageref *page ) +{ + char *msg = ""; + + /* check for string in content */ + if ( check_content_string ) { + if ( strstr( page->content, content_string ) ) { + asprintf( &msg, RESULT_TEMPLATE_STATUS_RESPONSE_TIME, + protocol_text( use_ssl ), + state_text( STATE_OK ), + page->status, + elapsed_time, + elapsed_time ); + terminate( STATE_OK, msg ); + } else { + asprintf( &msg, RESULT_TEMPLATE_STATUS_RESPONSE_TIME, + protocol_text( use_ssl ), + state_text( STATE_CRITICAL ), + page->status, + elapsed_time, + elapsed_time ); + terminate( STATE_CRITICAL, msg ); + } + } + +#ifdef HAVE_REGEX_H + /* check for regex in content */ + if ( check_content_regex ) { + regex_error = regexec( ®ex_preg, page->content, REGEX_REGS, regex_pmatch, 0); + if ( regex_error == 0 ) { + asprintf( &msg, RESULT_TEMPLATE_STATUS_RESPONSE_TIME, + protocol_text( use_ssl ), + state_text( STATE_OK ), + page->status, + elapsed_time, + elapsed_time ); + terminate( STATE_OK, msg ); + } else { + if ( regex_error == REG_NOMATCH ) { + asprintf( &msg, "%s, %s: regex pattern not found\n", + protocol_text( use_ssl) , + state_text( STATE_CRITICAL ) ); + terminate( STATE_CRITICAL, msg ); + } else { + regerror( regex_error, ®ex_preg, regex_error_buffer, MAX_INPUT_BUFFER); + asprintf( &msg, "%s %s: Regex execute Error: %s\n", + protocol_text( use_ssl) , + state_text( STATE_CRITICAL ), + regex_error_buffer ); + terminate( STATE_CRITICAL, msg ); + } + } + } +#endif + + return STATE_OK; +} + + +int +prepare_follow_redirect( struct pageref *page ) +{ + char *header = NULL; + char *msg = ""; + char protocol[6]; + char hostname[MAX_IPV4_HOSTLENGTH]; + char port[6]; + char *url_path = NULL; + char *orig_url_path = NULL; + char *orig_url_dirname = NULL; + size_t len = 0; + + asprintf( &header, "%s", page->header ); + + + /* restore some default values */ + use_http_post_data = FALSE; + asprintf( &http_method, "%s", DEFAULT_HTTP_METHOD ); + + /* copy url of original request, maybe we need it to compose + absolute url from relative Location: header */ + asprintf( &orig_url_path, "%s", http_url_path ); + + while ( strcspn( header, "\r\n" ) > (size_t) 0 ) { + url_path = realloc( url_path, (size_t) strcspn( header, "\r\n" ) ); + if ( url_path == NULL ) + terminate( STATE_UNKNOWN, "HTTP UNKNOWN: could not reallocate url_path" ); + + + /* Try to find a Location header combination of METHOD HOSTNAME PORT and PATH */ + /* 1. scan for Location: http[s]://hostname:port/path */ + if ( sscanf ( header, HTTP_HEADER_LOCATION_MATCH HTTP_HEADER_PROTOCOL_MATCH HTTP_HEADER_HOSTNAME_MATCH HTTP_HEADER_PORT_MATCH HTTP_HEADER_URL_PATH_MATCH, &protocol, &hostname, &port, url_path ) == 4 ) { + asprintf( &server_hostname, "%s", hostname ); + asprintf( &server_host, "%s", hostname ); + use_ssl = chk_protocol(protocol); + server_port = atoi( port ); + asprintf( &http_url_path, "%s", url_path ); + return STATE_DEPENDENT; + } + else if ( sscanf ( header, HTTP_HEADER_LOCATION_MATCH HTTP_HEADER_PROTOCOL_MATCH HTTP_HEADER_HOSTNAME_MATCH HTTP_HEADER_URL_PATH_MATCH, &protocol, &hostname, url_path ) == 3) { + asprintf( &server_hostname, "%s", hostname ); + asprintf( &server_host, "%s", hostname ); + use_ssl = chk_protocol(protocol); + server_port = protocol_std_port(use_ssl); + asprintf( &http_url_path, "%s", url_path ); + return STATE_DEPENDENT; + } + else if ( sscanf ( header, HTTP_HEADER_LOCATION_MATCH HTTP_HEADER_PROTOCOL_MATCH HTTP_HEADER_HOSTNAME_MATCH HTTP_HEADER_PORT_MATCH, &protocol, &hostname, &port ) == 3) { + asprintf( &server_hostname, "%s", hostname ); + asprintf( &server_host, "%s", hostname ); + use_ssl = chk_protocol(protocol); + server_port = atoi( port ); + asprintf( &http_url_path, "%s", DEFAULT_HTTP_URL_PATH ); + return STATE_DEPENDENT; + } + else if ( sscanf ( header, HTTP_HEADER_LOCATION_MATCH HTTP_HEADER_PROTOCOL_MATCH HTTP_HEADER_HOSTNAME_MATCH, protocol, hostname ) == 2 ) { + asprintf( &server_hostname, "%s", hostname ); + asprintf( &server_host, "%s", hostname ); + use_ssl = chk_protocol(protocol); + server_port = protocol_std_port(use_ssl); + asprintf( &http_url_path, "%s", DEFAULT_HTTP_URL_PATH ); + } + else if ( sscanf ( header, HTTP_HEADER_LOCATION_MATCH HTTP_HEADER_URL_PATH_MATCH, url_path ) == 1 ) { + /* check for relative url and prepend path if necessary */ + if ( ( url_path[0] != '/' ) && ( orig_url_dirname = strrchr( orig_url_path, '/' ) ) ) { + *orig_url_dirname = '\0'; + asprintf( &http_url_path, "%s%s", orig_url_path, url_path ); + } else { + asprintf( &http_url_path, "%s", url_path ); + } + return STATE_DEPENDENT; + } + header += (size_t) strcspn( header, "\r\n" ); + header += (size_t) strspn( header, "\r\n" ); + } /* end while (header) */ + + + /* default return value is STATE_DEPENDENT to continue looping in main() */ + asprintf( &msg, "% %: % - Could not find redirect Location", + protocol_text( use_ssl ), + state_text( STATE_UNKNOWN ), + page->status ); + terminate( STATE_UNKNOWN, msg ); +} + +#ifdef HAVE_SSL +int +https_request( SSL_CTX *ctx, SSL *ssl, struct pageref *page ) +{ + char *buffer = ""; + char recvbuff[MAX_INPUT_BUFFER] = ""; + int buffer_len = 0; + int content_len = 0; + size_t sendsize = 0; + size_t recvsize = 0; + char *content = ""; + size_t size = 0; + char *basic_auth_encoded = NULL; + + asprintf( &buffer, HTTP_TEMPLATE_REQUEST, buffer, http_method, http_url_path ); + + asprintf( &buffer, HTTP_TEMPLATE_HEADER_USERAGENT, buffer, progname, REVISION, PACKAGE_VERSION ); + + if ( use_server_hostname ) { + asprintf( &buffer, HTTP_TEMPLATE_HEADER_HOST, buffer, server_hostname ); + } + + if ( use_basic_auth ) { + basic_auth_encoded = base64( basic_auth, strlen( basic_auth ) ); + asprintf( &buffer, HTTP_TEMPLATE_HEADER_AUTH, buffer, basic_auth_encoded ); + } + + /* either send http POST data */ + if ( use_http_post_data ) { + asprintf( &buffer, "%sContent-Type: application/x-www-form-urlencoded\r\n", buffer ); + asprintf( &buffer, "%sContent-Length: %i\r\n\r\n", buffer, content_len ); + asprintf( &buffer, "%s%s%s", buffer, http_post_data, "\r\n" ); + sendsize = SSL_write( ssl, buffer, strlen( buffer ) ); + switch ( SSL_get_error( ssl, sendsize ) ) { + case SSL_ERROR_NONE: + if ( sendsize < strlen( buffer ) ) + ssl_terminate( STATE_CRITICAL, "SSL ERROR: Incomplete write.\n" ); + break; + default: + ssl_terminate( STATE_CRITICAL, "SSL ERROR: Write problem.\n" ); + break; + } + /* or just a newline */ + } else { + + asprintf( &buffer, "%s\r\n", buffer ); + sendsize = SSL_write( ssl, buffer, strlen( buffer ) ); + switch ( SSL_get_error( ssl, sendsize ) ) { + case SSL_ERROR_NONE: + if ( sendsize < strlen( buffer ) ) + ssl_terminate( STATE_CRITICAL, "SSL ERROR: Incomplete write.\n" ); + break; + default: + ssl_terminate( STATE_CRITICAL, "SSL ERROR: Write problem.\n" ); + break; + } + } + + + /* read server's response */ + + do { + recvsize = SSL_read( ssl, recvbuff, MAX_INPUT_BUFFER - 1 ); + + switch ( SSL_get_error( ssl, recvsize ) ) { + case SSL_ERROR_NONE: + if ( recvsize > (size_t) 0 ) { + recvbuff[recvsize] = '\0'; + asprintf( &content, "%s%s", content, recvbuff ); + size += recvsize; + } + break; + case SSL_ERROR_WANT_READ: + if ( use_client_certificate ) { + continue; + } else { + // workaround while we don't have anonymous client certificates: return OK + //ssl_terminate( STATE_WARNING, "HTTPS WARNING - Client Certificate required.\n" ); + ssl_terminate( STATE_OK, "HTTPS WARNING - Client Certificate required.\n" ); + } + break; + case SSL_ERROR_ZERO_RETURN: + break; + case SSL_ERROR_SYSCALL: + ssl_terminate( STATE_CRITICAL, "SSL ERROR: Premature close.\n" ); + break; + default: + ssl_terminate( STATE_CRITICAL, "SSL ERROR: Read problem.\n" ); + break; + } + } while ( recvsize > (size_t) 0 ); + + asprintf( &page->content, "%s", content ); + page->size = size; + + /* return a CRITICAL status if we couldn't read any data */ + if ( size == (size_t) 0) + ssl_terminate( STATE_CRITICAL, "No data received" ); + + return STATE_OK; +} +#endif + + +#ifdef HAVE_SSL +int +ssl_terminate(int state, char *string ) { + ERR_print_errors( bio_err ); + terminate( state, string ); +} +#endif + +#ifdef HAVE_SSL +static int +password_cb( char *buf, int num, int rwflag, void *userdata ) +{ + if ( num < strlen( client_certificate_passphrase ) + 1 ) + return( 0 ); + + strcpy( buf, client_certificate_passphrase ); + return( strlen( client_certificate_passphrase ) ); +} +#endif + +#ifdef HAVE_SSL +static void +sigpipe_handle( int x ) { +} +#endif + +#ifdef HAVE_SSL +SSL_CTX * +initialize_ssl_ctx( void ) +{ + SSL_METHOD *meth; + SSL_CTX *ctx; + + if ( !bio_err ) { + /* Global system initialization */ + SSL_library_init(); + SSL_load_error_strings(); + + /* An error write context */ + bio_err=BIO_new_fp( stderr, BIO_NOCLOSE ); + } + + /* set up as SIGPIPE handler */ + signal( SIGPIPE, sigpipe_handle ); + + /* create our context */ + meth=SSLv3_method(); + ctx=SSL_CTX_new( meth ); + + /* load client certificate and key */ + if ( use_client_certificate ) { + if ( !(SSL_CTX_use_certificate_chain_file( ctx, client_certificate_file )) ) + ssl_terminate( STATE_CRITICAL, "check_http: can't read client certificate file" ); + + /* set client certificate key passphrase */ + if ( use_client_certificate_passphrase ) { + SSL_CTX_set_default_passwd_cb( ctx, password_cb ); + } + + if ( !(SSL_CTX_use_PrivateKey_file( ctx, client_certificate_file, SSL_FILETYPE_PEM )) ) + ssl_terminate( STATE_CRITICAL, "check_http: can't read client certificate key file" ); + } + + /* load the CAs we trust */ + if ( use_ca_certificate ) { + if ( !(SSL_CTX_load_verify_locations( ctx, ca_certificate_file, 0 )) ) + ssl_terminate( STATE_CRITICAL, "check_http: can't read CA certificate file" ); + +#if (OPENSSL_VERSION_NUMBER < 0x00905100L) + SSL_CTX_set_verify_depth( ctx, 1 ); +#endif + } + + return ctx; +} +#endif + +#ifdef HAVE_SSL +void destroy_ssl_ctx( SSL_CTX *ctx ) +{ + SSL_CTX_free( ctx ); +} +#endif + +#ifdef HAVE_SSL +int +fetch_server_certificate( SSL *ssl ) +{ + server_certificate = SSL_get_peer_certificate( ssl ); + if ( server_certificate == NULL ) + ssl_terminate( STATE_CRITICAL, "SSL ERROR: Cannot retrieve server certificate.\n" ); + + return STATE_OK; +} +#endif + + +#ifdef HAVE_SSL +int +check_server_certificate_chain( SSL *ssl ) +{ + if ( SSL_get_verify_result( ssl ) != X509_V_OK ) + ssl_terminate( STATE_CRITICAL, "SSL ERROR: Cannot verify server certificate chain.\n" ); + + return STATE_OK; +} +#endif + + +#ifdef HAVE_SSL +int +check_server_certificate_hostname( ) +{ + char server_CN[256]; + char *msg = NULL; + X509_NAME_get_text_by_NID( X509_get_subject_name( server_certificate ), NID_commonName, server_CN, 256 ); + if ( strcasecmp( server_CN, server_hostname ) ) { + asprintf( &msg, "SSL ERROR: Server Certificate does not match Hostname %s.\n", server_hostname ); + ssl_terminate( STATE_WARNING, msg ); + } + + return STATE_OK; +} +#endif + +#ifdef HAVE_SSL +int +check_server_certificate_expires( ) +{ + ASN1_STRING *tm; + int offset; + struct tm stamp; + int days_left; + char timestamp[17] = ""; + char *msg = NULL; + + /* Retrieve timestamp of certificate */ + tm = X509_get_notAfter( server_certificate ); + + /* Generate tm structure to process timestamp */ + if ( tm->type == V_ASN1_UTCTIME ) { + if ( tm->length < 10 ) { + ssl_terminate( STATE_CRITICAL, "ERROR: Wrong time format in certificate.\n" ); + } else { + stamp.tm_year = ( tm->data[0] - '0' ) * 10 + ( tm->data[1] - '0' ); + if ( stamp.tm_year < 50 ) + stamp.tm_year += 100; + offset = 0; + } + } else { + if ( tm->length < 12 ) { + ssl_terminate( STATE_CRITICAL, "ERROR: Wrong time format in certificate.\n" ); + } else { + stamp.tm_year = + ( tm->data[0] - '0' ) * 1000 + ( tm->data[1] - '0' ) * 100 + + ( tm->data[2] - '0' ) * 10 + ( tm->data[3] - '0' ); + stamp.tm_year -= 1900; + offset = 2; + } + } + stamp.tm_mon = + ( tm->data[2 + offset] - '0' ) * 10 + ( tm->data[3 + offset] - '0' ) - 1; + stamp.tm_mday = + ( tm->data[4 + offset] - '0' ) * 10 + ( tm->data[5 + offset] - '0' ); + stamp.tm_hour = + ( tm->data[6 + offset] - '0' ) * 10 + ( tm->data[7 + offset] - '0' ); + stamp.tm_min = + ( tm->data[8 + offset] - '0' ) * 10 + ( tm->data[9 + offset] - '0' ); + stamp.tm_sec = 0; + stamp.tm_isdst = -1; + + days_left = ( mktime( &stamp ) - time( NULL ) ) / 86400; + snprintf + ( timestamp, 17, "%02d.%02d.%04d %02d:%02d", + stamp.tm_mday, stamp.tm_mon +1, stamp.tm_year + 1900, + stamp.tm_hour, stamp.tm_min ); + + if ( ( days_left > 0 ) && ( days_left <= server_certificate_min_days_valid ) ) { + asprintf( &msg, "Certificate expires in %d day(s) (%s).\n", days_left, timestamp ); + ssl_terminate( STATE_WARNING, msg ); + } + if ( days_left < 0 ) { + asprintf( &msg, "Certificate expired on %s.\n", timestamp ); + ssl_terminate( STATE_CRITICAL, msg ); + } + + if (days_left == 0) { + asprintf( &msg, "Certificate expires today (%s).\n", timestamp ); + ssl_terminate( STATE_WARNING, msg ); + } + + asprintf( &msg, "Certificate will expire on %s.\n", timestamp ); + ssl_terminate( STATE_OK, msg ); +} +#endif + +/* written by lauri alanko */ +static char * +base64 (char *bin, int len) +{ + + char *buf = (char *) malloc ((len + 2) / 3 * 4 + 1); + int i = 0, j = 0; + + char BASE64_END = '='; + char base64_table[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + + while (j < len - 2) { + buf[i++] = base64_table[bin[j] >> 2]; + buf[i++] = base64_table[((bin[j] & 3) << 4) | (bin[j + 1] >> 4)]; + buf[i++] = base64_table[((bin[j + 1] & 15) << 2) | (bin[j + 2] >> 6)]; + buf[i++] = base64_table[bin[j + 2] & 63]; + j += 3; + } + + switch (len - j) { + case 1: + buf[i++] = base64_table[bin[j] >> 2]; + buf[i++] = base64_table[(bin[j] & 3) << 4]; + buf[i++] = BASE64_END; + buf[i++] = BASE64_END; + break; + case 2: + buf[i++] = base64_table[bin[j] >> 2]; + buf[i++] = base64_table[((bin[j] & 3) << 4) | (bin[j + 1] >> 4)]; + buf[i++] = base64_table[(bin[j + 1] & 15) << 2]; + buf[i++] = BASE64_END; + break; + case 0: + break; + } + + buf[i] = '\0'; + return buf; +} + diff --git a/contrib/check_hw.sh b/contrib/check_hw.sh new file mode 100644 index 0000000..3f3dc20 --- /dev/null +++ b/contrib/check_hw.sh @@ -0,0 +1,66 @@ +#! /bin/sh +# +# Tested on SuSE 9.1 Professional with the hwinfo-8.62-0.2 package installed. +# +# Before you can run this plugin, you must do: +# /usr/sbin/hwinfo --short > /etc/hw.original +# add to cron job: +# /usr/sbin/hwinfo --short > /etc/hw.current +# /usr/bin/diff /etc/hw.original /etc/hw.current > /tmp/hw.check +# +# +# Rok Debevc -- rok.debevc@agenda.si +# +# +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin + +PROGNAME=`basename $0` +PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` +REVISION=`echo '$Revision: 1.1 $' | sed -e 's/[^0-9.]//g'` + +. $PROGPATH/utils.sh + + +print_usage() { + echo "Usage: $PROGNAME" +} + +print_help() { + print_revision $PROGNAME $REVISION + echo "" + print_usage + echo "" + echo "This plugin checks hardware changes." + echo "" + support + exit 0 +} + +case "$1" in + --help) + print_help + exit 0 + ;; + -h) + print_help + exit 0 + ;; + --version) + print_revision $PROGNAME $REVISION + exit 0 + ;; + -V) + print_revision $PROGNAME $REVISION + exit 0 + ;; + *) + if `du /tmp/hw.check | cut -c 1|grep "^[0]" > /dev/null` ; then + echo No hardware is changed + exit 0 + else + echo ***hardware is changed*** look into /tmp/hw.check + exit 2 + fi + ;; +esac + diff --git a/contrib/check_ica_master_browser.pl b/contrib/check_ica_master_browser.pl new file mode 100755 index 0000000..c2ee6bd --- /dev/null +++ b/contrib/check_ica_master_browser.pl @@ -0,0 +1,229 @@ +#!/usr/bin/perl -w + +# $Id: check_ica_master_browser.pl,v 1.1 2005/01/25 09:09:33 stanleyhopcroft Exp $ + +# $Log: check_ica_master_browser.pl,v $ +# Revision 1.1 2005/01/25 09:09:33 stanleyhopcroft +# New plugin - checks that ICA master browser is what it should be (important for firewalled dialup) +# + +use strict ; + +use IO::Socket; +use IO::Select; +use Getopt::Long ; + +use lib qw(/usr/local/nagios/libexec) ; +use utils qw(%ERRORS &print_revision &support &usage); +use packet_utils qw(&pdump &tethereal) ; + +my $PROGNAME = 'check_ica_master_browser' ; + +# You might have to change this... + +my $PACKET_TIMEOUT = 1; + # Number of seconds to wait for further UDP packets +my $TEST_COUNT = 2; + # Number of datagrams sent without reply +my $BUFFER_SIZE = 1500; + # buffer size used for 'recv' calls. +my $ICA_PORT = 1604; + # what port ICA runs on. Unlikely to change. + +# End user config. + +my ($debug, $preferred_master, $bcast_addr, $ica_browser, $timeout) ; + +Getopt::Long::Configure('bundling', 'no_ignore_case'); +GetOptions + ("V|version" => \&version, + "h|help" => \&help, + "v|verbose" => \$debug, + "B|broadcast_addr:s" => \$bcast_addr, + "I|ica_browser:s" => \$ica_browser, + "P|preferred_master:s" => \$preferred_master, + "T|Packet_timeout:i" => \$timeout, +) ; + + +my $broadcast_addr = $1 if $bcast_addr and $bcast_addr =~ m#(\d+\.\d+\.\d+\.\d+)# ; +usage("Invalid broadcast address: $bcast_addr") + if $bcast_addr and not defined($broadcast_addr) ; + +usage("You must provide either the name of an ICA browser or the broadcast address of the subnet containing them\n") + unless ($ica_browser or $broadcast_addr) ; + +usage("You must provide the name or address of a preferred ICA master browser\n") + unless ($preferred_master) ; + +my $preferred_master_n = $preferred_master =~ m#(\d+\.\d+\.\d+\.\d+)# + ? $preferred_master + : inet_ntoa(scalar gethostbyname($preferred_master)) ; + +my $Timeout = $timeout || $PACKET_TIMEOUT ; + + # Definitions of query strings. Change at your own risk :) + # this info was gathered with tcpdump whilst trying to use an ICA client, + # so I'm not 100% sure of what each value is. + +my $bcast_helo = &tethereal(<<'End_of_Tethereal_trace', '1e') ; +0020 ff ff 04 d6 06 44 00 26 4a 76 1e 00 01 30 02 fd .....D.&Jv...0.. +0030 a8 e3 00 02 f5 95 9f f5 30 07 00 00 00 00 00 00 ........0....... +0040 00 00 00 00 00 00 01 00 ........ +End_of_Tethereal_trace + +my $direct_helo = &tethereal(<<'End_of_Tethereal_trace', '20') ; +0020 64 17 05 0f 06 44 00 28 ab b5 20 00 01 30 02 fd d....D.(.. ..0.. +0030 a8 e3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0040 00 00 00 00 00 00 00 00 00 00 ........ +End_of_Tethereal_trace + +my $Udp = IO::Socket::INET->new( Proto => 'udp' ) + || die "Socket failure: $!"; + + # select is here to allow us to set timeouts on the connections. Otherwise they + # just 'stop' until a server appears. + +my $select = IO::Select->new($Udp) + || die "Select failure: $!"; + +$Udp->sockopt(SO_BROADCAST, 1 ); + +my ($remote_host, $buff, $destination, $raddr, $rport, $rhost, @remote_response); +my ($query_message, $send_addr, $this_test) ; + +$buff = ''; +$this_test = 0; + + # If there is no response to the first helo packet it will be resent + # up to $TEST_COUNT (see at the top). + +$query_message = $broadcast_addr ? $bcast_helo : $direct_helo ; +$destination = $broadcast_addr ? $broadcast_addr: $ica_browser ; +$send_addr = sockaddr_in($ICA_PORT, inet_aton($destination) ) ; + +while ( ++$this_test <= $TEST_COUNT && !$buff ) { + + print "Sending helo datagram. datagram number: ", $this_test, "\n" + if $debug ; + + print "Querying $destination for master browser\n" + if $debug ; + &pdump($query_message) + if $debug ; + $Udp->send($query_message, 0, $send_addr ); + if ( $select->can_read($Timeout) ) { + $remote_host = $Udp->recv($buff, $BUFFER_SIZE, 0 ); + } + + last + if $buff ; + sleep 1 ; + +} + + # Ok we've looped several times, looking for a response. If we don't have one + # yet, we simply mark the whole lot as being unavailable. + +unless ( $buff ) { + print "Failed. No response to helo datagram (master browser query) from $destination.\n" ; + exit $ERRORS{CRITICAL} ; +} + +($rport, $raddr) = sockaddr_in( $remote_host ); +$rhost = gethostbyaddr( $raddr, AF_INET ); +my @tmpbuf = unpack('C*', $buff ); +if ( $debug ) { + print "$rhost:$rport responded with: ",length($buff), " bytes\n"; + &pdump($buff) ; +} + + # Now we have a response, then we need to figure out the master browser, and + # query it for published applications... + +my $master_browser = join '.', @tmpbuf[32..35] ; +my ($master_browser_a) = gethostbyaddr(inet_aton($master_browser), AF_INET) =~ /^(\w+?)\./ ; + + # Ok should probably error check this, because it's remotely possible + # that a server response might be completely wrong... + +print "Master browser = $master_browser_a/$master_browser\n" + if $debug ; + +$send_addr = sockaddr_in($ICA_PORT, inet_aton($master_browser)); + +my $subject_clause = $bcast_addr ? "of the \"$destination\" subnet" : "known to ICA server \"$destination\"" ; + +if ( $master_browser eq $preferred_master_n ) { + print "Preferred master browser \"$preferred_master\" __is__ the master browser (\"$master_browser_a/$master_browser\") $subject_clause.\n" ; + exit $ERRORS{OK} ; +} else { + print "\"\u$preferred_master\" is __not__ the master browser (\"$master_browser_a/$master_browser\") $subject_clause: remote clients (dialup) may not find Published applications from Master Browser.\n" ; + exit $ERRORS{CRITICAL} ; +} + +close $Udp; + + +sub print_usage () { + print "Usage: $PROGNAME (-B | -I ) - P " ; +} + +sub print_help () { + print_revision($PROGNAME,'$Revision: 1.1 $ '); + print "Copyright (c) 2002 Ed Rolison/Tom De Blende/S Hopcroft + +Perl Check Citrix Master Browser plugin for Nagios. + +Returns OK if the Citrix master browser is that given by the -P option. + +The plugin works by + If the -B option is specified, sends a broadcast helo to find the address of the Citrix master browser in the specified subnet. + return critical if there is no reply; + Else if the -I option is specified + send a direct helo to the specified server until there is a response (containing the address of the Citrix master browser) + + + return Critical if the response does not contain the address of the 'preferred master browser' (-P option). + return OK + + How ICA Clients Use the Master ICA Browser. + +Citrix ICA Clients must locate the master browser to get the address of a server or published application. + +The Citrix ICA Client can locate the master browser by sending out broadcast packets, or, +if the address of a Citrix server is specified in the Citrix ICA Client or in an ICA file, +the ICA Client locates the master browser by sending directed packets to the specified address. +The ICA Client requests the address of the ICA master browser from the Citrix server. + +"; + print_usage(); + print ' +-B, --broadcast_address:STRING + The broadcast address that should contain Citrix master browser. This option takes precedence over -I. +-I, --ica_browser:STRING + Optional name or address of an ICA server that could be the master browser (used when broadcast not possible). +-P, --preferred_master:STRING + Name or address of the ICA server that _should_ be the master browser. + Required. +-T, --packet-timeout:INTEGER + Time to wait for UDP packets (default 1 sec). +-v, --verbose + Debugging output. +-h, --help + This stuff. + +'; + support(); +} + +sub version () { + print_revision($PROGNAME,'$Revision: 1.1 $ '); + exit $ERRORS{'OK'}; +} + +sub help () { + print_help(); + exit $ERRORS{'OK'}; +} + diff --git a/contrib/check_ica_metaframe_pub_apps.pl b/contrib/check_ica_metaframe_pub_apps.pl new file mode 100755 index 0000000..d5585e3 --- /dev/null +++ b/contrib/check_ica_metaframe_pub_apps.pl @@ -0,0 +1,382 @@ +#!/usr/bin/perl -w + +# $Id: check_ica_metaframe_pub_apps.pl,v 1.1 2005/01/25 09:07:39 stanleyhopcroft Exp $ + +# $Log: check_ica_metaframe_pub_apps.pl,v $ +# Revision 1.1 2005/01/25 09:07:39 stanleyhopcroft +# Replacement (structured name mainly) for check_citrix: check of ICA browse service +# +# Revision 1.1 2005-01-25 17:00:24+11 anwsmh +# Initial revision +# + +use strict ; + +use IO::Socket; +use IO::Select; +use Getopt::Long ; + +my ($bcast_addr, $timeout, $debug, @citrix_servers, $crit_pub_apps, $warn_pub_apps, $long_list) ; + +use lib qw(/usr/local/nagios/libexec) ; +use utils qw(%ERRORS &print_revision &support &usage) ; +use packet_utils qw(&pdump &tethereal) ; + +my $PROGNAME = 'check_ica_metaframe_pub_apps' ; + +sub print_help (); +sub print_usage (); +sub help (); +sub version (); + + # You might have to change this... + +my $PACKET_TIMEOUT = 1; + # Number of seconds to wait for further UDP packets +my $TEST_COUNT = 2; +# Number of datagrams sent without reply +my $BUFFER_SIZE = 1500; + # buffer size used for 'recv' calls. +my $LONG_LIST = 0 ; + # this is for if you have many published applications. + # if you set it, it won't do any harm, but may slow the test + # down a little. (Since it does a 'recv' twice instead of + # once and therefore may have to wait for a timeout). +my $ICA_PORT = 1604; + # what port ICA runs on. Unlikely to change. + +Getopt::Long::Configure('bundling', 'no_ignore_case'); +GetOptions + ("V|version" => \&version, + "h|help" => \&help, + "v|verbose" => \$debug, + "B|broadcast_addr:s" => \$bcast_addr, + "C|citrix_servers:s" => \@citrix_servers, + "L|long_list" => \$long_list, + "P|crit_pub_apps:s" => \$crit_pub_apps, + "T|Packet_timeout:i" => \$timeout, + "W|warn_pub_apps:s" => \$warn_pub_apps, +) ; + + +my $broadcast_addr = $1 if $bcast_addr and $bcast_addr =~ m#(\d+\.\d+\.\d+\.\d+)# ; +usage("Invalid broadcast address: $bcast_addr\n") + if $bcast_addr and not defined($broadcast_addr) ; + +usage("You must provide either the names of citrix servers or the broadcast address of the subnet containing them\n") + unless (@citrix_servers or $broadcast_addr) ; + +my @target = defined $broadcast_addr ? ($broadcast_addr) : @citrix_servers ; + +usage("You must provide the names of the published applications that the Citrix browser should be advertising\n") + unless $crit_pub_apps or $warn_pub_apps ; + +my $Timeout = $timeout + if defined $timeout ; +$Timeout = $PACKET_TIMEOUT + unless defined $Timeout ; +$long_list = $LONG_LIST + unless defined $long_list ; + +my @crit_pub_apps = $crit_pub_apps ? split(/,/, $crit_pub_apps) : () ; +my @warn_pub_apps = $warn_pub_apps ? split(/,/, $warn_pub_apps) : () ; + + # Definitions of query strings. Change at your own risk :) + # this info was gathered with tcpdump whilst trying to use an ICA client, + # so I'm not 100% sure of what each value is. + +my $bcast_helo = &tethereal(<<'End_of_Tethereal_trace', '1e') ; +0020 ff ff 04 d6 06 44 00 26 4a 76 1e 00 01 30 02 fd .....D.&Jv...0.. +0030 a8 e3 00 02 f5 95 9f f5 30 07 00 00 00 00 00 00 ........0....... +0040 00 00 00 00 00 00 01 00 ....... +End_of_Tethereal_trace + +my $bcast_query_app = &tethereal(<<'End_of_Tethereal_trace', '24') ; +0020 64 17 04 50 06 44 00 2c 85 6a 24 00 01 32 02 fd d..P.D.,.j$..2.. +0030 a8 e3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0040 00 00 00 00 00 00 21 00 02 00 00 00 00 00 ......!...... +End_of_Tethereal_trace + +my $direct_helo = &tethereal(<<'End_of_Tethereal_trace', '20') ; +0020 64 17 05 0f 06 44 00 28 ab b5 20 00 01 30 02 fd d....D.(.. ..0.. +0030 a8 e3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0040 00 00 00 00 00 00 00 00 00 00 ......... +End_of_Tethereal_trace + +my $direct_query_app = &tethereal(<<'End_of_Tethereal_trace', '2c') ; +0020 64 17 05 10 06 44 00 34 7a 9a 2c 00 02 32 02 fd d....D.4z.,..2.. +0030 a8 e3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0040 00 00 00 00 00 00 21 00 02 00 01 00 00 00 00 00 ......!......... +0050 00 00 00 00 00 00 ...... +End_of_Tethereal_trace + +my $Udp = IO::Socket::INET->new( Proto => 'udp' ) + || die "Socket failure: $!"; + + # Select is here to allow us to set timeouts on the connections. + # Otherwise they just 'stop' until a server appears. + +my $select = IO::Select->new($Udp) + || die "Select failure: $!"; + # Helo needs to be broadcastt, but query does not. +$Udp->sockopt(SO_BROADCAST, 1 ); + +my ($remote_host, $buff, $buff2, $raddr, $rport, $rhost, @remote_response); +my ($query_message, $send_addr, $this_test) ; + +$buff = $buff2 = ''; +$this_test = 0; + + # If there is no response to the first helo packet it will be resent + # up to TEST_COUNT (see at the top). + +while ( ++$this_test <= $TEST_COUNT && !$buff ) { + + print "Sending helo datagram. datagram number: ", $this_test, "\n" + if $debug ; + + # If we have multiple targets, we probe each of them until we get a + # response... + + foreach my $destination (@target) { + $query_message = $broadcast_addr ? $bcast_helo : $direct_helo ; + print "Querying $destination for master browser\n" + if $debug ; + $send_addr = sockaddr_in($ICA_PORT, inet_aton($destination) ); + &pdump($query_message) + if $debug ; + $Udp->send($query_message, 0, $send_addr ); + if ( $select->can_read($Timeout) ) { + $remote_host = $Udp->recv($buff, $BUFFER_SIZE, 0 ); + } + + last + if $buff ; + sleep 1 ; + + } +} + + # Ok we've looped several times, looking for a response. If we don't have one + # yet, we simply mark the whole lot as being unavailable. + +unless ( $buff ) { + print "Failed. No response to helo datagram (master browser query) from ", $broadcast_addr ? $broadcast_addr : "@citrix_servers", ".\n" ; + exit $ERRORS{CRITICAL} ; +} + +($rport, $raddr) = sockaddr_in( $remote_host ); +$rhost = gethostbyaddr( $raddr, AF_INET ); +my @tmpbuf = unpack('C*', $buff ); +if ( $debug ) { + print "$rhost:$rport responded with: ", length($buff), " bytes\n"; + &pdump($buff) ; +} + + # Now we have a response, then we need to figure out the master browser, and + # query it for published applications... + +my $master_browser = join '.', @tmpbuf[32..35] ; + + # Ok should probably error check this, because it's remotely possible + # that a server response might be completely wrong... + +print "Master browser = $master_browser\n" + if $debug ; + +$send_addr = sockaddr_in($ICA_PORT, inet_aton($master_browser)); + +if ( $broadcast_addr ) { + print "using broadcast query\n" + if $debug ; + $query_message = $bcast_query_app; +} else { + print "using directed query\n" + if $debug ; + $query_message = $direct_query_app; +} + + # Now we send the appropriate query string, to the master browser we've found. + +$buff = ''; +$this_test = 0 ; + +print "Querying master browser for published application list\n" + if $debug ; + +while ( ++$this_test <= $TEST_COUNT && !$buff ) { + print "Sending application query datagram. datagram number: ", $this_test, "\n" + if $debug ; + &pdump($query_message) + if $debug ; + $Udp->send($query_message, 0, $send_addr); + + if ( $select->can_read($Timeout) ) { + $remote_host = $Udp->recv($buff, $BUFFER_SIZE, 0 ); + # $buff = substr($buff, 32) ; + # Hope that ICA preamble is first 32 bytes + } + + # Long application lists are delivered in multiple packets + + my $buff2 = '' ; + while ( $long_list && $select->can_read($Timeout) ) { + $remote_host = $Udp->recv($buff2, $BUFFER_SIZE, 0); + $buff .= $buff2 + if $buff2 ; + # $buff .= substr($buff2, 32) if $buff2 ; + # Hope that ICA preamble is first 32 bytes + } + + last if $buff ; + sleep 1 ; + +} + +unless ( $buff ) { + print "Failed. No response to application query datagram from ", $master_browser, ".\n" ; + exit $ERRORS{CRITICAL} ; +} + + # we got a response from a couple of retries of the app query + +($rport, $raddr) = sockaddr_in ( $remote_host ); +$rhost = gethostbyaddr ( $raddr, AF_INET ); +if ( $debug ) { + print "$rhost:$rport responded to app query with: ", length($buff), " bytes\n"; + &pdump($buff) ; +} + +my $app_list = $buff ; + # delete nulls in unicode + # but only if there is unicode (usually from + # broadcast query) + +$app_list =~ s/(?:(\w| |-)\x00)/$1/g + if $app_list =~ /(?:(?:(?:\w| |-)\x00){3,})/ ; + # FIXME an application name is + # 3 or more unicoded characters + + # FIXME locale + # extract null terminated strings + +my (@clean_app_list, $clean_app_list) ; +$clean_app_list = join(',', @clean_app_list = $app_list =~ m#([A-Za-z](?:\w| |-|[])+?(?=\x00))#g ) ; + + # patch for German umlauts et al from Herr Mike Gerber. + + # $clean_app_list = join(',', @clean_app_list = $app_list =~ m#([A-Z](?:\w| |-)+?(?=\x00))#g ) ; + + # FIXME everyones apps don't start with caps + +print qq(Received list of applications: "$clean_app_list".\n) + if $debug ; + +if ( scalar @crit_pub_apps and my @missing = &simple_diff(\@clean_app_list, \@crit_pub_apps) ) { + print qq(Failed. "@missing" not found in list of published applications), + qq(" $clean_app_list" from master browser "$master_browser".\n) ; + exit $ERRORS{CRITICAL} ; +} + +if ( my @missing = &simple_diff(\@clean_app_list, \@warn_pub_apps) ) { + print qq(Warning. "@missing" not found in list of published applications), + qq(" $clean_app_list" from master browser "$master_browser".\n) ; + exit $ERRORS{WARNING} ; +} + +my @x = (@crit_pub_apps, @warn_pub_apps) ; +my $blah = ( scalar(@x) == 1 + ? 'the published application "' . join(',', @x) . '" is available' + : 'the published applications "' . join(',', @x) . '" are available' ) ; + +print qq(Ok. Citrix master browser "$master_browser" reported that $blah.\n) ; +exit $ERRORS{OK} ; + + # sleep $Timeout; + # because otherwise we can get responses from + # the WRONG servers. DOH +close $Udp; + + +sub print_usage () { + print "Usage: $PROGNAME (-B | -C ..) -W -P \n"; +} + +sub print_help () { + print_revision($PROGNAME,'$Revision: 1.1 $ '); + print "Copyright (c) 2002 Ed Rolison/Tom De Blende/S Hopcroft + +Perl Check Citrix plugin for Nagios. + +Returns OK if the Citrix master browser returns a 'published application' list that contain names specified by the -W or -P options + +The plugin works by + If the -B option is specified, sending a broadcast helo to find the address of the Citrix master browser in the specified subnet. + return critical if there is no reply; + Else if the -C option is specified + send a direct helo to the specified server until there is a response (containing the address of the Citrix master browser) + + Query the master browser (using a 'broadcast published applications query ' if -B) and compare the published applications returned + to those specified by -W and -P options + + return Critical if the published applications specified by -P is not a subset of the query responses; + return Warning if the published applications specified by -W is not a subset of the query responses; + return OK + +"; + print_usage(); + print ' +-B, --broadcast_address=STRING + The broadcast address that should contain Citrix master browser. This option takes precedence over -C. +-C, --citrix_server:STRING + Optional __name(s)__ of Citrix servers that could be the master browser (used when broadcast not possible). +-L, --long_list + Set this if you have heaps of published applications (ie more than will fit in _one_ UDP packet) +-P, --crit_published_app=STRING + Optional comma separated list of published application that must be in the response from the master browser. + Check returns critical otherwise. +-T, --packet-timeout:INTEGER + Time to wait for UDP packets (default 1 sec). +-W, --warn_published_app=STRING + Optional comma separated list of published application that should be in the response from the master browser. + Check returns warning otherwise. +-v, --verbose + Debugging output. +-h, --help + This stuff. + +'; + support(); +} + +sub version () { + print_revision($PROGNAME,'$Revision: 1.1 $ '); + exit $ERRORS{'OK'}; +} + +sub help () { + print_help(); + exit $ERRORS{'OK'}; +} + + +sub simple_diff { + +my ( $a_list, $b_list) = @_ ; + + # simple set difference 'Recipe 4.7 Perl Cookbook', Christiansen and Torkington + + my (%seen, @missing) ; + + @seen{@$a_list} = () ; + + foreach my $item (@$b_list) { + push @missing, $item + unless exists $seen{$item} ; + } + + @missing ; +} + + + diff --git a/contrib/check_ica_program_neigbourhood.pl b/contrib/check_ica_program_neigbourhood.pl new file mode 100755 index 0000000..faaf7aa --- /dev/null +++ b/contrib/check_ica_program_neigbourhood.pl @@ -0,0 +1,619 @@ +#!/usr/bin/perl -w + +# $Id: check_ica_program_neigbourhood.pl,v 1.1 2005/01/25 09:05:53 stanleyhopcroft Exp $ + +# $Log: check_ica_program_neigbourhood.pl,v $ +# Revision 1.1 2005/01/25 09:05:53 stanleyhopcroft +# New plugin to check Citrix Metaframe XP "Program Neighbourhood" +# +# Revision 1.1 2005-01-25 16:50:30+11 anwsmh +# Initial revision +# + +use strict ; + +use Getopt::Long; + +use utils qw($TIMEOUT %ERRORS &print_revision &support); +use LWP 5.65 ; +use XML::Parser ; + +my $PROGNAME = 'check_program_neigbourhood' ; +my ($debug, $xml_debug, $pn_server, $pub_apps, $app_servers, $server_farm, $usage) ; + +Getopt::Long::Configure('bundling', 'no_ignore_case') ; +GetOptions + ("V|version" => \&version, + "A|published_app:s" => \$pub_apps, + "h|help" => \&help, + 'usage|?' => \&usage, + "F|server_farm=s" => \$server_farm, + "P|pn_server=s" => \$pn_server, + "S|app_server=s" => \$app_servers, + "v|verbose" => \$debug, + "x|xml_debug" => \$xml_debug, +) ; + +$pn_server || do { + print "Name or IP Address of _one_ Program Neighbourhood server is required.\n" ; + &print_usage ; + exit $ERRORS{UNKNOWN} ; +} ; + +$pub_apps ||= 'Word 2003' ; +$pub_apps =~ s/["']//g ; +my @pub_apps = split /,\s*/, $pub_apps ; + +my @app_servers = split /,\s*/, $app_servers ; + +@app_servers || do { + print "IP Address of _each_ Application server in the Metaframe Citrix XP server farm is required.\n" ; + &print_usage ; + exit $ERRORS{UNKNOWN} ; +} ; + +my @non_ip_addresses = grep ! /\d+\.\d+\.\d+\.\d+/, @app_servers ; + +scalar(@non_ip_addresses) && do { + print qq(Application servers must be specified by IP Address (not name): "@non_ip_addresses".\n) ; + &print_usage ; + exit $ERRORS{UNKNOWN} ; +} ; + +$server_farm || do { + print "Name of Citrix Metaframe XP server farm is required.\n" ; + &print_usage ; + exit $ERRORS{UNKNOWN} ; +} ; + +my %xml_tag = () ; +my @tag_stack = () ; + +my $xml_p = new XML::Parser(Handlers => {Start => \&handle_start, + End => sub { pop @tag_stack }, + Char => \&handle_char}) ; + +# values required by Metaframe XP that don't appear to matter too much + +my $client_host = 'Nagios server (http://www.Nagios.ORG)' ; +my $user_name = 'nagios' ; +my $domain = 'Nagios_Uber_Alles' ; + +# end values required by Metaframe XP + +my $nilpotent_req = <<'EOR' ; + + + + + + +EOR + +my $server_farm_req = <<'EOR' ; + + + + + + + +EOR + +my $spec_server_farm_req = < + + + + + $server_farm* + + $client_host + + + + + $user_name + $domain + + + +EOR + +my $app_req = < + + + + + PUBLISHED_APP_ENCODED + + Nagios_Service_Check + + + + + $PROGNAME + $domain + + + +EOR + +my $ua = LWP::UserAgent->new ; +my $req = HTTP::Request->new('POST', "http://$pn_server/scripts/WPnBr.dll") ; + $req->content_type('text/xml') ; + +my $svr ; + +my @pubapp_encoded = map { my $x = $_ ; $x =~ s/(\W)/'&#' . ord($1) . ';'/eg; $x } @pub_apps ; + +my $error_tag_cr = sub { ! exists($xml_tag{ErrorId}) } ; + +my @app_reqs = ( + # { Content => url, Ok => ok_condition, Seq => \d+ } + + { Content => $nilpotent_req, Ok => $error_tag_cr, Seq => 0 }, + { Content => $server_farm_req, Ok => sub { + ! exists($xml_tag{ErrorId}) && + exists( $xml_tag{ServerFarmName}) && + defined($xml_tag{ServerFarmName}) && + $xml_tag{ServerFarmName} eq $server_farm + }, Seq => 2 }, + { Content => $nilpotent_req, Ok => $error_tag_cr, Seq => 4 }, + { Content => $spec_server_farm_req, Ok => sub { + ! exists($xml_tag{ErrorId}) && + exists( $xml_tag{ServerAddress}) && + defined($xml_tag{ServerAddress}) && + $xml_tag{ServerAddress} =~ /\d+\.\d+\.\d+\.\d+:\d+/ + }, Seq => 6 }, + { Content => $nilpotent_req, Ok => $error_tag_cr, Seq => 8 }, + { Content => $app_req, Ok => sub { + ! exists($xml_tag{ErrorId}) && + exists( $xml_tag{ServerAddress}) && + defined($xml_tag{ServerAddress}) && + (($svr) = split(/:/, $xml_tag{ServerAddress})) && + defined($svr) && + scalar(grep $_ eq $svr, @app_servers) + }, Seq => 10 } +) ; + +my $app_location ; + +foreach my $pub_app (@pub_apps) { + + my $pubapp_enc = shift @pubapp_encoded ; + my $app_req_tmp = $app_reqs[5]{Content} ; + $app_reqs[5]{Content} =~ s/PUBLISHED_APP_ENCODED/$pubapp_enc/ ; + + foreach (@app_reqs) { + + $req->content($_->{Content}) ; + + $debug && print STDERR "App: $pub_app Seq: $_->{Seq}\n", $req->as_string, "\n" ; + + my $resp = $ua->request($req) ; + + $debug && print STDERR "App: $pub_app Seq: ", $_->{Seq} + 1, "\n", $resp->as_string, "\n" ; + + $resp->is_error && do { + my $err = $resp->as_string ; + $err =~ s/\n//g ; + &outahere(qq(Failed. HTTP error finding $pub_app at seq $_->{Seq}: "$err")) ; + } ; + my $xml = $resp->content ; + + my $xml_disp ; + ($xml_disp = $xml) =~ s/\n//g ; + $xml_disp =~ s/ \s+/ /g ; + + &outahere($resp->as_string) + unless $xml ; + + my ($xml_ok, $whine) = &valid_xml($xml_p, $xml) ; + + $xml_ok || &outahere(qq(Failed. Bad XML finding $pub_app at eq $_->{Seq} in "$xml_disp".)) ; + + &{$_->{Ok}} || &outahere(qq(Failed. \"\&\$_->{Ok}\" false finding $pub_app at seq $_->{Seq} in "$xml_disp".)) ; + + # Ugly but alternative is $_->{Ok}->(). + # eval $_->{Ok} where $_->{Ok} is an + # expression returning a bool is possible. but + # sub { } prevent recompilation. + + } + + $app_reqs[5]{Content} = $app_req_tmp ; + + $app_location .= qq("$pub_app" => $svr, ) ; + +} + +substr($app_location, -2, 2) = '' ; +print qq(Ok. Citrix XML service located all published apps $app_location.\n) ; +exit $ERRORS{'OK'} ; + +sub outahere { + print "Citrix XML service $_[0]\n" ; + exit $ERRORS{CRITICAL} ; +} + +sub valid_xml { + my ($p, $input) = @_ ; + + %xml_tag = () ; + @tag_stack = () ; + + eval { + $p->parse($input) + } ; + + return (0, qq(XML::Parser->parse failed: Bad XML in "$input".!)) + if $@ ; + + if ( $xml_debug ) { + print STDERR pack('A4 A30 A40', ' ', $_, qq(-> "$xml_tag{$_}")), "\n" + foreach (keys %xml_tag) + } + + return (1, 'valid xml') + +} + + +sub handle_start { + push @tag_stack, $_[1] ; + + $xml_debug && print STDERR pack('A8 A30 A40', ' ', 'handle_start - tag', " -> '$_[1]'"), "\n" ; + $xml_debug && print STDERR pack('A8 A30 A60', ' ', 'handle_start - @tag_stack', " -> (@tag_stack)"), "\n" ; +} + +sub handle_char { + my $text = $_[1] ; + + !($text =~ /\S/ || $text =~ /^[ \t]$/) && return ; + + $text =~ s/\n//g ; + + my $tag = $tag_stack[-1] ; + + $xml_debug && print STDERR pack('A8 A30 A30', ' ', 'handle_char - tag', " -> '$tag'"), "\n" ; + $xml_debug && print STDERR pack('A8 A30 A40', ' ', 'handle_char - text', " -> '$text'"), "\n" ; + + $xml_tag{$tag} .= $text ; + +} + + +sub print_help() { + +# 1 2 3 4 5 6 7 8 +#12345678901234567890123456789012345678901234567890123456789012345678901234567890 + + print_revision($PROGNAME,'$Revision: 1.1 $ '); + +my $help = < -S -A + -F [-v -x -h -V] + +Check the Citrix Metaframe XP service by completing an HTTP dialogue with a Program +Neigbourhood server (pn_server) that returns an ICA server in the named Server farm +hosting the specified applications (an ICA server in a farm which runs some MS app). +EOHELP + + print $help ; + print "\n"; + print "\n"; + print_usage(); + print "\n"; + support(); +} + +sub print_usage () { + +# 1 2 3 4 5 6 7 8 +#12345678901234567890123456789012345678901234567890123456789012345678901234567890 + +my $usage = < + + + +HTTP/1.1 100 Continue +Server: Citrix Web PN Server +Date: Thu, 30 Sep 2004 00:12:40 GMT + + +resp 1 +HTTP/1.1 200 OK +Server: Citrix Web PN Server +Date: Thu, 30 Sep 2004 00:12:40 GMT +Content-type: text/xml +Content-length: 253 + + + + + + + + + + +req 2 +POST /scripts/WPnBr.dll HTTP/1.1 +Content-type: text/xml +Host: 10.1.2.2:80 +Content-Length: 191 +Connection: Keep-Alive + + + + + + +HTTP/1.1 100 Continue +Server: Citrix Web PN Server +Date: Thu, 30 Sep 2004 00:12:40 GMT + + +resp 3 +HTTP/1.1 200 OK +Server: Citrix Web PN Server +Date: Thu, 30 Sep 2004 00:12:40 GMT +Content-type: text/xml +Content-length: 293 + + + + + + + + FOOFARM01 + + + + +req 4 +POST /scripts/WPnBr.dll HTTP/1.1 +Content-type: text/xml +Host: 10.1.2.2:80 +Content-Length: 220 +Connection: Keep-Alive + + + + + + +HTTP/1.1 100 Continue +Server: Citrix Web PN Server +Date: Thu, 30 Sep 2004 00:12:55 GMT + + +resp 5 +HTTP/1.1 200 OK +Server: Citrix Web PN Server +Date: Thu, 30 Sep 2004 00:12:55 GMT +Content-type: text/xml +Content-length: 253 + + + + + + + + + + +req 6 +POST /scripts/WPnBr.dll HTTP/1.1 +Content-type: text/xml +Host: 10.1.2.2:80 +Content-Length: 442 +Connection: Keep-Alive + + + + + +i + FOOFARM01* + WS09535 + + + + + foo-user + some-domain + + + +HTTP/1.1 100 Continue +Server: Citrix Web PN Server +Date: Thu, 30 Sep 2004 00:12:56 GMT + + +resp 7 +HTTP/1.1 200 OK +Server: Citrix Web PN Server +Date: Thu, 30 Sep 2004 00:12:56 GMT +Content-type: text/xml +Content-length: 507 + + + + + + + 10.1.2.2:1494 + win32 + tcp + ica30 + 10.1.2.2 + ica_svr01.some.domain:443 + + + +req 8 +POST /scripts/WPnBr.dll HTTP/1.1 +Content-type: text/xml +Host: 10.1.2.2:80 +Content-Length: 220 +Connection: Keep-Alive + + + + + + +HTTP/1.1 100 Continue +Server: Citrix Web PN Server +Date: Thu, 30 Sep 2004 00:13:29 GMT + + +resp 9 +HTTP/1.1 200 OK +Server: Citrix Web PN Server +Date: Thu, 30 Sep 2004 00:13:29 GMT +Content-type: text/xml +Content-length: 253 + + + + + + + + + + +req 10 +POST /scripts/WPnBr.dll HTTP/1.1 +Content-type: text/xml +Host: 10.1.2.2:80 +Content-Length: 446 +Connection: Keep-Alive + + + + + +i + + EXCEL#32;2003 + + WS09535 + + + + foo-user + some-domain + +i + + +HTTP/1.1 100 Continue +Server: Citrix Web PN Server +Date: Thu, 30 Sep 2004 00:13:29 GMT + + +resp 11 +HTTP/1.1 200 OK +Server: Citrix Web PN Server +Date: Thu, 30 Sep 2004 00:13:29 GMT +Content-type: text/xml +Content-length: 509 + + + + + + + 10.1.2.14:1494 + win32 + tcp + ica30 + 10.1.2.14 + ica_svr02.some.domain:443 + + + +** One sees this XML on an error (there may well be other error XML also, but I haven't seen it) ** + + + + + + unspecified + 0x0000000E + + + + +=end comment + +=cut + + +# You never know when you may be embedded ... + + diff --git a/contrib/check_inodes-freebsd.pl b/contrib/check_inodes-freebsd.pl new file mode 100644 index 0000000..f00da1a --- /dev/null +++ b/contrib/check_inodes-freebsd.pl @@ -0,0 +1,127 @@ +#!/usr/bin/perl + +# check_inodes.pl for FreeBSD +# Designed on FreeBSD 4.6 (although this should not matter) +# parses df output, splits, and then takes variables +# df.pl -f mountpoint -w warningnumber -c critical number +# USE NUMBERS AND NOT PERCENTS FOR wanring and critical values +# -h is help +# -v is version +# Mountpoints: +# like / or /usr or /var (whatever you mount drives NOT the device names) +# Andrew Ryder - 20020804 - atr@mrcoffee.org + + +use strict; +use Getopt::Long; +use vars qw($opt_V $opt_h $opt_w $opt_c $opt_f $verbose $PROGNAME); +use lib "/usr/local/libexec/nagios" ; +use utils qw($TIMEOUT %ERRORS &print_revision &support); + +my $df = "/bin/df"; +my $grep = "/usr/bin/grep"; + +$PROGNAME="df.pl"; + +sub print_help (); +sub print_usage (); + + +$ENV{'PATH'}=''; +$ENV{'BASH_ENV'}=''; +$ENV{'ENV'}=''; + +Getopt::Long::Configure('bundling'); +GetOptions + ("V" => \$opt_V, "version" => \$opt_V, + "h" => \$opt_h, "help" => \$opt_h, + "w=s" => \$opt_w, "warning=s" => \$opt_w, + "c=s" => \$opt_c, "critical=s" => \$opt_c, + "f=s" => \$opt_f, "filesystem=s" => \$opt_f); + + +if ($opt_V) { + print_revision($PROGNAME,'$Revision: 1.1 $ '); + exit $ERRORS{'OK'}; +} + +if ($opt_h) { + print_help(); + exit $ERRORS{'OK'}; +} + +($opt_w) || ($opt_w = shift) || ($opt_w = 50); +my $warning = $1 if ($opt_w =~ /([0-9]+)/); + +($opt_c) || ($opt_c = shift) || ($opt_c = 75); +my $critical = $1 if ($opt_c =~ /([0-9]+)/); + +if ($opt_c < $opt_w) { + print "Critical offset should be larger than warning offset\n"; + print_usage(); + exit $ERRORS{"UNKNOWN"}; +} + +($opt_f) || ($opt_f = "/"); + + +unless (-e $df) { + print "UNKNOWN: $df is not where df is\n"; + exit $ERRORS{'UNKNOWN'}; + } + +unless (-e $grep) { + print "UNKNOWN: $grep is not where grep is\n"; + exit $ERRORS{'UNKNOWN'}; + } + +unless (-d $opt_f) { + print "UNKNOWN: $opt_f is not a mount point\n"; + exit $ERRORS{'UNKNOWN'}; + } + + +my $state = $ERRORS{'UNKNOWN'}; +my $answer; + +open(DF, "$df -i $opt_f| $grep -v Filesystem |"); + +while () { + + my ($fs,$onek,$used,$avail,$capacity,$iused,$ifree,$ipercent,$mounted) = split; + $ipercent =~ s/%//s; + + if ($ipercent > $opt_w) { + $state = $ERRORS{'WARNING'}; + $answer = "WARNING: $ipercent percent inodes free on $opt_f\n"; + } elsif ($ipercent > $opt_w) { + $state = $ERRORS{'CRITCAL'}; + $answer = "CRITICAL: $ipercent percent inodes free on $opt_f\n"; + } elsif ($ipercent < $opt_w) { + $state = $ERRORS{'OK'}; + $answer = "OK: $ipercent percent inodes free on $opt_f\n"; + } +} + +close(DF); + +print "$answer"; +exit $state; + +sub print_usage () { + print "Usage: $PROGNAME [-w ] [-c ]\n"; + print "Example: $PROGNAME /dev/ad0s1a -w 50 -c 75\n"; +} + +sub print_help () { + print_revision($PROGNAME,'$Revision: 1.1 $'); + print "Copyright (c) 2002 Andrew Ryder\n"; + print "\n"; + print_usage(); + print "\n"; + print " = Inode Percent at which a warning message is returned. Defaults to 50.\n"; + print " = Inode Percent at which a critical message is returned..\n Defaults to 75.\n\n"; + support(); +} + + diff --git a/contrib/check_inodes.pl b/contrib/check_inodes.pl new file mode 100755 index 0000000..5767878 --- /dev/null +++ b/contrib/check_inodes.pl @@ -0,0 +1,69 @@ +#!/usr/bin/perl +############################################################################## +# This plugin uses df to gather filesystem statistics and check the percent # +# used of inodes. I've put a switch in here since i've got both aix and # +# linux systems...adjust for your syntax's results. # +# Note: the percentages passed in MUST NOT have % after them # +# No warranty is either implied, nor expressed herein. # +# # +############################################################################## + +$filesystem = $ARGV[0]; +$warnpercent = $ARGV[1]; +$critpercent = $ARGV[2]; + +#------Find out what kind of syntax to expect +$systype=`uname`; +chomp($systype); + +#------Make sure we got called with the right number of arguments +#------you could also put a check in here to make sure critical level is +#------greater than warning...but what the heck. +die "Usage: check_inodes filesystem warnpercent critpercent" unless @ARGV; + +if ($#ARGV < 2) { + die "Usage: check_inodes filesystem warnpercent critpercent"; +}#end if + +#------This gets the data from the df command +$inputline = `df -i $filesystem|grep -v "Filesystem"`; + +#------replaces all spaces with a single :, that way we can use split +$inputline =~ y/ /:/s; + +#------different oses give back different sets of columns from the df -i +#------(at least mine do). This way I can use this plugin on all my hosts +#------if neither of these work, add your own in, or if you've got one that +#------just flat out reports something different...well...perl is your friend. +SWITCH: { + if ($systype eq "Linux") { + ($fs,$inodes,$iused,$ifree,$ipercent,$mntpt) = split(/:/,$inputline); + last SWITCH; + }#end if + if ($systype eq "AIX") { + ($fs,$blks,$free,$percentused,$iused,$ipercent,$mntpt) = split(/:/,$inputline); + last SWITCH; + }#end if +}#end switch + +#------First we check for critical, since that is, by definition and convention +#------going to exceed the warning threshold +$ipercent =~ y/%//ds; + +if ($ipercent > $critpercent) { + print "CRITICAL: $filesystem inode use exceeds critical threshold $critpercent ($ipercent)"; + exit 1; +}# end if + +#------Next we check the warning threshold +if ($ipercent > $warnpercent) { + print "WARNING: $filesystem inode use exceeds warning threshold $warnpercent ($ipercent)"; + exit 2; +}# end if + + +#------thanks to the magic of procedural programming, we figure if we got here, +#------everything MUST be fine. +print "$filesystem inode use within limits ($ipercent)"; +exit 0; + diff --git a/contrib/check_ipxping.c b/contrib/check_ipxping.c new file mode 100644 index 0000000..937b921 --- /dev/null +++ b/contrib/check_ipxping.c @@ -0,0 +1,201 @@ +/****************************************************************************************** + * + * CHECK_IPXPING.C + * + * Program: IPX ping plugin for Nagios + * License: GPL + * Copyright (c) 1999 Ethan Galstad (nagios@nagios.org) + * + * Last Modified: 09-24-1999 + * + * Command line: CHECK_IPXPING + * + * Description: + * + * This plugin will use the /usr/bin/ipxping command to ping the specified host using the + * IPX protocol. Note: Linux users must have IPX support compiled into the kernerl and + * must have IPX configured correctly in order for this plugin to work. + * If the round trip time value is above the level, a STATE_WARNING is + * returned. If it exceeds the level, a STATE_CRITICAL is returned. + * + * + * + * IMPORTANT!! + * + * This plugin will only work with the ipxping command that has been ported to Linux. + * The version for Sun takes different command line arguments and differs in its output. + * + *****************************************************************************************/ + +#include "config.h" +#include "common.h" +#include "netutils.h" +#include "popen.h" + +/* this should be moved out to the configure script! */ +#define IPXPING_COMMAND "/tmp/ipxping/ipxping" + +/* these should be moved to the common header file */ +#define MAX_IPXNET_ADDRESS_LENGTH 12 +#define MAX_IPXHOST_ADDRESS_LENGTH 18 + +int socket_timeout=DEFAULT_SOCKET_TIMEOUT; +char dest_network[MAX_IPXNET_ADDRESS_LENGTH]; +char dest_address[MAX_IPXHOST_ADDRESS_LENGTH]; +int wrtt; +int crtt; + +int process_arguments(int,char **); + +FILE * spopen(const char *); +int spclose(FILE *); + +int main(int argc, char **argv){ + char command_line[MAX_INPUT_BUFFER]; + int rtt; + int bytes_returned; + int result=STATE_OK; + FILE *fp; + char input_buffer[MAX_INPUT_BUFFER]; + char *substr; + int current_line; + + if(process_arguments(argc,argv)!=OK){ + printf("Incorrect arguments supplied\n"); + printf("\n"); + printf("IPX ping plugin for Nagios\n"); + printf("Copyright (c) 1999 Ethan Galstad (nagios@nagios.org)\n"); + printf("Last Modified: 09-24-1999\n"); + printf("License: GPL\n"); + printf("\n"); + printf("Usage: %s [-to to_sec]\n",argv[0]); + printf("\n"); + printf("Options:\n"); + printf(" = IPX network that the remote host lies on. (Hex Format - 00:00:00:00)\n"); + printf(" = MAC address of the remote host. (Hex Format - 00:00:00:00:00:00)\n"); + printf(" = Round trip time in milliseconds necessary to result in a WARNING state\n"); + printf(" = Round trip time in milliseconds necessary to result in a CRITICAL state\n"); + printf(" [to_sec] = Seconds before we should timeout waiting for ping result. Default = %d sec\n",DEFAULT_SOCKET_TIMEOUT); + printf("\n"); + printf("Notes:\n"); + printf("This plugin will use the /usr/bin/ipxping command to ping the specified host using\n"); + printf("the IPX protocol. IPX support must be compiled into the kernel and your host must\n"); + printf("be correctly configured to use IPX before this plugin will work! An RPM package of\n"); + printf("the ipxping binary can be found at...\n"); + printf("http://www.rpmfind.net/linux/RPM/contrib/libc5/i386/ipxping-0.0-2.i386.shtml\n"); + printf("\n"); + return STATE_UNKNOWN; + } + + /* create the command line to use... */ + sprintf(command_line,"%s %s %s",IPXPING_COMMAND,dest_network,dest_address); + + /* initialize alarm signal handling */ + signal(SIGALRM,socket_timeout_alarm_handler); + + /* set socket timeout */ + alarm(socket_timeout); + + /* run the command */ + fp = spopen(command_line); + if(fp==NULL){ + printf("Unable to open pipe: %s",command_line); + return STATE_UNKNOWN; + } + + current_line=0; + while(fgets(input_buffer,MAX_INPUT_BUFFER-1,fp)){ + + current_line++; + + /* skip the first line of the output */ + if(current_line==1) + continue; + + /* we didn't get the "is alive" */ + if(current_line==2 && !strstr(input_buffer,"is alive")) + result=STATE_CRITICAL; + + /* get the round trip time */ + if(current_line==3){ + substr=strtok(input_buffer,":"); + substr=strtok(NULL,"\n"); + rtt=atoi(substr); + } + + /* get the number of bytes returned */ + if(current_line==4 && strstr(input_buffer,"bytes returned")){ + bytes_returned=atoi(input_buffer); + } + } + + /* close the pipe */ + spclose(fp); + + /* reset the alarm */ + alarm(0); + + if(current_line==1 || result==STATE_CRITICAL) + printf("IPX Ping problem - No response from host\n"); + else{ + + if(rtt>crtt) + result=STATE_CRITICAL; + else if(rtt>wrtt) + result=STATE_WARNING; + + printf("IPX Ping %s - RTT = %d ms, %d bytes returned from %s %s\n",(result==STATE_OK)?"ok":"problem",rtt,bytes_returned,dest_network,dest_address); + } + + + return result; + } + + + +/* process all arguments passed on the command line */ +int process_arguments(int argc, char **argv){ + int x; + + /* no options were supplied */ + if(argc<5) + return ERROR; + + /* get the destination network address */ + strncpy(dest_network,argv[1],sizeof(dest_network)-1); + dest_network[sizeof(dest_network)-1]='\x0'; + + /* get the destination host address */ + strncpy(dest_address,argv[2],sizeof(dest_address)-1); + dest_address[sizeof(dest_address)-1]='\x0'; + + /* get the round trip time variables */ + wrtt=atoi(argv[3]); + crtt=atoi(argv[4]); + + /* process remaining arguments */ + for(x=6;x<=argc;x++){ + + /* we got the timeout to use */ + if(!strcmp(argv[x-1],"-to")){ + if(x \&version, + "h|help" => \&help, + "v|verbose" => \$verbose, + "w|warning=s" => \$opt_w, + "c|critical=s" => \$opt_c, + "n|name=s" => \$classname + ); + + +my $state = 'OK'; +my $min_warn = undef +my $max_warn = undef; +my $min_crit = undef; +my $max_crit = undef; + + +($opt_w) || ($opt_w = shift); +check_ranges($opt_w,\$min_warn, \$max_warn, "warning"); +($opt_c) || ($opt_c = shift); +check_ranges($opt_c,\$min_crit, \$max_crit, "critical"); + + +# +# Determine # of running processes for the java programs that interest us. +# +my @javalist = getJavaList(); + +my $total = 0; +my $msgout = ""; +my @fields; + +if ( defined $classname ) { + + #filter out a single java process based on class name + foreach (@javalist) { + @fields = split(/\s+/, $_); + $total = $fields[-1] and last if $classname eq $fields[0]; + } + $msgout .= "$total processes for $classname\n"; +} else { + #Handle all java processes + $msgout .= "\n"; + foreach (@javalist) { + @fields = split(/\s+/, $_); + + $total += $fields[-1]; + $msgout .= " $fields[-1] processes for "; + $msgout .= (scalar @fields > 1)? $fields[0] : "unknown" ; + $msgout .= "\n"; + } + my $msgtotal = "$total java processes for ". scalar @javalist . " applications"; + + if ( defined $verbose ) { + $msgout = $msgtotal . $msgout; + } else { + $msgout = $msgtotal; + } + +} + +# +# Set the state with the data we now have accumulated +# Note that due to the order of testing, warnings have precedence over +# criticals. This is logical, since you should be able to create a criticals +# range which encompasses a warning range. eg. following should be possible: +# +# check_javaproc -w 5:10 -c 3:12 +# proper specification of the ranges is the responsibility of the script user. +# +$state = 'CRITICAL' if (defined $min_crit && $total < $min_crit); +$state = 'CRITICAL' if (defined $max_crit && $total > $max_crit); +$state = 'CRITICAL' if (!defined $min_crit && !defined $max_crit && $total==0 ); +$state = 'WARNING' if (defined $min_warn && $total < $min_warn); +$state = 'WARNING' if (defined $max_warn && $total > $max_warn); + +print $msgout; +print "$state\n" if ($verbose); +exit $ERRORS{$state}; + +################################### +# Support routines for Nagios +################################### +sub check_ranges($$$$) { + my ($opt, $min, $max, $rangename) = @_; + + if ( defined $opt ) { + if ( $opt =~ /^([0-9]*)\:([0-9]*)$/) { + $$min = $1 if $1 > 0; + $$max= $2 if $2 > 0; + } else { + usage("Invalid $rangename range: $opt\n"); + } + } + + if ( defined $$min && defined $$max ) { + usage("Min value of $rangename range larger than max value: $opt\n") if ( $$min > $$max); + } +} + +sub print_usage () { + print "Usage: $PROGNAME [-v] [-w ] [-c ] [ -n ]\n"; +} + +sub print_help () { + revision(); + print "Copyright (c) 2002 by Wim Rijnders + +Perl Check java processes plugin for Nagios + +"; + print_usage(); + print " +-v, --verbose + Return additional information. + Intended as a command-line aid, not recommended for Nagios script usage. + +-w, --warning=INTEGER:INTEGER + Minimum and maximum number of processes outside of which a warning will be + generated. If omitted, no warning is generated. + +-c, --critical=INTEGER:INTEGER + Minimum and maximum number of processes outside of which a critical will be + generated. If omitted, a critical is generated if no processes are running. + +-n, --name=STRING + Name of class specified on the java command line (from which main() is run). + If omitted, all java processes are taken into account. + +"; + support(); +} + +sub revision() { + print_revision($PROGNAME,'$Revision: 1.1 $ '); +} + +sub version () { + revision(); + exit $ERRORS{'OK'}; +} + +sub help () { + print_help(); + exit $ERRORS{'OK'}; +} + +################################### +# Routines for delivering the data +################################### + +# +# Generate a formatted list of running java processes. +# +# Returns an array of strings having the following syntax: +# +# <#processes for this class> +# +sub getJavaList() { + + my @output; + + # Untaint + local $ENV{'PATH'} = '/bin:/usr/bin'; + local $ENV{'BASH_ENV'} = '~/.bashrc'; + + # We are only interested in the full command line + # The -H opstion is important for the order of the processes; + # this option ensures that all child processes are listed under + # their parents + @output=`ps -AHo \"\%a\" -ww`; + + #remove preceding whitespace and final EOL + foreach (@output) { + s/^\s*//; + chop; + } + + #Combine any consecutive processes with exactly the same command line + #into a single item + @output = checkSameLine(@output); + + #Filter out all java processes + my @javalist; + for (my $i = 0; $i < scalar @output; ++$i) { + push @javalist, $output[$i] if $output[$i] =~ /^\S*java/; + } + + foreach (@javalist) { + #The java statement at the beginning is redundant; remove it + s/^\S*java//; + + #remove all defines + s/\-D\S+//g; + + #remove classpath + s/\-(classpath|cp)\s+\S+//g; + + #remove any other parameters we don't want to see + s/\-server\s+//g; + s/\-X\S*\s+//g; + + #remove any redundant whitespaces at the beginning + s/^\s+//; + + } + + @javalist; +} + + +# +# Combine all consecutive lines with an identical command line +# to a signle line with a count at the end +# +sub checkSameLine { + my @input = @_; + my @output; + my $prevline= ""; + my $prevcount = 0; + + foreach my $a (@input) { + if ( $prevline eq $a) { + ++$prevcount; + } else { + push @output, $prevline . " " . ($prevcount + 1); + $prevcount = 0; + } + $prevline = $a; + } + + #don't forget the last item! + if ( $prevcount > 0 ) { + push @output, $prevline . " " . ($prevcount + 1); + } + + @output; +} + +#======= end check_javaproc ===== diff --git a/contrib/check_joy.sh b/contrib/check_joy.sh new file mode 100755 index 0000000..5c9a5d2 --- /dev/null +++ b/contrib/check_joy.sh @@ -0,0 +1,69 @@ +#! /bin/sh + +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin + +PROGNAME=`basename $0` +PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` +REVISION=`echo '$Revision: 1.1.1.1 $' | sed -e 's/[^0-9.]//g'` +STATUS="" + +. $PROGPATH/utils.sh + + +print_usage() { + echo "Usage: $PROGNAME /dev/js<#>