nagios-plugins-contrib-9.20140106/0000755000000000000000000000000012262515026013404 5ustar nagios-plugins-contrib-9.20140106/check_httpd_status/0000755000000000000000000000000012262515026017267 5ustar nagios-plugins-contrib-9.20140106/check_httpd_status/check_httpd_status0000644000000000000000000002510612262515026023101 0ustar #!/usr/bin/perl -w ####################### check_apachestatus_auto.pl ####################### # Version : 1.3 # Date : 06 Aug 2010 # # V1.3 Rewrite using Nagios::Plugin, rename check_httpd_status.pl (Stéphane Urbanovski) # V1.2 Updated perf data to be PNP compliant, added proxy option (Gerhard Lausser) # V1.1 Works with lighttpd server-status as well, added accesses perfdata # V1.0 Inital Release # # # Authors : Dennis D. Spreen (dennis at spreendigital.de) # Based on check_apachestatus.pl v1.4 by # De Bodt Lieven (Lieven dot DeBodt at gmail.com) # Updated by # Karsten Behrens (karsten at behrens dot in) # Geoff McQueen (geoff dot mcqueen at hiivesystems dot com ) # Dave Steinberg (dave at redterror dot net) # Updated by # Gerhard Lausser (gerhard dot lausser at consol dot de) # Licence : GPL - http://www.fsf.org/licenses/gpl.txt ############################################################# # # use strict; use warnings; #use Data::Dumper; use File::Basename; # get basename() use POSIX qw(setlocale); use Locale::gettext; use Nagios::Plugin ; use LWP::UserAgent; use HTTP::Status; # get status_message() use Time::HiRes qw(gettimeofday tv_interval); use Digest::MD5 qw(md5 md5_hex); # Globals my $VERSION = '1.3'; my $TIMEOUT = 10; my $PROGNAME = basename($0); # my $PROGNAME = 'check_httpd_status.pl'; # Retention files path (save previous values) : # FIXME: Make this configurable my $TempPath = '/tmp/'; # Check freshness og previous values my $MaxUptimeDif = 60*30; # Maximum uptime difference (seconds), default 30 minutes # i18n : setlocale(LC_MESSAGES, ''); textdomain('nagios-plugins-perl'); # Translate Apache / lighthttpd scoreboard status my %TranslationTable = ( 'APACHE' => { '.' => 'OpenSLot', '_' => 'Waiting', 'I' => 'Idle', 'S' => 'Starting', 'R' => 'Reading', 'W' => 'Sending', 'K' => 'Keepalive', 'D' => 'DNS', 'C' => 'Closing', 'L' => 'Logging', 'G' => 'Finishing', }, 'LIGHTTPD' => { '.' => 'Connect', 'C' => 'Close', 'E' => 'HardError', 'r' => 'Read', 'R' => 'ReadPost', 'W' => 'Write', 'h' => 'HandleRequest', 'q' => 'RequestStart', 'Q' => 'ReqestEnd', 's' => 'ResponseStart', 'S' => 'ResponseEnd', }, ); my $np = Nagios::Plugin->new( version => $VERSION, blurb => _gt('Apache / Lighthttpd server status monitor for Nagios'), usage => "Usage: %s [ -H [-p ] [-t ] [-w -c ] [-V] [-u ] [-U user -P pass -r realm]", extra => &showExtra(), timeout => $TIMEOUT+1 ); $np->add_arg ( spec => 'hostname|H=s', help => _gt('Name or IP address of host to check'), required => 1, ); $np->add_arg ( spec => 'port|p=i', help => _gt('Http port'), ); $np->add_arg ( spec => 'url|u=s', help => _gt('Specific URL to use, instead of the default http:///server-status?auto'), default => '/server-status?auto', ); $np->add_arg ( spec => 'user|U=s', help => _gt('Username for basic auth'), ); $np->add_arg ( spec => 'pass|P=s', help => _gt('Password for basic auth'), ); $np->add_arg ( spec => 'realm|r=s', help => _gt('Realm for basic auth'), ); $np->add_arg ( spec => 'proxy|X=s', help => _gt('Proxy-URL for http and https (mandatory)'), ); $np->add_arg ( spec => 'warn|w=s', help => _gt('Number of available slots that will cause a warning (Range format).'), ); $np->add_arg ( spec => 'crit|c=s', help => _gt('Number of available slots that will cause an error (Range format).'), ); $np->getopts; my $o_host = $np->opts->get('hostname'); my $o_port = $np->opts->get('port'); my $o_url = $np->opts->get('url'); my $o_user = $np->opts->get('user'); my $o_pass = $np->opts->get('pass'); my $o_realm = $np->opts->get('realm'); my $o_proxy = $np->opts->get('proxy'); my $o_warn_level = $np->opts->get('warn'); my $o_crit_level = $np->opts->get('crit'); # if (((defined($o_warn_level) && !defined($o_crit_level)) || # (!defined($o_warn_level) && defined($o_crit_level))) || # ((defined($o_warn_level) && defined($o_crit_level)) && (($o_warn_level != -1) && ($o_warn_level <= $o_crit_level))) # ) { # $np->nagios_exit(UNKNOWN, _gt("Check warn and crit!") ); # } my $o_proto = 'http'; my $url = undef; my $httpserver = 'APACHE'; #assume it is apache by default if (($o_url =~ m/^http(s?)\:\/\//i) ){ $url = $o_url; if ($1 eq 's') { $o_proto = 'https'; } } else { $url = $o_proto.'://' . $o_host; if ( defined($o_port)) { $url .= ':' . $o_port; } if ( $o_url !~ /^\// ) { $url .= '/'; } $url .= $o_url; } if ( $url !~ /\?auto$/ ) { $url .= '/server-status?auto'; } my $ua = LWP::UserAgent->new( protocols_allowed => ['http', 'https'], timeout => $TIMEOUT); $ua->agent($PROGNAME.'-'.$VERSION); logD("Web URL : $url"); my $req = HTTP::Request->new( GET => $url ); if ( defined($o_user) ) { $req->authorization_basic($o_user, $o_pass); } if ( defined($o_proxy) ) { if ($o_proto eq 'https') { if ($o_proxy =~ /^http:\/\/(.*?)\/?$/) { $o_proxy = $1; } $ENV{HTTPS_PROXY} = $o_proxy; } else { $ua->proxy(['http'], $o_proxy); } } my $timing0 = [gettimeofday]; my $response = $ua->request($req); my $timeelapsed = tv_interval($timing0, [gettimeofday]); if ( $response->is_error() ) { my $err = $response->code." ".status_message($response->code)." (".$response->message.")"; my $status = CRITICAL; $np->add_message(CRITICAL, ); if (defined($o_warn_level) || defined($o_crit_level)) { $status = UNKNOWN; } $np->nagios_exit($status, _gt("HTTP error: ").$err ); } elsif ( ! $response->is_success() ) { my $err = $response->code." ".status_message($response->code)." (".$response->message.")"; $np->add_message(CRITICAL, _gt("Internal error: ").$err ); } my $webcontent = $response->content; logD("Web content :\n----------------------------\n".$webcontent."\n----------------------------"); my $Uptime = 0; if ( $webcontent =~ m/Uptime: (.*?)\n/) { $Uptime = $1; } my $TotalAccesses = 0; if ( $webcontent =~ m/Total Accesses: (.*?)\n/) { $TotalAccesses = $1; } else { $np->add_message(WARNING, _gt('"Total Accesses" not set ! (need extented status ?)') ); } my $TotalKbytes = 0; if ( $webcontent =~ m/Total kBytes: (.*?)\n/) { $TotalKbytes = $1; } my $ScoreBoard = ''; if ( $webcontent =~ m/Scoreboard: (.*?)\n/) { $ScoreBoard = $1; } else { $np->add_message(WARNING, _gt("Scoreboard not found in reponse !") ); } my $BusyWorkers = 0; if ( $webcontent =~ m/(BusyWorkers|BusyServers): (.*?)\n/) { $BusyWorkers = $2; if ($1 eq 'BusyServers') { $httpserver = 'LIGHTTPD'; } } my $IdleWorkers = 0; if ( $webcontent =~ m/(IdleWorkers|IdleServers): (.*?)\n/) { $IdleWorkers = $2; } my $TempFile = $TempPath.$o_host.'_check_httpd_status'.md5_hex($url); my $LastUptime = 0; my $LastTotalAccesses = 0; my $LastTotalKbytes = 0; if ((-e $TempFile) && (-r $TempFile) && (-w $TempFile)) { if ( !open (RETENTION_FILE, '<',$TempFile) ) { $np->nagios_exit(CRITICAL, sprintf(_gt('Error while trying to read %s !'),$TempFile) ); } $LastUptime = ; $LastTotalAccesses = ; $LastTotalKbytes = ; close (RETENTION_FILE); chomp($LastUptime); chomp($LastTotalAccesses); chomp($LastTotalKbytes); logD("LastUptime=$LastUptime LastTotalAccesses=$LastTotalAccesses LastTotalKbytes=$LastTotalKbytes (from $TempFile)"); } else { logD("Retention file '$TempFile' not found"); } if ( !open (RETENTION_FILE, '>',$TempFile) ) { $np->nagios_exit(CRITICAL, sprintf(_gt('Error while trying to write to %s !'),$TempFile) ); } print RETENTION_FILE "$Uptime\n"; print RETENTION_FILE "$TotalAccesses\n"; print RETENTION_FILE "$TotalKbytes\n"; close (RETENTION_FILE); my $ReqPerSec = 0; my $BytesPerReq = 0; my $BytesPerSec = 0; my $DiffTime = $Uptime-$LastUptime; if ( ($DiffTime > 0) && ($DiffTime < $MaxUptimeDif) && ($TotalAccesses >= $LastTotalAccesses) && ($TotalKbytes >= $LastTotalKbytes) ) { $ReqPerSec = ($TotalAccesses-$LastTotalAccesses)/$DiffTime; $np->add_perfdata( 'label' => 'ReqPerSec', 'value' => sprintf('%.3f',$ReqPerSec), 'uom' => 'req/s', ); $BytesPerSec = (($TotalKbytes-$LastTotalKbytes)*1024)/$DiffTime; $np->add_perfdata( 'label' => 'BytesPerSec', 'value' => sprintf('%.2f',$BytesPerSec), 'uom' => 'B/s', ); my $Accesses = ($TotalAccesses-$LastTotalAccesses); if ( $Accesses > 0 ) { $BytesPerReq = (($TotalKbytes-$LastTotalKbytes)*1024)/$Accesses; $np->add_perfdata( 'label' => 'BytesPerReq', 'value' => sprintf('%.2f',$BytesPerReq), 'uom' => 'B/req', ); } } my $CountOpenSlots = ($ScoreBoard =~ tr/\.//); my $TotalSlots = $CountOpenSlots+$IdleWorkers+$BusyWorkers; my $InfoData = ''; my %WorkerStates = (); map( $WorkerStates{$_}++ , split(//,$ScoreBoard) ); foreach my $slotState ( keys( %{$TranslationTable{$httpserver}} ) ) { my $val = 0 ; if ( defined($WorkerStates{$slotState}) ) { $val = $WorkerStates{$slotState}; } $np->add_perfdata( 'label' => $TranslationTable{$httpserver}{$slotState}, 'value' => $val, ); } if ($httpserver eq 'APACHE') { $InfoData = sprintf ("%.3f s - %d/%d Busy/Idle, %d/%d Open/Total, %.1f requests/s, %.1f B/s, %d B/request", $timeelapsed, $BusyWorkers, $IdleWorkers, $CountOpenSlots, $TotalSlots, $ReqPerSec, $BytesPerSec, $BytesPerReq); } else { $InfoData = sprintf ("%.3f sec. response time, Busy/Idle %d/%d, slots %d, ReqPerSec %.1f, BytesPerReq %d, BytesPerSec %d", $timeelapsed, $BusyWorkers, $IdleWorkers, $TotalSlots, $ReqPerSec, $BytesPerReq, $BytesPerSec); } $np->add_message(OK, $InfoData); my $fw = $CountOpenSlots + $IdleWorkers; logD("FreeWorker = ".$fw); my $tmp_status = $np->check_threshold( check => $fw, warning => $o_warn_level, critical => $o_crit_level, ); $np->add_perfdata( 'label' => 'FreeWorker', 'value' => $fw, 'min' => 0, 'threshold' => $np->threshold() ); if ( $tmp_status ) { $np->add_message($tmp_status, sprintf(_gt(" Not enough free worker (%d) !"),$fw) ); } my ($status, $message) = $np->check_messages('join' => ' '); $np->nagios_exit($status, $message ); sub logD { print STDERR 'DEBUG: '.$_[0]."\n" if ($np->opts->verbose); } sub logW { print STDERR 'WARNING: '.$_[0]."\n" if ($np->opts->verbose); } # Gettext wrapper sub _gt { return gettext($_[0]); } sub showExtra { return < Recommends: liblocale-gettext-perl, libnagios-plugin-perl, liblwp-useragent-determined-perl Version: rev140 Uploaders: Jan Wagner Description: plugin checking Apache or Lighthttpd server-status page (using mod_status) nagios-plugins-contrib-9.20140106/check_httpd_status/copyright0000644000000000000000000000100012262515026021211 0ustar Dennis D. Spreen (dennis at spreendigital.de) De Bodt Lieven (Lieven dot DeBodt at gmail.com) Karsten Behrens (karsten at behrens dot in) Geoff McQueen (geoff dot mcqueen at hiivesystems dot com ) Dave Steinberg (dave at redterror dot net) Gerhard Lausser (gerhard dot lausser at consol dot de) Stéphane Urbanovski License: GPL v2 On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". nagios-plugins-contrib-9.20140106/check_httpd_status/Makefile0000644000000000000000000000005112262515026020723 0ustar #/usr/bin/make -f include ../common.mk nagios-plugins-contrib-9.20140106/check_bgpstate/0000755000000000000000000000000012262515026016352 5ustar nagios-plugins-contrib-9.20140106/check_bgpstate/check_bgpstate0000644000000000000000000001237112262515026021247 0ustar #!/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}; nagios-plugins-contrib-9.20140106/check_bgpstate/bgpstate.cfg0000644000000000000000000000031412262515026020642 0ustar # 'check_snmp_bgpstate' command definition define command{ command_name check_snmp_bgpstate command_line /usr/lib/nagios/plugins/check_bgpstate '$HOSTADDRESS$' -c '$ARG1$' } nagios-plugins-contrib-9.20140106/check_bgpstate/control0000644000000000000000000000043212262515026017754 0ustar Homepage: https://raw.github.com/nagios-plugins/nagios-plugins/ba7615631add0b610ada6a819d6c8f8c46a2d36d/contrib/check_bgpstate.pl Recommends: libnet-snmp-perl, whois Version: 1.0 Uploaders: Jan Wagner Description: plugin to check all BGP session on Cisco routers nagios-plugins-contrib-9.20140106/check_bgpstate/copyright0000644000000000000000000000027612262515026020312 0ustar C) 2000 Christoph Kron License: GPL-2 On Debian systems, the complete text of the GNU General Public License version 1 can be found in "/usr/share/common-licenses/GPL-2". nagios-plugins-contrib-9.20140106/check_bgpstate/Makefile0000644000000000000000000000005112262515026020006 0ustar #/usr/bin/make -f include ../common.mk nagios-plugins-contrib-9.20140106/check_snmp_environment/0000755000000000000000000000000012262515026020142 5ustar nagios-plugins-contrib-9.20140106/check_snmp_environment/control0000644000000000000000000000143612262515026021551 0ustar Homepage: http://exchange.nagios.org/directory/Plugins/Hardware/Network-Gear/Cisco/Check-various-hardware-environmental-sensors/details Watch: http://exchange.nagios.org/directory/Plugins/Hardware/Network-Gear/Cisco/Check-various-hardware-environmental-sensors/details Current Version
([0-9.]+)
Recommends: libnet-snmp-perl Description: plugin to check various hardware statuses Using snmp the plugin is able to retrieve Fan, power-supply, voltage, temperature, card and module status and various other information from Cisco, Nokia, Blue Coat, IronPort, Foundry Network, Linux (using lm-sensors), Extreme Networks, Juniper Networks, HP ProCurve, Netscreen, Citrix NetScaler and Transmode Systems hardware. Uploaders: Bernd Zeimetz Version: 0.7 nagios-plugins-contrib-9.20140106/check_snmp_environment/check_snmp_environment.pl0000644000000000000000000027661412262515026025255 0ustar #!/usr/bin/perl # ============================================================================ # ============================== INFO ======================================== # ============================================================================ # Version : 0.7 # Date : February 21 2011 # Author : Michiel Timmers ( michiel.timmers AT gmx.net) # Based on : "check_snmp_env" plugin (version 1.3) from Patrick Proy # Licence : GPL - summary below # # ============================================================================ # ============================== SUMMARY ===================================== # ============================================================================ # This plugin is an enhancement on the "check_snmp_env" plugin (version 1.3) # from Patrick Proy. The basic function of this script is to check various # hardware based information, like power supply's, fans, cards, modules etc. # Although some of the checks in this plugin are also in the "check_snmp_env" # I strongly suggest using this version as some of the checks in # "check_snmp_env" aren't efficient or don't give alarms. # # The default SNMP version has been changed from SNMPv1 to SNMPv2c because # of the use of SNMP Bulk option which is more efficient. SNMPv3 also # uses SNMP Bulk. # # This scrip supports IPv6. You can use the "-6" switch for this. # # ============================================================================ # ============================== SUPPORTED CHECKS ============================ # ============================================================================ # The following check are supported: # # NOTE(!!): There are several Cisco checks, on many Cisco devices multiple # Cisco checks will functions. # # cisco __________: Cisco Systems : Fan, power-supply, voltage, temperature # ciscoSW ________: Cisco Systems : Card and module status check # ciscoNEW _______: Cisco Systems : Sensor check for devices that have # the CISCO-ENTITY-SENSOR-MIB # nokia __________: Nokia IP : Fan, power-supply # bc _____________: Blue Coat Systems : Fan, power-supply, voltage, disk # iron ___________: IronPort : Fan, power-supply, temperature # foundry ________: Foundry Network : power supply, temperature # linux __________: lm-sensors : Fan, voltage, temperature, misc # extremeSW ______: Extreme Networks : Slot, power-supply, fan, temperature # juniper ________: Juniper Networks : Component status check # procurve _______: HP ProCurve : Fan, power-supply, temperature # netscreen ______: NetScreen : Slot, fan, power-supply # citrix _________: Citrix NetScaler : Fan, , voltage, temperture, # HA state, SSL engine # transmode ______: Transmode Systems : Check alarm table that is # not deactivated and not acknowledged # # Check the http://exchange.nagios.org website for new versions. # For comments, questions, problems and patches send me an # e-mail (michiel.timmmers AT gmx.net). # # ============================================================================ # ============================== TODO ======================================== # ============================================================================ # - cisco / ciscoSW and ciscoNEW needs to be checked regarding OID's # - Make use of "set_status" subroutine for all checks # - "linux" check does nothing (need all possible values of lm-sensors # to implement). Perhaps IPMI support, currently lacks general MIB # - "cisco","nokia","ironport","foundry","linux" needs clean up, need # snmpwalks for this # - Make more use of verbose output # - utils.pm will become deprecated. Replacement with Nagios::Plugin? # What are the effects of switching to Nagios::Plugin? # # ============================================================================ # ============================== VERSIONS ==================================== # ============================================================================ # version 0.2 : - juniper: Ignores a "Unknown" PCMCIA card # - Juniper: Standby(7) wasn't defined correctly # - juniper: Instance id's longer than 7 characters were failing # version 0.3 : - ciscoSW: Corrected the modules OID for Cisco # - ciscoSW: Standby cards don't generate critical status anymore # version 0.4 : - extreme: Added support for devices from Extreme Networks # version 0.5 : - juniper: J series routers now supported # version 0.6 : - general: Added support for IPv6 communication # version 0.7 : - ciscoNEW: Support for Cisco with CISCO-ENTITY-SENSOR-MIB # - procurve: Support for HP ProCurve # - netscreen: Support for Netscreen # - citrix: Support for Citrix Netscaler # - transmode: Support for Transmode # - extreme: Added checks for power-supply, fans and temperature # - juniper: # - bc: Blue Coat check wasn't working properly # - general: Default SNMP version is now SNMPv2c # - general: Switch default SNMPv3 from md5/des to sha/aes # - general: Lots of small fixes # # ============================================================================ # ============================== LICENCE ===================================== # ============================================================================ # 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 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see # # ============================================================================ # ============================== HELP ======================================== # ============================================================================ # Help : ./check_snmp_environment.pl --help # # ============================================================================ use warnings; use strict; use Net::SNMP; use Getopt::Long; #use lib "/usr/local/nagios/libexec"; #use utils qw(%ERRORS $TIMEOUT); # ============================================================================ # ============================== NAGIOS VARIABLES ============================ # ============================================================================ my $TIMEOUT = 15; # This is the global script timeout, not the SNMP timeout my %ERRORS = ('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4); my @Nagios_state = ("UNKNOWN","OK","WARNING","CRITICAL"); # Nagios states coding # ============================================================================ # ============================== OID VARIABLES =============================== # ============================================================================ # System description my $sysdescr = "1.3.6.1.2.1.1.1.0"; # Global system description # CISCO-ENVMON-MIB my $ciscoEnvMonMIB = "1.3.6.1.4.1.9.9.13"; # Cisco env base table my %CiscoEnvMonState = (1,"normal",2,"warning",3,"critical",4,"shutdown",5,"notPresent",6,"notFunctioning"); # Cisco states my %CiscoEnvMonNagios = (1,1 ,2,2 ,3,3 ,4,3 ,5,0, 6,3); # Nagios states returned for CIsco states (coded see @Nagios_state). my $ciscoVoltageTable = $ciscoEnvMonMIB.".1.2.1"; # Cisco voltage table my $ciscoVoltageTableIndex = $ciscoVoltageTable.".1"; #Index table my $ciscoVoltageTableDesc = $ciscoVoltageTable.".2"; #Description my $ciscoVoltageTableValue = $ciscoVoltageTable.".3"; #Value my $ciscoVoltageTableState = $ciscoVoltageTable.".7"; #Status my $ciscoTempTable = $ciscoEnvMonMIB.".1.3.1"; # Cisco temprature table my $ciscoTempTableIndex = $ciscoTempTable.".1"; #Index table my $ciscoTempTableDesc = $ciscoTempTable.".2"; #Description my $ciscoTempTableValue = $ciscoTempTable.".3"; #Value my $ciscoTempTableState = $ciscoTempTable.".6"; #Status my $ciscoFanTable = $ciscoEnvMonMIB.".1.4.1"; # Cisco fan table my $ciscoFanTableIndex = $ciscoFanTable.".1"; #Index table my $ciscoFanTableDesc = $ciscoFanTable.".2"; #Description my $ciscoFanTableState = $ciscoFanTable.".3"; #Status my $ciscoPSTable = $ciscoEnvMonMIB.".1.5.1"; # Cisco power supply table my $ciscoPSTableIndex = $ciscoPSTable.".1"; #Index table my $ciscoPSTableDesc = $ciscoPSTable.".2"; #Description my $ciscoPSTableState = $ciscoPSTable.".3"; #Status # Nokia env mib my $nokia_temp_tbl = "1.3.6.1.4.1.94.1.21.1.1.5"; my $nokia_temp = "1.3.6.1.4.1.94.1.21.1.1.5.0"; my $nokia_fan_table = "1.3.6.1.4.1.94.1.21.1.2"; my $nokia_fan_status = "1.3.6.1.4.1.94.1.21.1.2.1.1.2"; my $nokia_ps_table = "1.3.6.1.4.1.94.1.21.1.3"; my $nokia_ps_temp = "1.3.6.1.4.1.94.1.21.1.3.1.1.2"; my $nokia_ps_status = "1.3.6.1.4.1.94.1.21.1.3.1.1.3"; # Bluecoat env mib my @bc_SensorCode = ("","ok","unknown","not-installed","voltage-low-warning","voltage-low-critical", "no-power","voltage-high-warning","voltage-high-critical","voltage-high-severe", "temperature-high-warning","temperature-high-critical","temperature-high-severe", "fan-slow-warning","fan-slow-critical","fan-stopped"); # BC element status returned by MIB my @bc_status_code = (3,0,3,3,1,2,2,1,2,2,1,2,2,1,2,2); # nagios status equivallent to BC status my @bc_SensorStatus = ("","ok","unavailable","nonoperational"); # ok(1),unavailable(2),nonoperational(3) my @bc_status_sensor = (3,0,1,2); # nagios status equivallent to BC status my @bc_mesure = ("","","","Enum","volts","celsius","rpm"); my $bc_sensor_table = "1.3.6.1.4.1.3417.2.1.1.1.1.1"; # sensor table my $bc_sensor_Units = "1.3.6.1.4.1.3417.2.1.1.1.1.1.3"; # cf bc_mesure my $bc_sensor_Scale = "1.3.6.1.4.1.3417.2.1.1.1.1.1.4"; # * 10^value my $bc_sensor_Value = "1.3.6.1.4.1.3417.2.1.1.1.1.1.5"; # value my $bc_sensor_Code = "1.3.6.1.4.1.3417.2.1.1.1.1.1.6"; # bc_SensorCode my $bc_sensor_Status = "1.3.6.1.4.1.3417.2.1.1.1.1.1.7"; # bc_SensorStatus my $bc_sensor_Name = "1.3.6.1.4.1.3417.2.1.1.1.1.1.9"; # name my $bc_dsk_table = "1.3.6.1.4.1.3417.2.2.1.1.1.1"; # disk table my $bc_dsk_status = "1.3.6.1.4.1.3417.2.2.1.1.1.1.3"; # bc_DiskStatus - present(1), initializing(2), inserted(3), offline(4), removed(5), not-present(6), empty(7), bad(8), unknown(9 my $bc_dsk_vendor = "1.3.6.1.4.1.3417.2.2.1.1.1.1.5"; # bc_DiskStatus my $bc_dsk_product = "1.3.6.1.4.1.3417.2.2.1.1.1.1.6"; # bc_DiskStatus my $bc_dsk_serial = "1.3.6.1.4.1.3417.2.2.1.1.1.1.8"; # bc_DiskStatus my @bc_DiskStatus = ("","present","initializing","inserted","offline","removed","not-present","empty","bad","unknown"); my @bc_dsk_status_nagios = (3,0,1,1,1,1,0,0,2,3); # Iron Port env mib my $iron_ps_table = "1.3.6.1.4.1.15497.1.1.1.8"; # power-supply table my $iron_ps_status = "1.3.6.1.4.1.15497.1.1.1.8.1.2"; #powerSupplyNotInstalled(1), powerSupplyHealthy(2), powerSupplyNoAC(3), powerSupplyFaulty(4) my @iron_ps_status_name = ("","powerSupplyNotInstalled","powerSupplyHealthy","powerSupplyNoAC","powerSupplyFaulty"); my @iron_ps_status_nagios = (3,3,0,2,2); my $iron_ps_ha = "1.3.6.1.4.1.15497.1.1.1.8.1.3"; # ps redundancy status- powerSupplyRedundancyOK(1), powerSupplyRedundancyLost(2) my @iron_ps_ha_name = ("","powerSupplyRedundancyOK","powerSupplyRedundancyLost"); my @iron_ps_ha_nagios = (3,0,1); my $iron_ps_name = "1.3.6.1.4.1.15497.1.1.1.8.1.4"; # ps name my $iron_tmp_table = "1.3.6.1.4.1.15497.1.1.1.9"; # temp table my $iron_tmp_celcius = "1.3.6.1.4.1.15497.1.1.1.9.1.2"; # temp in celcius my $iron_tmp_name = "1.3.6.1.4.1.15497.1.1.1.9.1.3"; # name my $iron_fan_table = "1.3.6.1.4.1.15497.1.1.1.10"; # fan table my $iron_fan_rpm = "1.3.6.1.4.1.15497.1.1.1.10.1.2"; # fan speed in RPM my $iron_fan_name = "1.3.6.1.4.1.15497.1.1.1.10.1.3"; # fan name # Foundry BigIron Router Switch (FOUNDRY-SN-AGENT-MIB) my $foundry_temp = "1.3.6.1.4.1.1991.1.1.1.1.18.0"; # Chassis temperature in Deg C *2 my $foundry_temp_warn = "1.3.6.1.4.1.1991.1.1.1.1.19.0"; # Chassis warn temperature in Deg C *2 my $foundry_temp_crit = "1.3.6.1.4.1.1991.1.1.1.1.20.0"; # Chassis warn temperature in Deg C *2 my $foundry_ps_table = "1.3.6.1.4.1.1991.1.1.1.2.1"; # PS table my $foundry_ps_desc = "1.3.6.1.4.1.1991.1.1.1.2.1.1.2"; # PS desc my $foundry_ps_status = "1.3.6.1.4.1.1991.1.1.1.2.1.1.3"; # PS status my $foundry_fan_table = "1.3.6.1.4.1.1991.1.1.1.3.1"; # FAN table my $foundry_fan_desc = "1.3.6.1.4.1.1991.1.1.1.3.1.1.2"; # FAN desc my $foundry_fan_status = "1.3.6.1.4.1.1991.1.1.1.3.1.1.3"; # FAN status my @foundry_status = (3,0,2); # oper status : 1:other, 2: Normal, 3: Failure # lm-sensors my $linux_env_table = "1.3.6.1.4.1.2021.13.16"; # Global env table my $linux_temp = "1.3.6.1.4.1.2021.13.16.2.1"; # temperature table my $linux_temp_descr = "1.3.6.1.4.1.2021.13.16.2.1.2"; # temperature entry description my $linux_temp_value = "1.3.6.1.4.1.2021.13.16.2.1.3"; # temperature entry value (mC) my $linux_fan = "1.3.6.1.4.1.2021.13.16.3.1"; # fan table my $linux_fan_descr = "1.3.6.1.4.1.2021.13.16.3.1.2"; # fan entry description my $linux_fan_value = "1.3.6.1.4.1.2021.13.16.3.1.3"; # fan entry value (RPM) my $linux_volt = "1.3.6.1.4.1.2021.13.16.4.1"; # voltage table my $linux_volt_descr = "1.3.6.1.4.1.2021.13.16.4.1.2"; # voltage entry description my $linux_volt_value = "1.3.6.1.4.1.2021.13.16.4.1.3"; # voltage entry value (mV) my $linux_misc = "1.3.6.1.4.1.2021.13.16.5.1"; # misc table my $linux_misc_descr = "1.3.6.1.4.1.2021.13.16.5.1.2"; # misc entry description my $linux_misc_value = "1.3.6.1.4.1.2021.13.16.5.1.3"; # misc entry value # Cisco switches (catalys & IOS) my $cisco_chassis_card_descr = "1.3.6.1.4.1.9.3.6.11.1.3"; # Chassis card description my $cisco_chassis_card_slot = "1.3.6.1.4.1.9.3.6.11.1.7"; # Chassis card slot number my $cisco_chassis_card_state = "1.3.6.1.4.1.9.3.6.11.1.9"; # operating status of card - 1 : Not specified, 2 : Up, 3: Down, 4 : standby my @cisco_chassis_card_status_text = ("Unknown","Not specified","Up","Down","Standby"); my @cisco_chassis_card_status = (2,2,0,2,0); my $cisco_module_descr = "1.3.6.1.2.1.47.1.1.1.1.13"; # Chassis card description my $cisco_module_slot = "1.3.6.1.4.1.9.5.1.3.1.1.25"; # Chassis card slot number my $cisco_module_state = "1.3.6.1.4.1.9.9.117.1.2.1.1.2"; # operating status of card - 1:unknown, 2:ok, 3:disabled, 4:okButDiagFailed, 5:boot, 6:selfTest, 7:failed, 8:missing, 9:mismatchWithParent, # 10:mismatchConfig, 11:diagFailed, 12:dormant, 13:outOfServiceAdmin, 14:outOfServiceEnvTemp, 15:poweredDown, 16:poweredUp, # 17:powerDenied, 18:powerCycled, 19:okButPowerOverWarning, 20:okButPowerOverCritical, 21:syncInProgress my @cisco_module_status_text =("Unknown", "unknown", "OK", "Disabled", "OkButDiagFailed", "Boot", "SelfTest", "Failed", "Missing", "MismatchWithParent", "MismatchConfig", "DiagFailed", "Dormant", "OutOfServiceAdmin", "OutOfServiceEnvTemp", "PoweredDown", "PoweredUp", "PowerDenied", "PowerCycled", "OkButPowerOverWarning", "OkButPowerOverCritical", "SyncInProgress"); my @cisco_module_status = (3,3,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2); # Juniper routers (JUNOS) my $juniper_operating_descr = "1.3.6.1.4.1.2636.3.1.13.1.5"; # Component description my $juniper_operating_state = "1.3.6.1.4.1.2636.3.1.13.1.6"; # Operating status of component- Unknown(1), Running(2), Ready(3), Reset(4), RunningAtFullSpeed(5), Down(6), Standby(7) my @juniper_operating_status_text = ("--Invalid--","Unknown","Running","Ready","Reset","RunningAtFullSpeed","Down","Standby"); my @juniper_operating_status = (3,3,0,0,1,0,2,0); # Extreme switches my $extreme_slot_table = "1.3.6.1.4.1.1916.1.1.2.2.1"; my $extreme_slot_name = "1.3.6.1.4.1.1916.1.1.2.2.1.2"; # Component description my $extreme_slot_state = "1.3.6.1.4.1.1916.1.1.2.2.1.5"; # Operating status of component - NotPresent(1), testing(2), mismatch(3), failed(4), operational(5), powerdown(6), unknown(7) my $extreme_slot_serialnumber = "1.3.6.1.4.1.1916.1.1.2.2.1.6"; my @extreme_slot_state_text = ("--Invalid--","NotPresent","Testing","Mismatch","Failed","Operational","Powerdown","Unknown"); my @extreme_slot_nagios = (3,0,2,2,2,0,2,3); my $extreme_ps_table = "1.3.6.1.4.1.1916.1.1.1.27.1"; my $extreme_ps_status = "1.3.6.1.4.1.1916.1.1.1.27.1.2"; my @extreme_ps_status_text = ("--Invalid--","notPresent","presentOK","presentNotOK"); my @extreme_ps_nagios = (3,1,0,2); my $extreme_fan_table = "1.3.6.1.4.1.1916.1.1.1.9.1"; my $extreme_fan_number = "1.3.6.1.4.1.1916.1.1.1.9.1.1"; my $extreme_fan_operational = "1.3.6.1.4.1.1916.1.1.1.9.1.2"; my @extreme_fan_operational_text = ("--Invalid--","Operational","Not operational"); my @extreme_fan_nagios = (3,0,2); my $extreme_temperature_alarm = "1.3.6.1.4.1.1916.1.1.1.7.0"; my @extreme_temperature_alarm_text = ("--Invalid--","OverTemperature","OK"); my @extreme_temperature_nagios = (3,2,0); my $extreme_temperature_current = "1.3.6.1.4.1.1916.1.1.1.8.0"; # HP ProCurve switches my $procurve_operating_descr = "1.3.6.1.4.1.11.2.14.11.1.2.6.1.7"; # Component description my $procurve_operating_state = "1.3.6.1.4.1.11.2.14.11.1.2.6.1.4"; # Operating status of component - Unknown(1), Bad(2), Warning(3), Good(4), NotPresent(5) my @procurve_operating_status_text = ("--Invalid--","Unknown","Bad","Warning","Good","NotPresent"); my @procurve_operating_status = (3,3,2,1,0,4); # Netscreen my $netscreen_slot_operating_descr = "1.3.6.1.4.1.3224.21.5.1.2"; # Component description my $netscreen_slot_operating_state = "1.3.6.1.4.1.3224.21.5.1.3"; # Operating status of component - Fail?(0), Good(1) my @netscreen_slot_operating_status_text = ("Fail","Good"); my @netscreen_slot_operating_status = (2,0); my $netscreen_power_operating_descr = "1.3.6.1.4.1.3224.21.1.1.3"; # Component description my $netscreen_power_operating_state = "1.3.6.1.4.1.3224.21.1.1.2"; # Operating status of component - Fail(0), Good(1) my @netscreen_power_operating_status_text = ("Fail","Good"); my @netscreen_power_operating_status = (2,0); my $netscreen_fan_operating_descr = "1.3.6.1.4.1.3224.21.2.1.3"; # Component description my $netscreen_fan_operating_state = "1.3.6.1.4.1.3224.21.2.1.2"; # Operating status of component - Fail(0), Good(1), Not Installed(2) my @netscreen_fan_operating_status_text = ("Fail","Good","Not Installed"); my @netscreen_fan_operating_status = (2,0,4); # Cisco CISCO-ENTITY-SENSOR-MIB my $cisco_ios_xe_physicaldescr = "1.3.6.1.2.1.47.1.1.1.1.7"; my $cisco_ios_xe_type = "1.3.6.1.4.1.9.9.91.1.1.1.1.1"; my @cisco_ios_xe_type_text = ("not_specified","other","unknown","voltsAC","voltsDC","amperes","watts","hertz","celsius","percent","rpm","cmm","truthvalue","specialEnum","dBm"); my $cisco_ios_xe_scale = "1.3.6.1.4.1.9.9.91.1.1.1.1.2"; my @cisco_ios_xe_scale_power = ("0","-24","-21","-18","-15","12","e-9","e-6","e-3","e0","e3","e6","9","12","15","18","21","24"); my $cisco_ios_xe_precision = "1.3.6.1.4.1.9.9.91.1.1.1.1.3"; my $cisco_ios_xe_value = "1.3.6.1.4.1.9.9.91.1.1.1.1.4"; my $cisco_ios_xe_status = "1.3.6.1.4.1.9.9.91.1.1.1.1.5"; my @cisco_ios_xe_operating_text = ("--Invalid--","ok","unavailable","nonoperational"); my @cisco_ios_xe_operating_status = (0,1,2,3); my $cisco_ios_xe_threshold_severity = "1.3.6.1.4.1.9.9.91.1.2.1.1.2"; my $cisco_ios_xe_threshold_value = "1.3.6.1.4.1.9.9.91.1.2.1.1.4"; # Citrix NetScaler my $citrix_desc = "1.3.6.1.4.1.5951.4.1.1.41.7.1.1"; my $citrix_value = "1.3.6.1.4.1.5951.4.1.1.41.7.1.2"; my $citrix_high_availability_state = "1.3.6.1.4.1.5951.4.1.1.23.24.0"; my @citrix_high_availability_state_text = ("unknown","init","down","up","partialFail","monitorFail","monitorOk","completeFail","dumb","disabled","partialFailSsl","routemonitorFail"); my $citrix_ssl_engine_state = "1.3.6.1.4.1.5951.4.1.1.47.2.0"; my @citrix_ssl_engine_state_text = ("down","up"); # Transmode WDM MIB/OID my $transmode_table = "1.3.6.1.4.1.11857.1.1.3.2.1"; # Alarm Active Entry table my $transmode_alarm_rack = "1.3.6.1.4.1.11857.1.1.3.2.1.2"; # Non Acked Alarm rack my $transmode_alarm_slot = "1.3.6.1.4.1.11857.1.1.3.2.1.3"; # Non Acked Alarm slot my $transmode_alarm_descr = "1.3.6.1.4.1.11857.1.1.3.2.1.4"; # Non Acked Alarm description my $transmode_alarm_sev = "1.3.6.1.4.1.11857.1.1.3.2.1.5"; # Non Acked Alarm severity my $transmode_alarm_unit = "1.3.6.1.4.1.11857.1.1.3.2.1.6"; # Non Acked Alarm unit my $transmode_alarm_serial = "1.3.6.1.4.1.11857.1.1.3.2.1.7"; # Non Acked Alarm serial my $transmode_alarm_time_start = "1.3.6.1.4.1.11857.1.1.3.2.1.8"; # Time of Alarm Start my $transmode_alarm_time_end = "1.3.6.1.4.1.11857.1.1.3.2.1.9"; # Time of Alarm End my @transmode_alarm_status_text = ("Indeterminate","Critical","Major","Minor","Warning"); my @transmode_alarm_status = (1,2,2,1,1); # ============================================================================ # ============================== GLOBAL VARIABLES ============================ # ============================================================================ my $Version = '0.7'; # Version number of this script my $o_host = undef; # Hostname my $o_community = undef; # Community my $o_port = 161; # Port my $o_help = undef; # Want some help ? my $o_verb = undef; # Verbose mode my $o_version = undef; # Print version my $o_timeout = undef; # Timeout (Default 5) my $o_perf = undef; # Output performance data my $o_version1 = undef; # Use SNMPv1 my $o_version2 = undef; # Use SNMPv2c my $o_domain = undef; # Use IPv6 my $o_check_type = "cisco"; # Default check is "cisco" my @valid_types = ("cisco","nokia","bc","iron","foundry","linux","ciscoSW","extremeSW","juniper","procurve","netscreen","ciscoNEW","citrix","transmode"); my $o_temp = undef; # Max temp my $o_fan = undef; # Min fan speed my $o_login = undef; # Login for SNMPv3 my $o_passwd = undef; # Pass for SNMPv3 my $v3protocols = undef; # V3 protocol list. my $o_authproto = 'sha'; # Auth protocol my $o_privproto = 'aes'; # Priv protocol my $o_privpass = undef; # priv password # ============================================================================ # ============================== SUBROUTINES (FUNCTIONS) ===================== # ============================================================================ # Subroutine: Print version sub p_version { print "check_snmp_environment version : $Version\n"; } # Subroutine: Print Usage sub print_usage { print "Usage: $0 [-v] -H [-6] -C [-2] | (-l login -x passwd [-X pass -L ,]) [-p ] -T (cisco|ciscoSW|ciscoNEW|nokia|bc|iron|foundry|linux|extremeSW|juniper|procurve|netscreen|citrix|transmode) [-F ] [-c ] [-f] [-t ] [-V]\n"; } # Subroutine: Check number sub isnnum { # Return true if arg is not a number my $num = shift; if ( $num =~ /^(\d+\.?\d*)|(^\.\d+)$/ ) { return 0 ;} return 1; } # Subroutine: Set final status sub set_status { # Return worst status with this order : OK, unknown, warning, critical my $new_status = shift; my $cur_status = shift; if ($new_status == 1 && $cur_status != 2) {$cur_status = $new_status;} if ($new_status == 2) {$cur_status = $new_status;} if ($new_status == 3 && $cur_status == 0) {$cur_status = $new_status;} return $cur_status; } # Subroutine: Check if SNMP table could be retrieved, otherwise give error sub check_snmp_result { my $snmp_table = shift; my $snmp_error_mesg = shift; # Check if table is defined and does not contain specified error message. # Had to do string compare it will not work with a status code if (!defined($snmp_table) && $snmp_error_mesg !~ /table is empty or does not exist/) { printf("ERROR: ". $snmp_error_mesg . " : UNKNOWN\n"); exit $ERRORS{"UNKNOWN"}; } } # Subroutine: Print complete help sub help { print "\nSNMP environmental plugin for Nagios\nVersion: ",$Version,"\n\n"; print_usage(); print <, : Authentication protocol (md5|sha : default sha) : Priv protocole (des|aes : default aes) -P, --port=PORT SNMP port (Default 161) -T, --type=cisco|ciscoSW|ciscoNEW|nokia|bc|iron|foundry|linux|extremeSW|juniper|procurve|netscreen|citrix|transmode Environmental check : cisco __________: Cisco Systems : Fan, power-supply, voltage, temperature ciscoSW ________: Cisco Systems : Card and module status check ciscoNEW _______: Cisco Systems : Sensor check for devices that have the CISCO-ENTITY-SENSOR-MIB nokia __________: Nokia IP : Fan, power-supply bc _____________: Blue Coat Systems : Fan, power-supply, voltage, disk iron ___________: IronPort : Fan, power-supply, temperature foundry ________: Foundry Network : power supply, temperature linux __________: lm-sensors : Fan, voltage, temperature, misc extremeSW ______: Extreme Networks : Slot, power-supply, fan, temperature juniper ________: Juniper Networks : Component status check procurve _______: HP ProCurve : Fan, power-supply, temperature netscreen ______: NetScreen : Slot, fan, power-supply (ScreenOS 6.1 and newer) citrix _________: Citrix NetScaler : Fan, , voltage, temperture (thresholds are hardcoded), HA state, SSL engine transmode ______: Transmode Systems : Check alarm table that is not deactivated and not acknowledged -F, --fan= Minimum fan rpm value (only needed for 'iron' & 'linux') -c, --celcius= Maximum temp in degree celcius (only needed for 'iron' & 'linux') -f, --perfparse Perfparse compatible output -t, --timeout=INTEGER Timeout for SNMP in seconds (Default: 5) -V, --version Prints version number Notes: - Check the http://exchange.nagios.org website for new versions. - For questions, problems and patches send me an e-mail (michiel.timmmers AT gmx.net). EOT } # Subroutine: Verbose output sub verb { my $t=shift; print $t,"\n" if defined($o_verb); } # Subroutine: Verbose output sub check_options { Getopt::Long::Configure ("bundling"); GetOptions( 'v' => \$o_verb, 'verbose' => \$o_verb, 'h' => \$o_help, 'help' => \$o_help, 'H:s' => \$o_host, 'hostname:s' => \$o_host, 'p:i' => \$o_port, 'port:i' => \$o_port, 'C:s' => \$o_community, 'community:s' => \$o_community, 'l:s' => \$o_login, 'login:s' => \$o_login, 'x:s' => \$o_passwd, 'passwd:s' => \$o_passwd, 'X:s' => \$o_privpass, 'privpass:s' => \$o_privpass, 'L:s' => \$v3protocols, 'protocols:s' => \$v3protocols, 't:i' => \$o_timeout, 'timeout:i' => \$o_timeout, 'V' => \$o_version, 'version' => \$o_version, '6' => \$o_domain, 'use-ipv6' => \$o_domain, '1' => \$o_version1, 'v1' => \$o_version1, '2' => \$o_version2, 'v2c' => \$o_version2, 'f' => \$o_perf, 'perfparse' => \$o_perf, 'T:s' => \$o_check_type, 'type:s' => \$o_check_type, 'F:i' => \$o_fan, 'fan:i' => \$o_fan, 'c:i' => \$o_temp, 'celcius:i' => \$o_temp ); # Check the -T option my $T_option_valid=0; foreach (@valid_types) { if ($_ eq $o_check_type) { $T_option_valid=1; } } if ( $T_option_valid == 0 ) { print "Invalid check type (-T)!\n"; print_usage(); exit $ERRORS{"UNKNOWN"}; } # Basic checks if (defined($o_timeout) && (isnnum($o_timeout) || ($o_timeout < 2) || ($o_timeout > 60))) { print "Timeout must be >1 and <60 !\n"; print_usage(); exit $ERRORS{"UNKNOWN"}; } if (!defined($o_timeout)) { $o_timeout=5; } if (defined ($o_help) ) { help(); exit $ERRORS{"UNKNOWN"}; } if (defined($o_version)) { p_version(); exit $ERRORS{"UNKNOWN"}; } # check host and filter if ( ! defined($o_host) ) { print_usage(); exit $ERRORS{"UNKNOWN"}; } # Check IPv6 if (defined ($o_domain)) { $o_domain="udp/ipv6"; } else { $o_domain="udp/ipv4"; } # Check SNMP information if ( !defined($o_community) && (!defined($o_login) || !defined($o_passwd)) ){ print "Put SNMP login info!\n"; print_usage(); exit $ERRORS{"UNKNOWN"}; } if ((defined($o_login) || defined($o_passwd)) && (defined($o_community) || defined($o_version2)) ){ print "Can't mix SNMP v1,v2c,v3 protocols!\n"; print_usage(); exit $ERRORS{"UNKNOWN"}; } # Check SNMPv3 information if (defined ($v3protocols)) { if (!defined($o_login)) { print "Put SNMP V3 login info with protocols!\n"; print_usage(); exit $ERRORS{"UNKNOWN"}; } my @v3proto=split(/,/,$v3protocols); if ((defined ($v3proto[0])) && ($v3proto[0] ne "")) { $o_authproto=$v3proto[0]; } if (defined ($v3proto[1])) { $o_privproto=$v3proto[1]; } if ((defined ($v3proto[1])) && (!defined($o_privpass))) { print "Put SNMP v3 priv login info with priv protocols!\n"; print_usage(); exit $ERRORS{"UNKNOWN"}; } } } # ============================================================================ # ============================== MAIN ======================================== # ============================================================================ check_options(); # Check gobal timeout if SNMP screws up if (defined($TIMEOUT)) { verb("Alarm at ".$TIMEOUT." + ".$o_timeout); alarm($TIMEOUT+$o_timeout); } else { verb("no global timeout defined : ".$o_timeout." + 15"); alarm ($o_timeout+15); } # Report when the script gets "stuck" in a loop or takes to long $SIG{'ALRM'} = sub { print "UNKNOWN: Script timed out\n"; exit $ERRORS{"UNKNOWN"}; }; # Connect to host my ($session,$error); if (defined($o_login) && defined($o_passwd)) { # SNMPv3 login verb("SNMPv3 login"); if (!defined ($o_privpass)) { # SNMPv3 login (Without encryption) verb("SNMPv3 AuthNoPriv login : $o_login, $o_authproto"); ($session, $error) = Net::SNMP->session( -domain => $o_domain, -hostname => $o_host, -version => 3, -username => $o_login, -authpassword => $o_passwd, -authprotocol => $o_authproto, -timeout => $o_timeout ); } else { # SNMPv3 login (With encryption) verb("SNMPv3 AuthPriv login : $o_login, $o_authproto, $o_privproto"); ($session, $error) = Net::SNMP->session( -domain => $o_domain, -hostname => $o_host, -version => 3, -username => $o_login, -authpassword => $o_passwd, -authprotocol => $o_authproto, -privpassword => $o_privpass, -privprotocol => $o_privproto, -timeout => $o_timeout ); } } else { if ((defined ($o_version2)) || (!defined ($o_version1))) { # SNMPv2 login verb("SNMP v2c login"); ($session, $error) = Net::SNMP->session( -domain => $o_domain, -hostname => $o_host, -version => 2, -community => $o_community, -port => $o_port, -timeout => $o_timeout ); } else { # SNMPv1 login verb("SNMP v1 login"); ($session, $error) = Net::SNMP->session( -domain => $o_domain, -hostname => $o_host, -version => 1, -community => $o_community, -port => $o_port, -timeout => $o_timeout ); } } # Check if there are any problems with the session if (!defined($session)) { printf("ERROR opening session: %s.\n", $error); exit $ERRORS{"UNKNOWN"}; } my $exit_val=undef; # ============================================================================ # ============================== CISCO ======================================= # ============================================================================ if ($o_check_type eq "cisco") { verb("Checking cisco env"); # Get load table my $resultat = $session->get_table(Baseoid => $ciscoEnvMonMIB); &check_snmp_result($resultat,$session->error); # Get env data index my (@voltindex,@tempindex,@fanindex,@psindex)=(undef,undef,undef,undef); my ($voltexist,$tempexist,$fanexist,$psexist)=(0,0,0,0); my @oid=undef; foreach my $key ( keys %$resultat) { verb("OID : $key, Desc : $$resultat{$key}"); if ( $key =~ /$ciscoVoltageTableDesc/ ) { @oid=split (/\./,$key); $voltindex[$voltexist++] = pop(@oid); } if ( $key =~ /$ciscoTempTableDesc/ ) { @oid=split (/\./,$key); $tempindex[$tempexist++] = pop(@oid); } if ( $key =~ /$ciscoFanTableDesc/ ) { @oid=split (/\./,$key); $fanindex[$fanexist++] = pop(@oid); } if ( $key =~ /$ciscoPSTableDesc/ ) { @oid=split (/\./,$key); $psindex[$psexist++] = pop(@oid); } } if ( ($voltexist ==0) && ($tempexist ==0) && ($fanexist ==0) && ($psexist ==0) ) { print "No Environemental data found : UNKNOWN \n"; exit $ERRORS{"UNKNOWN"}; } my $perf_output=""; # Get the data my ($i,$cur_status)=(undef,undef); my $volt_global=0; my %volt_status; if ($fanexist !=0) { for ($i=0;$i < $voltexist; $i++) { $cur_status=$$resultat{$ciscoVoltageTableState. "." . $voltindex[$i]}; verb ($$resultat{$ciscoVoltageTableDesc .".".$voltindex[$i]}); verb ($cur_status); if (!defined ($cur_status)) { ### Error TODO $volt_global=1; } if (defined($$resultat{$ciscoVoltageTableValue."." . $voltindex[$i]})) { $perf_output.=" '".$$resultat{$ciscoVoltageTableDesc .".".$voltindex[$i]}."'=" ; $perf_output.=$$resultat{$ciscoVoltageTableValue."." . $voltindex[$i]}; } if ($Nagios_state[$CiscoEnvMonNagios{$cur_status}] ne "OK") { $volt_global= 1; $volt_status{$$resultat{$ciscoVoltageTableDesc .".".$voltindex[$i]}}=$cur_status; } } } my $temp_global=0; my %temp_status; if ($tempexist !=0) { for ($i=0;$i < $tempexist; $i++) { $cur_status=$$resultat{$ciscoTempTableState . "." . $tempindex[$i]}; verb ($$resultat{$ciscoTempTableDesc .".".$tempindex[$i]}); verb ($cur_status); if (!defined ($cur_status)) { ### Error TODO $temp_global=1; } if (defined($$resultat{$ciscoTempTableValue."." . $tempindex[$i]})) { $perf_output.=" '".$$resultat{$ciscoTempTableDesc .".".$tempindex[$i]}."'=" ; $perf_output.=$$resultat{$ciscoTempTableValue."." . $tempindex[$i]}; } if ($Nagios_state[$CiscoEnvMonNagios{$cur_status}] ne "OK") { $temp_global= 1; $temp_status{$$resultat{$ciscoTempTableDesc .".".$tempindex[$i]}}=$cur_status; } } } my $fan_global=0; my %fan_status; if ($fanexist !=0) { for ($i=0;$i < $fanexist; $i++) { $cur_status=$$resultat{$ciscoFanTableState . "." . $fanindex[$i]}; verb ($$resultat{$ciscoFanTableDesc .".".$fanindex[$i]}); verb ($cur_status); if (!defined ($cur_status)) { ### Error TODO $fan_global=1; } if ($Nagios_state[$CiscoEnvMonNagios{$cur_status}] ne "OK") { $fan_global= 1; $fan_status{$$resultat{$ciscoFanTableDesc .".".$fanindex[$i]}}=$cur_status; } } } my $ps_global=0; my %ps_status; if ($psexist !=0) { for ($i=0;$i < $psexist; $i++) { $cur_status=$$resultat{$ciscoPSTableState . "." . $psindex[$i]}; if (!defined ($cur_status)) { ### Error TODO $fan_global=1; } if ($Nagios_state[$CiscoEnvMonNagios{$cur_status}] ne "OK") { $ps_global= 1; $ps_status{$$resultat{$ciscoPSTableDesc .".".$psindex[$i]}}=$cur_status; } } } my $global_state=0; my $output=""; if ($fanexist !=0) { if ($fan_global ==0) { $output .= $fanexist." Fan OK"; $global_state=1 if ($global_state==0); } else { foreach (keys %fan_status) { $output .= "Fan " . $_ . ":" . $CiscoEnvMonState {$fan_status{$_}} ." "; if ($global_state < $CiscoEnvMonNagios{$fan_status{$_}} ) { $global_state = $CiscoEnvMonNagios{$fan_status{$_}} ; } } } } if ($psexist !=0) { $output .= ", " if ($output ne ""); if ($ps_global ==0) { $output .= $psexist." ps OK"; $global_state=1 if ($global_state==0); } else { foreach (keys %ps_status) { $output .= "ps " . $_ . ":" . $CiscoEnvMonState {$ps_status{$_}} ." "; if ($global_state < $CiscoEnvMonNagios{$ps_status{$_}} ) { $global_state = $CiscoEnvMonNagios{$ps_status{$_}} ; } } } } if ($voltexist !=0) { $output .= ", " if ($output ne ""); if ($volt_global ==0) { $output .= $voltexist." volt OK"; $global_state=1 if ($global_state==0); } else { foreach (keys %volt_status) { $output .= "volt " . $_ . ":" . $CiscoEnvMonState {$volt_status{$_}} ." "; if ($global_state < $CiscoEnvMonNagios{$volt_status{$_}} ) { $global_state = $CiscoEnvMonNagios{$volt_status{$_}} ; } } } } if ($tempexist !=0) { $output .= ", " if ($output ne ""); if ($temp_global ==0) { $output .= $tempexist." temp OK"; $global_state=1 if ($global_state==0); } else { foreach (keys %temp_status) { $output .= "temp " . $_ . ":" . $CiscoEnvMonState {$temp_status{$_}} ." "; if ($global_state < $CiscoEnvMonNagios{$temp_status{$_}} ) { $global_state = $CiscoEnvMonNagios{$temp_status{$_}} ; } } } } # Clear the SNMP Transport Domain and any errors associated with the object. $session->close; #print $output," : ",$Nagios_state[$global_state]," | ",$perf_output,"\n"; print $output," : ",$Nagios_state[$global_state],"\n"; $exit_val=$ERRORS{$Nagios_state[$global_state]}; exit $exit_val; } # ============================================================================ # ============================== NOKIA ======================================= # ============================================================================ if ($o_check_type eq "nokia") { verb("Checking nokia env"); # Define variables my $resultat; my ($fan_status,$ps_status,$temp_status)=(0,0,0); my ($fan_exist,$ps_exist,$temp_exist)=(0,0,0); my ($num_fan,$num_ps)=(0,0); my ($num_fan_nok,$num_ps_nok)=(0,0); my $global_status=0; my $output=""; # get temp $resultat = $session->get_table(Baseoid => $nokia_temp_tbl); if (defined($resultat)) { verb ("temp found"); $temp_exist=1; if ($$resultat{$nokia_temp} != 1) { $temp_status=2;$global_status=1; $output="Temp CRITICAL "; } else { $output="Temp OK "; } } # Get fan table $resultat = $session->get_table(Baseoid => $nokia_fan_table); if (defined($resultat)) { $fan_exist=1; foreach my $key ( keys %$resultat) { verb("OID : $key, Desc : $$resultat{$key}"); if ( $key =~ /$nokia_fan_status/ ) { if ($$resultat{$key} != 1) { $fan_status=1; $num_fan_nok++} $num_fan++; } } if ($fan_status==0) { $output.= ", ".$num_fan." fan OK"; } else { $output.= ", ".$num_fan_nok."/".$num_fan." fan CRITICAL"; $global_status=2; } } # Get ps table $resultat = $session->get_table(Baseoid => $nokia_ps_table); if (defined($resultat)) { $ps_exist=1; foreach my $key ( keys %$resultat) { verb("OID : $key, Desc : $$resultat{$key}"); if ( $key =~ /$nokia_ps_status/ ) { if ($$resultat{$key} != 1) { $ps_status=1; $num_ps_nok++;} $num_ps++; } if ( $key =~ /$nokia_ps_temp/ ) { if ($$resultat{$key} != 1) { if ($ps_status==0) {$ps_status=2;$num_ps_nok++;} } } } if ($ps_status==0) { $output.= ", ".$num_ps." ps OK"; } elsif ($ps_status==2) { $output.= ", ".$num_ps_nok."/".$num_ps." ps WARNING (temp)"; if ($global_status != 2) {$global_status=1;} } else { $output.= ", ".$num_ps_nok."/".$num_ps." ps CRITICAL"; $global_status=2; } } # Clear the SNMP Transport Domain and any errors associated with the object. $session->close; verb ("status : $global_status"); if ( ($fan_exist+$ps_exist+$temp_exist) == 0) { print "No environemental informations found : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } if ($global_status==0) { print $output." : all OK\n"; exit $ERRORS{"OK"}; } if ($global_status==1) { print $output." : WARNING\n"; exit $ERRORS{"WARNING"}; } if ($global_status==2) { print $output." : CRITICAL\n"; exit $ERRORS{"CRITICAL"}; } } # ============================================================================ # ============================== BLUECOAT ==================================== # ============================================================================ if ($o_check_type eq "bc") { verb("Checking bluecoat env"); # Define variables my $final_status = 0; my $output = ""; my $output_perf = ""; my $tmp_status_sensor; my $tmp_status_code; my ($num_fan,$num_other,$num_volt,$num_temp,$num_disk)=(0,0,0,0,0); my ($num_fan_ok,$num_other_ok,$num_volt_ok,$num_temp_ok,$num_disk_ok)=(0,0,0,0,0); my ($sens_name,$sens_status,$sens_scale,$sens_value,$sens_code,$sens_unit)=(undef,undef,undef,undef,undef,undef); # Get SNMP table(s) and check the result my $resultat_sensor = $session->get_table(Baseoid => $bc_sensor_table); &check_snmp_result($resultat_sensor,$session->error); my $resultat_disk = $session->get_table(Baseoid => $bc_dsk_table); &check_snmp_result($resultat_disk,$session->error); # Check the sensor table if (defined($resultat_sensor)) { verb ("sensor table found"); foreach my $key ( keys %$resultat_sensor) { if ($key =~ /$bc_sensor_Name/) { $sens_name = $$resultat_sensor{$key}; $key =~ s/$bc_sensor_Name//; $sens_status = $$resultat_sensor{$bc_sensor_Status.$key}; $sens_scale = $$resultat_sensor{$bc_sensor_Scale.$key}; $sens_value = $$resultat_sensor{$bc_sensor_Value.$key} * 10 ** $sens_scale; $sens_code = $$resultat_sensor{$bc_sensor_Code.$key}; $sens_unit = $$resultat_sensor{$bc_sensor_Units.$key}; $sens_scale = $$resultat_sensor{$bc_sensor_Scale.$key}; if ($sens_status != 1 || $sens_code != 1) { # check is there is something wrong with either the status or code if ($output ne "") { $output.=", ";} if ($sens_status != 1 && $sens_code != 1) { # If both the status and code are not reporting "ok" use the following output $output .= $sens_name ." sensor ".$bc_SensorStatus[$sens_status].", reports ".$sens_value." ".$bc_mesure[$sens_unit]." (".$bc_SensorCode[$sens_code].")"; } if ($sens_status != 1 && $sens_code == 1) { # If only the status is not reporting "ok" $output .= $sens_name ." sensor ".$bc_SensorStatus[$sens_status]; } if ($sens_status == 1 && $sens_code != 1) { # If only the code is not reporting "ok" $output .= $sens_name ." reports ".$sens_value." ".$bc_mesure[$sens_unit]." (".$bc_SensorCode[$sens_code].")"; } # Set the status $tmp_status_sensor = $bc_status_sensor[$sens_status]; $tmp_status_code = $bc_status_code[$sens_code]; $final_status = &set_status($tmp_status_sensor,$final_status); $final_status = &set_status($tmp_status_code,$final_status); } # If performance data is enabled then output name with value if (defined($o_perf)) { if ($output_perf ne "") { $output_perf .=" ";} $output_perf .= "'".$sens_name."'="; my $perf_value = $sens_value; $output_perf .= $perf_value; } # Count fans sensors if ($bc_mesure[$sens_unit] eq "rpm") { $num_fan++; if ($sens_status == 1 && $sens_code == 1) { $num_fan_ok++; } } # Count temperature sensors if ($bc_mesure[$sens_unit] eq "celsius") { $num_temp++; if ($sens_status == 1 && $sens_code == 1) { $num_temp_ok++; } } # Count voltage sensors if ($bc_mesure[$sens_unit] eq "volts") { $num_volt++; if ($sens_status == 1 && $sens_code == 1) { $num_volt_ok++; } } if (!$bc_mesure[$sens_unit] =~ /rpm|celsius|volts/) { $num_other++; if ($sens_status == 1 && $sens_code == 1) { $num_other_ok++;} } } } } # Check the disk table if (defined($resultat_disk )) { foreach my $key ( keys %$resultat_disk ) { my ($dsk_name,$dsk_status)=(undef,undef); if ( $key =~ /$bc_dsk_status/ ) { $num_disk++; $dsk_status=$bc_dsk_status_nagios[$$resultat_disk{$key}]; $key =~ s/$bc_dsk_status//; if ( $dsk_status != 0) { if ($output ne "") { $output.=", ";} $output .= $$resultat_disk{$bc_dsk_vendor.$key} . "(S/N:".$$resultat_disk{$bc_dsk_serial.$key} ." MODEL:". $$resultat_disk{$bc_dsk_product.$key} . ") - ". $bc_DiskStatus[$$resultat_disk {$bc_dsk_status.$key}]; $final_status = &set_status($dsk_status,$final_status); } else { $num_disk_ok++; } if($$resultat_disk{$bc_dsk_status.$key} == 6){ $num_disk--; $num_disk_ok--; } } } } # Clear the SNMP Transport Domain and any errors associated with the object. $session->close; if ($num_fan+$num_other+$num_volt+$num_temp+$num_disk == 0) { print "No information found : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } if ($output ne "") {$output.=" : ";} if ($num_fan!=0) { if ($num_fan == $num_fan_ok) { $output.= $num_fan . " fan OK, "; } else { $output.= $num_fan_ok . "/" . $num_fan ." fan OK, "; } } if ($num_temp!=0) { if ($num_temp == $num_temp_ok) { $output.= $num_temp . " temp OK, "; } else { $output.= $num_temp_ok . "/" . $num_temp ." temp OK, "; } } if ($num_volt!=0) { if ($num_volt == $num_volt_ok) { $output.= $num_volt . " volt OK, "; } else { $output.= $num_volt_ok . "/" . $num_volt ." volt OK, "; } } if ($num_other!=0) { if ($num_other == $num_other_ok) { $output.= $num_other . " other OK, "; } else { $output.= $num_other_ok . "/" . $num_other ." other OK, "; } } if ($num_disk!=0) { if ($num_disk == $num_disk_ok) { $output.= $num_disk . " disk OK"; } else { $output.= $num_disk_ok . "/" . $num_disk ." disk OK"; } } if ($final_status == 3) { print $output," : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } if ($final_status == 2) { print $output," : CRITICAL\n"; exit $ERRORS{"CRITICAL"}; } if ($final_status == 1) { print $output," : WARNING\n"; exit $ERRORS{"WARNING"}; } print $output," : OK\n"; exit $ERRORS{"OK"}; } # ============================================================================ # ============================== IRONPORT ==================================== # ============================================================================ if ($o_check_type eq "iron") { verb("Checking Ironport env"); my $resultat; # status : 0=ok, 1=warn, 2=crit my ($fan_status,$ps_status,$temp_status)=(0,0,0); my ($fan_exist,$ps_exist,$temp_exist)=(0,0,0); my ($num_fan,$num_ps,$num_temp)=(0,0,0); my ($num_fan_nok,$num_ps_nok,$num_temp_nok)=(0,0,0); my $global_status=0; my $output=""; # get temp if $o_temp is defined if (defined($o_temp)) { verb("Checking temp < $o_temp"); $resultat = $session->get_table(Baseoid => $iron_tmp_table); if (defined($resultat)) { verb ("temp found"); $temp_exist=1; foreach my $key ( keys %$resultat) { verb("OID : $key, Desc : $$resultat{$key}"); if ( $key =~ /$iron_tmp_celcius/ ) { verb("Status : $$resultat{$key}"); if ($$resultat{$key} > $o_temp) { my @index_oid=split(/\./,$key); my $index_oid_key=pop(@index_oid); $output .= ",Temp : ". $$resultat{ $iron_tmp_name.".".$index_oid_key}." : ".$$resultat{$key}." C"; $temp_status=2; $num_temp_nok++; } $num_temp++; } } if ($temp_status==0) { $output.= ", ".$num_temp." temp < ".$o_temp." OK"; } else { $output.= ", ".$num_temp_nok."/".$num_temp." temp probes CRITICAL"; $global_status=2; } } } # Get fan status if $o_fan is defined if (defined($o_fan)) { verb("Checking fan > $o_fan"); $resultat = $session->get_table(Baseoid => $iron_fan_table); if (defined($resultat)) { verb ("fan found"); $fan_exist=1; foreach my $key ( keys %$resultat) { verb("OID : $key, Desc : $$resultat{$key}"); if ( $key =~ /$iron_fan_rpm/ ) { verb("Status : $$resultat{$key}"); if ($$resultat{$key} < $o_fan) { my @index_oid=split(/\./,$key); my $index_oid_key=pop(@index_oid); $output .= ",Fan ". $$resultat{ $iron_fan_name.".".$index_oid_key}." : ".$$resultat{$key}." RPM"; $fan_status=2; $num_fan_nok++; } $num_fan++; } } if ($fan_status==0) { $output.= ", ".$num_fan." fan > ".$o_fan." OK"; } else { $output.= ", ".$num_fan_nok."/".$num_fan." fans CRITICAL"; $global_status=2; } } } # Get power supply status verb("Checking PS"); $resultat = $session->get_table(Baseoid => $iron_ps_table); if (defined($resultat)) { verb ("ps found"); $ps_exist=1; foreach my $key ( keys %$resultat) { verb("OID : $key, Desc : $$resultat{$key}"); if ( $key =~ /$iron_ps_status/ ) { verb("Status : $iron_ps_status_name[$$resultat{$key}]"); if ($iron_ps_status_nagios[$$resultat{$key}] != 0) { my @index_oid=split(/\./,$key); my $index_oid_key=pop(@index_oid); $output .= ",PS ". $$resultat{$iron_ps_name.".".$index_oid_key}." : ".$iron_ps_status_name[$$resultat{$key}]; $ps_status=2; $num_ps_nok++; } $num_ps++; } } if ($ps_status==0) { $output.= ", ".$num_ps." ps OK"; } else { $output.= ", ".$num_ps_nok."/".$num_ps." ps CRITICAL"; $global_status=2; } } # Clear the SNMP Transport Domain and any errors associated with the object. $session->close; verb ("status : $global_status"); if ( ($fan_exist+$ps_exist+$temp_exist) == 0) { print "No environemental informations found : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } $output =~ s/^,//; if ($global_status==0) { print $output." : all OK\n"; exit $ERRORS{"OK"}; } if ($global_status==1) { print $output." : WARNING\n"; exit $ERRORS{"WARNING"}; } if ($global_status==2) { print $output." : CRITICAL\n"; exit $ERRORS{"CRITICAL"}; } } # ============================================================================ # ============================== FOUNDRY ===================================== # ============================================================================ if ($o_check_type eq "foundry") { verb("Checking foundry env"); # Define variables my $global_status = 0; my $output = ""; my @foundry_temp_oid=($foundry_temp,$foundry_temp_warn,$foundry_temp_crit); # Get SNMP table(s) and check the result my $result_temp = $session->get_request(Varbindlist => \@foundry_temp_oid); my $temp_found=0; if (defined($result_temp)) { $temp_found=1; #Temp found $output = "Temp : " . $$result_temp{$foundry_temp} / 2; if ($$result_temp{$foundry_temp} > $$result_temp{$foundry_temp_crit}) { # Temp above critical $output.= " > ". $$result_temp{$foundry_temp_crit} / 2 . " : CRITICAL"; $global_status=3; } elsif ( $$result_temp{$foundry_temp} > $$result_temp{$foundry_temp_warn}) { # Temp above warning $output.= " > ". $$result_temp{$foundry_temp_warn} / 2 . " : WARNING"; $global_status=2; } else { $output.= " < ". $$result_temp{$foundry_temp_warn} / 2 . " : OK"; $global_status=1; } } # Get PS table (TODO : Bug in FAN table, see with Foundry). my $result_ps = $session->get_table(Baseoid => $foundry_ps_table); &check_snmp_result($result_ps,$session->error); my $ps_num=0; if (defined($result_ps)) { $output .=", " if defined($output); foreach my $key ( keys %$result_ps) { verb("OID : $key, Desc : $$result_ps{$key}"); if ($$result_ps{$key} =~ /$foundry_ps_desc/) { $ps_num++; my @oid_list = split (/\./,$key); my $index_ps = pop (@oid_list); $index_ps= $foundry_ps_status . "." . $index_ps; if (defined ($$result_ps{$index_ps})) { if ($$result_ps{$index_ps} == 3) { $output.="PS ".$$result_ps{$key}." : FAILURE"; $global_status=3; } elsif ($$result_ps{$index_ps} == 2) { $global_status=1 if ($global_status==0); } else { $output.= "ps ".$$result_ps{$key}." : OTHER"; } } else { $output.= "ps ".$$result_ps{$key}." : UNDEFINED STATUS"; } } } } # Clear the SNMP Transport Domain and any errors associated with the object. $session->close; if (($ps_num+$temp_found) == 0) { print "No data found : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } if ($global_status==1) { print $output." : all OK\n"; exit $ERRORS{"OK"}; } if ($global_status==2) { print $output." : WARNING\n"; exit $ERRORS{"WARNING"}; } if ($global_status==3) { print $output." : CRITICAL\n"; exit $ERRORS{"CRITICAL"}; } print $output." : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } # ============================================================================ # ============================== LINUX LM-SENSORS ============================ # ============================================================================ if ($o_check_type eq "linux") { verb("Checking linux env"); # Define variables my $output = ""; my $index; my ($sens_name,$sens_status,$sens_value,$sens_unit)=(undef,undef,undef,undef); # Get SNMP table(s) and check the result my $resultat = $session->get_table(Baseoid => $linux_env_table); &check_snmp_result($resultat,$session->error); foreach my $key ( keys %$resultat) { if ($key =~ /$linux_temp_descr/) { $sens_name=$$resultat{$key}; $index=(split /\./,$key)[-1]; $sens_value=$$resultat{$linux_temp_value.".".$index}/1000; printf("TSensor %s : %.0f\n",$sens_name,$sens_value); } if ($key =~ /$linux_fan_descr/) { $sens_name=$$resultat{$key}; $index=(split /\./,$key)[-1]; $sens_value=$$resultat{$linux_fan_value.".".$index}; printf("FSensor %s : %.0f\n",$sens_name,$sens_value); } if ($key =~ /$linux_volt_descr/) { $sens_name=$$resultat{$key}; $index=(split /\./,$key)[-1]; $sens_value=$$resultat{$linux_volt_value.".".$index}/1000; printf("VSensor %s : %.2f\n",$sens_name,$sens_value); } if ($key =~ /$linux_misc_descr/) { $sens_name=$$resultat{$key}; $index=(split /\./,$key)[-1]; $sens_value=$$resultat{$linux_misc_value.".".$index}; printf("MSensor %s : %.2f\n",$sens_name,$sens_value); } } # Clear the SNMP Transport Domain and any errors associated with the object. $session->close; print "Not implemented yet : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } # ============================================================================ # ============================== CISCO CARD/MODULE =========================== # ============================================================================ if ($o_check_type eq "ciscoSW") { verb("Checking ciscoSW env"); # Define variables my $output =""; my $final_status =0; my $card_output =""; my $modules_output =""; my $tmp_status; my $result_t; my $index; my @temp_oid; my ($num_cards,$num_cards_ok,$num_modules,$num_modules_ok)=(0,0,0,0); # Get SNMP table(s) and check the result my $resultat_c = $session->get_table(Baseoid => $cisco_chassis_card_state); &check_snmp_result($resultat_c,$session->error); my $resultat_m = $session->get_table(Baseoid => $cisco_module_state); &check_snmp_result($resultat_m,$session->error); # Check cards if (defined($resultat_c)) { foreach my $key ( keys %$resultat_c) { if ($key =~ /$cisco_chassis_card_state/) { $num_cards++; $tmp_status=$cisco_chassis_card_status[$$resultat_c{$key}]; if ($tmp_status == 0) { $num_cards_ok++; } else { $final_status=2; $index=(split /\./,$key)[-1]; @temp_oid=($cisco_chassis_card_descr.".".$index,$cisco_chassis_card_slot.".".$index); $result_t = $session->get_request( Varbindlist => \@temp_oid); if (!defined($result_t)) { $card_output.="Invalid card(UNKNOWN)";} else { if ($card_output ne "") {$card_output.=", ";} $card_output.= "Card slot " . $$result_t{$cisco_chassis_card_slot.".".$index}; $card_output.= "(" .$$result_t{$cisco_chassis_card_descr.".".$index} ."): "; $card_output.= "status " . $cisco_chassis_card_status_text[$$resultat_c{$key}]; } } } } if ($card_output ne "") {$card_output.=", ";} } # Check modules if (defined($resultat_m)) { foreach my $key ( keys %$resultat_m) { if ($key =~ /$cisco_module_state/) { $num_modules++; $tmp_status=$cisco_module_status[$$resultat_m{$key}]; if ($tmp_status == 0) { $num_modules_ok++; } else { my $module_slot_present=0; $index=(split /\./,$key)[-1]; @temp_oid=($cisco_module_slot.".".$index); $result_t = $session->get_request( Varbindlist => \@temp_oid); if (defined($result_t)) { if ($modules_output ne "") {$modules_output.=", ";} $modules_output.= "Module slot " . $$result_t{$cisco_module_slot.".".$index}; $module_slot_present=1; } @temp_oid=($cisco_module_descr.".".$index); $result_t = $session->get_request( Varbindlist => \@temp_oid); if (defined($result_t)) { if ($module_slot_present == 1) { $modules_output.= "(" .$$result_t{$cisco_module_descr.".".$index} ."): "; } else { if ($modules_output ne "") {$modules_output.=", ";} $modules_output.= "Module (" .$$result_t{$cisco_module_descr.".".$index} ."): "; } $modules_output.= "status " . $cisco_module_status_text[$$resultat_m{$key}]; $module_slot_present=1; } if ($module_slot_present == 0) { $modules_output.="Invalid module(UNKNOWN) : status " . $cisco_module_status_text[$$resultat_m{$key}]; } if ($tmp_status == 1 && $final_status==0) { $final_status=1; } else { $final_status=2; } } } } } # Clear the SNMP Transport Domain and any errors associated with the object. $session->close; if ($num_cards==0 && $num_modules==0) { print "No cards/modules found : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } $output=$card_output . $modules_output; if ($output ne "") {$output.=" : ";} if ($num_cards!=0) { if ($num_cards == $num_cards_ok) { $output.= $num_cards . " cards OK, "; } else { $output.= $num_cards_ok . "/" . $num_cards ." cards OK, "; $final_status=2; } } if ($num_modules!=0) { if ($num_modules == $num_modules_ok) { $output.= $num_modules . " modules OK "; } else { $output.= $num_modules_ok . "/" . $num_modules ." modules OK "; $final_status=2; } } if ($final_status == 2) { print $output," : CRITICAL\n"; exit $ERRORS{"CRITICAL"}; } if ($final_status == 1) { print $output," : WARNING\n"; exit $ERRORS{"WARNING"}; } print $output," : OK\n"; exit $ERRORS{"OK"}; } # ============================================================================ # ============================== JUNIPER ===================================== # ============================================================================ if ($o_check_type eq "juniper") { verb("Checking juniper env"); # Define variables my $output = ""; my $final_status = 0; my $card_output = ""; my $ignore = ": Ignored: "; my $tmp_status; my $result_t; my $index; my @temp_oid; my ($num_cards,$num_cards_ok)=(0,0); # Get SNMP table(s) and check the result my $resultat_c = $session->get_table(Baseoid => $juniper_operating_state); &check_snmp_result($resultat_c,$session->error); if (defined($resultat_c)) { foreach my $key ( keys %$resultat_c) { if ($key =~ /$juniper_operating_state/) { $num_cards++; $tmp_status=$juniper_operating_status[$$resultat_c{$key}]; if ($tmp_status == 0) { $num_cards_ok++; } else { $index = $key; $index =~ s/^$juniper_operating_state.//; @temp_oid=($juniper_operating_descr.".".$index); $result_t = $session->get_request( Varbindlist => \@temp_oid); if ($$result_t{$juniper_operating_descr.".".$index} =~ /PCMCIA|USB|Flash|Fan Tray [0-9]$/ && $tmp_status == 3) { $ignore.= "(" .$$result_t{$juniper_operating_descr.".".$index} ."),"; } else { $final_status = &set_status($tmp_status,$final_status); if (!defined($result_t)) { $card_output.="Invalid component(UNKNOWN)"; } else { if ($card_output ne "") {$card_output.=", ";} $card_output.= "(" .$$result_t{$juniper_operating_descr.".".$index} ."): "; $card_output.= "status " . $juniper_operating_status_text[$$resultat_c{$key}]; } } } } } if ($card_output ne "") {$card_output.=", ";} } # Clear the SNMP Transport Domain and any errors associated with the object. $session->close; if ($num_cards==0) { print "No components found : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } $output=$card_output; if ($output ne "") {$output.=" : ";} if ($num_cards!=0) { if ($num_cards == $num_cards_ok) { $output.= $num_cards . " components OK"; } else { $output.= $num_cards_ok . "/" . $num_cards ." components OK" .$ignore; } } if ($final_status == 3) { print $output," : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } if ($final_status == 2) { print $output," : CRITICAL\n"; exit $ERRORS{"CRITICAL"}; } if ($final_status == 1) { print $output," : WARNING\n"; exit $ERRORS{"WARNING"}; } print $output," : OK\n"; exit $ERRORS{"OK"}; } # ============================================================================ # ============================== EXTREME ===================================== # ============================================================================ if ($o_check_type eq "extremeSW") { verb("Checking extreme env"); # Define variables my $tmp_status; my $index; my $output = ""; my $final_status = 0; my $slot_output = ""; my $ps_output = ""; my $fan_output = ""; my $temperature_output = ""; my ($num_slot,$num_slot_ok) = (0,0); my ($num_ps,$num_ps_ok) = (0,0); my ($num_fan,$num_fan_ok) = (0,0); my ($slot_name,$slot_state,$slot_serialnumber,$slot_state_text) = (undef,undef,undef,undef); my ($ps_status,$ps_status_text) = (undef,undef); my ($fan_number,$fan_operational,$fan_operational_text) = (undef,undef,undef); my ($temperature_state,$temperature_state_text,$temperature_current) = (undef,undef,undef); # Get SNMP table(s) and check the result my $resultat_slot = $session->get_table(Baseoid => $extreme_slot_table); &check_snmp_result($resultat_slot,$session->error); my $resultat_ps = $session->get_table(Baseoid => $extreme_ps_table); &check_snmp_result($resultat_ps,$session->error); my $resultat_fan = $session->get_table(Baseoid => $extreme_fan_table); &check_snmp_result($resultat_fan,$session->error); my @extreme_temp_alarm_oid =($extreme_temperature_alarm); my $resultat_temp_alarm = $session->get_request( Varbindlist => \@extreme_temp_alarm_oid ); my @extreme_temp_current_oid =($extreme_temperature_current); my $resultat_temp_current = $session->get_request( Varbindlist => \@extreme_temp_current_oid ); # Check slot if (defined($resultat_slot)) { foreach my $key ( keys %$resultat_slot) { if ($key =~ /$extreme_slot_name/) { $key =~ s/$extreme_slot_name//; # Set the slot variables $slot_name = $$resultat_slot{$extreme_slot_name.$key}; $slot_state = $$resultat_slot{$extreme_slot_state.$key}; $slot_state_text = $extreme_slot_state_text[$slot_state]; $slot_serialnumber = $$resultat_slot{$extreme_slot_serialnumber.$key}; $tmp_status = $extreme_slot_nagios[$slot_state]; $final_status = &set_status($tmp_status,$final_status); if ($slot_state != 1){ $num_slot++; if ($tmp_status == 0) { $num_slot_ok++; } else { if ($slot_output ne "") {$slot_output.=", ";} $slot_output.= "(Slot: " . $slot_name; $slot_output.= " Status: " . $slot_state_text; $slot_output.= " S/N: " . $slot_serialnumber . ")"; } } } } if ($slot_output ne "") {$slot_output.=", ";} } # Check power-supply if (defined($resultat_ps)) { foreach my $key ( keys %$resultat_ps) { if ($key =~ /$extreme_ps_status/) { $num_ps++; $key =~ s/$extreme_ps_status//; # Set the slot variables $ps_status = $$resultat_ps{$extreme_ps_status.$key}; $ps_status_text = $extreme_ps_status_text[$ps_status]; $tmp_status = $extreme_ps_nagios[$ps_status]; $final_status = &set_status($tmp_status,$final_status); if ($tmp_status == 0) { $num_ps_ok++; } else { if ($ps_output ne "") {$ps_output.=", ";} $ps_output.= "(Power-supply status: " . $ps_status_text . ")"; } } } if ($ps_output ne "") {$ps_output.=", ";} } # Check fan if (defined($resultat_fan)) { foreach my $key ( keys %$resultat_fan) { if ($key =~ /$extreme_fan_number/) { $num_fan++; $key =~ s/$extreme_fan_number//; # Set the slot variables $fan_number = $$resultat_fan{$extreme_fan_number.$key}; $fan_operational = $$resultat_fan{$extreme_fan_operational.$key}; $fan_operational_text = $extreme_fan_operational_text[$fan_operational]; $tmp_status = $extreme_fan_nagios[$fan_operational]; $final_status = &set_status($tmp_status,$final_status); if ($tmp_status == 0) { $num_fan_ok++; } else { if ($fan_output ne "") {$fan_output.=", ";} $fan_output.= "(Fan: " . $fan_number; $fan_output.= " Status: " . $fan_operational_text . ")"; } } } if ($fan_output ne "") {$fan_output.=", ";} } # Check temperature if (defined($resultat_temp_alarm) && defined($resultat_temp_current)){ $temperature_state = $$resultat_temp_alarm{$extreme_temperature_alarm}; $temperature_state_text = $extreme_temperature_alarm_text[$temperature_state]; $temperature_current = $$resultat_temp_current{$extreme_temperature_current}; $tmp_status = $extreme_temperature_nagios[$temperature_state]; $final_status = &set_status($tmp_status,$final_status); $temperature_output.= "Temp: " . $temperature_state_text; $temperature_output.= " (" . $temperature_current . " celcius)"; } # Clear the SNMP Transport Domain and any errors associated with the object. $session->close; if ($num_slot == 0 && $num_ps == 0 && $num_fan == 0) { print "No slot/power-supply/fan found : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } $output=$slot_output . $ps_output . $fan_output; if ($output ne "") {$output.=": ";} if ($num_slot != 0) { if ($num_slot == $num_slot_ok) { $output.= $num_slot . " slots OK, "; } else { $output.= $num_slot_ok . "/" . $num_slot ." slots OK, "; } } if ($num_ps != 0) { if ($num_ps == $num_ps_ok) { $output.= $num_ps . " power-supply OK, "; } else { $output.= $num_ps_ok . "/" . $num_ps ." power-supply OK, "; } } if ($num_fan != 0) { if ($num_fan == $num_fan_ok) { $output.= $num_fan . " fans OK, "; } else { $output.= $num_fan_ok . "/" . $num_fan ." fans OK, "; } } $output.= $temperature_output; if ($final_status == 3) { print $output," : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } if ($final_status == 2) { print $output," : CRITICAL\n"; exit $ERRORS{"CRITICAL"}; } if ($final_status == 1) { print $output," : WARNING\n"; exit $ERRORS{"WARNING"}; } print $output," : OK\n"; exit $ERRORS{"OK"}; } # ============================================================================ # ============================== HP PROCURVE ================================= # ============================================================================ if ($o_check_type eq "procurve") { verb("Checking procurve env"); # Define variables my $output = ""; my $final_status = 0; my $power_output = ""; my $fan_output = ""; my $temp_output = ""; my $tmp_status; my $index; my @temp_oid; my ($num_power,$num_power_ok,$num_fan,$num_fan_ok,$num_temp,$num_temp_ok)=(0,0,0,0,0,0); # Get SNMP table(s) and check the result my $resultat_state = $session->get_table(Baseoid => $procurve_operating_state); &check_snmp_result($resultat_state,$session->error); my $resultat_descr = $session->get_table(Baseoid => $procurve_operating_descr); &check_snmp_result($resultat_descr,$session->error); if (defined($resultat_state)) { foreach my $key ( keys %$resultat_state) { if ($key =~ /$procurve_operating_state/) { $tmp_status=$procurve_operating_status[$$resultat_state{$key}]; $index = $key; $index =~ s/^$procurve_operating_state.//; my $description = $$resultat_descr{$procurve_operating_descr.".".$index}; if ($description =~ /Power/ ) {$num_power++;} if ($description =~ /Fan/ ) {$num_fan++;} if ($description =~ /temperature/ ) {$num_temp++;} if ($description =~ /Power/ && $tmp_status == 0) {$num_power_ok++;} if ($description =~ /Fan/ && $tmp_status == 0) {$num_fan_ok++;} if ($description =~ /temperature/ && $tmp_status == 0) {$num_temp_ok++;} if ($tmp_status != 0) { if ($description =~ /Power/ && $tmp_status == 4) {$num_power--;} if ($description =~ /Fan/ && $tmp_status == 4) {$num_fan--;} if ($description =~ /temperature/ && $tmp_status == 4) {$num_temp--;} if ($tmp_status != 4) { if ($tmp_status == 1 && $final_status != 2) {$final_status=$tmp_status;} if ($tmp_status == 2) {$final_status=$tmp_status;} if ($tmp_status == 3 && $final_status == 0) {$final_status=$tmp_status;} if ($description =~ /Power/ ) { if (!defined($description)) {$power_output.="Invalid power(UNKNOWN)";} else { if ($power_output ne "") {$power_output.=", ";} $power_output.= "(".$description."): "; $power_output.= "status " . $procurve_operating_status_text[$$resultat_state{$key}]; } } if ($description =~ /Fan/ ) { if (!defined($description)) {$fan_output.="Invalid fan(UNKNOWN)";} else { if ($fan_output ne "") {$fan_output.=", ";} $fan_output.= "(".$description."): "; $fan_output.= "status " . $procurve_operating_status_text[$$resultat_state{$key}]; } } if ($description =~ /temperature/ ) { if (!defined($description)) {$power_output.="Invalid temp(UNKNOWN)";} else { if ($temp_output ne "") {$temp_output.=", ";} $temp_output.= "(".$description."): "; $temp_output.= "status " . $procurve_operating_status_text[$$resultat_state{$key}]; } } } } } } if ($power_output ne "") {$power_output.=", ";} if ($fan_output ne "") {$fan_output.=", ";} if ($temp_output ne "") {$temp_output.=", ";} } # Clear the SNMP Transport Domain and any errors associated with the object. $session->close; if ($num_power==0 && $num_fan==0 && $num_temp==0) { print "No power/fan/temp found : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } $output=$power_output . $fan_output . $temp_output; if ($output ne "") {$output.=" : ";} if ($num_power!=0) { if ($num_power == $num_power_ok) { $output.= $num_power . " power OK, "; } else { $output.= $num_power_ok . "/" . $num_power ." power OK, "; } } if ($num_fan!=0) { if ($num_fan == $num_fan_ok) { $output.= $num_fan . " fan OK, "; } else { $output.= $num_fan_ok . "/" . $num_fan ." fan OK, "; } } if ($num_temp!=0) { if ($num_temp == $num_temp_ok) { $output.= $num_temp . " temp OK"; } else { $output.= $num_temp_ok . "/" . $num_temp ." temp OK"; } } if ($final_status == 3) { print $output," : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } if ($final_status == 2) { print $output," : CRITICAL\n"; exit $ERRORS{"CRITICAL"}; } if ($final_status == 1) { print $output," : WARNING\n"; exit $ERRORS{"WARNING"}; } print $output," : OK\n"; exit $ERRORS{"OK"}; } # ============================================================================ # ============================== NETSCREEN =================================== # ============================================================================ if ($o_check_type eq "netscreen") { verb("Checking netscreen env"); # Define variables my $output = ""; my $final_status = 0; my $slot_output = ""; my $power_output = ""; my $fan_output = ""; my $tmp_status; my $result_t; my $index; my @temp_oid; my ($num_slot,$num_slot_ok,$num_power,$num_power_ok,$num_fan,$num_fan_ok)=(0,0,0,0,0,0); # Get SNMP table(s) and check the result my $resultat_s = $session->get_table(Baseoid => $netscreen_slot_operating_state); &check_snmp_result($resultat_s,$session->error); my $resultat_p = $session->get_table(Baseoid => $netscreen_power_operating_state); &check_snmp_result($resultat_p,$session->error); my $resultat_f = $session->get_table(Baseoid => $netscreen_fan_operating_state); &check_snmp_result($resultat_f,$session->error); # Check if the ScreenOS version is not below 6.1 or 5GT, these are not supported my @netscreen_os_oid = ($sysdescr); my $netscreen_version = $session->get_request(Varbindlist => \@netscreen_os_oid); if( ($$netscreen_version{$sysdescr} !~ /version 6.[1-9]/) || ($$netscreen_version{$sysdescr} =~ /5GT/) ) { print "Not checked, ScreenOS version below 6.1 and/or 5GT: OK\n"; exit $ERRORS{"OK"}; } # Check slots if (defined($resultat_s)) { foreach my $key ( keys %$resultat_s) { if ($key =~ /$netscreen_slot_operating_state/) { $num_slot++; $tmp_status = $netscreen_slot_operating_status[$$resultat_s{$key}]; $final_status = &set_status($tmp_status,$final_status); if ($tmp_status == 0) { $num_slot_ok++; } else { $index = $key; $index =~ s/^$netscreen_slot_operating_state.//; @temp_oid=($netscreen_slot_operating_descr.".".$index); $result_t = $session->get_request( Varbindlist => \@temp_oid); if (!defined($result_t)) {$slot_output.="Invalid slot(UNKNOWN)";} else { if ($slot_output ne "") {$slot_output.=", ";} $slot_output.= "(" .$$result_t{$netscreen_slot_operating_descr.".".$index} ."): "; $slot_output.= "status " . $netscreen_slot_operating_status_text[$$resultat_s{$key}]; } } } } if ($slot_output ne "") {$slot_output.=", ";} } # Check power if (defined($resultat_p)) { foreach my $key ( keys %$resultat_p) { if ($key =~ /$netscreen_power_operating_state/) { $num_power++; $tmp_status = $netscreen_power_operating_status[$$resultat_p{$key}]; $final_status = &set_status($tmp_status,$final_status); if ($tmp_status == 0) { $num_power_ok++; } else { $index = $key; $index =~ s/^$netscreen_power_operating_state.//; @temp_oid=($netscreen_power_operating_descr.".".$index); $result_t = $session->get_request( Varbindlist => \@temp_oid); if (!defined($result_t)) {$slot_output.="Invalid power(UNKNOWN)";} else { if ($power_output ne "") {$power_output.=", ";} $power_output.= "(" .$$result_t{$netscreen_power_operating_descr.".".$index} ."): "; $power_output.= "status " . $netscreen_power_operating_status_text[$$resultat_p{$key}]; } } } } if ($power_output ne "") {$power_output.=", ";} } # Check fans if (defined($resultat_f)) { foreach my $key ( keys %$resultat_f) { if ($key =~ /$netscreen_fan_operating_state/) { $num_fan++; $tmp_status = $netscreen_fan_operating_status[$$resultat_f{$key}]; $final_status = &set_status($tmp_status,$final_status); if ($tmp_status == 0) { $num_fan_ok++; } else { if($tmp_status == 4) { $num_fan--; } else { $index = $key; $index =~ s/^$netscreen_fan_operating_state.//; @temp_oid=($netscreen_fan_operating_descr.".".$index); $result_t = $session->get_request( Varbindlist => \@temp_oid); if (!defined($result_t)) {$fan_output.="Invalid fan(UNKNOWN)";} else { if ($fan_output ne "") {$fan_output.=", ";} $fan_output.= "(" .$$result_t{$netscreen_fan_operating_descr.".".$index} ."): "; $fan_output.= "status " . $netscreen_fan_operating_status_text[$$resultat_f{$key}]; } } } } } if ($fan_output ne "") {$fan_output.=", ";} } # Clear the SNMP Transport Domain and any errors associated with the object. $session->close; if ($num_slot==0 && $num_power==0 && $num_fan==0) { print "No slot/power/fan found : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } $output=$slot_output . $power_output . $fan_output; if ($output ne "") {$output.=" : ";} if ($num_slot!=0) { if ($num_slot == $num_slot_ok) { $output.= $num_slot . " slots OK, "; } else { $output.= $num_slot_ok . "/" . $num_slot ." slots OK, "; } } if ($num_power!=0) { if ($num_power == $num_power_ok) { $output.= $num_power . " power OK, "; } else { $output.= $num_power_ok . "/" . $num_power ." power OK "; } } if ($num_fan!=0) { if ($num_fan == $num_fan_ok) { $output.= $num_fan . " fans OK"; } else { $output.= $num_fan_ok . "/" . $num_fan ." fans OK"; } } if ($final_status == 3) { print $output," : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } if ($final_status == 2) { print $output," : CRITICAL\n"; exit $ERRORS{"CRITICAL"}; } if ($final_status == 1) { print $output," : WARNING\n"; exit $ERRORS{"WARNING"}; } print $output," : OK\n"; exit $ERRORS{"OK"}; } # ============================================================================ # ============================== CISCO (CISCO-ENTITY-SENSOR-MIB) ============= # ============================================================================ if ($o_check_type eq "ciscoNEW") { verb("Checking Cisco CISCO-ENTITY-SENSOR-MIB env"); # Define variables my $output = ""; my $final_status = 0; my $sensor_output = ""; my $tmp_status; my $result_t; my $index; my @temp_oid; my ($num_sensors,$num_sensors_ok,$num_thresholds,$num_thresholds_ok) = (0,0,0,0); # Get SNMP table(s) and check the result my $resultat_status = $session->get_table(Baseoid => $cisco_ios_xe_status); &check_snmp_result($resultat_status,$session->error); my $resultat_type = $session->get_table(Baseoid => $cisco_ios_xe_type); &check_snmp_result($resultat_type,$session->error); my $resultat_precision = $session->get_table(Baseoid => $cisco_ios_xe_precision); &check_snmp_result($resultat_precision,$session->error); my $resultat_value = $session->get_table(Baseoid => $cisco_ios_xe_value); &check_snmp_result($resultat_value,$session->error); my $resultat_threshold_value = $session->get_table(Baseoid => $cisco_ios_xe_threshold_value); &check_snmp_result($resultat_threshold_value,$session->error); my $resultat_threshold_severity = $session->get_table(Baseoid => $cisco_ios_xe_threshold_severity); &check_snmp_result($resultat_threshold_severity,$session->error); if (defined($resultat_status)) { foreach my $key ( keys %$resultat_status) { if ($key =~ /$cisco_ios_xe_status/) { $num_sensors++; $tmp_status=$cisco_ios_xe_operating_status[$$resultat_status{$key}]; $index = $key; $index =~ s/^$cisco_ios_xe_status.//; if ($tmp_status == 1) { $num_sensors_ok++; # Get sensor TYPE my $CiscoType = $$resultat_type{$cisco_ios_xe_type.".".$index}; if ($CiscoType == 8) { # Get sensor PRECISION my $CiscoPrecision = $$resultat_precision{$cisco_ios_xe_precision.".".$index}; if ($CiscoPrecision == 0){ # Get sensor THRESHOLD VALUE 1 my $CiscoThreshold_value1 = $$resultat_threshold_value{$cisco_ios_xe_threshold_value.".".$index.".1"}; if (defined($CiscoThreshold_value1)){ # Get sensor VALUE my $CiscoValue = $$resultat_value{$cisco_ios_xe_value.".".$index}; # Get sensor THRESHOLD SEVERITY 2 my $CiscoThreshold_severity2 = $$resultat_threshold_severity{$cisco_ios_xe_threshold_severity.".".$index.".2"}; if ($CiscoThreshold_severity2 ne "noSuchInstance") { $num_thresholds++; if (($CiscoValue < $CiscoThreshold_value1) || ($CiscoThreshold_severity2 == 10)){ $num_thresholds_ok++; } else { $final_status=2; # Get sensor DESCRIPTION @temp_oid=($cisco_ios_xe_physicaldescr.".".$index); $result_t = $session->get_request( Varbindlist => \@temp_oid); if ($output ne "") {$output.=", ";} $output.= "(" .$$result_t{$cisco_ios_xe_physicaldescr.".".$index}.": ".$CiscoValue." Celsius)"; } } } } } } else { $final_status=2; # Get sensor DESCRIPTION @temp_oid=($cisco_ios_xe_physicaldescr.".".$index); $result_t = $session->get_request( Varbindlist => \@temp_oid); if ($tmp_status == 2){ if ($output ne "") {$output.=", ";} $output.= "(" .$$result_t{$cisco_ios_xe_physicaldescr.".".$index}.": sensor unavailable)"; } if ($tmp_status == 3){ if ($output ne "") {$output.=", ";} $output.= "(" .$$result_t{$cisco_ios_xe_physicaldescr.".".$index}.": sensor nonoperational)"; } } } } } # Clear the SNMP Transport Domain and any errors associated with the object. $session->close; if ($num_sensors==0) { print "No components found : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } if ($output ne "") {$output.=" : ";} if ($num_sensors!=0) { if (($num_sensors == $num_sensors_ok) && ($num_thresholds == $num_thresholds_ok)){ $output.= $num_sensors . " sensors reported OK (".$num_thresholds." thresholds reported OK)"; } else { $output.= $num_sensors_ok . "/" . $num_sensors ." sensors reported OK (".$num_thresholds." sensors using thresholds)"; } } if ($final_status == 3) { print $output," : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } if ($final_status == 2) { print $output," : CRITICAL\n"; exit $ERRORS{"CRITICAL"}; } if ($final_status == 1) { print $output," : WARNING\n"; exit $ERRORS{"WARNING"}; } print $output," : OK\n"; exit $ERRORS{"OK"}; } # ============================================================================ # ============================== CITRIX NETSCALER ============================ # ============================================================================ if ($o_check_type eq "citrix") { verb("Checking citrix"); # Define variables my $output = ""; my $final_status = 0; my $voltage_output = ""; my $powersupply_output = ""; my $fan_output = ""; my $temp_output = ""; my $ha_state_output = ""; my $ssl_engine_output = ""; my $ha_state_and_ssl_engine = ""; my $result_t; my $index; my @temp_oid; my $using_voltage_threshold; my ($num_voltage,$num_voltage_ok,$num_powersupply,$num_powersupply_ok,$num_fan,$num_fan_ok,$num_temp,$num_temp_ok)=(0,0,0,0,0,0); # Get SNMP table(s) and check the result my $resultat_status = $session->get_table(Baseoid => $citrix_desc); &check_snmp_result($resultat_status,$session->error); my $resultat_value = $session->get_table(Baseoid => $citrix_value); &check_snmp_result($resultat_value,$session->error); if (defined($resultat_status)) { foreach my $key ( keys %$resultat_status) { if ($key =~ /$citrix_desc/) { my $reported_counter_name = $$resultat_status{$key}; $using_voltage_threshold = 0; $index = $key; $index =~ s/^$citrix_desc.//; my $reported_counter_value = $$resultat_value{$citrix_value.".".$index}; # Thresholds are hardcoded and are based on the "Citrix NetScaler SNMP OID Reference - Release 9.2" document. # If a threshold for a specific component is not available in this document then a logical threshold has been picked. if ($reported_counter_name =~ /Voltage/ ) { $num_voltage++; my $ha_state_and_ssl_engine =""; # Measures the +5V power supply in millivolt if ($reported_counter_name =~ /\+5.0VSupplyVoltage/ ){ $using_voltage_threshold = 1; if (($reported_counter_value > 4500 ) && ($reported_counter_value < 5500)) { $num_voltage_ok++; } else { if ($voltage_output ne "") {$voltage_output.=", ";} $voltage_output.= "(" .$reported_counter_name.": "; $voltage_output.= $reported_counter_value." mV)"; $final_status = 2; } } # Measures the +12V power supply in millivolt if ($reported_counter_name =~ /\+12.0VSupplyVoltage/ ){ $using_voltage_threshold = 1; if (($reported_counter_value > 10800 ) && ($reported_counter_value < 13200)) { $num_voltage_ok++; } else { if ($voltage_output ne "") {$voltage_output.=", ";} $voltage_output.= "(" .$reported_counter_name.": "; $voltage_output.= $reported_counter_value." mV)"; $final_status = 2; } } # Measures the -5V power supply in millivolt if ($reported_counter_name =~ /\-5.0VSupplyVoltage/ ){ $using_voltage_threshold = 1; if (($reported_counter_value > -5500 ) && ($reported_counter_value < -4500)) { $num_voltage_ok++; } else { if ($voltage_output ne "") {$voltage_output.=", ";} $voltage_output.= "(" .$reported_counter_name.": "; $voltage_output.= $reported_counter_value." mV)"; $final_status = 2; } } # Measures the -12V power supply in millivolt if ($reported_counter_name =~ /\-12.0VSupplyVoltage/ ){ $using_voltage_threshold = 1; if (($reported_counter_value > -13200 ) && ($reported_counter_value < -10800)) { $num_voltage_ok++; } else { if ($voltage_output ne "") {$voltage_output.=", ";} $voltage_output.= "(" .$reported_counter_name.": "; $voltage_output.= $reported_counter_value." mV)"; $final_status = 2; } } # Measures the +3.3V main and standby power supply in millivolt if ($reported_counter_name =~ /3.3VSupplyVoltage/ ){ $using_voltage_threshold = 1; if (($reported_counter_value > 2970 ) && ($reported_counter_value < 3630)) { $num_voltage_ok++; } else { if ($voltage_output ne "") {$voltage_output.=", ";} $voltage_output.= "(" .$reported_counter_name.": "; $voltage_output.= $reported_counter_value." mV)"; $final_status = 2; } } # Measures the +5V standby power supply in millivolt if ($reported_counter_name =~ /PowerSupply5vStandbyVoltage/ ){ $using_voltage_threshold = 1; if (($reported_counter_value > 4500 ) && ($reported_counter_value < 5500)) { $num_voltage_ok++; } else { if ($voltage_output ne "") {$voltage_output.=", ";} $voltage_output.= "(" .$reported_counter_name.": "; $voltage_output.= $reported_counter_value." mV)"; $final_status = 2; } } # Measures the processor core voltage in millivolt if ($reported_counter_name =~ /CPU0CoreVoltage|CPU1CoreVoltage/ ){ $using_voltage_threshold = 1; if (($reported_counter_value > 1080 ) && ($reported_counter_value < 1650)) { $num_voltage_ok++; } else { if ($voltage_output ne "") {$voltage_output.=", ";} $voltage_output.= "(" .$reported_counter_name.": "; $voltage_output.= $reported_counter_value." mV)"; $final_status = 2; } } # If no defined voltage description is found, uses the following thresholds if ($using_voltage_threshold == 0){ if (($reported_counter_value > 1000 ) && ($reported_counter_value < 6000)){ $num_voltage_ok++; } else { if ($voltage_output ne "") {$voltage_output.=", ";} $voltage_output.= "(" .$reported_counter_name.": "; $voltage_output.= $reported_counter_value." mV)"; $final_status = 2; } } } # Power Supply check. No documentation available about possible values. "3" appears to be "OK", so anything other then that will be reported if ($reported_counter_name =~ /PowerSupply1FailureStatus|PowerSupply2FailureStatus/ ) { $num_powersupply++; if ($reported_counter_value == 3 ){ $num_powersupply_ok++; } else { if ($powersupply_output ne "") {$powersupply_output.=", ";} $powersupply_output.= "(" .$reported_counter_name.": "; $powersupply_output.= $reported_counter_value." Failure)"; $final_status = 2; } } # Fan speed threshold in RPM. Documentation is not clear about the thresholds if ($reported_counter_name =~ /Fan/ ) { $num_fan++; if (($reported_counter_value > 5000 ) && ($reported_counter_value < 15000)){ $num_fan_ok++; } else { if ($fan_output ne "") {$fan_output.=", ";} $fan_output.= "(" .$reported_counter_name.": "; $fan_output.= $reported_counter_value." RPM)"; $final_status = 2; } } # It looks like Citrix NetScaler devices are based on Intel XEON processors. Most of them appear to have a maximum operation temperature of 75 degrees Celsius. if ($reported_counter_name =~ /CPU0Temperature|CPU1Temperature/ ) { $num_temp++; if (($reported_counter_value > 50 ) && ($reported_counter_value < 72)){ $num_temp_ok++; } else { if ($temp_output ne "") {$temp_output.=", ";} $temp_output.= "(" .$reported_counter_name.": "; $temp_output.= $reported_counter_value." Celsius)"; $final_status = 2; } } # Internal temperature in degrees Celsius. No defined threshold in documentation. if ($reported_counter_name =~ /InternalTemperature/ ) { $num_temp++; if (($reported_counter_value > 20 ) && ($reported_counter_value < 40)){ $num_temp_ok++; } else { if ($temp_output ne "") {$temp_output.=", ";} $temp_output.= "(" .$reported_counter_name.": "; $temp_output.= $reported_counter_value." Celsius)"; $final_status = 2; } } } } # Get High Availability State @temp_oid=($citrix_high_availability_state); $result_t = $session->get_request( Varbindlist => \@temp_oid); my $ha_cur_state = $$result_t{$citrix_high_availability_state}; if (defined($ha_cur_state)){ $ha_state_output.= "HA State " . $citrix_high_availability_state_text[$ha_cur_state]; if ($ha_cur_state != 3){ $final_status = 2; } } # Get High Availability State @temp_oid=($citrix_ssl_engine_state); $result_t = $session->get_request( Varbindlist => \@temp_oid); my $ssl_engine_state = $$result_t{$citrix_ssl_engine_state}; if (defined($ssl_engine_state)){ $ssl_engine_output.= "SSL Engine " . $citrix_ssl_engine_state_text[$ssl_engine_state]; if ($ssl_engine_state != 1){ $final_status = 2; } } if ((defined($ha_cur_state)) && (defined($ssl_engine_state))){$ha_state_and_ssl_engine = " (".$ha_state_output.", ".$ssl_engine_output.")"}; if ((defined($ha_cur_state)) && (!defined($ssl_engine_state))){$ha_state_and_ssl_engine = " - (".$ha_state_output.")"}; if ((!defined($ha_cur_state)) && (defined($ssl_engine_state))){$ha_state_and_ssl_engine = " - (".$ssl_engine_output.")"}; if ($voltage_output ne "") {$voltage_output.=", ";} if ($powersupply_output ne "") {$powersupply_output.=", ";} if ($fan_output ne "") {$fan_output.=", ";} if ($temp_output ne "") {$temp_output.=", ";} } # Clear the SNMP Transport Domain and any errors associated with the object. $session->close; if ($num_voltage==0 && $num_fan==0 && $num_temp==0) { print "No power/fan/temp found : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } $output=$voltage_output . $fan_output . $temp_output ; if ($output ne "") {$output.=" : ";} if ($num_powersupply!=0) { if ($num_powersupply == $num_powersupply_ok) { $output.= $num_powersupply . " powersupply OK, "; } else { $output.= $num_powersupply_ok . "/" . $num_powersupply ." powersupply OK, "; } } if ($num_voltage!=0) { if ($num_voltage == $num_voltage_ok) { $output.= $num_voltage . " voltage OK, "; } else { $output.= $num_voltage_ok . "/" . $num_voltage ." voltage OK, "; } } if ($num_fan!=0) { if ($num_fan == $num_fan_ok) { $output.= $num_fan . " fan OK, "; } else { $output.= $num_fan_ok . "/" . $num_fan ." fan OK, "; } } if ($num_temp!=0) { if ($num_temp == $num_temp_ok) { $output.= $num_temp . " temp OK"; } else { $output.= $num_temp_ok . "/" . $num_temp ." temp OK"; } } $output.= $ha_state_and_ssl_engine; if ($final_status == 3) { print $output," : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } if ($final_status == 2) { print $output," : CRITICAL\n"; exit $ERRORS{"CRITICAL"}; } if ($final_status == 1) { print $output," : WARNING\n"; exit $ERRORS{"WARNING"}; } print $output," : OK\n"; exit $ERRORS{"OK"}; } # ============================================================================ # ============================== TRANSMODE =================================== # ============================================================================ if ($o_check_type eq "transmode") { verb("Checking transmode env"); # Define variables my $final_status = 0; my $tmp_status = undef; my $num_alarms = 0; my $num_ignored = 0; my $alarm_output = ""; my $output = ""; my ($alarm_serv,$alarm_serv_txt,$alarm_descr,$alarm_time_start,$alarm_time_end,$alarm_rack,$alarm_slot,$alarm_unit)=(undef,undef,undef,undef,undef,undef,undef,undef); # Get SNMP table(s) and check the result my $resultat_c = $session->get_table(Baseoid => $transmode_table); &check_snmp_result($resultat_c,$session->error); if (defined($resultat_c)) { foreach my $key ( keys %$resultat_c) { if ($key =~ /$transmode_alarm_sev/) { $alarm_serv = $$resultat_c{$key}; $key =~ s/$transmode_alarm_sev//; # Set the alarm variables $alarm_descr = $$resultat_c{$transmode_alarm_descr.$key}; $alarm_time_start = $$resultat_c{$transmode_alarm_time_start.$key}; $alarm_time_end = $$resultat_c{$transmode_alarm_time_end.$key}; $alarm_rack = $$resultat_c{$transmode_alarm_rack.$key}; $alarm_slot = $$resultat_c{$transmode_alarm_slot.$key}; $alarm_unit = $$resultat_c{$transmode_alarm_unit.$key}; $alarm_serv_txt = $transmode_alarm_status_text[$alarm_serv]; $tmp_status = $transmode_alarm_status[$alarm_serv]; # Ignore client related alarms or alarms that are deactivated if (($alarm_descr =~ /client|Client/ ) || ($alarm_time_end =~ /[0-9]{4}[-][0-9]{2}[-][0-9]{2}/)) { $num_ignored++; } # Print reported alarms that are not ignored else { $final_status = &set_status($tmp_status,$final_status); $num_alarms++; $alarm_output .= "Rack:" . $alarm_rack; $alarm_output .= " Slot:" . $alarm_slot; $alarm_output .= " Unit:" . $alarm_unit; $alarm_output .= " Desc:" . $alarm_descr; $alarm_output .= " Time:" . $alarm_time_start; $alarm_output .= " Sev:" . $alarm_serv_txt .","; } } } } # Clear the SNMP Transport Domain and any errors associated with the object. $session->close; if ($num_alarms == 0) { print "No alarms found : OK\n"; exit $ERRORS{"OK"}; } $output=$alarm_output; if ($output ne "") {$output.=" : ";} if ($num_alarms != 0) { $output .= $num_alarms . " Active alarm(s) found, ".$num_ignored." ignored"; } if ($final_status == 3) { print $output," : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } if ($final_status == 2) { print $output," : CRITICAL\n"; exit $ERRORS{"CRITICAL"}; } if ($final_status == 1) { print $output," : WARNING\n"; exit $ERRORS{"WARNING"}; } print $output," : OK\n"; exit $ERRORS{"OK"}; } # ============================================================================ # ============================== NO CHECK DEFINED ============================ # ============================================================================ print "Unknown check type : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; nagios-plugins-contrib-9.20140106/check_snmp_environment/copyright0000644000000000000000000000135412262515026022100 0ustar Author : Michiel Timmers ( michiel.timmers AT gmx.net) Based on : "check_snmp_env" plugin (version 1.3) from Patrick Proy 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see nagios-plugins-contrib-9.20140106/check_snmp_environment/Makefile0000644000000000000000000000025012262515026021577 0ustar PLUGIN := check_snmp_environment CLEANFILES := check_snmp_environment include ../common.mk check_snmp_environment: check_snmp_environment.pl cp $< $@ chmod 755 $@ nagios-plugins-contrib-9.20140106/check_varnish/0000755000000000000000000000000012262515026016213 5ustar nagios-plugins-contrib-9.20140106/check_varnish/control0000644000000000000000000000042512262515026017617 0ustar Uploaders: Bernd Zeimetz Build-Depends: libvarnishapi-dev, pkg-config Version: 1.1 Homepage: http://repo.varnish-cache.org/source/ Watch: http://repo.varnish-cache.org/source/ varnish-nagios-([0-9.]+)\.tar\.gz Description: plugin to monitor varnish instances nagios-plugins-contrib-9.20140106/check_varnish/varnish-nagios-1.1/0000755000000000000000000000000012262515026021440 5ustar nagios-plugins-contrib-9.20140106/check_varnish/varnish-nagios-1.1/install-sh0000755000000000000000000003253712262515026023456 0ustar #!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # 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 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: nagios-plugins-contrib-9.20140106/check_varnish/varnish-nagios-1.1/autogen.sh0000755000000000000000000000147312262515026023446 0ustar #!/bin/sh # # $Id$ # warn() { echo "WARNING: $@" 1>&2 } case `uname -s` in Darwin) LIBTOOLIZE=glibtoolize ;; FreeBSD) LIBTOOLIZE=libtoolize if [ -d /usr/local/gnu-autotools/bin ] ; then PATH=/usr/local/gnu-autotools/bin:${PATH} export PATH FIX_BROKEN_FREEBSD_PORTS="-I /usr/local/share/aclocal" fi ;; Linux) LIBTOOLIZE=libtoolize ;; esac automake_version=$(automake --version | tr ' ' '\n' | egrep '^[0-9]\.[0-9a-z.-]+') if [ -z "$automake_version" ] ; then warn "unable to determine automake version" else case $automake_version in 0.*|1.[0-8]|1.[0-8][.-]*) warn "automake ($automake_version) detected; 1.9 or newer recommended" ;; *) ;; esac fi set -ex aclocal ${FIX_BROKEN_FREEBSD_PORTS} $LIBTOOLIZE --copy --force autoheader automake --add-missing --copy --foreign autoconf nagios-plugins-contrib-9.20140106/check_varnish/varnish-nagios-1.1/config.guess0000755000000000000000000012673012262515026023771 0ustar #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011 Free Software Foundation, Inc. timestamp='2011-05-11' # 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 (context # diff format) to and include a 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. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 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, 2006, 2007, 2008, 2009, 2010, 2011 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 "$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 ;; sh5el) machine=sh5le-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 -q __ELF__ 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 ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-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'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # 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 ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; 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:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-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:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 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 -q __LP64__ 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:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *: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 ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-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 ;; 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 -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-gnueabi else echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*: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 ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 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:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #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 ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu 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 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-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 ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-tilera-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu 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.[02]*:*) 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 i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; 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; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' 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; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; 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.[02]*:*) 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 ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku 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 ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-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 i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac 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 ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} 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 ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros 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: nagios-plugins-contrib-9.20140106/check_varnish/varnish-nagios-1.1/configure0000755000000000000000000155726212262515026023371 0ustar #! /bin/sh # From configure.ac Id. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for varnish-nagios 1.1. # # Report bugs to . # # Copyright (c) 2007-2011 Varnish Software AS # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 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 IFS=$as_save_IFS ;; 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 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: varnish-dev@varnish-cache.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; 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 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # 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 as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='varnish-nagios' PACKAGE_TARNAME='varnish-nagios' PACKAGE_VERSION='1.1' PACKAGE_STRING='varnish-nagios 1.1' PACKAGE_BUGREPORT='varnish-dev@varnish-cache.org' PACKAGE_URL='' ac_unique_file="check_varnish.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS VARNISHAPI_LIBS VARNISHAPI_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED LIBTOOL EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock enable_developer_warnings enable_debugging_symbols enable_extra_developer_warnings enable_stack_protector enable_werror ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR VARNISHAPI_CFLAGS VARNISHAPI_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # 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. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= 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 case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -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) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$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 ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$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 ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 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 ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$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_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=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 ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 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 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # 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 the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | 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 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # 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 varnish-nagios 1.1 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 \`..'] 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] --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] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/varnish-nagios] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _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] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of varnish-nagios 1.1:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-developer-warnings enable strict warnings (default is NO) --enable-debugging-symbols enable debugging symbols (default is NO) --enable-extra-developer-warnings enable even stricter warnings (default is NO) --enable-stack-protector enable stack protector (default is NO) --enable-werror use -Werror (default is NO) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). 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 LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path VARNISHAPI_CFLAGS C compiler flags for VARNISHAPI, overriding pkg-config VARNISHAPI_LIBS linker flags for VARNISHAPI, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested 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 else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF varnish-nagios configure 1.1 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Copyright (c) 2007-2011 Varnish Software AS _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## -------------------------------------------- ## ## Report this to varnish-dev@varnish-cache.org ## ## -------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* 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_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by varnish-nagios $as_me 1.1, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { 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` /usr/bin/hostinfo = `(/usr/bin/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=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&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_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=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append 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 as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset 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: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > 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 cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } 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. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_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 $ac_precious_vars; 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,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_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 # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_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. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## 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 ac_config_headers="$ac_config_headers config.h" 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 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- 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.11' # 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. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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 rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir 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. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$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' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "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 $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi 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='varnish-nagios' VERSION='1.1' 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"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' # Checks for programs. DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; 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 | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 -std 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 -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 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 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : 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 depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. 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 am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #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)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h 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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 -std 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 -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 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 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : 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 depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. 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 am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } 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 case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4' macro_revision='1.3293' ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST 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_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw 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. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" 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 # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' lt_prog_compiler_pic='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi 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].*|aix[5-9]*) 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # 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. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH 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" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH 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" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } 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 CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # Checks for libraries. if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VARNISHAPI" >&5 $as_echo_n "checking for VARNISHAPI... " >&6; } if test -n "$VARNISHAPI_CFLAGS"; then pkg_cv_VARNISHAPI_CFLAGS="$VARNISHAPI_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"varnishapi\""; } >&5 ($PKG_CONFIG --exists --print-errors "varnishapi") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_VARNISHAPI_CFLAGS=`$PKG_CONFIG --cflags "varnishapi" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$VARNISHAPI_LIBS"; then pkg_cv_VARNISHAPI_LIBS="$VARNISHAPI_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"varnishapi\""; } >&5 ($PKG_CONFIG --exists --print-errors "varnishapi") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_VARNISHAPI_LIBS=`$PKG_CONFIG --libs "varnishapi" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then VARNISHAPI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "varnishapi" 2>&1` else VARNISHAPI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "varnishapi" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$VARNISHAPI_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (varnishapi) were not met: $VARNISHAPI_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables VARNISHAPI_CFLAGS and VARNISHAPI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables VARNISHAPI_CFLAGS and VARNISHAPI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else VARNISHAPI_CFLAGS=$pkg_cv_VARNISHAPI_CFLAGS VARNISHAPI_LIBS=$pkg_cv_VARNISHAPI_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi # Checks for header files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #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)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (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 if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* 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"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 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; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi # Checks for library functions. ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # Now that we're done using the compiler to look for functions and # libraries, set CFLAGS to what we want them to be for our own code # This corresponds to FreeBSD's WARNS level 6 DEVELOPER_CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat" # Additional flags for GCC 4 EXTRA_DEVELOPER_CFLAGS="-Wextra -Wno-missing-field-initializers -Wno-sign-compare" # Check whether --enable-developer-warnings was given. if test "${enable_developer_warnings+set}" = set; then : enableval=$enable_developer_warnings; CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}" fi # Check whether --enable-debugging-symbols was given. if test "${enable_debugging_symbols+set}" = set; then : enableval=$enable_debugging_symbols; CFLAGS="${CFLAGS} -O0 -g -fno-inline" fi # Check whether --enable-extra-developer-warnings was given. if test "${enable_extra_developer_warnings+set}" = set; then : enableval=$enable_extra_developer_warnings; CFLAGS="${CFLAGS} ${EXTRA_DEVELOPER_CFLAGS}" fi # Check whether --enable-stack-protector was given. if test "${enable_stack_protector+set}" = set; then : enableval=$enable_stack_protector; CFLAGS="${CFLAGS} -fstack-protector-all" fi # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; CFLAGS="${CFLAGS} -Werror" fi # Generate output ac_config_files="$ac_config_files Makefile" 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, we kill variables containing newlines. # 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. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 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}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $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} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 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 IFS=$as_save_IFS ;; 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 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; 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 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # 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 ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by varnish-nagios $as_me 1.1, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent 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_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ varnish-nagios config.status 1.1 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. 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=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; 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 || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 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 against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries 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[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #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. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # 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. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;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&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_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 # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # 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 || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi nagios-plugins-contrib-9.20140106/check_varnish/varnish-nagios-1.1/aclocal.m40000644000000000000000000124110512262515026023304 0ustar # generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, [m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -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 Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2010 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH 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" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH 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" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) 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. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # 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 AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi 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]].*|aix[[5-9]]*) 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # 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. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) 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 exp_sym_flag='-Bexport' no_entry_flag="" 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]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) # ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # 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. # @configure_input@ # serial 3293 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4]) m4_define([LT_PACKAGE_REVISION], [1.3293]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4' macro_revision='1.3293' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # 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. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # 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, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl 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])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # 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], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [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 am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$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 build --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])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # 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"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # 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.62])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 if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi 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 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # 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) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 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([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # 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_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [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, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # 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 this is the am__doit target .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 # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [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 AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # 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 ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _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. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # 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)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # 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="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR nagios-plugins-contrib-9.20140106/check_varnish/varnish-nagios-1.1/LICENSE0000644000000000000000000000237512262515026022454 0ustar Copyright (c) 2007-2009 Linpro AS All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. nagios-plugins-contrib-9.20140106/check_varnish/varnish-nagios-1.1/Makefile.am0000644000000000000000000000033412262515026023474 0ustar # $Id$ libexec_PROGRAMS = check_varnish check_varnish_SOURCES = check_varnish.c check_varnish_CFLAGS = -include config.h ${VARNISHAPI_CFLAGS} check_varnish_LDADD = ${VARNISHAPI_LIBS} EXTRA_DIST = LICENSE autogen.sh nagios-plugins-contrib-9.20140106/check_varnish/varnish-nagios-1.1/depcomp0000755000000000000000000004426712262515026023032 0ustar #! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: nagios-plugins-contrib-9.20140106/check_varnish/varnish-nagios-1.1/config.h.in0000644000000000000000000000526712262515026023475 0ustar /* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* 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 header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* 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 home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Version number of package */ #undef VERSION /* Define to 1 if on MINIX. */ #undef _MINIX /* 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 /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `unsigned int' if does not define. */ #undef size_t nagios-plugins-contrib-9.20140106/check_varnish/varnish-nagios-1.1/config.sub0000755000000000000000000010460612262515026023432 0ustar #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011 Free Software Foundation, Inc. timestamp='2011-03-23' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (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. # Please send patches to . Submit a context # diff and a properly formatted GNU 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. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # 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, 2006, 2007, 2008, 2009, 2010, 2011 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-android* | linux-dietlibc | linux-newlib* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) 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 | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -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 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -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/'` ;; -sco5v6*) # 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 | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. 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-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile-* | tilegx-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # 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 ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; 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 ;; cr16 | cr16-*) basic_machine=cr16-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 ;; dicos) basic_machine=i686-pc os=-dicos ;; 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 ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; 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 ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; 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 ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; 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 ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; 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 | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) 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 ;; rdos) basic_machine=i386-pc os=-rdos ;; 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 ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; 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 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; 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 ;; # This must be matched before tile*. tilegx*) basic_machine=tilegx-unknown os=-linux-gnu ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; 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 ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-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[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 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. -auroraux) os=-auroraux ;; -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* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -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* | -rdos* | -toppers* | -drops* | -es*) # 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 ;; -dicos*) os=-dicos ;; -nacl*) ;; -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 score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) 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 ;; mep-*) os=-elf ;; 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 ;; -cnk*|-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: nagios-plugins-contrib-9.20140106/check_varnish/varnish-nagios-1.1/check_varnish.c0000644000000000000000000001732512262515026024423 0ustar /*- * Copyright (c) 2007-2011 Varnish Software AS * All rights reserved. * * Author: Cecilie Fritzvold * Author: Tollef Fog Heen * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $Id$ * * Nagios plugin for Varnish */ #include #include #include #include #include #include #include #include #include #include #include #include "vsc.h" #include "varnishapi.h" static int verbose = 0; struct range { intmax_t lo; intmax_t hi; int inverted:1; int defined:1; }; static struct range critical; static struct range warning; enum { NAGIOS_OK = 0, NAGIOS_WARNING = 1, NAGIOS_CRITICAL = 2, NAGIOS_UNKNOWN = 3, }; static const char *status_text[] = { [NAGIOS_OK] = "OK", [NAGIOS_WARNING] = "WARNING", [NAGIOS_CRITICAL] = "CRITICAL", [NAGIOS_UNKNOWN] = "UNKNOWN", }; /* * Parse a range specification */ static int parse_range(const char *spec, struct range *range) { const char *delim; char *end; /* @ means invert the range */ if (*spec == '@') { ++spec; range->inverted = 1; } else { range->inverted = 0; } /* empty spec... */ if (*spec == '\0') return (-1); if ((delim = strchr(spec, ':')) != NULL) { /* * The Nagios plugin documentation says nothing about how * to interpret ":N", so we disallow it. Allowed forms * are "~:N", "~:", "M:" and "M:N". */ if (delim - spec == 1 && *spec == '~') { range->lo = INTMAX_MIN; } else { range->lo = strtoimax(spec, &end, 10); if (end != delim) return (-1); } if (*(delim + 1) != '\0') { range->hi = strtoimax(delim + 1, &end, 10); if (*end != '\0') return (-1); } else { range->hi = INTMAX_MAX; } } else { /* * Allowed forms are N */ range->lo = 0; range->hi = strtol(spec, &end, 10); if (*end != '\0') return (-1); } /* * Sanity */ if (range->lo > range->hi) return (-1); range->defined = 1; return (0); } /* * Check if a given value is within a given range. */ static int inside_range(intmax_t value, const struct range *range) { if (range->inverted) return (value < range->lo || value > range->hi); return (value >= range->lo && value <= range->hi); } /* * Check if the thresholds against the value and return the appropriate * status code. */ static int check_thresholds(intmax_t value) { if (!warning.defined && !critical.defined) return (NAGIOS_UNKNOWN); if (critical.defined && !inside_range(value, &critical)) return (NAGIOS_CRITICAL); if (warning.defined && !inside_range(value, &warning)) return (NAGIOS_WARNING); return (NAGIOS_OK); } struct stat_priv { char *param; const char *info; intmax_t value; int found; intmax_t cache_hit; intmax_t cache_miss; }; static int check_stats_cb(void *priv, const struct VSC_point * const pt) { struct stat_priv *p; char tmp[1024]; assert(sizeof(tmp) > (strlen(pt->class) + 1 + strlen(pt->ident) + 1 + strlen(pt->name) + 1)); snprintf(tmp, sizeof(tmp), "%s%s%s%s%s", (pt->class[0] == 0 ? "" : pt->class), (pt->class[0] == 0 ? "" : "."), (pt->ident[0] == 0 ? "" : pt->ident), (pt->ident[0] == 0 ? "" : "."), pt->name); p = priv; assert(!strcmp(pt->fmt, "uint64_t")); if (strcmp(tmp, p->param) == 0) { p->found = 1; p->info = pt->desc; p->value = *(const volatile uint64_t*)pt->ptr; } else if (strcmp(p->param, "ratio") == 0) { if (strcmp(tmp, "cache_hit") == 0) { p->found = 1; p->cache_hit = *(const volatile uint64_t*)pt->ptr; } else if (strcmp(tmp, "cache_miss") == 0) { p->cache_miss = *(const volatile uint64_t*)pt->ptr; } } return (0); } /* * Check the statistics for the requested parameter. */ static void check_stats(struct VSM_data *vd, char *param) { int status; struct stat_priv priv; priv.found = 0; priv.param = param; (void)VSC_Iter(vd, check_stats_cb, &priv); if (strcmp(param, "ratio") == 0) { intmax_t total = priv.cache_hit + priv.cache_miss; priv.value = total ? (100 * priv.cache_hit / total) : 0; priv.info = "Cache hit ratio"; } if (priv.found != 1) { printf("Unknown parameter '%s'\n", param); exit(1); } status = check_thresholds(priv.value); printf("VARNISH %s: %s (%'jd)|%s=%jd\n", status_text[status], priv.info, priv.value, param, priv.value); exit(status); } /*-------------------------------------------------------------------------------*/ static void help(void) { fprintf(stderr, "usage: " "check_varnish [-lv] [-n varnish_name] [-p param_name [-c N] [-w N]]\n" "\n" "-v Increase verbosity.\n" "-n varnish_name Specify the Varnish instance name\n" "-p param_name Specify the parameter to check (see below).\n" " The default is 'ratio'.\n" "-c [@][lo:]hi Set critical threshold\n" "-w [@][lo:]hi Set warning threshold\n" "\n" "All items reported by varnishstat(1) are available - use the\n" "identifier listed in the left column by 'varnishstat -l'. In\n" "addition, the following parameters are available:\n" "\n" "uptime How long the cache has been running (in seconds)\n" "ratio The cache hit ratio expressed as a percentage of hits to\n" " hits + misses. Default thresholds are 95 and 90.\n" "usage Cache file usage as a percentage of the total cache space.\n" ); exit(0); } static void usage(void) { fprintf(stderr, "usage: " "check_varnish [-lv] [-n varnish_name] [-p param_name [-c N] [-w N]]\n"); exit(3); } int main(int argc, char **argv) { struct VSM_data *vd; char *param = NULL; int opt; setlocale(LC_ALL, ""); vd = VSM_New(); VSC_Setup(vd); while ((opt = getopt(argc, argv, VSC_ARGS "c:hn:p:vw:")) != -1) { switch (opt) { case 'c': if (parse_range(optarg, &critical) != 0) usage(); break; case 'h': help(); break; case 'n': VSC_Arg(vd, opt, optarg); break; case 'p': param = strdup(optarg); break; case 'v': ++verbose; break; case 'w': if (parse_range(optarg, &warning) != 0) usage(); break; default: if (VSC_Arg(vd, opt, optarg) > 0) break; usage(); } } if (VSC_Open(vd, 1)) exit(1); /* Default: if no param specified, check hit ratio. If no warning * and critical values are specified either, set these to default. */ if (param == NULL) { param = strdup("ratio"); if (!warning.defined) parse_range("95:", &warning); if (!critical.defined) parse_range("90:", &critical); } if (!param) usage(); check_stats(vd, param); exit(0); } nagios-plugins-contrib-9.20140106/check_varnish/varnish-nagios-1.1/ltmain.sh0000755000000000000000000105051112262515026023266 0ustar # libtool (GNU libtool) 2.4 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010 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. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4 Debian-2.4-4 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION="2.4 Debian-2.4-4" TIMESTAMP="" package_revision=1.3293 # 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+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # 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+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_apped perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 nagios-plugins-contrib-9.20140106/check_varnish/varnish-nagios-1.1/configure.ac0000644000000000000000000000401612262515026023727 0ustar # $Id$ AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (c) 2007-2011 Varnish Software AS]) AC_REVISION([$Id$]) AC_INIT([varnish-nagios], [1.1], [varnish-dev@varnish-cache.org]) AC_CONFIG_SRCDIR(check_varnish.c) AM_CONFIG_HEADER(config.h) AC_CANONICAL_SYSTEM AC_LANG(C) AM_INIT_AUTOMAKE # Checks for programs. AC_GNU_SOURCE AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LIBTOOL AC_PROG_MAKE_SET # Checks for libraries. PKG_CHECK_MODULES([VARNISHAPI], [varnishapi]) # Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_HEADER_TIME # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST # Checks for library functions. AC_TYPE_SIZE_T # Now that we're done using the compiler to look for functions and # libraries, set CFLAGS to what we want them to be for our own code # This corresponds to FreeBSD's WARNS level 6 DEVELOPER_CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat" # Additional flags for GCC 4 EXTRA_DEVELOPER_CFLAGS="-Wextra -Wno-missing-field-initializers -Wno-sign-compare" AC_ARG_ENABLE(developer-warnings, AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]), CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}") AC_ARG_ENABLE(debugging-symbols, AS_HELP_STRING([--enable-debugging-symbols],[enable debugging symbols (default is NO)]), CFLAGS="${CFLAGS} -O0 -g -fno-inline") AC_ARG_ENABLE(extra-developer-warnings, AS_HELP_STRING([--enable-extra-developer-warnings],[enable even stricter warnings (default is NO)]), CFLAGS="${CFLAGS} ${EXTRA_DEVELOPER_CFLAGS}") AC_ARG_ENABLE(stack-protector, AS_HELP_STRING([--enable-stack-protector],[enable stack protector (default is NO)]), CFLAGS="${CFLAGS} -fstack-protector-all") AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror],[use -Werror (default is NO)]), CFLAGS="${CFLAGS} -Werror") # Generate output AC_CONFIG_FILES([ Makefile ]) AC_OUTPUT nagios-plugins-contrib-9.20140106/check_varnish/varnish-nagios-1.1/missing0000755000000000000000000002623312262515026023045 0ustar #! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: nagios-plugins-contrib-9.20140106/check_varnish/varnish-nagios-1.1/Makefile.in0000644000000000000000000005707212262515026023520 0ustar # Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # 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@ # $Id$ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ libexec_PROGRAMS = check_varnish$(EXEEXT) subdir = . DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure config.guess config.sub depcomp \ install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(libexecdir)" PROGRAMS = $(libexec_PROGRAMS) am_check_varnish_OBJECTS = check_varnish-check_varnish.$(OBJEXT) check_varnish_OBJECTS = $(am_check_varnish_OBJECTS) am__DEPENDENCIES_1 = check_varnish_DEPENDENCIES = $(am__DEPENDENCIES_1) check_varnish_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(check_varnish_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(check_varnish_SOURCES) DIST_SOURCES = $(check_varnish_SOURCES) ETAGS = etags CTAGS = ctags 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 ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VARNISHAPI_CFLAGS = @VARNISHAPI_CFLAGS@ VARNISHAPI_LIBS = @VARNISHAPI_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ check_varnish_SOURCES = check_varnish.c check_varnish_CFLAGS = -include config.h ${VARNISHAPI_CFLAGS} check_varnish_LDADD = ${VARNISHAPI_LIBS} EXTRA_DIST = LICENSE autogen.sh all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj 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) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign 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) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) 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) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-libexecPROGRAMS: $(libexec_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \ } \ ; done uninstall-libexecPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files clean-libexecPROGRAMS: @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list check_varnish$(EXEEXT): $(check_varnish_OBJECTS) $(check_varnish_DEPENDENCIES) @rm -f check_varnish$(EXEEXT) $(check_varnish_LINK) $(check_varnish_OBJECTS) $(check_varnish_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_varnish-check_varnish.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< check_varnish-check_varnish.o: check_varnish.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_varnish_CFLAGS) $(CFLAGS) -MT check_varnish-check_varnish.o -MD -MP -MF $(DEPDIR)/check_varnish-check_varnish.Tpo -c -o check_varnish-check_varnish.o `test -f 'check_varnish.c' || echo '$(srcdir)/'`check_varnish.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/check_varnish-check_varnish.Tpo $(DEPDIR)/check_varnish-check_varnish.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check_varnish.c' object='check_varnish-check_varnish.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_varnish_CFLAGS) $(CFLAGS) -c -o check_varnish-check_varnish.o `test -f 'check_varnish.c' || echo '$(srcdir)/'`check_varnish.c check_varnish-check_varnish.obj: check_varnish.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_varnish_CFLAGS) $(CFLAGS) -MT check_varnish-check_varnish.obj -MD -MP -MF $(DEPDIR)/check_varnish-check_varnish.Tpo -c -o check_varnish-check_varnish.obj `if test -f 'check_varnish.c'; then $(CYGPATH_W) 'check_varnish.c'; else $(CYGPATH_W) '$(srcdir)/check_varnish.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/check_varnish-check_varnish.Tpo $(DEPDIR)/check_varnish-check_varnish.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check_varnish.c' object='check_varnish-check_varnish.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_varnish_CFLAGS) $(CFLAGS) -c -o check_varnish-check_varnish.obj `if test -f 'check_varnish.c'; then $(CYGPATH_W) 'check_varnish.c'; else $(CYGPATH_W) '$(srcdir)/check_varnish.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -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 $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | 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 tardir=$(distdir) && $(am__tar) | 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) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.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) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(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 ../.. && umask 077 && mkdir "$$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 \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { 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-am all-am: Makefile $(PROGRAMS) config.h installdirs: for dir in "$(DESTDIR)$(libexecdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libexecPROGRAMS clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libexecPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libexecPROGRAMS .MAKE: all install-am install-strip .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-generic clean-libexecPROGRAMS clean-libtool ctags dist \ dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-compile \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-libexecPROGRAMS \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-libexecPROGRAMS # 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: nagios-plugins-contrib-9.20140106/check_varnish/copyright0000644000000000000000000000237612262515026020156 0ustar Copyright (c) 2007-2009 Linpro AS All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. nagios-plugins-contrib-9.20140106/check_varnish/src0000777000000000000000000000000012262515026022072 2varnish-nagios-1.1ustar nagios-plugins-contrib-9.20140106/check_printer/0000755000000000000000000000000012262515026016224 5ustar nagios-plugins-contrib-9.20140106/check_printer/check_printer0000644000000000000000000001657012262515026021000 0ustar #!/usr/bin/perl # # Copyright (c) 2007,2011 Eric F Crist # # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # $Id$ # $HeadURL$ use strict; use warnings; my $OS = `uname`; if ($OS =~ m/^\wBSD/){ use lib "/usr/local/libexec/nagios"; } elsif ($OS =~ m/Linux/){ use lib "/usr/local/nagios/libexec"; } use utils qw(%ERRORS); use Data::Dumper; '$Revision$' =~ m/Revision: (\d+)/; my $revision = $1; '$HeadURL$' =~ m/HeadURL: ([\w\:\/\-\.\_]+) /; my $src_url = $1; my $usage = " Usage: $0 host_addr community warn% crit% This script connects via SNMP to a print and checks printer supply levels. This script outputs performance data for all supplies found for toner and drum. "; ## set to 1 if you want debug output for development my $debug = 0; if ($ARGV[4]){ $debug = 1; print "check_printer Revision $revision\n$src_url\n\n"; } die $usage unless ($#ARGV >= 3); my $base_oid = ".1.3.6.1.2.1.43.11.1.1"; my $type_oid = "3.1"; my $name_oid = "6.1"; my $uom_oid = "7.1"; my $max_oid = "8.1"; my $curr_oid = "9.1"; my $loop; my $host = $ARGV[0]; my $comm = $ARGV[1]; my @vars = ("snmpwalk -On -v 1 -c $comm $host $base_oid.$name_oid", "snmpwalk -On -v 1 -c $comm $host $base_oid.$uom_oid", "snmpwalk -On -v 1 -c $comm $host $base_oid.$max_oid", "snmpwalk -On -v 1 -c $comm $host $base_oid.$curr_oid"); my(@values, @names, @max, @min); our %uom = ( "4" => "µm", "7" => "impressions", "8" => "pages", "11" => "hrs", "12" => "oz/1000", "13" => "gr/10", "14" => "gr/100", "15" => "mL", "16" => "feet", "17" => "meters", "18" => "items", "19" => "%"); foreach(@vars){ @values = (@values, split /\n/, `$_`); if ($? != 0){ print "Printer Supplies UNKNOWN"; exit $ERRORS{'UNKNOWN'}; } } if ($debug){ print Dumper(\@values); } my %finvalues; foreach(@values){ # matching the following line # $1 $2 $3 # .1.3.6.1.2.1.43.11.1.1.6.1.1 = STRING: "Black Cartridge" $_ =~ m/^([\.\d]+) = ([\w-]+):[\s\"]+([\(\)\-\d\w\s,\/:]+)\"*$/; my $loid = $1; my $ltype = $2; my $string = $3; if ($ltype =~ m/HEX/i){ # hex string, convert to ascii $string = join "", map {chr hex $_ } split m/ /, $string; } $finvalues{"$loid"} = $string; } my %status; # get OID field numbers for matching later while (my ($key, $value) = each(%finvalues)){ ## sort this array into an associative in the following format: # $status['name'] : Supply Name # $status['curr'] : Supply Status # $status['max'] : Supply Level When New my $search = quotemeta("$base_oid.$name_oid"); if ($key =~ /^$search\.([\d\.]+)$/){ ## we'll assume a name $status{$value}{"sub"} = $1; } else { } } # get maximum values, matching on OID field number while (my ($key, $value) = each(%finvalues)){ my $search = quotemeta("$base_oid.$max_oid"); if ($key =~ /^$search\.([\d\.]+)$/){ ## assign it to the other variable ## search the existing keys, find the one we want foreach my $subvalue (values %status){ if ($subvalue->{"sub"} eq $1){ $subvalue->{"max"} = $value; } } } } # get current value, matching on OID field number while (my ($key, $value) = each(%finvalues)){ my $search = quotemeta("$base_oid.$curr_oid"); if ($key =~ /^$search\.([\d\.]+)$/){ ## assign it to the other variable ## search the existing keys, find the one we want foreach my $subvalue (values %status){ if ($subvalue->{"sub"} eq $1){ $subvalue->{"curr"} = $value; } } } } # get uom, add it to data while (my ($key, $value) = each(%finvalues)){ my $search = quotemeta("$base_oid.$uom_oid"); if ($key =~ /^$search\.([\d\.]+)$/){ ## assign it to the other variable ## search the existing keys, find the one we want foreach my $subvalue (values %status){ if ($subvalue->{"sub"} eq $1){ $subvalue->{"uom"} = $uom{$value}; } } } } ## Assemble performance data and error string. my $perf_str = ""; my $is_warn = 0; my $is_crit = 0; my $err_str = ""; while (my($key, $value) = each(%status)){ my ($maximum, $current); my $critical = $ARGV[3]; my $warning = $ARGV[2]; if ($value->{"curr"} == -3){ ## we can process as yes/no $current = 100; ## Override the critical/warning, since they're moot $critical = 0; $warning = 0; } elsif (($value->{"max"} == -2) and ($value->{"uom"} ne '%')){ ## we don't know (-2 == unknown) the max and can't compute next; } else { $maximum = $value->{"max"}; } if ($value->{"curr"} == -3){ ## -3 means printer knows supply exists, but not how much $current = 100; } elsif ($value->{"curr"} < 0){ ## weird value, set to 0 for math reasons $current = 0; } else { $current = round(($value->{"curr"} / $maximum) * 100); } my $lcurrent; if (($key =~ m/waste/i) or ($key =~ m/Toneruppsamlare/i) or ($key =~ m/Restonner/i)){ # invert the $current as waste is calculated in reverse if ($value->{"curr"} == -3){ $lcurrent = 0; } else { $lcurrent = $maximum - $current; } } else { $lcurrent = $current; } if ($lcurrent < $critical){ $is_crit = $is_crit + 1; if ($err_str eq ""){ $err_str = "$key"; } else { $err_str = "$err_str, $key"; } } elsif ($lcurrent < $warning){ $is_warn = $is_warn + 1; if ($err_str eq ""){ $err_str = "$key"; } else { $err_str = "$err_str, $key"; } } if ($debug){ print "Key: $key\nCur: $current\nWarn: $warning\nCrit: $critical\n"; } $perf_str = "$perf_str '$key'=$current%;$warning;$critical;0;100 "; } if ($debug){ print Dumper(\%status); print "\n\n############ ATTENTION ############\n"; print "You have debug enabled. If asked to enable debug by the developer,\n"; print "please send all of the output, including your command line to\n"; print "ecrist\@secure-computing.net with the subject line 'check_printer DEBUG' along\n"; print "with a description of the problem you're experiencing.\n###################################\n"; } if ($is_crit){ print "$err_str CRITICAL. See http://$ARGV[0] | $perf_str"; exit $ERRORS{'CRITICAL'}; } elsif ($is_warn){ print "$err_str WARNING. See http://$ARGV[0] | $perf_str"; exit $ERRORS{'WARNING'}; } else { print "Printer Supplies OK | $perf_str"; exit $ERRORS{'OK'}; } ### ### subroutines here ### sub round { my($number) = shift; return int($number + .5 * ($number <=> 0)); } nagios-plugins-contrib-9.20140106/check_printer/control0000644000000000000000000000057612262515026017637 0ustar Homepage: https://www.secure-computing.net/svn/trunk/nagios/ Watch: https://www.secure-computing.net/svn/trunk/nagios/check_printer SHA1:bdb9254c6bb01d147602eeedc9ed19d0ebe1cef4 Uploaders: Bernd Zeimetz Description: plugin to check printer supply levels using SNMP It outputs performance data for all supplies found, for example toner and drum. Recommends: snmp nagios-plugins-contrib-9.20140106/check_printer/copyright0000644000000000000000000000241712262515026020163 0ustar Copyright (c) 2007,2011 Eric F Crist All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. nagios-plugins-contrib-9.20140106/check_printer/printer.cfg0000644000000000000000000000025212262515026020367 0ustar define command{ command_name check_printer command_line /usr/lib/nagios/plugins/check_printer '$HOSTADDRESS$' '$ARG1$' '$ARG2$' '$ARG3$' } nagios-plugins-contrib-9.20140106/check_printer/Makefile0000644000000000000000000000002512262515026017661 0ustar include ../common.mk nagios-plugins-contrib-9.20140106/check_ipmi_sensor/0000755000000000000000000000000012262515026017070 5ustar nagios-plugins-contrib-9.20140106/check_ipmi_sensor/ipmi_sensor.cfg0000644000000000000000000000113512262515026022100 0ustar # See http://www.thomas-krenn.com/de/wiki/IPMI_Sensor_Monitoring_Plugin # for details (German only) # Ensure to configure # _ipmi_ip # as Custom Object Variable in your Host definition. # 'check_ipmi_sensor' command definition define command{ command_name check_ipmi_sensor command_line /usr/lib/nagios/plugins/check_ipmi_sensor -H $_HOSTIPMI_IP$ -f $ARG1$ } # 'check_ipmi_sensor_exclude' command definition define command{ command_name check_ipmi_sensor_exclude command_line /usr/lib/nagios/plugins/check_ipmi_sensor -H $_HOSTIPMI_IP$ -f $ARG1$ -x $ARG2$ } nagios-plugins-contrib-9.20140106/check_ipmi_sensor/check_ipmi_sensor0000755000000000000000000004236612262515026022515 0ustar #!/usr/bin/perl # check_ipmi_sensor: Nagios/Icinga plugin to check IPMI sensors # # Copyright (C) 2009-2012 Thomas-Krenn.AG, # additional contributors see changelog.txt # # 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 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program; if not, see . # ################################################################################ # The following guides provide helpful information if you want to extend this # script: # http://tldp.org/LDP/abs/html/ (Advanced Bash-Scripting Guide) # http://www.gnu.org/software/gawk/manual/ (Gawk: Effective AWK Programming) # http://de.wikibooks.org/wiki/Awk (awk Wikibook, in German) # http://nagios.sourceforge.net/docs/3_0/customobjectvars.html (hints on # custom object variables) # http://nagiosplug.sourceforge.net/developer-guidelines.html (plug-in # development guidelines) # http://nagios.sourceforge.net/docs/3_0/pluginapi.html (plugin API) ################################################################################ use strict; use warnings; use Getopt::Long qw(:config no_ignore_case); use IPC::Run qw( run ); #interact with processes ################################################################################ # set text variables our $check_ipmi_sensor_version = "3.1 2012-05-24"; sub get_version { return < [-f | -U -P -L ] [-O ] [-b] [-T ] [-x ] [-v|-vv|-vvv] [-o zenoss] [-h] [-V] EOT } sub get_help { return < hostname or IP of the IPMI interface. For \"-H localhost\" the Nagios/Icinga user must be allowed to execute ipmimonitoring with root privileges via sudo (ipmimonitoring must be able to access the IPMI devices via the IPMI system interface). [-f ] path to the FreeIPMI configuration file. Only neccessary for communication via network. Not neccessary for access via IPMI system interface (\"-H localhost\"). It should contain IPMI username, IPMI password, and IPMI privilege-level, for example: username monitoring password yourpassword privilege-level user As alternative you can use -U/-P/-L instead (see below). [-U -P -L ] IPMI username, IPMI password and IPMI privilege level, provided as parameters and not by a FreeIPMI configuration file. Useful for RHEL/ Centos 5.* with FreeIPMI 0.5.1 (this elder FreeIPMI version does not support config files). Warning: with this method the password is visible in the process list. So whenever possible use a FreeIPMI confiugration file instead. [-O ] additional options for FreeIPMI. Useful for RHEL/CentOS 5.* with FreeIPMI 0.5.1 (this elder FreeIPMI version does not support config files). [-b] backward compatibility mode for FreeIPMI 0.5.* (this omits the FreeIPMI caching options --quiet-cache and --sdr-cache-recreate) [-T ] limit sensors to query based on IPMI sensor type. Examples for IPMI sensor type are 'Fan', 'Temperature', 'Voltage', ... See chapter '42.2 Sensor Type Codes and Data' of the IPMI 2.0 spec for a full list of possible sensor types. The available types depend on your particular server and the available sensors there. [-x ] exclude sensor matching . Useful for cases when unused sensors cannot be deleted from SDR and are reported in a non-OK state. Option can be specified multiple times. The is a numeric value (sensor names are not used as some servers have multiple sensors with the same name). Use -v 3 option to query the . [-v|-vv|-vvv] be verbose (no -v) .. single line output -v ..... single line output with additional details for warnings -vv ..... multi line output, also with additional details for warnings -vvv ..... debugging output, followed by normal multi line output [-o] change output format. Useful for using the plugin with other monitoring software than Nagios or Icinga. -o zenoss .. create ZENOSS compatible formatted output (output with underscores instead of whitespaces and no single quotes) [-h] show this help [-V] show version information Further information about this plugin can be found at http://www.thomas-krenn.com/en/oss/ipmi-plugin.html Send email to the IPMI-plugin-user mailing list if you have questions regarding use of this software, to submit patches, or suggest improvements. The mailing list is available at http://lists.thomas-krenn.com/ EOT } sub usage { my ($arg) = @_; #the list of inputs my ($exitcode); if ( defined $arg ){ if ( $arg =~ m/^\d+$/ ){ $exitcode = $arg; } else{ print STDOUT $arg, "\n"; $exitcode = 1; } } print STDOUT get_usage(); exit($exitcode) if defined $exitcode; } ################################################################################ # set ipmimonitoring path our $MISSING_COMMAND_TEXT = ''; our $IPMICOMMAND =""; if(-x "/usr/sbin/ipmimonitoring"){ $IPMICOMMAND = "/usr/sbin/ipmimonitoring"; } elsif (-x "/usr/bin/ipmimonitoring"){ $IPMICOMMAND = "/usr/bin/ipmimonitoring"; } elsif (-x "/usr/local/sbin/ipmimonitoring"){ $IPMICOMMAND = "/usr/local/sbin/ipmimonitoring"; } elsif (-x "/usr/local/bin/ipmimonitoring"){ $IPMICOMMAND = "/usr/local/bin/ipmimonitoring"; } else{ $MISSING_COMMAND_TEXT = " ipmimonitoring command not found"; } # Identify the version of the ipmi-tool sub get_ipmi_version{ my @ipmi_version_output = ''; my $ipmi_version = ''; @ipmi_version_output = `$IPMICOMMAND -V`; $ipmi_version = shift(@ipmi_version_output); $ipmi_version =~ /(\d+)\.(\d+)\.(\d+)/; @ipmi_version_output = (); push @ipmi_version_output,$1,$2,$3; return @ipmi_version_output; } sub simulate{ my $output = ''; my $simul_file = $_[0]; if( !defined $simul_file || (-x '\"'.$simul_file.'\"')){ print "DEBUG: Using simulation file: $simul_file\n"; print "Error: Simulation file with ipmi output not found.\n"; exit(3); } return ($output = `cat $simul_file`); } #define entire hashes our %hdrmap = ( 'Record_ID' => 'id', # FreeIPMI ...,0.7.x 'Record ID' => 'id', # FreeIPMI 0.8.x,... with --legacy-output 'ID' => 'id', # FreeIPMI 0.8.x 'Sensor Name' => 'name', 'Name' => 'name', # FreeIPMI 0.8.x 'Sensor Group' => 'type', 'Type' => 'type', # FreeIPMI 0.8.x 'Monitoring Status' => 'state', 'State' => 'state', # FreeIPMI 0.8.x 'Sensor Units' => 'units', 'Units' => 'units', # FreeIPMI 0.8.x 'Sensor Reading' => 'reading', 'Reading' => 'reading', # FreeIPMI 0.8.x 'Event' => 'event', # FreeIPMI 0.8.x ); our $verbosity = 0; MAIN: { $| = 1; #force a flush after every write or print my @ARGV_SAVE = @ARGV;#keep args for verbose output my ($show_help, $show_version); my ($ipmi_host, $ipmi_user, $ipmi_password, $ipmi_privilege_level, $ipmi_config_file, $ipmi_outformat); my (@freeipmi_options, $freeipmi_compat); my (@ipmi_sensor_types, @ipmi_xlist); my (@ipmi_version); my $ipmi_sensors = 0;#states to use ipmi-sensors instead of ipmimonitoring my $abort_text = ''; my $zenoss = 0; my $simulate = ''; #read in command line arguments and init hash variables with the given values from argv if ( !( GetOptions( 'H|host=s' => \$ipmi_host,#the pipe states an list of possible option names 'f|config-file=s' => \$ipmi_config_file,#the backslash inits the variable with the given argument 'U|user=s' => \$ipmi_user, 'P|password=s' => \$ipmi_password, 'L|privilege-level=s' => \$ipmi_privilege_level, 'O|options=s' => \@freeipmi_options, 'b|compat' => \$freeipmi_compat, 'T|sensor-types=s' => \@ipmi_sensor_types, 'v|verbosity' => \$verbosity, 'vv' => sub{$verbosity=2}, 'vvv' => sub{$verbosity=3}, 'x|exclude=s' => \@ipmi_xlist, 'o|outformat=s' => \$ipmi_outformat, 's=s' =>\$simulate, 'h|help' => sub{print STDOUT get_version(); print STDOUT "\n"; print STDOUT get_usage(); print STDOUT "\n"; print STDOUT get_help(); exit(0) }, 'V|version' => sub{ print STDOUT get_version(); exit(0); }, 'usage|?' => sub{print STDOUT get_usage(); exit(3); } ) ) ){ usage(1);#call usage if GetOptions failed } usage(1) if @ARGV;#print usage if unknown arg list is left ################################################################################ # check for ipmimonitoring or ipmi-sensors. Since version > 0.8 ipmi-sensors is used # if '--legacy-output' is given ipmi-sensors cannot be used if( $MISSING_COMMAND_TEXT ne "" ){ print STDOUT "Error:$MISSING_COMMAND_TEXT"; exit(3); } else{ @ipmi_version = get_ipmi_version(); if( $ipmi_version[0] > 0 && (grep(/legacy\-output/,@freeipmi_options)) == 0){ $IPMICOMMAND =~ s/ipmimonitoring/ipmi-sensors/; $ipmi_sensors = 1; } if( $ipmi_version[0] > 0 && (grep(/legacy\-output/,@freeipmi_options)) == 1){ print "Error: Cannot use ipmi-sensors with option \'--legacy-output\'. Remove it to work correctly.\n"; exit(3); } } ############################################################################### # verify if all mandatory parameters are set and initialize various variables #\s defines any whitespace characters #first join the list, then split it at whitespace ' ' #also cf. http://perldoc.perl.org/Getopt/Long.html#Options-with-multiple-values @freeipmi_options = split(/\s+/, join(' ', @freeipmi_options)); # a bit hack, shell word splitting should be implemented... @ipmi_sensor_types = split(/,/, join(',', @ipmi_sensor_types)); @ipmi_xlist = split(/,/, join(',', @ipmi_xlist)); #check for zenoss output if(defined $ipmi_outformat && $ipmi_outformat eq "zenoss"){ $zenoss = 1; } my @basecmd; #variable for command to call ipmi if( !(defined $ipmi_host) ){ $abort_text= $abort_text . " -H " } else{ if( $ipmi_host eq 'localhost' ){ @basecmd = ('sudo', $IPMICOMMAND); } else{ if(defined $ipmi_config_file){ @basecmd = ($IPMICOMMAND, '-h', $ipmi_host, '--config-file', $ipmi_config_file); } elsif ( defined $ipmi_user && defined $ipmi_password && defined $ipmi_privilege_level ){ @basecmd = ($IPMICOMMAND, '-h', $ipmi_host, '-u', $ipmi_user, '-p', $ipmi_password, '-l', $ipmi_privilege_level) } else{ $abort_text = $abort_text . " -f or -U -P -L "; } } } if( $abort_text ne ""){ print STDOUT "Error: " . $abort_text . " missing."; print STDOUT get_usage(); exit(3); } # , is the seperator in the new string if(@ipmi_sensor_types){ push @basecmd, '-g', join(',', @ipmi_sensor_types); } if(@freeipmi_options){ push @basecmd, @freeipmi_options; } #keep original basecmd for later usage my @getstatus = @basecmd; #if -b is not defined, caching options are used if( !(defined $freeipmi_compat) ){ push @getstatus, '--quiet-cache', '--sdr-cache-recreate'; } #since version 0.8 it is possible to interpret OEM data if( ($ipmi_version[0] == 0 && $ipmi_version[1] > 7) || $ipmi_version[0] > 0){ push @getstatus, '--interpret-oem-data'; } #since version 0.8 it is necessary to add the legacy option if( ($ipmi_version[0] == 0 && $ipmi_version[1] > 7) && (grep(/legacy\-output/,@freeipmi_options) == 0)){ push @getstatus, '--legacy-output'; } #if ipmi-sensors is used show the state of sensors an ignore N/A if($ipmi_sensors){ push @getstatus, '--output-sensor-state', '--ignore-not-available-sensors'; } ################################################################################ #execute status command and redirect stdout and stderr to ipmioutput my $ipmioutput; my $returncode; if(!$simulate){ run \@getstatus, '>&', \$ipmioutput; #the upper eight bits contain the error condition (exit code) #see http://perldoc.perl.org/perlvar.html#Error-Variables $returncode = $? >> 8; } else{ $ipmioutput = simulate($simulate); print "DEBUG: Using simulation mode\n"; $returncode = 0; } ################################################################################ # print debug output when verbosity is set to 3 (-vvv) if ( $verbosity == 3 ){ my $ipmicommandversion; run [$IPMICOMMAND, '-V'], '2>&1', '|', ['head', '-n', 1], '&>', \$ipmicommandversion; #remove trailing newline with chomp chomp $ipmicommandversion; print "------------- begin of debug output (-vvv is set): ------------\n"; print " script was executed with the following parameters:\n"; print " $0 ", join(' ', @ARGV_SAVE), "\n"; print " check_ipmi_sensor version:\n"; print " $check_ipmi_sensor_version\n"; print " FreeIPMI version:\n"; print " $ipmicommandversion\n"; print " FreeIPMI was executed with the following parameters:\n"; print " ", join(' ', @getstatus), "\n"; print " FreeIPMI return code: $returncode\n"; print " output of FreeIPMI:\n"; print "$ipmioutput\n"; print "--------------------- end of debug output ---------------------\n"; } ################################################################################ # generate main output if ( $returncode != 0 ){ print "$ipmioutput\n"; print "-> Execution of ipmimonitoring failed with return code $returncode.\n"; print "-> ipmimonitoring was executed with the following parameters:\n"; print " ", join(' ', @getstatus), "\n"; exit(3); } else{ #print desired filter types if ( @ipmi_sensor_types ){ print "Sensor Type(s) ", join(', ', @ipmi_sensor_types), " Status: "; } else{ print "IPMI Status: "; } #split at newlines, fetch array with lines of output my @ipmioutput = split('\n', $ipmioutput); #remove leading and trailing whitespace characters, split at the pipe delimiter @ipmioutput = map { [ map { s/^\s*//; s/\s*$//; $_; } split(m/\|/, $_) ] } @ipmioutput; #shift out the header as it is the first line my $header = shift @ipmioutput; my %header; for(my $i = 0; $i < @$header; $i++) { #assigning %header with (key from hdrmap) => $i #checking at which position in the header is which key $header{$hdrmap{$header->[$i]}} = $i; } my @ipmioutput2; foreach my $row ( @ipmioutput ){ my %row; #fetch keys from header and assign existent values to row #this maps the values from row(ipmioutput) to the header values while ( my ($key, $index) = each %header ){ $row{$key} = $row->[$index]; } push @ipmioutput2, \%row; } #create hash with sensor name an 1 my %ipmi_xlist = map { ($_, 1) } @ipmi_xlist; #filter out the desired sensor values @ipmioutput2 = grep(!exists $ipmi_xlist{$_->{'id'}}, @ipmioutput2); my $exit = 0; my $w_sensors = '';#sensors with warnings my $perf = '';#performance sensor foreach my $row ( @ipmioutput2 ){ if( $zenoss ){ $row->{'name'} =~ s/ /_/g; } #check for warning sensors if ( $row->{'state'} ne 'Nominal' && $row->{'state'} ne 'N/A' ){ $exit = 1 if $exit < 1; $exit = 2 if $exit < 2 && $row->{'state'} ne 'Warning'; #don't insert a , the first time $w_sensors .= ", " unless $w_sensors eq ''; $w_sensors .= "$row->{'name'} = $row->{'state'}"; if( $verbosity ){ if( $row->{'reading'} ne 'N/A'){ $w_sensors .= " ($row->{'reading'})" ; } else{ $w_sensors .= " ($row->{'event'})"; } } } if ( $row->{'units'} ne 'N/A' ){ my $val = $row->{'reading'}; if($zenoss){ $perf .= qq|$row->{'name'}=$val |; } else{ $perf .= qq|'$row->{'name'}'=$val |; } } } $perf = substr($perf, 0, -1);#cut off the last chars if ( $exit == 0 ){ print "OK"; } elsif ( $exit == 1 ){ print "Warning [$w_sensors]"; } else{ print "Critical [$w_sensors]"; } print " | ", $perf if $perf ne ''; print "\n"; if ( $verbosity > 1 ){ foreach my $row (@ipmioutput2){ if( $row->{'state'} eq 'N/A'){ next; } elsif( $row->{'reading'} ne 'N/A'){ print "$row->{'name'} = $row->{'reading'} "; } elsif( $row->{'event'} ne 'N/A'){ print "$row->{'name'} = $row->{'event'} "; } else{ next; } print "(Status: $row->{'state'})\n"; } } exit $exit; } }; # vim:ai:sw=4:sts=4: nagios-plugins-contrib-9.20140106/check_ipmi_sensor/contrib/0000755000000000000000000000000012262515026020530 5ustar nagios-plugins-contrib-9.20140106/check_ipmi_sensor/contrib/default-combinedgraph.template0000644000000000000000000000260212262515026026511 0ustar This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Probably requires: pnp4nagios 0.4.14+ */ # Template to combine all data sets of an RRD into one single graph # useful for e.g. hardware sensors with many values $opt[1] = "-T 55 -l 0 --vertical-label \"Combined Graph\" --title \"Combined Graph " . $this->MACRO['DISP_HOSTNAME'] . ' / ' . $this->MACRO['DISP_SERVICEDESC'] . "\" "; $def[1] = ""; foreach ($this->DS as $KEY=>$VAL) { $def[1] .= rrd::def ("var$KEY", $VAL['RRDFILE'], $VAL['DS'], "AVERAGE"); $def[1] .= rrd::line2 ("var$KEY", rrd::color($KEY, 80) , rrd::cut($VAL['NAME'],16) ); $def[1] .= rrd::gprint ("var$KEY", array("LAST","MIN","MAX","AVERAGE"), "%3.4lf %S".$VAL['UNIT']); } $def[1] .= rrd::comment("Default Combined Graph Template\\r"); $def[1] .= rrd::comment("Command " . $VAL['TEMPLATE'] . "\\r"); ?> nagios-plugins-contrib-9.20140106/check_ipmi_sensor/gpl.txt0000644000000000000000000010451312262515026020417 0ustar GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. 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 them 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 prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. 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. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey 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; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If 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 convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU 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 that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. 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. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 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. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. 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 state 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) 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program 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, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU 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 Lesser General Public License instead of this License. But first, please read . nagios-plugins-contrib-9.20140106/check_ipmi_sensor/control0000644000000000000000000000064312262515026020476 0ustar Recommends: freeipmi-tools, libipc-run-perl Version: 3.1 Uploaders: Bernd Zeimetz Homepage: http://www.thomas-krenn.com/en/oss/ipmi-plugin.html Description: IPMI Sensor Monitoring Plugin Plugin to monitor the hardware status (fan speed, temperaturs, voltages, power usage, ...) of a server using IPMI. Watch: http://www.thomas-krenn.com/en/oss/ipmi-plugin.html check_ipmi_sensor_v([0-9.]+)\.tar\.gz nagios-plugins-contrib-9.20140106/check_ipmi_sensor/README0000644000000000000000000000212512262515026017750 0ustar check_ipmi_sensor ================= check_ipmi_sensor: Nagios/Icinga plugin to check IPMI sensors Copyright (C) 2009-2012 Thomas-Krenn.AG, additional contributors see changelog.txt 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, see . Requirements: ------------- o Nagios or Icinga o FreeIPMI version 0.5.1 or newer o Perl o Perl IPC::Run Installation hints: ------------------- On Debian/Ubuntu use 'apt-get install libipc-run-perl' to install IPC::Run. nagios-plugins-contrib-9.20140106/check_ipmi_sensor/copyright0000644000000000000000000000256012262515026021026 0ustar Copyright (C) 2009-2011 Thomas-Krenn.AG (written by Werner Fischer), additional contributors see changelog.txt 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, see . License and copyright for contrib/default-combinedgraph.template: Author: Andy Spiegl This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . nagios-plugins-contrib-9.20140106/check_ipmi_sensor/changelog.txt0000644000000000000000000000424212262515026021562 0ustar ################################################################################ Changelog for check_ipmi_sensor, a Nagios/Icinga plugin to check IPMI sensors ################################################################################ Version 3.1 20120524 Version 3.1-dev (20120312-20120508) * Documentation cleanups. * Added PNP4Nagios default-combinedgraph.template in contrib/ directory. (was missing for 3.* version) * Updated help text (-v|-vv|-vvv verbose outputs). * Renamed check_ipmi_sensor.pl to check_ipmi_sensor. * Added output of check_ipmi_sensor version. * Added newlines to debug output master. Version 3.1rc1 20120222 * Reformatted code to be as close as possible to check_ipmi_sensor v2 (bash). * Fetched Version 3.0 from https://github.com/zito/check_ipmi_sensor.git * Moved development to git.thomas-krenn.com * Added various default options. Version 3.0 20110501 * The code rewritten using the Perl. * Added long variant options. * Removed trailing zeros after the decimal point in perfdata. * Output format of the ipmimonitoring version 0.8.x and up supported. Version 2.2 20110127 * Added -b option to enable backward compatibility with FreeIPMI 0.5.*. reported by: Tobias Gablunsky, CBXNET combox internet GmbH * Added ipmimonitoring version information in verbose output (-v 3). * Further improved readability of the help text (-x Option). List of contributors to version 3.* branch: Werner Fischer, Thomas-Krenn.AG Georg Schönberger, Thomas-Krenn.AG Václav Ovsík (ported version 2 to Perl) List of contributors to version 2.* branch: Werner Fischer, Thomas-Krenn.AG (author) Tobias Gablunsky, CBXNET combox internet GmbH Sebastian Mörchen, DFS Deutsche Flugsicherung GmbH Gustav Olsson, Telavox AB List of contributors to version 1.* branch: Nikolaus Filus (to version 1.3rc1) Werner Fischer, Thomas-Krenn.AG (author) Lars Meuser, LMA Deutschland GmbH (to version 1.2.1) Holger Paschke, comspace GmbH & Co. KG (to version 1.2) Ulrich Zehl, lagis Internet Serviceprovider GmbH (to version 1.1) ################################################################################ nagios-plugins-contrib-9.20140106/check_ipmi_sensor/Makefile0000644000000000000000000000013412262515026020526 0ustar #/usr/bin/make -f DOCFILES = contrib/default-combinedgraph.template include ../common.mk nagios-plugins-contrib-9.20140106/check_hpasm/0000755000000000000000000000000012262515026015651 5ustar nagios-plugins-contrib-9.20140106/check_hpasm/control0000644000000000000000000000117312262515026017256 0ustar Homepage: http://labs.consol.de/lang/en/nagios/check_hpasm/ Watch: http://labs.consol.de/lang/en/nagios/check_hpasm/ check_hpasm-([0-9.]+)\.tar\.gz Uploaders: Bernd Zeimetz Description: plugin to check the hardware health of HP Proliant Servers It either uses snmp or - if installed - the hpasm package locally. The plugin checks the health of * Processors * Power supplies * Memory modules * Fans * CPU- and board-temperatures * Raids and alerts you if one of these components is faulty or operates outside its normal parameters. Build-Depends: autotools-dev Recommends: snmp Version: 4.6.3.2 nagios-plugins-contrib-9.20140106/check_hpasm/copyright0000644000000000000000000000133612262515026017607 0ustar AUTHOR: Gerhard Lausser 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. nagios-plugins-contrib-9.20140106/check_hpasm/src0000777000000000000000000000000012262515026021356 2check_hpasm-4.6.3.2ustar nagios-plugins-contrib-9.20140106/check_hpasm/Makefile0000644000000000000000000000117512262515026017315 0ustar PLUGIN := check_hpasm CLEANFILES := check_hpasm include ../common.mk check_hpasm: set -e; for i in guess sub; do if [ ! -e src/config.$$i.bak ]; then cp src/config.$$i src/config.$$i.bak; fi; done cp /usr/share/misc/config.* src cd src && ./configure --prefix=/usr --enable-perfdata --enable-extendedinfo --with-nagios-user=nagios --with-nagios-group=nagios --with-degrees=celsius make -C src sed '2s,^,# nagios: -epn\n,' src/plugins-scripts/check_hpasm > $@ clean:: [ ! -f src/Makefile ] || make -C src distclean set -e; for i in guess sub; do if [ -e src/config.$$i.bak ]; then mv src/config.$$i.bak src/config.$$i; fi; done nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/0000755000000000000000000000000012262515026020724 5ustar nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/install-sh0000755000000000000000000002017412262515026022734 0ustar #!/bin/sh # install - install a program, script, or datafile scriptversion=2003-09-24.23 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # 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 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename= transform_arg= instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= usage="Usage: $0 [OPTION]... SRCFILE DSTFILE or: $0 -d DIR1 DIR2... In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. In the second, create the directory path DIR. Options: -b=TRANSFORMBASENAME -c copy source (using $cpprog) instead of moving (using $mvprog). -d create directories instead of installing files. -g GROUP $chgrp installed files to GROUP. -m MODE $chmod installed files to MODE. -o USER $chown installed files to USER. -s strip installed files (using $stripprog). -t=TRANSFORM --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; -c) instcmd=$cpprog shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit 0;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; --version) echo "$0 $scriptversion"; exit 0;; *) if test -z "$src"; then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if test -z "$src"; then echo "$0: no input file specified." >&2 exit 1 fi # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then instcmd=: chmodcmd= else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst"; then echo "$0: no destination specified." >&2 exit 1 fi # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift test -d "$pathcomp" || $mkdirprog "$pathcomp" pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $instcmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else # If we're going to rename the final executable, determine the name now. if test -z "$transformarg"; then dstfile=`basename "$dst"` else dstfile=`basename "$dst" $transformbasename \ | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename. test -z "$dstfile" && dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 # Move or copy the file name to the temp name $doit $instcmd "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now remove or move aside any old file at destination location. We # try this two ways since rm can't unlink itself on some systems and # the destination file might be busy for other reasons. In this case, # the final cleanup might fail but the new file should still install # successfully. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" fi && # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/config.guess0000755000000000000000000012366112262515026023255 0ustar #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-10-20' # 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., 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. # 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 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 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # 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 ;' # 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 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pegasos:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mipseb-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # 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 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/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha*:OpenVMS:*:*) echo alpha-hp-vms exit 0 ;; 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 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; *:OS400:*:*) echo powerpc-ibm-os400 exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; 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 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit 0 ;; DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; 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 0 ;; 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 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; 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 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # 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 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; 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 \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; 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 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????: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 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; 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 0 ;; *: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 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 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 0 ;; *: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 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 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 # avoid double evaluation of $set_cc_for_build test -n "$CC_FOR_BUILD" || eval $set_cc_for_build if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 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 && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; 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 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; 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 0 ;; 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 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) # Determine whether the default compiler uses glibc. eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #if __GLIBC__ >= 2 LIBC=gnu #else LIBC= #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` # GNU/KFreeBSD systems have a "k" prefix to indicate we are using # FreeBSD's kernel, but not the complete OS. case ${LIBC} in gnu) kernel_only='k' ;; esac echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit 0 ;; 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 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *: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 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; 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 0 ;; 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 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; 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 0 ;; 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 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; 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 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # 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 0 ;; 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 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; 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 0 ;; 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 0 ;; 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 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; 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 0 ;; i*86:*:5:[78]*) 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 0 ;; 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 0 ;; 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 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; 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 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 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) 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 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *: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 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; 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 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) case `uname -p` in *86) UNAME_PROCESSOR=i686 ;; powerpc) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *: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 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *: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 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; *:DRAGONFLY:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly${UNAME_RELEASE} exit 0 ;; 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"); 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 && $dummy && exit 0 # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # 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 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; 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: nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/INSTALL0000644000000000000000000002203012262515026021752 0ustar 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. nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/configure0000755000000000000000000027562612262515026022655 0ustar #! /bin/sh # From configure.in . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for check_hpasm 4.6.3.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='check_hpasm' PACKAGE_TARNAME='check_hpasm' PACKAGE_VERSION='4.6.3.2' PACKAGE_STRING='check_hpasm 4.6.3.2' PACKAGE_BUGREPORT='' ac_default_prefix=/usr/local/nagios ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os RELEASE INSTALL WARRANTY SUPPORT with_nagios_user with_nagios_group INSTALL_OPTS NOINSTLEVEL CELSIUS PERFDATA EXTENDEDINFO HWINFO HPACUCLI SH PERL LIBOBJS 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 # # 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 check_hpasm 4.6.3.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 check_hpasm 4.6.3.2:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-perfdata wether to output perfdata (default=no) --enable-extendedinfo wether to output extended info (default=no) --disable-hwinfo wether to output model desc., serial no., bios version (default=yes) --enable-hpacucli wether to check raid status with hpacucli (default=no) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-nagios-user=USER set user name to run nagios --with-nagios-group=GROUP set group name to run nagios --with-noinst-level=LEVEL error level if hpasm is not installed --with-degrees=UNIT which temperature unit to use. (celsius or fahrenheit) --with-perl=PATH sets path to perl executable _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 # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$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 check_hpasm configure 4.6.3.2 generated by GNU Autoconf 2.59 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 check_hpasm $as_me 4.6.3.2, which was generated by GNU Autoconf 2.59. 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.9" 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 -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -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 ./-p ./--version; 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)' else mkdir_p='$(install_sh) -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='check_hpasm' VERSION='4.6.3.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"} 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. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} echo "$as_me:$LINENO: checking how to create a pax tar archive" >&5 echo $ECHO_N "checking how to create a pax tar archive... $ECHO_C" >&6 # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' _am_tools=${am_cv_prog_tar_pax-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=posix -chf - "'"$$tardir"' am__tar_="$_am_tar --format=posix -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x pax -w "$$tardir"' am__tar_='pax -L -x pax -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H pax -L' am__tar_='find "$tardir" -print | cpio -o -H pax -L' am__untar='cpio -i -H pax -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_pax}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if test "${am_cv_prog_tar_pax+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_prog_tar_pax=$_am_tool fi echo "$as_me:$LINENO: result: $am_cv_prog_tar_pax" >&5 echo "${ECHO_T}$am_cv_prog_tar_pax" >&6 # 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' 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 WARRANTY="This plugin comes with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of the plugin 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 gerhard.lausser@consol.de if you have questions\nregarding use of this software.\nPlease include version information with all correspondence (when possible,\nuse output from the --version option of the plugin itself).\n" # 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-noinst_level or --without-noinst_level was given. if test "${with_noinst_level+set}" = set; then withval="$with_noinst_level" with_noinst_level=$withval else with_noinst_level=unknown fi; NOINSTLEVEL=$with_noinst_level # Check whether --with-degrees or --without-degrees was given. if test "${with_degrees+set}" = set; then withval="$with_degrees" with_degrees=$withval else with_degrees=unknown fi; case "$with_degrees" in fahrenheit) CELSIUS=0 ;; *) CELSIUS=1 ;; esac # Check whether --enable-perfdata or --disable-perfdata was given. if test "${enable_perfdata+set}" = set; then enableval="$enable_perfdata" else enable_perfdata=no fi; if test x"$enable_perfdata" = xyes ; then PERFDATA=1 else PERFDATA=0 fi # Check whether --enable-extendedinfo or --disable-extendedinfo was given. if test "${enable_extendedinfo+set}" = set; then enableval="$enable_extendedinfo" else enable_extendedinfo=no fi; if test x"$enable_extendedinfo" = xyes ; then EXTENDEDINFO=1 else EXTENDEDINFO=0 fi # Check whether --enable-hwinfo or --disable-hwinfo was given. if test "${enable_hwinfo+set}" = set; then enableval="$enable_hwinfo" else enable_hwinfo=yes fi; if test x"$enable_hwinfo" = xyes ; then HWINFO=1 else HWINFO=0 fi # Check whether --enable-hpacucli or --disable-hpacucli was given. if test "${enable_hpacucli+set}" = set; then enableval="$enable_hpacucli" else enable_hpacucli=no fi; if test x"$enable_hpacucli" = xyes ; then HPACUCLI=1 elif test x"$enable_hpacucli" = xmaybe ; then HPACUCLI=2 else HPACUCLI=0 fi case "$host_os" in *hp*) defaulttrustedpath=/bin:/sbin:/usr/bin:/usr/sbin:/usr/contrib/bin ;; *) defaulttrustedpath=/bin:/sbin:/usr/bin:/usr/sbin ;; esac EXTRAS= # 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 ac_config_files="$ac_config_files Makefile plugins-scripts/Makefile plugins-scripts/subst" 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 # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. cat >confdef2opt.sed <<\_ACEOF t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote d : quote s,[ `~#$^&*(){}\\|;'"<>?],\\&,g s,\[,\\&,g s,\],\\&,g s,\$,$$,g p _ACEOF # We use echo to avoid assuming a particular line-breaking character. # The extra dot is to prevent the shell from consuming trailing # line-breaks from the sub-command output. A line-break within # single-quotes doesn't work because, if this script is created in a # platform that uses two characters for line-breaks (e.g., DOS), tr # would break. ac_LF_and_DOT=`echo; echo .` DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` rm -f confdef2opt.sed 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 : ${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 check_hpasm $as_me 4.6.3.2, which was generated by GNU Autoconf 2.59. 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 Configuration files: $config_files Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ check_hpasm config.status 4.6.3.2 configured by $0, generated by GNU Autoconf 2.59, 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 for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "plugins-scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES plugins-scripts/Makefile" ;; "plugins-scripts/subst" ) CONFIG_FILES="$CONFIG_FILES plugins-scripts/subst" ;; *) { { 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 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,@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,@AMTAR@,$AMTAR,;t t s,@am__tar@,$am__tar,;t t s,@am__untar@,$am__untar,;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,@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,@NOINSTLEVEL@,$NOINSTLEVEL,;t t s,@CELSIUS@,$CELSIUS,;t t s,@PERFDATA@,$PERFDATA,;t t s,@EXTENDEDINFO@,$EXTENDEDINFO,;t t s,@HWINFO@,$HWINFO,;t t s,@HPACUCLI@,$HPACUCLI,;t t s,@SH@,$SH,;t t s,@PERL@,$PERL,;t t s,@LIBOBJS@,$LIBOBJS,;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 # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$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 { (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-nagios-user: $with_nagios_user" echo " --with-nagios-group: $with_nagios_group" echo " --with-noinst-level: $with_noinst_level" echo " --with-degrees: $with_degrees" echo " --enable-perfdata: $enable_perfdata" echo " --enable-extendedinfo: $enable_extendedinfo" echo " --enable-hwinfo: $enable_hwinfo" echo " --enable-hpacucli: $enable_hpacucli" nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/aclocal.m40000644000000000000000000005003512262515026022567 0ustar # generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is 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. # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # 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.9"]) # 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.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$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` ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # 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_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([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 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]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. 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)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [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])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [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 ]) # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -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 ./-p ./--version; 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)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _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])]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # 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)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # 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])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([acinclude.m4]) nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/Makefile.am0000644000000000000000000000015012262515026022754 0ustar ## Process this file with automake to produce Makefile.in SUBDIRS = plugins-scripts dist-hook: make nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/AUTHORS0000644000000000000000000000005412262515026021773 0ustar Gerhard Lausser nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/acinclude.m40000644000000000000000000000454712262515026023127 0ustar 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)"]) nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/README0000644000000000000000000003246512262515026021616 0ustar check_hpasm Nagios Plugin README --------------------- This plugin checks the hardware health of HP Proliant servers with the hpasm software installed. It uses the hpasmcli command to acquire the condition of the system's critical components like cpus, power supplies, temperatures, fans and memory modules. Newer versions also use SNMP. * For instructions on installing this plugin 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, read the Changelog file. * This plugins is self documenting. All plugins that comply with the basic guidelines for development will provide detailed help when invoked with the '-h' or '--help' options. You can check for the latest plugin at: http://www.consol.de/opensource/nagios/check-hpasm Send mail to gerhard.lausser@consol.de for assistance. Please include the OS type and version that you are using. Also, run the plugin with the '-v' option and provide the resulting version information. Of course, there may be additional diagnostic information required as well. Use good judgment. How to "compile" the check_hpasm script. -------------------------------------------------------- 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-perl=PATH_TO_PERL --with-noinst-level=LEVEL --with-degrees=UNIT --with-perfdata --with-hpacucli 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 PATH_TO_PERL with the path where a perl binary can be found. Besides the system wide perl you might have installed a private perl just for the nagios plugins (default is the perl in your path). e) Replace LEVEL with one of ok, warning, critical or unknown. If the required hpasm-rpm is not installed, the check_hpasm plugin will exit with the level specified. If you chose ok, the message will say "ok - .... hpasm is not installed". This is different from the "ok - hardware working fine" if hpasm was found. The default is to treat a missing hpasm package as ok. f) Replace UNIT with one of celsius or fahrenheit. The hpasmcli "show temp" prints temperatures both in units of celsius and fahrenheit. With the --with-degrees option you can decide which units will be shown in an alarm message. The default is "celsius". g) You can tell check_hpasm to output performance data by default if you call configure with the --enable-perfdata option. h) You can tell check_hpasm to check the raid status with the hpacucli command if you call configure with the --enable-hpacucli option. You need the hpacucli rpm. 2) "Compile" the plugin with the following command: make This will produce a "check_hpasm" script. You will also find a "check_hpasm.pl" which you better ignore. It is the base for the compilation filled with placeholders. These will be replaced during the make process. 3) Install the compiled plugin script with the following command: make install The installation procedure will attempt to place the plugin in a 'libexec/' subdirectory in the base directory you specified with the --prefix argument to the configure script. 4) Verify that your configuration files for Nagios contains the correct paths to the new plugin. 5) Add this line to /etc/sudoers: nagios ALL=NOPASSWD: /sbin/hpasmcli or ths, if you also installed the hpacu package nagios ALL=NOPASSWD: /sbin/hpasmcli, /usr/sbin/hpacucli Command line parameters ----------------------- -v, --verbose Increased verbosity will print how check_hpasm communicates with the hpasm daemon and which values were acquired. -t, --timeout The number of seconds after which the plugin will abort. -b, --blacklist If some components of your system are missing (mostly the secondary power supply bay is empty) and you tolerate this, then blacklist the missing/failed component to avoid false alarms. The value for this option is a slash-separated list of components to ignore. Example: -b p:1,2/f:2/t:3,4/c:1/d:0-1,0-2 means: ignore power supplies #1 and #2, fan #2, temperature #3 and #4, cpu #1 and dimms #1 and #2 in cartridge #0. -c, --customthresh Override the machine-default temperature thresholds. Example: -c 1:60/4:80/5:50 Sets limit for temperature 1 to 60 degrees, temperature 4 to 80 degrees and temperature 5 to 50 degrees. You get the consecutive numbers by calling check_hpasm -v ... checking temperatures 1 processor_zone temperature is 46 (62 max) 2 cpu#1 temperature is 43 (73 max) 3 i/o_zone temperature is 54 (68 max) 4 cpu#2 temperature is 46 (73 max) 5 power_supply_bay temperature is 38 (55 max) -p, --perfdata Add performance data to the output even if you did not compile check_hpasm with --with-perfdata in step 1. SNMP and Memory Modules ----------------------- Older hardware does not always show valuable information when queried for the health of memory modules. Maybe it's because older modules do not support error checking at all. 1. no cpqHeResMemModule --------------------------------------------------------------------------- 2. collapsed cpqHeResMemModule --------------------------------------------------------------------------- Some (older) systems do not support the cpqHeResMemModuleEntry table. Either there is no oid with 1.3.6.1.4.1.232.6.2.14.11.1 at all or there is a single oid like Example: iso.3.6.1.4.1.232.2.2.4.5.1.3.0.1 = INTEGER: 524288 iso.3.6.1.4.1.232.2.2.4.5.1.3.0.2 = INTEGER: 262144 iso.3.6.1.4.1.232.2.2.4.5.1.3.0.3 = INTEGER: 0 iso.3.6.1.4.1.232.2.2.4.5.1.3.0.4 = INTEGER: 524288 iso.3.6.1.4.1.232.2.2.4.5.1.3.0.5 = INTEGER: 262144 iso.3.6.1.4.1.232.2.2.4.5.1.3.0.6 = INTEGER: 0 ^-- module number ^-- cartridge number (0 = system board) ^-- size iso.3.6.1.4.1.232.6.2.14.11.1.1.0.6 = INTEGER: 0 I compared 300 systems and found out that with 1.3.6.1.4.1.232.6.2.14.11.1... = no1 is always 1 no2 is always 0 no3 is the number of memory slots (including the empty ones). no4 is always 0. It is probably the health status of the overall memory subsystem. I don't know. I will implement 0 = ok, not 0 = ask compaq cpqSiMemECCStatus provides no usable information. All my test systems showed 0 which is an undocumented value. function get_size(cpqHeResMemModuleEntry) will return 1. 3. cpqHeResMemModule containing crap --------------------------------------------------------------------------- grepping for cpqSiMemBoardSize shows 4 modules iso.3.6.1.4.1.232.2.2.4.5.1.3.0.1 = INTEGER: 262144 iso.3.6.1.4.1.232.2.2.4.5.1.3.0.2 = INTEGER: 262144 iso.3.6.1.4.1.232.2.2.4.5.1.3.0.3 = INTEGER: 0 iso.3.6.1.4.1.232.2.2.4.5.1.3.0.4 = INTEGER: 262144 iso.3.6.1.4.1.232.2.2.4.5.1.3.0.5 = INTEGER: 262144 iso.3.6.1.4.1.232.2.2.4.5.1.3.0.6 = INTEGER: 0 grepping for cpqHeResMemEntry shows one module with zero values iso.3.6.1.4.1.232.6.2.14.11.1.1.0.0 = INTEGER: 0 iso.3.6.1.4.1.232.6.2.14.11.1.2.0.0 = INTEGER: 0 iso.3.6.1.4.1.232.6.2.14.11.1.3.0.0 = "" iso.3.6.1.4.1.232.6.2.14.11.1.4.0.0 = INTEGER: 0 iso.3.6.1.4.1.232.6.2.14.11.1.5.0.0 = INTEGER: 0 iso.3.6.1.4.1.232.6.2.14.11.1.6.0.0 = Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4. cpqHeResMemModuleEntry and cpqSiMemModuleEntry use different table indexes --------------------------------------------------------------------------- cpqSiMemBoardIndex 1.3.6.1.4.1.232.2.2.4.5.1.1 cpqSiMemModuleIndex 1.3.6.1.4.1.232.2.2.4.5.1.2 cpqHeResMemBoardIndex 1.3.6.1.4.1.232.6.2.14.11.1.1 cpqHeResMemModuleIndex 1.3.6.1.4.1.232.6.2.14.11.1.2 cpqSiMemBoardIndex SNMPv2-SMI::enterprises.232.2.2.4.5.1.1.0.1 = INTEGER: 0 SNMPv2-SMI::enterprises.232.2.2.4.5.1.1.0.2 = INTEGER: 0 SNMPv2-SMI::enterprises.232.2.2.4.5.1.1.0.3 = INTEGER: 0 SNMPv2-SMI::enterprises.232.2.2.4.5.1.1.0.4 = INTEGER: 0 SNMPv2-SMI::enterprises.232.2.2.4.5.1.1.0.5 = INTEGER: 0 SNMPv2-SMI::enterprises.232.2.2.4.5.1.1.0.6 = INTEGER: 0 cpqHeResMemBoardIndex SNMPv2-SMI::enterprises.232.6.2.14.11.1.1.1.1 = INTEGER: 0 SNMPv2-SMI::enterprises.232.6.2.14.11.1.1.1.2 = INTEGER: 0 SNMPv2-SMI::enterprises.232.6.2.14.11.1.1.1.3 = INTEGER: 0 SNMPv2-SMI::enterprises.232.6.2.14.11.1.1.1.4 = INTEGER: 0 SNMPv2-SMI::enterprises.232.6.2.14.11.1.1.1.5 = INTEGER: 0 SNMPv2-SMI::enterprises.232.6.2.14.11.1.1.1.6 = INTEGER: 0 It is not possible to use the SNMP-table-indices to identify the corresponding he-entry. Matching is done with nested loops. 5. even worse: cpqHeResMemBoardIndex and cpqSiMemBoardIndex don't match --------------------------------------------------------------------------- cpqSiMemBoardIndex iso.3.6.1.4.1.232.2.2.4.5.1.1.1.1 = INTEGER: 1 iso.3.6.1.4.1.232.2.2.4.5.1.1.1.2 = INTEGER: 1 iso.3.6.1.4.1.232.2.2.4.5.1.1.1.3 = INTEGER: 1 iso.3.6.1.4.1.232.2.2.4.5.1.1.1.4 = INTEGER: 1 iso.3.6.1.4.1.232.2.2.4.5.1.1.1.5 = INTEGER: 1 iso.3.6.1.4.1.232.2.2.4.5.1.1.1.6 = INTEGER: 1 iso.3.6.1.4.1.232.2.2.4.5.1.1.1.7 = INTEGER: 1 iso.3.6.1.4.1.232.2.2.4.5.1.1.1.8 = INTEGER: 1 iso.3.6.1.4.1.232.2.2.4.5.1.1.2.1 = INTEGER: 2 iso.3.6.1.4.1.232.2.2.4.5.1.1.2.2 = INTEGER: 2 iso.3.6.1.4.1.232.2.2.4.5.1.1.2.3 = INTEGER: 2 iso.3.6.1.4.1.232.2.2.4.5.1.1.2.4 = INTEGER: 2 iso.3.6.1.4.1.232.2.2.4.5.1.1.2.5 = INTEGER: 2 iso.3.6.1.4.1.232.2.2.4.5.1.1.2.6 = INTEGER: 2 iso.3.6.1.4.1.232.2.2.4.5.1.1.2.7 = INTEGER: 2 iso.3.6.1.4.1.232.2.2.4.5.1.1.2.8 = INTEGER: 2 iso.3.6.1.4.1.232.2.2.4.5.1.1.3.1 = INTEGER: 3 cpqHeResMemBoardIndex iso.3.6.1.4.1.232.6.2.14.11.1.1.0.1 = INTEGER: 0 iso.3.6.1.4.1.232.6.2.14.11.1.1.0.2 = INTEGER: 0 iso.3.6.1.4.1.232.6.2.14.11.1.1.0.3 = INTEGER: 0 iso.3.6.1.4.1.232.6.2.14.11.1.1.0.4 = INTEGER: 0 iso.3.6.1.4.1.232.6.2.14.11.1.1.0.5 = INTEGER: 0 iso.3.6.1.4.1.232.6.2.14.11.1.1.0.6 = INTEGER: 0 iso.3.6.1.4.1.232.6.2.14.11.1.1.0.7 = INTEGER: 0 iso.3.6.1.4.1.232.6.2.14.11.1.1.0.8 = INTEGER: 0 iso.3.6.1.4.1.232.6.2.14.11.1.1.1.1 = INTEGER: 1 iso.3.6.1.4.1.232.6.2.14.11.1.1.1.2 = INTEGER: 1 iso.3.6.1.4.1.232.6.2.14.11.1.1.1.3 = INTEGER: 1 iso.3.6.1.4.1.232.6.2.14.11.1.1.1.4 = INTEGER: 1 iso.3.6.1.4.1.232.6.2.14.11.1.1.1.5 = INTEGER: 1 iso.3.6.1.4.1.232.6.2.14.11.1.1.1.6 = INTEGER: 1 iso.3.6.1.4.1.232.6.2.14.11.1.1.1.7 = INTEGER: 1 iso.3.6.1.4.1.232.6.2.14.11.1.1.1.8 = INTEGER: 1 iso.3.6.1.4.1.232.6.2.14.11.1.1.2.1 = INTEGER: 2 Redundant fans ----------------------- I saw one old server which had only half of the possible fans installed. Fan# 1 2 3 4 5 6 cpqHeFltTolFanPresent yes no yes no yes no cpqHeFltTolFanRedundant no no no no no no cpqHeFltTolFanRedundantPartner 2 1 4 3 6 5 cpqHeFltTolFanCondition ok other ok other ok other cpqHeFltTolFanLocation cpu cpu cpu cpu io io Normally this would result in ... fan #1 (cpu) is not redundant fan #2 (cpu) is not redundant fan #3 (cpu) is not redundant fan #4 (cpu) is not redundant fan #5 (ioboard) is not redundant fan #6 (ioboard) is not redundant WARNING - fan #1 (cpu) is not redundant, fan #2 (cpu) is not redundant, fan #3 (cpu) is not redundant, fan #4 (cpu) is not redundant, fan #5 (ioboard) is not redundant, fan #6 (ioboard) is not redundant However it was the server's owner decision not to install fan pairs but only one fan per location, so for him this is a false alert. By using --ignore-fan-redundancy check_hpasm only looks at the cpqHeFltTolFanCondition and ignores dependencies between two fans, so the result is: fan 1 speed is normal, pctmax is 50%, location is cpu, redundance is no, partner is 2 fan 3 speed is normal, pctmax is 50%, location is cpu, redundance is no, partner is 4 fan 5 speed is normal, pctmax is 50%, location is ioboard, redundance is no, partner is 6 OK - System: 'proliant ml370 g3', ... A snmp forwarding trick ----------------------- local - where check_hpasm runs remote - where a proliant can be reached proliant - where the snmp agent runs remote: ssh -R6667:localhost:6667 local socat tcp4-listen:6667,reuseaddr,fork UDP:proliant:161 local: socat udp4-listen:161,reuseaddr,fork tcp:localhost:6667 check_hpasm --hostname 127.0.0.1 Sample data from real machines ------------------------------ hpasmcli=$(which hpasmcli) hpacucli=$(which hpacucli) for i in server powersupply fans temp dimm do $hpasmcli -s "show $i" | while read line do printf "%s %s\n" $i "$line" done done if [ -x "$hpacucli" ]; then for i in config status do $hpacucli ctrl all show $i | while read line do printf "%s %s\n" $i "$line" done done fi If you think check_hpasm is not working correctly, please run the above script and send me the output. It's also helpful to see the output of snmpwalk snmpwalk .... 1.3.6.1.4.1.232 -- Gerhard Lausser nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/config.sub0000755000000000000000000007417512262515026022725 0ustar #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-11-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (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. # Please send patches to . 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 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 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # 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 0;; * ) 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) 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 \ | 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 | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ | z8k) 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-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | 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-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | msp430-* \ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ | xtensa-* \ | ymp-* \ | z8k-*) ;; # 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 ;; 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 ;; 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 ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; 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 ;; 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 ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; 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 ;; nv1) basic_machine=nv1-cray os=-unicosmp ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; 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 ;; 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 ;; 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 ;; sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | 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* | -netbsd* | -openbsd* | -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*) # 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* \ | -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 ;; -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 ;; *-ibm) os=-aix ;; *-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 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/TODO0000644000000000000000000000207312262515026021416 0ustar "1.3.6.1.4.1.232.6.2.9.3.1.4.0"; /* PSU Table */ warning = 3, critical = 4 "1.3.6.1.4.1.232.6.2.6.4.0"; /* Fan status */ oder auch .... 7 warning = 3, critical = 4 3=non-required fan im arsch 4=required fan im arsch "1.3.6.1.4.1.232.3.2.5.1.1.5"; /* Location Table */ "1.3.6.1.4.1.232.3.2.5.1.1.6"; /* Drive Table */ "1.3.6.1.4.1.232.3.2.5.1.1.50"; /* Drive Bus */ "1.3.6.1.4.1.232.6.2.6.8.1.4.1"; /* Temperature table */ ml370g4 "Processor zone", "CPU 1", "I/O zone", "CPU 2" 57.0, 80.0, 53.0, 80.0 dl385g1 "CPU 1", "I/O zone", "CPU 2", "Processor zone", "PSU bay" 100.0, 62.0, 100.0, 60.0, 51.0 dl380g4 "Processor zone", "CPU 1", "I/O zone", "CPU 2", "PSU bay" 62.0, 80.0, 60.0, 80.0, 50.0 dl380g3 "Processor zone", "CPU 1", "I/O zone", "CPU 2", "PSU bay" 62.0, 73.0, 68.0, 73.0, 53.0 dl360g4 "I/O zone", "CPU 1", "CPU 2", "PSU bay", "System board" 63.0, 85.0, 85.0, 48.0, 41.0 dl360g3 "Processor zone", "CPU 1", "I/O zone", "CPU 2" 56.0, 67.0, 57.0, 67.0 dl329g3 "Processor zone", "CPU 1", "I/O zone" 41.0, 85.0, 52.0 nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/0000755000000000000000000000000012262515026024072 5ustar nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/check_hpasm.pl0000644000000000000000000001416712262515026026705 0ustar #! /usr/bin/perl use strict; my $CELSIUS = 1; my $PERFDATA = 1; my $EXTENDEDINFO = 1; my $HWINFO = 1; my $HPACUCLI = 1; my $NOINSTLEVEL = 'unknown'; use constant OK => 0; use constant WARNING => 1; use constant CRITICAL => 2; use constant UNKNOWN => 3; use constant DEPENDENT => 4; my $plugin = Nagios::MiniPlugin->new( shortname => '', usage => 'Usage: %s [ -v|--verbose ] [ -t ] '. '--hostname --community '. ' ...]', version => '4.0', blurb => 'This plugin checks the hardware of hp/compaq proliant servers', url => 'http://labs.consol.de/nagios/check_hpasm', timeout => 60, shortname => '', ); $plugin->add_arg( spec => 'blacklist|b=s', help => '--blacklist Blacklist some (missing/failed) components', required => 0, default => '', ); $plugin->add_arg( spec => 'ignore-dimms|i', help => '--ignore-dimms Ignore "N/A"-DIMM status on misc. servers (e.g. older DL320)', required => 0, ); $plugin->add_arg( spec => 'ignore-fan-redundancy', help => '--ignore-fan-redundancy Ignore missing redundancy partners', required => 0, ); $plugin->add_arg( spec => 'customthresholds|c=s', help => '--customthresholds Use custom thresholds for certain temperatures', required => 0, ); $plugin->add_arg( spec => 'eventrange=s', help => '--eventrange=/ Period of time before critical IML events respecively become warnings or vanish A range is descibed as a number and a unit (s, m, h, d), e.g. --eventrange 1h/20m', required => 0, ); $plugin->add_arg( spec => 'perfdata=s', help => '--perfdata=[short] Output performance data. If your performance data string becomes too long and is truncated by Nagios, then you can use --perfdata=short instead. This will output temperature tags without location information', required => 0, ); $plugin->add_arg( spec => 'hostname|H=s', help => '--hostname Hostname or IP-address of the server (SNMP mode only)', required => 0, ); $plugin->add_arg( spec => 'port=i', help => '--port The SNMP port to use (default: 161)', required => 0, default => 161, ); $plugin->add_arg( spec => 'protocol|P=s', help => '--protocol The SNMP protocol to use (default: 2c, other possibilities: 1,3)', required => 0, default => '2c', ); $plugin->add_arg( spec => 'community|C=s', help => '--community SNMP community of the server (SNMP v1/2 only)', required => 0, default => 'public', ); $plugin->add_arg( spec => 'username=s', help => '--username The securityName for the USM security model (SNMPv3 only)', required => 0, ); $plugin->add_arg( spec => 'authpassword=s', help => '--authpassword The authentication password for SNMPv3', required => 0, ); $plugin->add_arg( spec => 'authprotocol=s', help => '--authprotocol The authentication protocol for SNMPv3 (md5|sha)', required => 0, ); $plugin->add_arg( spec => 'privpassword=s', help => '--privpassword The password for authPriv security level', required => 0, ); $plugin->add_arg( spec => 'privprotocol=s', help => '--privprotocol The private protocol for SNMPv3 (des|aes|aes128|3des|3desde)', required => 0, ); $plugin->add_arg( spec => 'snmpwalk=s', help => '--snmpwalk A file with the output of snmpwalk 1.3.6.1.4.1.232', required => 0, ); $plugin->add_arg( spec => 'hpasmcli=s', help => '--hpasmcli A file with the output of hpasmcli', required => 0, ); $plugin->add_arg( spec => 'servertype=s', help => '--servertype The type of the server: proliant (default) or bladesystem', required => 0, ); $plugin->add_arg( spec => 'eval-nics', help => '--eval-nics Check network interfaces (and groups). Try it and report me whyt you think about it. I need to build up some know how on this subject. If get an error and you think, it is not justified for your configuration, please tell me about it. (alwasy send the output of "snmpwalk -On .... 1.3.6.1.4.1.232" and a description how you setup your nics and why it is correct opposed to the plugins error message', required => 0, ); $plugin->getopts(); if (! $PERFDATA && $plugin->opts->get('perfdata')) { $PERFDATA = 1; } if ($PERFDATA && $plugin->opts->get('perfdata') && ($plugin->opts->get('perfdata') eq 'short')) { $PERFDATA = 2; } $plugin->{messages}->{unknown} = []; # wg. add_message(UNKNOWN,...) $plugin->{info} = []; # gefrickel $SIG{'ALRM'} = sub { printf "UNKNOWN - check_hpasm timed out after %d seconds\n", $plugin->opts->get('timeout'); exit $ERRORS{UNKNOWN}; }; alarm($plugin->opts->get('timeout')); my $server = HP::Server->new( runtime => { plugin => $plugin, options => { servertype => $plugin->opts->get('servertype'), verbose => $plugin->opts->get('verbose'), scrapiron => 0, ignore_fan_redundancy => $plugin->opts->get('ignore-fan-redundancy'), ignore_dimms => $plugin->opts->get('ignore-dimms'), customthresholds => $plugin->opts->get('customthresholds'), eventrange => $plugin->opts->get('eventrange'), blacklist => $plugin->opts->get('blacklist'), celsius => $CELSIUS, perfdata => $PERFDATA, extendedinfo => $EXTENDEDINFO, hwinfo => $HWINFO, hpacucli => $HPACUCLI, noinstlevel => $NOINSTLEVEL, }, },); if (! $plugin->check_messages()) { $server->init(); $plugin->add_message(OK, $server->identify()) if $HWINFO; if (! $plugin->check_messages()) { $plugin->add_message(OK, 'hardware working fine'); $plugin->add_message(OK, $server->get_summary()) if $server->get_summary(); $plugin->add_message(OK, $server->get_extendedinfo()) if $server->get_extendedinfo(); } } else { $plugin->add_message(CRITICAL, 'wrong device'); } my ($code, $message) = $plugin->check_messages(join => ', ', join_all => ', '); $message .= sprintf "\n%s\n", join("\n", @{$plugin->{info}}) if $plugin->opts->get('verbose') >= 1; #printf "%s\n", Data::Dumper::Dumper($plugin->{info}); $plugin->nagios_exit($code, $message); nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/Makefile.am0000644000000000000000000000674712262515026026144 0ustar ## Process this file with automake to produce Makefile.in SED=/bin/sed GREP=/bin/grep CAT=/bin/cat ECHO=/bin/echo SUFFIXES = .pl .pm .sh VPATH=$(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t libexec_SCRIPTS=check_hpasm MY_MODULES= EXTRA_MODULES=\ Nagios/MiniPlugin.pm \ HP/SNMP/Utils.pm \ HP/Proliant/Component/EventSubsystem.pm \ HP/Proliant/Component/EventSubsystem/CLI.pm \ HP/Proliant/Component/EventSubsystem/SNMP.pm \ HP/Proliant/Component/PowersupplySubsystem.pm \ HP/Proliant/Component/PowersupplySubsystem/CLI.pm \ HP/Proliant/Component/PowersupplySubsystem/SNMP.pm \ HP/Proliant/Component/TemperatureSubsystem.pm \ HP/Proliant/Component/TemperatureSubsystem/CLI.pm \ HP/Proliant/Component/TemperatureSubsystem/SNMP.pm \ HP/Proliant/Component/CpuSubsystem.pm \ HP/Proliant/Component/CpuSubsystem/CLI.pm \ HP/Proliant/Component/CpuSubsystem/SNMP.pm \ HP/Proliant/Component/FanSubsystem.pm \ HP/Proliant/Component/FanSubsystem/CLI.pm \ HP/Proliant/Component/FanSubsystem/SNMP.pm \ HP/Proliant/Component/MemorySubsystem/CLI.pm \ HP/Proliant/Component/MemorySubsystem/SNMP.pm \ HP/Proliant/Component/MemorySubsystem.pm \ HP/Proliant/Component/NicSubsystem/SNMP.pm \ HP/Proliant/Component/NicSubsystem.pm \ HP/Proliant/Component/AsrSubsystem/CLI.pm \ HP/Proliant/Component/AsrSubsystem/SNMP.pm \ HP/Proliant/Component/AsrSubsystem.pm \ HP/Proliant/Component/SNMP.pm \ HP/Proliant/Component/DiskSubsystem/Da/CLI.pm \ HP/Proliant/Component/DiskSubsystem/Da/SNMP.pm \ HP/Proliant/Component/DiskSubsystem/Da.pm \ HP/Proliant/Component/DiskSubsystem/Sas/CLI.pm \ HP/Proliant/Component/DiskSubsystem/Sas/SNMP.pm \ HP/Proliant/Component/DiskSubsystem/Sas.pm \ HP/Proliant/Component/DiskSubsystem/Scsi/CLI.pm \ HP/Proliant/Component/DiskSubsystem/Scsi/SNMP.pm \ HP/Proliant/Component/DiskSubsystem/Scsi.pm \ HP/Proliant/Component/DiskSubsystem/Ide/CLI.pm \ HP/Proliant/Component/DiskSubsystem/Ide/SNMP.pm \ HP/Proliant/Component/DiskSubsystem/Ide.pm \ HP/Proliant/Component/DiskSubsystem/Fca/CLI.pm \ HP/Proliant/Component/DiskSubsystem/Fca/SNMP.pm \ HP/Proliant/Component/DiskSubsystem/Fca.pm \ HP/Proliant/Component/DiskSubsystem.pm \ HP/Proliant/Component.pm \ HP/Proliant.pm \ HP/BladeSystem/Component/CommonEnclosureSubsystem.pm \ HP/BladeSystem/Component/CommonEnclosureSubsystem/FanSubsystem.pm \ HP/BladeSystem/Component/CommonEnclosureSubsystem/TempSubsystem.pm \ HP/BladeSystem/Component/CommonEnclosureSubsystem/FuseSubsystem.pm \ HP/BladeSystem/Component/CommonEnclosureSubsystem/ManagerSubsystem.pm \ HP/BladeSystem/Component/PowerEnclosureSubsystem.pm \ HP/BladeSystem/Component/PowerSupplySubsystem.pm \ HP/BladeSystem/Component/NetConnectorSubsystem.pm \ HP/BladeSystem/Component/ServerBladeSubsystem.pm \ HP/BladeSystem/Component.pm \ HP/BladeSystem.pm \ HP/Storage.pm \ HP/Server.pm EXTRA_DIST=check_hpasm.pl $(EXTRA_MODULES) CLEANFILES=$(libexec_SCRIPTS) AM_INSTALL_PROGRAM_FLAGS=@INSTALL_OPTS@ .pm : $(AWK) -f ./subst $< > $@ chmod +x $@ .pl : $(AWK) -f ./subst $< > $@ chmod +x $@ .sh : $(AWK) -f ./subst $< > $@ chmod +x $@ $(libexec_SCRIPTS) : $(EXTRA_DIST) $(ECHO) "#! #PERL# -w" | $(AWK) -f ./subst > $@ $(ECHO) >> $@ for m in ${EXTRA_MODULES}; do \ $(SED) -e 's/^1;//g' < $$m | $(AWK) -f ./subst | $(GREP) -v "use Nagios::Plugin" >> $@; \ done $(ECHO) "package main;" >> $@ $(CAT) check_hpasm.pl | $(AWK) -f ./subst >> $@ chmod +x $@ #| $(GREP) -v "use Nagios" >> $@; nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/Nagios/0000755000000000000000000000000012262515026025312 5ustar ././@LongLink0000644000000000000000000000014712262515411011643 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/Nagios/MiniPlugin.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/Nagios/MiniPlugin.0000644000000000000000000002022112262515026027363 0ustar package Nagios::MiniPlugin; use strict; use Getopt::Long qw(:config no_ignore_case bundling); our @STATUS_CODES = qw(OK WARNING CRITICAL UNKNOWN DEPENDENT); require Exporter; our @ISA = qw(Exporter); our @EXPORT = (@STATUS_CODES, qw(nagios_exit nagios_die check_messages)); our @EXPORT_OK = qw(%ERRORS); use constant OK => 0; use constant WARNING => 1; use constant CRITICAL => 2; use constant UNKNOWN => 3; use constant DEPENDENT => 4; our %ERRORS = ( 'OK' => OK, 'WARNING' => WARNING, 'CRITICAL' => CRITICAL, 'UNKNOWN' => UNKNOWN, 'DEPENDENT' => DEPENDENT, ); our %STATUS_TEXT = reverse %ERRORS; sub new { my $class = shift; my %params = @_; my $self = { perfdata => [], messages => { ok => [], warning => [], critical => [], unknown => [], }, args => [], opts => Nagios::MiniPlugin::Getopt->new(%params), }; foreach (qw(shortname usage version url plugin blurb extra license timeout)) { $self->{$_} = $params{$_}; } bless $self, $class; } sub add_arg { my $self = shift; $self->{opts}->add_arg(@_); } sub getopts { my $self = shift; $self->{opts}->getopts(); } sub opts { my $self = shift; return $self->{opts}; } sub add_message { my $self = shift; my ($code, @messages) = @_; $code = (qw(ok warning critical unknown))[$code] if $code =~ /^\d+$/; $code = lc $code; push @{$self->{messages}->{$code}}, @messages; } sub remove_message { my $self = shift; my ($code, @messages) = @_; $code = (qw(ok warning critical unknown))[$code] if $code =~ /^\d+$/; $code = lc $code; pop @{$self->{messages}->{$code}}; } sub add_perfdata { my ($self, %args) = @_; my $str = $args{label}.'='.$args{value}; if ($args{uom}) { $str .= $args{uom}; } if ($args{warning}) { $str .= ';'.$args{warning}; } if ($args{critical}) { $str .= ';'.$args{critical}; } push @{$self->{perfdata}}, $str; } sub check_messages { my $self = shift; my %args = @_; # Add object messages to any passed in as args for my $code (qw(critical warning unknown ok)) { my $messages = $self->{messages}->{$code} || []; if ($args{$code}) { unless (ref $args{$code} eq 'ARRAY') { if ($code eq 'ok') { $args{$code} = [ $args{$code} ]; } } push @{$args{$code}}, @$messages; } else { $args{$code} = $messages; } } my %arg = %args; $arg{join} = ' ' unless defined $arg{join}; # Decide $code my $code = OK; $code ||= CRITICAL if @{$arg{critical}}; $code ||= WARNING if @{$arg{warning}}; $code ||= UNKNOWN if @{$arg{unknown}}; return $code unless wantarray; # Compose message my $message = ''; if ($arg{join_all}) { $message = join( $arg{join_all}, map { @$_ ? join( $arg{'join'}, @$_) : () } $arg{critical}, $arg{warning}, $arg{unknown}, $arg{ok} ? (ref $arg{ok} ? $arg{ok} : [ $arg{ok} ]) : [] ); } else { $message ||= join( $arg{'join'}, @{$arg{critical}} ) if $code == CRITICAL; $message ||= join( $arg{'join'}, @{$arg{warning}} ) if $code == WARNING; $message ||= join( $arg{'join'}, @{$arg{unknown}} ) if $code == UNKNOWN; $message ||= ref $arg{ok} ? join( $arg{'join'}, @{$arg{ok}} ) : $arg{ok} if $arg{ok}; } return ($code, $message); } sub nagios_exit { my $self = shift; my ($code, $message, $arg) = @_; $code = $ERRORS{$code} if defined $code && exists $ERRORS{$code}; $code = UNKNOWN unless defined $code && exists $STATUS_TEXT{$code}; $message = '' unless defined $message; if (ref $message && ref $message eq 'ARRAY') { $message = join(' ', map { chomp; $_ } @$message); } else { chomp $message; } my $output = "$STATUS_TEXT{$code}"; $output .= " - $message" if defined $message && $message ne ''; if (scalar (@{$self->{perfdata}})) { $output .= " | ".join(" ", @{$self->{perfdata}}); } $output .= "\n"; print $output; exit $code; } package Nagios::MiniPlugin::Getopt; use strict; use File::Basename; use Data::Dumper; use Getopt::Long qw(:config no_ignore_case bundling); # Standard defaults my %DEFAULT = ( timeout => 60, verbose => 0, license => "This nagios plugin is free software, and comes with ABSOLUTELY NO WARRANTY. It may be used, redistributed and/or modified under the terms of the GNU General Public Licence (see http://www.fsf.org/licensing/licenses/gpl.txt).", ); # Standard arguments my @ARGS = ({ spec => 'usage|?', help => "-?, --usage\n Print usage information", }, { spec => 'help|h', help => "-h, --help\n Print detailed help screen", }, { spec => 'version|V', help => "-V, --version\n Print version information", }, { #spec => 'extra-opts:s@', #help => "--extra-opts=[
[@]]\n Section and/or config_file from which to load extra options (may repeat)", }, { spec => 'timeout|t=i', help => "-t, --timeout=INTEGER\n Seconds before plugin times out (default: %s)", default => $DEFAULT{timeout}, }, { spec => 'verbose|v+', help => "-v, --verbose\n Show details for command-line debugging (can repeat up to 3 times)", default => $DEFAULT{verbose}, }, ); # Standard arguments we traditionally display last in the help output my %DEFER_ARGS = map { $_ => 1 } qw(timeout verbose); sub _init { my $self = shift; my %params = @_; # Check params my $plugin = basename($ENV{NAGIOS_PLUGIN} || $0); #my %attr = validate( @_, { my %attr = ( usage => 1, version => 0, url => 0, plugin => { default => $plugin }, blurb => 0, extra => 0, 'extra-opts' => 0, license => { default => $DEFAULT{license} }, timeout => { default => $DEFAULT{timeout} }, ); # Add attr to private _attr hash (except timeout) $self->{timeout} = delete $attr{timeout}; $self->{_attr} = { %attr }; foreach (keys %{$self->{_attr}}) { if (exists $params{$_}) { $self->{_attr}->{$_} = $params{$_}; } else { $self->{_attr}->{$_} = $self->{_attr}->{$_}->{default} if ref ($self->{_attr}->{$_}) eq 'HASH' && exists $self->{_attr}->{$_}->{default}; } } # Chomp _attr values chomp foreach values %{$self->{_attr}}; # Setup initial args list $self->{_args} = [ grep { exists $_->{spec} } @ARGS ]; $self } sub new { my $class = shift; my $self = bless {}, $class; $self->_init(@_); } sub add_arg { my $self = shift; my %arg = @_; push (@{$self->{_args}}, \%arg); } sub getopts { my $self = shift; my %commandline = (); my @params = map { $_->{spec} } @{$self->{_args}}; if (! GetOptions(\%commandline, @params)) { $self->print_help(); exit 0; } else { no strict 'refs'; do { $self->print_help(); exit 0; } if $commandline{help}; do { $self->print_version(); exit 0 } if $commandline{version}; do { $self->print_usage(); exit 0 } if $commandline{usage}; foreach (map { $_->{spec} =~ /^([\w\-]+)/; $1; } @{$self->{_args}}) { my $field = $_; *{"$field"} = sub { return $self->{opts}->{$field}; }; } foreach (grep { exists $_->{default} } @{$self->{_args}}) { $_->{spec} =~ /^([\w\-]+)/; my $spec = $1; $self->{opts}->{$spec} = $_->{default}; } foreach (keys %commandline) { $self->{opts}->{$_} = $commandline{$_}; } } } sub get { my $self = shift; my $opt = shift; return $self->{opts}->{$opt}; } sub print_help { my $self = shift; $self->print_version(); printf "\n%s\n", $self->{_attr}->{license}; printf "\n%s\n\n", $self->{_attr}->{blurb}; $self->print_usage(); foreach (@{$self->{_args}}) { printf " %s\n", $_->{help}; } exit 0; } sub print_usage { my $self = shift; printf $self->{_attr}->{usage}, $self->{_attr}->{plugin}; print "\n"; } sub print_version { my $self = shift; printf "%s %s", $self->{_attr}->{plugin}, $self->{_attr}->{version}; printf " [%s]", $self->{_attr}->{url} if $self->{_attr}->{url}; print "\n"; } sub print_license { my $self = shift; printf "%s\n", $self->{_attr}->{license}; print "\n"; } 1; nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/0000755000000000000000000000000012262515026024401 5ustar nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem.pm0000644000000000000000000002021212262515026027150 0ustar package HP::BladeSystem; use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; use Data::Dumper; our @ISA = qw(HP::Server HP::Proliant::Component::SNMP); sub init { my $self = shift; $self->{components} = { common_enclosure_subsystem => undef, power_enclosure_subsystem => undef, power_supply_subsystem => undef, net_connector_subsystem => undef, server_blade_subsystem => undef, }; $self->{serial} = 'unknown'; $self->{product} = 'unknown'; $self->{romversion} = 'unknown'; $self->trace(3, 'BladeSystem identified'); $self->collect(); if (! $self->{runtime}->{plugin}->check_messages()) { $self->set_serial(); $self->analyze_common_enclosures(); $self->analyze_power_enclosures(); $self->analyze_power_supplies(); $self->analyze_net_connectors(); $self->analyze_server_blades(); $self->check_common_enclosures(); $self->check_power_enclosures(); $self->check_power_supplies(); $self->check_net_connectors(); $self->check_server_blades(); } } sub identify { my $self = shift; return sprintf "System: '%s', S/N: '%s'", $self->{product}, $self->{serial}; } sub dump { my $self = shift; printf STDERR "serial %s\n", $self->{serial}; printf STDERR "product %s\n", $self->{product}; printf STDERR "romversion %s\n", $self->{romversion}; printf STDERR "%s\n", Data::Dumper::Dumper($self->{enclosures}); } sub analyze_common_enclosures { my $self = shift; $self->{components}->{common_enclosure_subsystem} = HP::BladeSystem::Component::CommonEnclosureSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub analyze_power_enclosures { my $self = shift; $self->{components}->{power_enclosure_subsystem} = HP::BladeSystem::Component::PowerEnclosureSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub analyze_power_supplies { my $self = shift; $self->{components}->{power_supply_subsystem} = HP::BladeSystem::Component::PowerSupplySubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub analyze_net_connectors { my $self = shift; $self->{components}->{net_connector_subsystem} = HP::BladeSystem::Component::NetConnectorSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub analyze_server_blades { my $self = shift; $self->{components}->{server_blade_subsystem} = HP::BladeSystem::Component::ServerBladeSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub check_common_enclosures { my $self = shift; $self->{components}->{common_enclosure_subsystem}->check(); $self->{components}->{common_enclosure_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 2; } sub check_power_enclosures { my $self = shift; $self->{components}->{power_enclosure_subsystem}->check(); $self->{components}->{power_enclosure_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 2; } sub check_power_supplies { my $self = shift; $self->{components}->{power_supply_subsystem}->check(); $self->{components}->{power_supply_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 2; } sub check_net_connectors { my $self = shift; $self->{components}->{net_connector_subsystem}->check(); $self->{components}->{net_connector_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 2; } sub check_server_blades { my $self = shift; $self->{components}->{server_blade_subsystem}->check(); $self->{components}->{server_blade_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 2; } sub collect { my $self = shift; if ($self->{runtime}->{plugin}->opts->snmpwalk) { my $cpqRackMibCondition = '1.3.6.1.4.1.232.22.1.3.0'; $self->trace(3, 'getting cpqRackMibCondition'); if (! exists $self->{rawdata}->{$cpqRackMibCondition}) { $self->add_message(CRITICAL, 'snmpwalk returns no health data (cpqrack-mib)'); } } else { my $net_snmp_version = Net::SNMP->VERSION(); # 5.002000 or 6.000000 #$params{'-translate'} = [ # -all => 0x0 #]; my ($session, $error) = Net::SNMP->session(%{$self->{runtime}->{snmpparams}}); if (! defined $session) { $self->{plugin}->add_message(CRITICAL, 'cannot create session object'); $self->trace(1, Data::Dumper::Dumper($self->{runtime}->{snmpparams})); } else { # revMajor is often used for discovery of hp devices my $cpqSeMibRev = '1.3.6.1.4.1.232.22.1'; my $cpqSeMibRevMajor = '1.3.6.1.4.1.232.22.1.1.0'; my $cpqRackMibCondition = '1.3.6.1.4.1.232.22.1.3.0'; $self->trace(3, 'getting cpqRackMibCondition'); my $result = $session->get_request( -varbindlist => [$cpqRackMibCondition] ); if (!defined($result) || $result->{$cpqRackMibCondition} eq 'noSuchInstance' || $result->{$cpqRackMibCondition} eq 'noSuchObject' || $result->{$cpqRackMibCondition} eq 'endOfMibView') { $self->add_message(CRITICAL, 'snmpwalk returns no health data (cpqrack-mib)'); $session->close; } else { $self->trace(3, 'getting cpqRackMibCondition done'); } } if (! $self->{runtime}->{plugin}->check_messages()) { # snmp peer is alive $self->trace(2, sprintf "Protocol is %s", $self->{runtime}->{snmpparams}->{'-version'}); my $oidtrees = [ ["cpqSiComponent", "1.3.6.1.4.1.232.2.2"], ["cpqSiAsset", "1.3.6.1.4.1.232.2.2.2"], #["cpqRackInfo", "1.3.6.1.4.1.232.22"], ['cpqRackCommonEnclosureEntry', '1.3.6.1.4.1.232.22.2.3.1.1.1'], ['cpqRackCommonEnclosureTempEntry', '1.3.6.1.4.1.232.22.2.3.1.2.1'], ['cpqRackCommonEnclosureFanEntry', '1.3.6.1.4.1.232.22.2.3.1.3.1'], ['cpqRackCommonEnclosureFuseEntry', '1.3.6.1.4.1.232.22.2.3.1.4.1'], ['cpqRackCommonEnclosureManagerEntry', '1.3.6.1.4.1.232.22.2.3.1.6.1'], ['cpqRackPowerEnclosureEntry', '1.3.6.1.4.1.232.22.2.3.3.1.1'], ['cpqRackServerBladeEntry', '1.3.6.1.4.1.232.22.2.4.1.1.1'], ['cpqRackPowerSupplyEntry', '1.3.6.1.4.1.232.22.2.5.1.1.1'], ['cpqRackNetConnectorEntry', '1.3.6.1.4.1.232.22.2.6.1.1.1'], ['cpqRackMibCondition', '1.3.6.1.4.1.232.22.1.3.0'], ]; my $cpqSiComponent = "1.3.6.1.4.1.232.2.2"; my $cpqSiAsset = "1.3.6.1.4.1.232.2.2.2"; my $cpqRackInfo = "1.3.6.1.4.1.232.22"; $session->translate; my $response = {}; #break the walk up in smaller pieces foreach my $subtree (@{$oidtrees}) { my $tic = time; my $tac = $tic; my $response0 = $session->get_table( -baseoid => $subtree->[1]); if (scalar (keys %{$response0}) == 0) { $self->trace(2, sprintf "maxrepetitions failed. fallback"); $response0 = $session->get_table( -maxrepetitions => 1, -baseoid => $subtree->[1]); } $tac = time; $self->trace(2, sprintf "%03d seconds for walk %s (%d oids)", $tac - $tic, $subtree->[0], scalar(keys %{$response0})); map { $response->{$_} = $response0->{$_} } keys %{$response0}; } $session->close; map { $response->{$_} =~ s/^\s+//; $response->{$_} =~ s/\s+$//; } keys %$response; $self->{rawdata} = $response; } } return $self->{runtime}->{plugin}->check_messages(); } sub set_serial { my $self = shift; my $cpqSiSysSerialNum = "1.3.6.1.4.1.232.2.2.2.1.0"; my $cpqSiProductName = "1.3.6.1.4.1.232.2.2.4.2.0"; $self->{serial} = SNMP::Utils::get_object($self->{rawdata}, $cpqSiSysSerialNum); $self->{product} = SNMP::Utils::get_object($self->{rawdata}, $cpqSiProductName); $self->{serial} = $self->{serial}; $self->{product} = lc $self->{product}; $self->{romversion} = 'unknown'; ##################################################################### $self->{runtime}->{product} = $self->{product}; } nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Storage.pm0000644000000000000000000002117712262515026026353 0ustar package HP::Storage; use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; use Data::Dumper; our @ISA = qw(HP::Server); sub init { my $self = shift; $self->{components} = { powersupply_subsystem => undef, fan_subsystem => undef, temperature_subsystem => undef, cpu_subsystem => undef, memory_subsystem => undef, disk_subsystem => undef, sensor_subsystem => undef, }; $self->{serial} = 'unknown'; $self->{product} = 'unknown'; $self->{romversion} = 'unknown'; $self->collect(); if (! $self->{runtime}->{plugin}->check_messages()) { $self->set_serial(); # $self->check_for_buggy_firmware(); # $self->analyze_cpus(); # $self->analyze_powersupplies(); # $self->analyze_fan_subsystem(); # $self->analyze_temperatures(); # $self->analyze_memory_subsystem(); $self->analyze_disk_subsystem(); ## $self->analyze_sensor_subsystem(); # $self->check_cpus(); # $self->check_powersupplies(); # $self->check_fan_subsystem(); # $self->check_temperatures(); # $self->check_memory_subsystem(); $self->check_disk_subsystem(); ## $self->check_sensor_subsystem(); } } sub identify { my $self = shift; return sprintf "System: '%s', S/N: '%s', ROM: '%s'", $self->{product}, $self->{serial}, $self->{romversion}; } sub check_for_buggy_firmware { my $self = shift; my @buggyfirmwares = ( "P24 12/11/2001", "P24 11/15/2002", "D13 06/03/2003", "D13 09/15/2004", "P20 12/17/2002" ); $self->{runtime}->{options}->{buggy_firmware} = grep /^$self->{romversion}/, @buggyfirmwares; } sub dump { my $self = shift; printf STDERR "serial %s\n", $self->{serial}; printf STDERR "product %s\n", $self->{product}; printf STDERR "romversion %s\n", $self->{romversion}; printf STDERR "%s\n", Data::Dumper::Dumper($self->{components}); } sub analyze_powersupplies { my $self = shift; $self->{components}->{powersupply_subsystem} = HP::Storage::Component::PowersupplySubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub analyze_fan_subsystem { my $self = shift; $self->{components}->{fan_subsystem} = HP::Storage::Component::FanSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub analyze_temperatures { my $self = shift; $self->{components}->{temperature_subsystem} = HP::Storage::Component::TemperatureSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub analyze_cpus { my $self = shift; $self->{components}->{cpu_subsystem} = HP::Storage::Component::CpuSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub analyze_memory_subsystem { my $self = shift; $self->{components}->{memory_subsystem} = HP::Storage::Component::MemorySubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub analyze_disk_subsystem { my $self = shift; $self->{components}->{disk_subsystem} = HP::Proliant::Component::DiskSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub analyze_sensor_subsystem { my $self = shift; $self->{components}->{sensor_subsystem} = HP::FCMGMT::Component::SensorSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub check_cpus { my $self = shift; $self->{components}->{cpu_subsystem}->check(); $self->{components}->{cpu_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 2; } sub check_powersupplies { my $self = shift; $self->{components}->{powersupply_subsystem}->check(); $self->{components}->{powersupply_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 2; } sub check_fan_subsystem { my $self = shift; $self->{components}->{fan_subsystem}->check(); $self->{components}->{fan_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 2; } sub check_temperatures { my $self = shift; $self->{components}->{temperature_subsystem}->check(); $self->{components}->{temperature_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 2; } sub check_memory_subsystem { my $self = shift; $self->{components}->{memory_subsystem}->check(); $self->{components}->{memory_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 2; } sub check_disk_subsystem { my $self = shift; $self->{components}->{disk_subsystem}->check(); $self->{components}->{disk_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 1; } sub check_sensor_subsystem { my $self = shift; $self->{components}->{isensor_subsystem}->check(); $self->{components}->{sensor_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 1; } sub collect { my $self = shift; if ($self->{runtime}->{plugin}->opts->snmpwalk) { my $cpqSeMibCondition = '1.3.6.1.4.1.232.6.1.3.0'; # rindsarsch! $self->{rawdata}->{$cpqSeMibCondition} = 0; if (! exists $self->{rawdata}->{$cpqSeMibCondition}) { $self->add_message(CRITICAL, 'snmpwalk returns no health data (cpqhlth-mib)'); } } else { my $net_snmp_version = Net::SNMP->VERSION(); # 5.002000 or 6.000000 #$params{'-translate'} = [ # -all => 0x0 #]; my ($session, $error) = Net::SNMP->session(%{$self->{runtime}->{snmpparams}}); if (! defined $session) { $self->{plugin}->add_message(CRITICAL, 'cannot create session object'); $self->trace(1, Data::Dumper::Dumper($self->{runtime}->{snmpparams})); } else { # revMajor is often used for discovery of hp devices my $cpqSeMibRev = '1.3.6.1.4.1.232.6.1'; my $cpqSeMibRevMajor = '1.3.6.1.4.1.232.6.1.1.0'; my $cpqSeMibCondition = '1.3.6.1.4.1.232.6.1.3.0'; my $result = $session->get_request( -varbindlist => [$cpqSeMibCondition] ); # rindsarsch! $result->{$cpqSeMibCondition} = 0; if (!defined($result) || $result->{$cpqSeMibCondition} eq 'noSuchInstance' || $result->{$cpqSeMibCondition} eq 'noSuchObject' || $result->{$cpqSeMibCondition} eq 'endOfMibView') { $self->add_message(CRITICAL, 'snmpwalk returns no health data (cpqhlth-mib)'); $session->close; } else { # this is not reliable. many agents return 4=failed #if ($result->{$cpqSeMibCondition} != 2) { # $obstacle = "cmapeerstart"; #} } } if (! $self->{runtime}->{plugin}->check_messages()) { # snmp peer is alive $self->trace(2, sprintf "Protocol is %s", $self->{runtime}->{snmpparams}->{'-version'}); my $cpqSsSys = "1.3.6.1.4.1.232.8"; $session->translate; my $response = {}; #break the walk up in smaller pieces my $tic = time; my $tac = $tic; my $response1 = $session->get_table( -baseoid => $cpqSsSys); $tac = time; $self->trace(2, sprintf "%03d seconds for walk cpqSsSys (%d oids)", $tac - $tic, scalar(keys %{$response1})); $session->close; map { $response->{$_} = $response1->{$_} } keys %{$response1}; map { $response->{$_} =~ s/^\s+//; $response->{$_} =~ s/\s+$//; } keys %$response; $self->{rawdata} = $response; } } return $self->{runtime}->{plugin}->check_messages(); } sub set_serial { my $self = shift; my $snmpwalk = $self->{rawdata}; my @serials = (); my @models = (); my @fws = (); my $cpqSsBackplaneEntry = '1.3.6.1.4.1.232.8.2.2.6.1'; my $cpqSsBackplaneFWRev = '1.3.6.1.4.1.232.8.2.2.6.1.3'; my $cpqSsBackplaneModel = '1.3.6.1.4.1.232.8.2.2.6.1.9'; my $cpqSsBackplaneSerialNumber = '1.3.6.1.4.1.232.8.2.2.6.1.13'; # INDEX { cpqSsBackplaneChassisIndex, cpqSsBackplaneIndex } my @indexes = SNMP::Utils::get_indices($snmpwalk, $cpqSsBackplaneEntry); foreach (@indexes) { my($idx1, $idx2) = ($_->[0], $_->[1]); my $fw = SNMP::Utils::get_object($snmpwalk, $cpqSsBackplaneFWRev, $idx1, $idx2); my $model = SNMP::Utils::get_object($snmpwalk, $cpqSsBackplaneModel, $idx1, $idx2); my $serial = SNMP::Utils::get_object($snmpwalk, $cpqSsBackplaneSerialNumber, $idx1, $idx2); push(@serials, $serial); push(@models, $model); push(@fws, $fw); } $self->{serial} = join('/', @serials); $self->{product} = join('/', @models); $self->{romversion} = join('/', @fws); $self->{runtime}->{product} = $self->{product}; } 1; nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/0000755000000000000000000000000012262515026026615 5ustar ././@LongLink0000644000000000000000000000015612262515411011643 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Component.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Com0000644000000000000000000000012612262515026027255 0ustar package HP::BladeSystem::Component; use strict; our @ISA = qw(HP::BladeSystem); 1; ././@LongLink0000644000000000000000000000015412262515411011641 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Component/nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Com0000755000000000000000000000000012262515026027254 5ustar ././@LongLink0000644000000000000000000000020612262515411011637 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Component/PowerEnclosureSubsystem.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Com0000644000000000000000000000765412262515026027272 0ustar package HP::BladeSystem::Component::PowerEnclosureSubsystem; our @ISA = qw(HP::BladeSystem::Component); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, power_enclosures => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->init(); return $self; } sub init { my $self = shift; # cpqRackPowerEnclosureTable my $oids = { cpqRackPowerEnclosureEntry => '1.3.6.1.4.1.232.22.2.3.3.1.1', cpqRackPowerEnclosureRack => '1.3.6.1.4.1.232.22.2.3.3.1.1.1', cpqRackPowerEnclosureIndex => '1.3.6.1.4.1.232.22.2.3.3.1.1.2', cpqRackPowerEnclosureName => '1.3.6.1.4.1.232.22.2.3.3.1.1.3', cpqRackPowerEnclosureMgmgtBoardSerialNum => '1.3.6.1.4.1.232.22.2.3.3.1.1.4', cpqRackPowerEnclosureRedundant => '1.3.6.1.4.1.232.22.2.3.3.1.1.5', cpqRackPowerEnclosureLoadBalanced => '1.3.6.1.4.1.232.22.2.3.3.1.1.6', cpqRackPowerEnclosureInputPwrType => '1.3.6.1.4.1.232.22.2.3.3.1.1.7', cpqRackPowerEnclosurePwrFeedMax => '1.3.6.1.4.1.232.22.2.3.3.1.1.8', cpqRackPowerEnclosureCondition => '1.3.6.1.4.1.232.22.2.3.3.1.1.9', cpqRackPowerEnclosureRedundantValue => { 1 => 'other', 2 => 'notRedundant', 3 => 'redundant', }, cpqRackPowerEnclosureLoadBalancedValue => { 0 => 'aechz', 1 => 'other', 2 => 'notLoadBalanced', 3 => 'loadBalanced', }, cpqRackPowerEnclosureInputPwrTypeValue => { 1 => 'other', 2 => 'singlePhase', 3 => 'threePhase', 4 => 'directCurrent', }, cpqRackPowerEnclosureConditionValue => { 1 => 'other', 2 => 'ok', 3 => 'degraded', }, }; # INDEX { cpqRackPowerEnclosureRack, cpqRackPowerEnclosureIndex } # dreckada dreck, dreckada foreach ($self->get_entries($oids, 'cpqRackPowerEnclosureEntry')) { push(@{$self->{power_enclosures}}, HP::BladeSystem::Component::PowerEnclosureSubsystem::PowerEnclosure->new(%{$_})); } } sub check { my $self = shift; foreach (@{$self->{power_enclosures}}) { $_->check(); } } sub dump { my $self = shift; foreach (@{$self->{power_enclosures}}) { $_->dump(); } } package HP::BladeSystem::Component::PowerEnclosureSubsystem::PowerEnclosure; our @ISA = qw(HP::BladeSystem::Component::PowerEnclosureSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, blacklisted => 0, info => undef, extendedinfo => undef, }; map { $self->{$_} = $params{$_} } grep /cpqRackPowerEnclosure/, keys %params; $self->{name} = $self->{cpqRackPowerEnclosureRack}.':'.$self->{cpqRackPowerEnclosureIndex}; bless $self, $class; $self->init(); return $self; } sub check { my $self = shift; $self->blacklist('pe', $self->{name}); my $info = sprintf 'power enclosure %s \'%s\' condition is %s', $self->{name}, $self->{cpqRackPowerEnclosureName}, $self->{cpqRackPowerEnclosureCondition}; $self->add_info($info); if ($self->{cpqRackPowerEnclosureCondition} eq 'degraded') { $self->add_message(WARNING, $info); } } sub dump { my $self = shift; printf "[POWER_ENCLOSURE_%s]\n", $self->{cpqRackPowerEnclosureName}; foreach (qw(cpqRackPowerEnclosureRack cpqRackPowerEnclosureIndex cpqRackPowerEnclosureName cpqRackPowerEnclosureMgmgtBoardSerialNum cpqRackPowerEnclosureRedundant cpqRackPowerEnclosureLoadBalanced cpqRackPowerEnclosureInputPwrType cpqRackPowerEnclosurePwrFeedMax cpqRackPowerEnclosureCondition)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } 1; ././@LongLink0000644000000000000000000000020312262515411011634 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Component/PowerSupplySubsystem.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Com0000644000000000000000000002102212262515026027253 0ustar package HP::BladeSystem::Component::PowerSupplySubsystem; our @ISA = qw(HP::BladeSystem::Component); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, power_supplies => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->init(); return $self; } sub init { my $self = shift; my $oids = { cpqRackPowerSupplyEntry => '1.3.6.1.4.1.232.22.2.5.1.1.1', cpqRackPowerSupplyRack => '1.3.6.1.4.1.232.22.2.5.1.1.1.1', cpqRackPowerSupplyChassis => '1.3.6.1.4.1.232.22.2.5.1.1.1.2', cpqRackPowerSupplyIndex => '1.3.6.1.4.1.232.22.2.5.1.1.1.3', cpqRackPowerSupplyEnclosureName => '1.3.6.1.4.1.232.22.2.5.1.1.1.4', cpqRackPowerSupplySerialNum => '1.3.6.1.4.1.232.22.2.5.1.1.1.5', cpqRackPowerSupplySparePartNumber => '1.3.6.1.4.1.232.22.2.5.1.1.1.7', cpqRackPowerSupplyFWRev => '1.3.6.1.4.1.232.22.2.5.1.1.1.8', cpqRackPowerSupplyMaxPwrOutput => '1.3.6.1.4.1.232.22.2.5.1.1.1.9', cpqRackPowerSupplyCurPwrOutput => '1.3.6.1.4.1.232.22.2.5.1.1.1.10', cpqRackPowerSupplyIntakeTemp => '1.3.6.1.4.1.232.22.2.5.1.1.1.12', cpqRackPowerSupplyExhaustTemp => '1.3.6.1.4.1.232.22.2.5.1.1.1.13', cpqRackPowerSupplyStatus => '1.3.6.1.4.1.232.22.2.5.1.1.1.14', cpqRackPowerSupplySupplyInputLineStatus => '1.3.6.1.4.1.232.22.2.5.1.1.1.15', cpqRackPowerSupplyPresent => '1.3.6.1.4.1.232.22.2.5.1.1.1.16', cpqRackPowerSupplyCondition => '1.3.6.1.4.1.232.22.2.5.1.1.1.17', cpqRackPowerSupplySupplyInputLineStatusValue => { 1 => 'noError', 2 => 'lineOverVoltage', 3 => 'lineUnderVoltage', 4 => 'lineHit', 5 => 'brownOut', 6 => 'linePowerLoss', }, cpqRackPowerSupplyStatusValue => { 1 => 'noError', 2 => 'generalFailure', 3 => 'bistFailure', 4 => 'fanFailure', 5 => 'tempFailure', 6 => 'interlockOpen', 7 => 'epromFailed', 8 => 'vrefFailed', 9 => 'dacFailed', 10 => 'ramTestFailed', 11 => 'voltageChannelFailed', 12 => 'orringdiodeFailed', 13 => 'brownOut', 14 => 'giveupOnStartup', 15 => 'nvramInvalid', 16 => 'calibrationTableInvalid', }, cpqRackPowerSupplyPresentValue => { 1 => 'other', 2 => 'absent', 3 => 'present', }, cpqRackPowerSupplyConditionValue => { 1 => 'other', 2 => 'ok', 3 => 'degraded', 4 => 'failed', }, }; # INDEX { cpqRackPowerSupplyRack, cpqRackPowerSupplyChassis, cpqRackPowerSupplyIndex } foreach ($self->get_entries($oids, 'cpqRackPowerSupplyEntry')) { push(@{$self->{power_supplies}}, HP::BladeSystem::Component::PowerSupplySubsystem::PowerSupply->new(%{$_})); } } sub check { my $self = shift; my $total_current_watt = 0; my $total_max_watt = 0; my $total_in_temp = 0; my $total_out_temp = 0; my $num_ps = 0; foreach (@{$self->{power_supplies}}) { $_->check() if $_->{cpqRackPowerSupplyPresent} eq 'present' || $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv if ($_->{cpqRackPowerSupplyPresent} eq 'present') { $total_max_watt += $_->{cpqRackPowerSupplyMaxPwrOutput}; $total_current_watt += $_->{cpqRackPowerSupplyCurPwrOutput}; $total_in_temp += $_->{cpqRackPowerSupplyIntakeTemp} if $_->{cpqRackPowerSupplyIntakeTemp} != -1; $total_out_temp += $_->{cpqRackPowerSupplyExhaustTemp} if $_->{cpqRackPowerSupplyExhaustTemp} != -1; $num_ps++; } } $self->{runtime}->{plugin}->add_perfdata( label => 'watt_total', value => $total_current_watt, warning => $total_max_watt, critical => $total_max_watt, ); #$self->{runtime}->{plugin}->add_perfdata( # label => 'watt_total_pct', # value => ($total_current_watt == 0 ? 0 : # sprintf("%.2f", # ($total_current_watt / $total_max_watt * 100))), # warning => 100, # critical => 100, # uom => '%', #); if ($total_in_temp) { $self->{runtime}->{plugin}->add_perfdata( label => 'in_temp', value => $total_in_temp / $num_ps, ); } if ($total_out_temp) { $self->{runtime}->{plugin}->add_perfdata( label => 'out_temp', value => $total_out_temp / $num_ps, ); } } sub dump { my $self = shift; foreach (@{$self->{power_supplies}}) { $_->dump() if $_->{cpqRackPowerSupplyPresent} eq 'present' || $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv } } package HP::BladeSystem::Component::PowerSupplySubsystem::PowerSupply; our @ISA = qw(HP::BladeSystem::Component::PowerSupplySubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, blacklisted => 0, info => undef, extendedinfo => undef, }; map { $self->{$_} = $params{$_} } grep /cpqRackPowerSupply/, keys %params; $self->{name} = $params{cpqRackPowerSupplyRack}. ':'.$params{cpqRackPowerSupplyChassis}. ':'.$params{cpqRackPowerSupplyIndex}; $self->{serfw} = sprintf "Ser: %s, FW: %s", $self->{cpqRackPowerSupplySerialNum}, $self->{cpqRackPowerSupplyFWRev}; bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('ps', $self->{name}); my $info = sprintf 'power supply %s is %s, condition is %s (%s)', $self->{name}, $self->{cpqRackPowerSupplyPresent}, $self->{cpqRackPowerSupplyCondition}, $self->{serfw}; $self->add_info($info); if ($self->{cpqRackPowerSupplyPresent} eq 'present') { if ($self->{cpqRackPowerSupplyCondition} eq 'degraded') { $info .= sprintf " (SparePartNum %s)", $self->{cpqRackPowerSupplySparePartNumber}; $self->add_message(WARNING, $info); $self->add_info(sprintf 'power supply %s status is %s, inp.line status is %s', $self->{name}, $self->{cpqRackPowerSupplyStatus}, $self->{cpqRackPowerSupplySupplyInputLineStatus}); } elsif ($self->{cpqRackPowerSupplyCondition} eq 'failed') { $info .= sprintf " (SparePartNum %s)", $self->{cpqRackPowerSupplySparePartNumber}; $self->add_message(CRITICAL, $info); $self->add_info(sprintf 'power supply %s status is %s, inp.line status is %s', $self->{name}, $self->{cpqRackPowerSupplyStatus}, $self->{cpqRackPowerSupplySupplyInputLineStatus}); } if ($self->{runtime}->{options}->{perfdata} != 2) { $self->{runtime}->{plugin}->add_perfdata( label => sprintf('watt_%s', $self->{name}), value => $self->{cpqRackPowerSupplyCurPwrOutput}, warning => $self->{cpqRackPowerSupplyMaxPwrOutput}, critical => $self->{cpqRackPowerSupplyMaxPwrOutput} ); #$self->{runtime}->{plugin}->add_perfdata( # label => sprintf('watt_pct_%s', $self->{name}), # value => ($self->{cpqRackPowerSupplyCurPwrOutput} == 0 ? 0 : # sprintf ("%.2f", # ($self->{cpqRackPowerSupplyCurPwrOutput} / # $self->{cpqRackPowerSupplyMaxPwrOutput} * 100))), # warning => 100, # critical => 100, # uom => '%', #); if ($self->{cpqRackPowerSupplyIntakeTemp} != -1) { $self->{runtime}->{plugin}->add_perfdata( label => sprintf('in_temp_%s', $self->{name}), value => $self->{cpqRackPowerSupplyIntakeTemp}, ); } if ($self->{cpqRackPowerSupplyExhaustTemp} != -1) { $self->{runtime}->{plugin}->add_perfdata( label => sprintf('out_temp_%s', $self->{name}), value => $self->{cpqRackPowerSupplyExhaustTemp}, ); } } } } sub dump { my $self = shift; printf "[POWER_SUPPLY%s]\n", $self->{name}; foreach (qw(cpqRackPowerSupplyRack cpqRackPowerSupplyChassis cpqRackPowerSupplyIndex cpqRackPowerSupplyEnclosureName cpqRackPowerSupplySerialNum cpqRackPowerSupplySparePartNumber cpqRackPowerSupplyFWRev cpqRackPowerSupplyMaxPwrOutput cpqRackPowerSupplyCurPwrOutput cpqRackPowerSupplyIntakeTemp cpqRackPowerSupplyExhaustTemp cpqRackPowerSupplyStatus cpqRackPowerSupplySupplyInputLineStatus cpqRackPowerSupplyPresent cpqRackPowerSupplyCondition)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } 1; ././@LongLink0000644000000000000000000000020312262515411011634 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Component/ServerBladeSubsystem.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Com0000644000000000000000000001343312262515026027262 0ustar package HP::BladeSystem::Component::ServerBladeSubsystem; our @ISA = qw(HP::BladeSystem::Component); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, server_blades => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->init(); return $self; } sub init { my $self = shift; my $oids = { cpqRackServerBladeEntry => '1.3.6.1.4.1.232.22.2.4.1.1.1', cpqRackServerBladeRack => '1.3.6.1.4.1.232.22.2.4.1.1.1.1', cpqRackServerBladeChassis => '1.3.6.1.4.1.232.22.2.4.1.1.1.2', cpqRackServerBladeIndex => '1.3.6.1.4.1.232.22.2.4.1.1.1.3', cpqRackServerBladeName => '1.3.6.1.4.1.232.22.2.4.1.1.1.4', cpqRackServerBladeEnclosureName => '1.3.6.1.4.1.232.22.2.4.1.1.1.5', cpqRackServerBladePartNumber => '1.3.6.1.4.1.232.22.2.4.1.1.1.6', cpqRackServerBladeSparePartNumber => '1.3.6.1.4.1.232.22.2.4.1.1.1.7', cpqRackServerBladePosition => '1.3.6.1.4.1.232.22.2.4.1.1.1.8', cpqRackServerBladeHeight => '1.3.6.1.4.1.232.22.2.4.1.1.1.9', cpqRackServerBladeWidth => '1.3.6.1.4.1.232.22.2.4.1.1.1.10', cpqRackServerBladeDepth => '1.3.6.1.4.1.232.22.2.4.1.1.1.11', cpqRackServerBladePresent => '1.3.6.1.4.1.232.22.2.4.1.1.1.12', cpqRackServerBladeHasFuses => '1.3.6.1.4.1.232.22.2.4.1.1.1.13', cpqRackServerBladeEnclosureSerialNum => '1.3.6.1.4.1.232.22.2.4.1.1.1.14', cpqRackServerBladeSlotsUsed => '1.3.6.1.4.1.232.22.2.4.1.1.1.15', cpqRackServerBladeStatus => '1.3.6.1.4.1.232.22.2.4.1.1.1.21', cpqRackServerBladeDiagnosticString => '1.3.6.1.4.1.232.22.2.4.1.1.1.24', cpqRackServerBladePowered => '1.3.6.1.4.1.232.22.2.4.1.1.1.25', cpqRackServerBladePOSTStatus => '1.3.6.1.4.1.232.22.2.4.1.1.1.35', cpqRackServerBladePresentValue => { 1 => 'other', 2 => 'absent', 3 => 'present', }, cpqRackServerBladeStatusValue => { 1 => 'other', 2 => 'ok', 3 => 'degraded', 4 => 'failed', }, cpqRackServerBladePoweredValue => { 0 => 'aechz', 1 => 'other', 2 => 'on', 3 => 'off', 4 => 'powerStagedOff', 5 => 'reboot', }, cpqRackServerBladePOSTStatusValue => { 1 => 'other', 2 => 'started', 3 => 'completed', 4 => 'failed', }, }; # INDEX { cpqRackServerBladeRack, cpqRackServerBladeChassis, cpqRackServerBladeIndex } # dreckada dreck, dreckada foreach ($self->get_entries($oids, 'cpqRackServerBladeEntry')) { push(@{$self->{server_blades}}, HP::BladeSystem::Component::ServerBladeSubsystem::ServerBlade->new(%{$_})); } } sub check { my $self = shift; foreach (@{$self->{server_blades}}) { $_->check() if $_->{cpqRackServerBladePresent} eq 'present' || $self->{runtime}->{options}->{verbose} >= 3; # absent blades nur bei -vvv } } sub dump { my $self = shift; foreach (@{$self->{server_blades}}) { $_->dump() if $_->{cpqRackServerBladePresent} eq 'present' || $self->{runtime}->{options}->{verbose} >= 3; # absent blades nur bei -vvv } } package HP::BladeSystem::Component::ServerBladeSubsystem::ServerBlade; our @ISA = qw(HP::BladeSystem::Component::ServerBladeSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, blacklisted => 0, info => undef, extendedinfo => undef, }; map { $self->{$_} = $params{$_} } grep /cpqRackServerBlade/, keys %params; $self->{cpqRackServerBladeDiagnosticString} ||= ''; $self->{name} = $self->{cpqRackServerBladeRack}. ':'.$self->{cpqRackServerBladeChassis}. ':'.$self->{cpqRackServerBladeIndex}; bless $self, $class; $self->init(); #printf "%s\n", Data::Dumper::Dumper(\%params); return $self; } sub check { my $self = shift; $self->blacklist('sb', $self->{name}); my $info = sprintf 'server blade %s \'%s\' is %s, status is %s, powered is %s', $self->{name}, $self->{cpqRackServerBladeName}, $self->{cpqRackServerBladePresent}, $self->{cpqRackServerBladeStatus}, $self->{cpqRackServerBladePowered}; $self->add_info($info); if ($self->{cpqRackServerBladePowered} eq 'on') { if ($self->{cpqRackServerBladeStatus} eq 'degraded') { $self->add_message(WARNING, sprintf 'server blade %s diag is \'%s\', post status is %s', $self->{cpqRackServerBladeName}, $self->{cpqRackServerBladeDiagnosticString}, $self->{cpqRackServerBladePOSTStatus}); } elsif ($self->{cpqRackServerBladeStatus} eq 'failed') { $self->add_message(CRITICAL, sprintf 'server blade %s diag is \'%s\', post status is %s', $self->{cpqRackServerBladeName}, $self->{cpqRackServerBladeDiagnosticString}, $self->{cpqRackServerBladePOSTStatus}); } } } sub dump { my $self = shift; printf "[SERVER_BLADE_%s]\n", $self->{cpqRackServerBladeName}; foreach (qw(cpqRackServerBladeRack cpqRackServerBladeChassis cpqRackServerBladeIndex cpqRackServerBladeName cpqRackServerBladeEnclosureName cpqRackServerBladePartNumber cpqRackServerBladeSparePartNumber cpqRackServerBladePosition cpqRackServerBladeHeight cpqRackServerBladeWidth cpqRackServerBladeDepth cpqRackServerBladePresent cpqRackServerBladeHasFuses cpqRackServerBladeEnclosureSerialNum cpqRackServerBladeSlotsUsed cpqRackServerBladeStatus cpqRackServerBladeDiagnosticString cpqRackServerBladePowered cpqRackServerBladePOSTStatus)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } 1; ././@LongLink0000644000000000000000000000020712262515411011640 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Com0000644000000000000000000001512212262515026027257 0ustar package HP::BladeSystem::Component::CommonEnclosureSubsystem; our @ISA = qw(HP::BladeSystem::Component); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, common_enclosures => [], common_enclosure_temp_subsys => undef, common_enclosure_fan_subsys => undef, common_enclosure_fuse_subsys => undef, common_enclosure_manager_subsys => undef, common_enclosure_frus => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->init(); return $self; } sub init { my $self = shift; # jeweils ein block fuer # enclosures, temps, fans, fuses # loop ueber oids und entspr. new my $oids = { cpqRackCommonEnclosureEntry => '1.3.6.1.4.1.232.22.2.3.1.1.1', cpqRackCommonEnclosureRack => '1.3.6.1.4.1.232.22.2.3.1.1.1.1', cpqRackCommonEnclosureIndex => '1.3.6.1.4.1.232.22.2.3.1.1.1.2', cpqRackCommonEnclosureModel => '1.3.6.1.4.1.232.22.2.3.1.1.1.3', cpqRackCommonEnclosureSparePartNumber => '1.3.6.1.4.1.232.22.2.3.1.1.1.6', cpqRackCommonEnclosureSerialNum => '1.3.6.1.4.1.232.22.2.3.1.1.1.7', cpqRackCommonEnclosureFWRev => '1.3.6.1.4.1.232.22.2.3.1.1.1.8', cpqRackCommonEnclosureName => '1.3.6.1.4.1.232.22.2.3.1.1.1.9', cpqRackCommonEnclosureCondition => '1.3.6.1.4.1.232.22.2.3.1.1.1.16', cpqRackCommonEnclosureHasServerBlades => '1.3.6.1.4.1.232.22.2.3.1.1.1.17', cpqRackCommonEnclosureHasPowerBlades => '1.3.6.1.4.1.232.22.2.3.1.1.1.18', cpqRackCommonEnclosureHasNetConnectors => '1.3.6.1.4.1.232.22.2.3.1.1.1.19', cpqRackCommonEnclosureHasTempSensors => '1.3.6.1.4.1.232.22.2.3.1.1.1.20', cpqRackCommonEnclosureHasFans => '1.3.6.1.4.1.232.22.2.3.1.1.1.21', cpqRackCommonEnclosureHasFuses => '1.3.6.1.4.1.232.22.2.3.1.1.1.22', cpqRackCommonEnclosureConditionValue => { 1 => 'other', 2 => 'ok', 3 => 'degraded', 4 => 'failed', }, cpqRackCommonEnclosureHasServerBladesValue => { 1 => 'false', 2 => 'true', }, }; $oids->{cpqRackCommonEnclosureHasPowerBladesValue} = $oids->{cpqRackCommonEnclosureHasServerBladesValue}; $oids->{cpqRackCommonEnclosureHasNetConnectorsValue} = $oids->{cpqRackCommonEnclosureHasServerBladesValue}; $oids->{cpqRackCommonEnclosureHasTempSensorsValue} = $oids->{cpqRackCommonEnclosureHasServerBladesValue}; $oids->{cpqRackCommonEnclosureHasFansValue} = $oids->{cpqRackCommonEnclosureHasServerBladesValue}; $oids->{cpqRackCommonEnclosureHasServerBladesValue} = $oids->{cpqRackCommonEnclosureHasServerBladesValue}; # INDEX { cpqRackCommonEnclosureRack cpqRackCommonEnclosureIndex } foreach ($self->get_entries($oids, 'cpqRackCommonEnclosureEntry')) { push(@{$self->{common_enclosures}}, HP::BladeSystem::Component::CommonEnclosureSubsystem::CommonEnclosure->new(%{$_})); } $self->{common_enclosure_fan_subsys} = HP::BladeSystem::Component::CommonEnclosureSubsystem::FanSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); $self->{common_enclosure_temp_subsys} = HP::BladeSystem::Component::CommonEnclosureSubsystem::TempSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); $self->{common_enclosure_fuse_subsys} = HP::BladeSystem::Component::CommonEnclosureSubsystem::FuseSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); $self->{common_enclosure_manager_subsys} = HP::BladeSystem::Component::CommonEnclosureSubsystem::ManagerSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub check { my $self = shift; foreach (@{$self->{common_enclosures}}) { $_->check(); } $self->{common_enclosure_fan_subsys}->check(); $self->{common_enclosure_temp_subsys}->check(); $self->{common_enclosure_fuse_subsys}->check(); $self->{common_enclosure_manager_subsys}->check(); } sub dump { my $self = shift; foreach (@{$self->{common_enclosures}}) { $_->dump(); } $self->{common_enclosure_fan_subsys}->dump(); $self->{common_enclosure_temp_subsys}->dump(); $self->{common_enclosure_fuse_subsys}->dump(); $self->{common_enclosure_manager_subsys}->dump(); } package HP::BladeSystem::Component::CommonEnclosureSubsystem::CommonEnclosure; our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, blacklisted => 0, info => undef, extendedinfo => undef, }; map { $self->{$_} = $params{$_} } grep /cpqRackCommonEnclosure/, keys %params; $self->{name} = $self->{cpqRackCommonEnclosureRack}.':'.$self->{cpqRackCommonEnclosureIndex}; $self->{serfw} = sprintf "Ser: %s, FW: %s", $self->{cpqRackCommonEnclosureSerialNum}, $self->{cpqRackCommonEnclosureFWRev}; bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('ce', $self->{cpqRackCommonEnclosureName}); my $info = sprintf 'common enclosure %s condition is %s (%s)', $self->{cpqRackCommonEnclosureName}, $self->{cpqRackCommonEnclosureCondition}, $self->{serfw}; $self->add_info($info); if ($self->{cpqRackCommonEnclosureCondition} eq 'failed') { $info .= sprintf " (SparePartNum %s)", $self->{cpqRackCommonEnclosureSparePartNumber}; $self->add_message(CRITICAL, $info); } elsif ($self->{cpqRackCommonEnclosureCondition} eq 'degraded') { $info .= sprintf " (SparePartNum %s)", $self->{cpqRackCommonEnclosureSparePartNumber}; $self->add_message(WARNING, $info); } } sub dump { my $self = shift; printf "[COMMON_ENCLOSURE_%s]\n", $self->{cpqRackCommonEnclosureName}; foreach (qw(cpqRackCommonEnclosureRack cpqRackCommonEnclosureIndex cpqRackCommonEnclosureModel cpqRackCommonEnclosureSerialNum cpqRackCommonEnclosureFWRev cpqRackCommonEnclosureFWRev cpqRackCommonEnclosureName cpqRackCommonEnclosureCondition cpqRackCommonEnclosureHasServerBlades cpqRackCommonEnclosureHasPowerBlades cpqRackCommonEnclosureHasNetConnectors cpqRackCommonEnclosureHasTempSensors cpqRackCommonEnclosureHasFans cpqRackCommonEnclosureHasFuses)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } 1; ././@LongLink0000644000000000000000000000020412262515411011635 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Component/NetConnectorSubsystem.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Com0000644000000000000000000001142112262515026027255 0ustar package HP::BladeSystem::Component::NetConnectorSubsystem; our @ISA = qw(HP::BladeSystem::Component); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, net_connectors => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->init(); return $self; } sub init { my $self = shift; my $oids = { cpqRackNetConnectorEntry => '1.3.6.1.4.1.232.22.2.6.1.1.1', cpqRackNetConnectorRack => '1.3.6.1.4.1.232.22.2.6.1.1.1.1', cpqRackNetConnectorChassis => '1.3.6.1.4.1.232.22.2.6.1.1.1.2', cpqRackNetConnectorIndex => '1.3.6.1.4.1.232.22.2.6.1.1.1.3', cpqRackNetConnectorEnclosureName => '1.3.6.1.4.1.232.22.2.6.1.1.1.4', cpqRackNetConnectorName => '1.3.6.1.4.1.232.22.2.6.1.1.1.5', cpqRackNetConnectorModel => '1.3.6.1.4.1.232.22.2.6.1.1.1.6', cpqRackNetConnectorSerialNum => '1.3.6.1.4.1.232.22.2.6.1.1.1.7', cpqRackNetConnectorPartNumber => '1.3.6.1.4.1.232.22.2.6.1.1.1.8', cpqRackNetConnectorSparePartNumber => '1.3.6.1.4.1.232.22.2.6.1.1.1.9', cpqRackNetConnectorFWRev => '1.3.6.1.4.1.232.22.2.6.1.1.1.10', cpqRackNetConnectorType => '1.3.6.1.4.1.232.22.2.6.1.1.1.11', cpqRackNetConnectorLocation => '1.3.6.1.4.1.232.22.2.6.1.1.1.12', cpqRackNetConnectorPresent => '1.3.6.1.4.1.232.22.2.6.1.1.1.13', cpqRackNetConnectorHasFuses => '1.3.6.1.4.1.232.22.2.6.1.1.1.14', cpqRackNetConnectorEnclosureSerialNum => '1.3.6.1.4.1.232.22.2.6.1.1.1.15', cpqRackNetConnectorTypeValue => { 0 => 'other', # undefined 1 => 'other', 2 => 'active', 3 => 'passive', }, cpqRackNetConnectorPresentValue => { 1 => 'other', 2 => 'absent', 3 => 'present', }, cpqRackNetConnectorHasFusesValue => { -1 => 'false', # wird geliefert, also vermute ich false 1 => 'false', 2 => 'true', }, }; # INDEX { cpqRackNetConnectorRack, cpqRackNetConnectorChassis, cpqRackNetConnectorIndex } # dreckada dreck, dreckada foreach ($self->get_entries($oids, 'cpqRackNetConnectorEntry')) { push(@{$self->{net_connectors}}, HP::BladeSystem::Component::NetConnectorSubsystem::NetConnector->new(%{$_})); } } sub check { my $self = shift; foreach (@{$self->{net_connectors}}) { $_->check() if $_->{cpqRackNetConnectorPresent} eq 'present' || $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv } } sub dump { my $self = shift; foreach (@{$self->{net_connectors}}) { $_->dump() if $_->{cpqRackNetConnectorPresent} eq 'present' || $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv } } package HP::BladeSystem::Component::NetConnectorSubsystem::NetConnector; our @ISA = qw(HP::BladeSystem::Component::NetConnectorSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, blacklisted => 0, info => undef, extendedinfo => undef, }; map { $self->{$_} = $params{$_} } grep /cpqRackNetConnector/, keys %params; $self->{name} = $params{cpqRackNetConnectorRack}. ':'.$params{cpqRackNetConnectorChassis}. ':'.$params{cpqRackNetConnectorIndex}; $self->{serfw} = sprintf "Ser: %s, FW: %s", $self->{cpqRackNetConnectorSerialNum}, $self->{cpqRackNetConnectorFWRev}; bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('nc', $self->{name}); my $info = sprintf 'net connector %s is %s, model is %s (%s)', $self->{name}.($self->{cpqRackNetConnectorName} ? ' \''.$self->{cpqRackNetConnectorName}.'\'' : ''), $self->{cpqRackNetConnectorPresent}, $self->{cpqRackNetConnectorModel}, $self->{serfw}; $self->add_info($info); # hat weder status noch condition, vielleicht spaeter mal $info .= sprintf " (SparePartNum %s)", $self->{cpqRackNetConnectorSparePartNumber}; } sub dump { my $self = shift; printf "[NET_CONNECTOR_%s]\n", $self->{cpqRackNetConnectorName}; foreach (qw(cpqRackNetConnectorRack cpqRackNetConnectorChassis cpqRackNetConnectorIndex cpqRackNetConnectorEnclosureName cpqRackNetConnectorName cpqRackNetConnectorModel cpqRackNetConnectorSerialNum cpqRackNetConnectorPartNumber cpqRackNetConnectorSparePartNumber cpqRackNetConnectorFWRev cpqRackNetConnectorType cpqRackNetConnectorLocation cpqRackNetConnectorPresent cpqRackNetConnectorHasFuses cpqRackNetConnectorEnclosureSerialNum)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } 1; ././@LongLink0000644000000000000000000000020512262515411011636 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Com0000755000000000000000000000000012262515026027254 5ustar ././@LongLink0000644000000000000000000000022512262515411011640 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FuseSubsystem.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Com0000644000000000000000000000764012262515026027265 0ustar package HP::BladeSystem::Component::CommonEnclosureSubsystem::FuseSubsystem; our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, blacklisted => 0, fuses => [], info => undef, extendedinfo => undef, }; bless $self, $class; $self->init(); return $self; } sub init { my $self = shift; my $oids = { cpqRackCommonEnclosureFuseEntry => '1.3.6.1.4.1.232.22.2.3.1.4.1', cpqRackCommonEnclosureFuseRack => '1.3.6.1.4.1.232.22.2.3.1.4.1.1', cpqRackCommonEnclosureFuseChassis => '1.3.6.1.4.1.232.22.2.3.1.4.1.2', cpqRackCommonEnclosureFuseIndex => '1.3.6.1.4.1.232.22.2.3.1.4.1.3', cpqRackCommonEnclosureFuseEnclosureName => '1.3.6.1.4.1.232.22.2.3.1.4.1.4', cpqRackCommonEnclosureFuseLocation => '1.3.6.1.4.1.232.22.2.3.1.4.1.5', cpqRackCommonEnclosureFusePresent => '1.3.6.1.4.1.232.22.2.3.1.4.1.8', cpqRackCommonEnclosureFuseCondition => '1.3.6.1.4.1.232.22.2.3.1.4.1.11', cpqRackCommonEnclosureFusePresentValue => { 1 => 'other', 2 => 'absent', 3 => 'present', }, cpqRackCommonEnclosureFuseConditionValue => { 1 => 'other', 2 => 'ok', 4 => 'failed', } }; # INDEX { cpqRackCommonEnclosureFuseRack, cpqRackCommonEnclosureFuseChassis, cpqRackCommonEnclosureFuseIndex } foreach ($self->get_entries($oids, 'cpqRackCommonEnclosureFuseEntry')) { push(@{$self->{fuses}}, HP::BladeSystem::Component::CommonEnclosureSubsystem::FuseSubsystem::Fuse->new(%{$_})); } } sub check { my $self = shift; foreach (@{$self->{fuses}}) { $_->check() if $_->{cpqRackCommonEnclosureFusePresent} eq 'present' || $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv } } sub dump { my $self = shift; foreach (@{$self->{fuses}}) { $_->dump() if $_->{cpqRackCommonEnclosureFusePresent} eq 'present' || $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv } } package HP::BladeSystem::Component::CommonEnclosureSubsystem::FuseSubsystem::Fuse; our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem::FuseSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, blacklisted => 0, info => undef, extendedinfo => undef, }; map { $self->{$_} = $params{$_} } grep /cpqRackCommonEnclosureFuse/, keys %params; $self->{name} = $self->{cpqRackCommonEnclosureFuseRack}.':'.$self->{cpqRackCommonEnclosureFuseChassis}.':'.$self->{cpqRackCommonEnclosureFuseIndex}; bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('fu', $self->{name}); $self->add_info(sprintf 'fuse %s is %s, location is %s, condition is %s', $self->{name}, $self->{cpqRackCommonEnclosureFusePresent}, $self->{cpqRackCommonEnclosureFuseLocation}, $self->{cpqRackCommonEnclosureFuseCondition}); if ($self->{cpqRackCommonEnclosureFuseCondition} eq 'failed') { $self->add_message(CRITICAL, $self->{info}); } elsif ($self->{cpqRackCommonEnclosureFuseCondition} ne 'ok') { $self->add_message(WARNING, $self->{info}); } } sub dump { my $self = shift; printf "[FUSE_%s]\n", $self->{name}; foreach (qw(cpqRackCommonEnclosureFuseRack cpqRackCommonEnclosureFuseChassis cpqRackCommonEnclosureFuseIndex cpqRackCommonEnclosureFuseEnclosureName cpqRackCommonEnclosureFuseLocation cpqRackCommonEnclosureFusePresent cpqRackCommonEnclosureFuseCondition)) { printf "%s: %s\n", $_, $self->{$_}; } printf "info: %s\n", $self->{info}; printf "\n"; } 1; ././@LongLink0000644000000000000000000000023012262515411011634 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/ManagerSubsystem.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Com0000644000000000000000000001351212262515026027260 0ustar package HP::BladeSystem::Component::CommonEnclosureSubsystem::ManagerSubsystem; our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, blacklisted => 0, managers => [], info => undef, extendedinfo => undef, }; bless $self, $class; $self->init(); return $self; } sub init { my $self = shift; my $oids = { cpqRackCommonEnclosureManagerEntry => '1.3.6.1.4.1.232.22.2.3.1.6.1', cpqRackCommonEnclosureManagerRack => '1.3.6.1.4.1.232.22.2.3.1.6.1.1', cpqRackCommonEnclosureManagerChassis => '1.3.6.1.4.1.232.22.2.3.1.6.1.2', cpqRackCommonEnclosureManagerIndex => '1.3.6.1.4.1.232.22.2.3.1.6.1.3', cpqRackCommonEnclosureManagerEnclosureName => '1.3.6.1.4.1.232.22.2.3.1.6.1.4', cpqRackCommonEnclosureManagerLocation => '1.3.6.1.4.1.232.22.2.3.1.6.1.5', cpqRackCommonEnclosureManagerPartNumber => '1.3.6.1.4.1.232.22.2.3.1.6.1.6', cpqRackCommonEnclosureManagerSparePartNumber => '1.3.6.1.4.1.232.22.2.3.1.6.1.7', cpqRackCommonEnclosureManagerSerialNum => '1.3.6.1.4.1.232.22.2.3.1.6.1.8', cpqRackCommonEnclosureManagerRole => '1.3.6.1.4.1.232.22.2.3.1.6.1.9', cpqRackCommonEnclosureManagerPresent => '1.3.6.1.4.1.232.22.2.3.1.6.1.10', cpqRackCommonEnclosureManagerRedundant => '1.3.6.1.4.1.232.22.2.3.1.6.1.11', cpqRackCommonEnclosureManagerCondition => '1.3.6.1.4.1.232.22.2.3.1.6.1.12', cpqRackCommonEnclosureManagerFWRev => '1.3.6.1.4.1.232.22.2.3.1.6.1.15', cpqRackCommonEnclosureManagerRoleValue => { 1 => 'standby', 2 => 'active', }, cpqRackCommonEnclosureManagerPresentValue => { 1 => 'other', 2 => 'absent', # mit vorsicht zu geniessen! 3 => 'present', }, cpqRackCommonEnclosureManagerRedundantValue => { 0 => 'other', # meiner phantasie entsprungen, da sich hp nicht aeussert 1 => 'other', 2 => 'notRedundant', 3 => 'redundant', }, cpqRackCommonEnclosureManagerConditionValue => { 1 => 'other', 2 => 'ok', 3 => 'degraded', 4 => 'failed', } }; # INDEX { cpqRackCommonEnclosureManagerRack, cpqRackCommonEnclosureManagerChassis, cpqRackCommonEnclosureManagerIndex } foreach ($self->get_entries($oids, 'cpqRackCommonEnclosureManagerEntry')) { push(@{$self->{managers}}, HP::BladeSystem::Component::CommonEnclosureSubsystem::ManagerSubsystem::Manager->new(%{$_})); } } sub check { my $self = shift; foreach (@{$self->{managers}}) { $_->check() if $_->{cpqRackCommonEnclosureManagerPresent} eq 'present' || $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv } } sub dump { my $self = shift; foreach (@{$self->{managers}}) { $_->dump() if $_->{cpqRackCommonEnclosureManagerPresent} eq 'present' || $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv } } package HP::BladeSystem::Component::CommonEnclosureSubsystem::ManagerSubsystem::Manager; our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem::ManagerSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, blacklisted => 0, info => undef, extendedinfo => undef, }; map { $self->{$_} = $params{$_} } grep /cpqRackCommonEnclosureManager/, keys %params; $self->{name} = $self->{cpqRackCommonEnclosureManagerRack}. ':'.$self->{cpqRackCommonEnclosureManagerChassis}. ':'.$self->{cpqRackCommonEnclosureManagerIndex}; if ($self->{cpqRackCommonEnclosureManagerPresent} eq "absent" && defined $self->{cpqRackCommonEnclosureManagerEnclosureName}) { $self->{cpqRackCommonEnclosureManagerPresent} = "present"; } bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('em', $self->{name}); my $info = sprintf 'manager %s is %s, location is %s, redundance is %s, condition is %s, role is %s', $self->{name}, $self->{cpqRackCommonEnclosureManagerPresent}, $self->{cpqRackCommonEnclosureManagerLocation}, $self->{cpqRackCommonEnclosureManagerRedundant}, $self->{cpqRackCommonEnclosureManagerCondition}, $self->{cpqRackCommonEnclosureManagerRole}; $self->add_info($info) if $self->{cpqRackCommonEnclosureManagerPresent} eq 'present' || $self->{runtime}->{options}->{verbose} >= 3; # absent managers nur bei -vvv if ($self->{cpqRackCommonEnclosureManagerCondition} eq 'degraded') { $self->{info} .= sprintf ' (SparePartNum: %s)', $self->{cpqRackCommonEnclosureManagerSparePartNumber}; $self->add_message(WARNING, $self->{info}); } elsif ($self->{cpqRackCommonEnclosureManagerCondition} eq 'failed') { $self->{info} .= sprintf ' (SparePartNum: %s)', $self->{cpqRackCommonEnclosureManagerSparePartNumber}; $self->add_message(CRITICAL, $self->{info}); } } sub dump { my $self = shift; printf "[ENCLOSURE_MANAGER_%s]\n", $self->{name}; foreach (qw(cpqRackCommonEnclosureManagerRack cpqRackCommonEnclosureManagerChassis cpqRackCommonEnclosureManagerIndex cpqRackCommonEnclosureManagerEnclosureName cpqRackCommonEnclosureManagerLocation cpqRackCommonEnclosureManagerPartNumber cpqRackCommonEnclosureManagerSparePartNumber cpqRackCommonEnclosureManagerPresent cpqRackCommonEnclosureManagerRedundant cpqRackCommonEnclosureManagerCondition cpqRackCommonEnclosureManagerFWRev)) { printf "%s: %s\n", $_, $self->{$_}; } printf "info: %s\n", $self->{info}; printf "\n"; } 1; ././@LongLink0000644000000000000000000000022412262515411011637 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FanSubsystem.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Com0000644000000000000000000001200212262515026027251 0ustar package HP::BladeSystem::Component::CommonEnclosureSubsystem::FanSubsystem; our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, blacklisted => 0, fans => [], info => undef, extendedinfo => undef, }; bless $self, $class; $self->init(); return $self; } sub init { my $self = shift; my $oids = { cpqRackCommonEnclosureFanEntry => '1.3.6.1.4.1.232.22.2.3.1.3.1', cpqRackCommonEnclosureFanRack => '1.3.6.1.4.1.232.22.2.3.1.3.1.1', cpqRackCommonEnclosureFanChassis => '1.3.6.1.4.1.232.22.2.3.1.3.1.2', cpqRackCommonEnclosureFanIndex => '1.3.6.1.4.1.232.22.2.3.1.3.1.3', cpqRackCommonEnclosureFanEnclosureName => '1.3.6.1.4.1.232.22.2.3.1.3.1.4', cpqRackCommonEnclosureFanLocation => '1.3.6.1.4.1.232.22.2.3.1.3.1.5', cpqRackCommonEnclosureFanPartNumber => '1.3.6.1.4.1.232.22.2.3.1.3.1.6', cpqRackCommonEnclosureFanSparePartNumber => '1.3.6.1.4.1.232.22.2.3.1.3.1.7', cpqRackCommonEnclosureFanPresent => '1.3.6.1.4.1.232.22.2.3.1.3.1.8', cpqRackCommonEnclosureFanRedundant => '1.3.6.1.4.1.232.22.2.3.1.3.1.9', cpqRackCommonEnclosureFanRedundantGroupId => '1.3.6.1.4.1.232.22.2.3.1.3.1.10', cpqRackCommonEnclosureFanCondition => '1.3.6.1.4.1.232.22.2.3.1.3.1.11', cpqRackCommonEnclosureFanEnclosureSerialNum => '1.3.6.1.4.1.232.22.2.3.1.3.1.12', cpqRackCommonEnclosureFanPresentValue => { 1 => 'other', 2 => 'absent', 3 => 'present', }, cpqRackCommonEnclosureFanRedundantValue => { 0 => 'other', # meiner phantasie entsprungen, da sich hp nicht aeussert 1 => 'other', 2 => 'notRedundant', 3 => 'redundant', }, cpqRackCommonEnclosureFanConditionValue => { 1 => 'other', 2 => 'ok', 3 => 'degraded', 4 => 'failed', } }; # INDEX { cpqRackCommonEnclosureFanRack, cpqRackCommonEnclosureFanChassis, cpqRackCommonEnclosureFanIndex } foreach ($self->get_entries($oids, 'cpqRackCommonEnclosureFanEntry')) { push(@{$self->{fans}}, HP::BladeSystem::Component::CommonEnclosureSubsystem::FanSubsystem::Fan->new(%{$_})); } } sub check { my $self = shift; foreach (@{$self->{fans}}) { $_->check() if $_->{cpqRackCommonEnclosureFanPresent} eq 'present' || $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv } } sub dump { my $self = shift; foreach (@{$self->{fans}}) { $_->dump() if $_->{cpqRackCommonEnclosureFanPresent} eq 'present' || $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv } } package HP::BladeSystem::Component::CommonEnclosureSubsystem::FanSubsystem::Fan; our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem::FanSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, blacklisted => 0, info => undef, extendedinfo => undef, }; map { $self->{$_} = $params{$_} } grep /cpqRackCommonEnclosureFan/, keys %params; $self->{name} = $self->{cpqRackCommonEnclosureFanRack}.':'.$self->{cpqRackCommonEnclosureFanChassis}.':'.$self->{cpqRackCommonEnclosureFanIndex}; bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('f', $self->{name}); $self->add_info(sprintf 'fan %s is %s, location is %s, redundance is %s, condition is %s', $self->{name}, $self->{cpqRackCommonEnclosureFanPresent}, $self->{cpqRackCommonEnclosureFanLocation}, $self->{cpqRackCommonEnclosureFanRedundant}, $self->{cpqRackCommonEnclosureFanCondition}); if ($self->{cpqRackCommonEnclosureFanCondition} eq 'degraded') { $self->{info} .= sprintf ", (SparePartNum: %s)", $self->{cpqRackCommonEnclosureFanSparePartNumber}; $self->add_message(WARNING, $self->{info}); } elsif ($self->{cpqRackCommonEnclosureFanCondition} eq 'failed') { $self->{info} .= sprintf ", (SparePartNum: %s)", $self->{cpqRackCommonEnclosureFanSparePartNumber}; $self->add_message(CRITICAL, $self->{info}); } } sub dump { my $self = shift; printf "[FAN_%s]\n", $self->{name}; foreach (qw(cpqRackCommonEnclosureFanRack cpqRackCommonEnclosureFanChassis cpqRackCommonEnclosureFanIndex cpqRackCommonEnclosureFanEnclosureName cpqRackCommonEnclosureFanLocation cpqRackCommonEnclosureFanPartNumber cpqRackCommonEnclosureFanSparePartNumber cpqRackCommonEnclosureFanPresent cpqRackCommonEnclosureFanRedundant cpqRackCommonEnclosureFanRedundantGroupId cpqRackCommonEnclosureFanCondition cpqRackCommonEnclosureFanEnclosureSerialNum)) { printf "%s: %s\n", $_, $self->{$_}; } printf "info: %s\n", $self->{info}; printf "\n"; } 1; ././@LongLink0000644000000000000000000000022512262515411011640 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/TempSubsystem.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/BladeSystem/Com0000644000000000000000000001401212262515026027254 0ustar package HP::BladeSystem::Component::CommonEnclosureSubsystem::TempSubsystem; our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, condition => $params{condition}, status => $params{status}, temperatures => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; if ($params{runtime}->{options}->{customthresholds}) { if (-f $params{runtime}->{options}->{customthresholds}) { open CT, $params{runtime}->{options}->{customthresholds}; $params{runtime}->{options}->{customthresholds} = ; close CT; } foreach my $ct_items (split(/\//, $params{runtime}->{options}->{customthresholds})) { if ($ct_items =~ /^(\d+):(\d+)$/) { my $temp = $2; $params{runtime}->{options}->{thresholds}->{$1} = $temp; } else { die sprintf "invalid threshold %s", $ct_items; } } } $self->init(); return $self; } sub init { my $self = shift; my %params = @_; my $snmpwalk = $self->{rawdata}; my $oids = { cpqRackCommonEnclosureTempEntry => '1.3.6.1.4.1.232.22.2.3.1.2.1', cpqRackCommonEnclosureTempRack => '1.3.6.1.4.1.232.22.2.3.1.2.1.1', cpqRackCommonEnclosureTempChassis => '1.3.6.1.4.1.232.22.2.3.1.2.1.2', cpqRackCommonEnclosureTempSensorIndex => '1.3.6.1.4.1.232.22.2.3.1.2.1.3', cpqRackCommonEnclosureTempSensorEnclosureName => '1.3.6.1.4.1.232.22.2.3.1.2.1.4', cpqRackCommonEnclosureTempLocation => '1.3.6.1.4.1.232.22.2.3.1.2.1.5', cpqRackCommonEnclosureTempCurrent => '1.3.6.1.4.1.232.22.2.3.1.2.1.6', cpqRackCommonEnclosureTempThreshold => '1.3.6.1.4.1.232.22.2.3.1.2.1.7', cpqRackCommonEnclosureTempCondition => '1.3.6.1.4.1.232.22.2.3.1.2.1.8', cpqRackCommonEnclosureTempType => '1.3.6.1.4.1.232.22.2.3.1.2.1.9', cpqRackCommonEnclosureTempConditionValue => { 1 => 'other', 2 => 'ok', 3 => 'degraded', 4 => 'failed', }, cpqRackCommonEnclosureTempTypeValue => { 1 => 'other', 5 => 'blowout', 9 => 'caution', 15 => 'critical', }, }; # INDEX { cpqRackCommonEnclosureTempRack cpqRackCommonEnclosureTempChassis # cpqRackCommonEnclosureTempSensorIndex } foreach ($self->get_entries($oids, 'cpqRackCommonEnclosureTempEntry')) { push(@{$self->{temperatures}}, HP::BladeSystem::Component::CommonEnclosureSubsystem::TempSubsystem::Temp->new(%{$_})) if (($_->{cpqRackCommonEnclosureTempCurrent} != -1 && $_->{cpqRackCommonEnclosureTempThreshold} != -1) && ($_->{cpqRackCommonEnclosureTempThreshold} != 0)); } } sub check { my $self = shift; my $errorfound = 0; if (scalar (@{$self->{temperatures}}) == 0) { #$self->overall_check(); } else { foreach (@{$self->{temperatures}}) { $_->check(); } } } sub dump { my $self = shift; foreach (@{$self->{temperatures}}) { $_->dump(); } } package HP::BladeSystem::Component::CommonEnclosureSubsystem::TempSubsystem::Temp; our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem::TempSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, blacklisted => 0, info => undef, extendedinfo => undef, }; map { $self->{$_} = $params{$_} } grep /cpqRackCommonEnclosureTemp/, keys %params; $self->{name} = $params{cpqRackCommonEnclosureTempRack}.':'. $params{cpqRackCommonEnclosureTempChassis}.':'. $params{cpqRackCommonEnclosureTempSensorIndex}; bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('t', $self->{name}); if ($self->{cpqRackCommonEnclosureTempCurrent} > $self->{cpqRackCommonEnclosureTempThreshold}) { $self->add_info(sprintf "%s temperature too high (%d%s)", $self->{cpqRackCommonEnclosureTempLocation}, $self->{cpqRackCommonEnclosureTempCurrent}, $self->{runtime}->{options}->{celsius} ? "C" : "F"); $self->add_message(CRITICAL, $self->{info}); } else { $self->add_info(sprintf "%s temperature is %d%s (%d max)", $self->{cpqRackCommonEnclosureTempLocation}, $self->{cpqRackCommonEnclosureTempCurrent}, $self->{runtime}->{options}->{celsius} ? "C" : "F", $self->{cpqRackCommonEnclosureTempThreshold}); } if ($self->{runtime}->{options}->{perfdata} == 2) { $self->{runtime}->{plugin}->add_perfdata( label => sprintf('temp_%s', $self->{name}), value => $self->{cpqRackCommonEnclosureTempCurrent}, warning => $self->{cpqRackCommonEnclosureTempThreshold}, critical => $self->{cpqRackCommonEnclosureTempThreshold} ); } elsif ($self->{runtime}->{options}->{perfdata} == 1) { $self->{runtime}->{plugin}->add_perfdata( label => sprintf('temp_%s_%s', $self->{name}, $self->{cpqRackCommonEnclosureTempLocation}), value => $self->{cpqRackCommonEnclosureTempCurrent}, warning => $self->{cpqRackCommonEnclosureTempThreshold}, critical => $self->{cpqRackCommonEnclosureTempThreshold} ); } $self->add_extendedinfo(sprintf "temp_%s=%d", $self->{name}, $self->{cpqRackCommonEnclosureTempCurrent}); } sub dump { my $self = shift; printf "[TEMP_%s]\n", $self->{name}; foreach (qw(cpqRackCommonEnclosureTempRack cpqRackCommonEnclosureTempChassis cpqRackCommonEnclosureTempSensorIndex cpqRackCommonEnclosureTempSensorEnclosureName cpqRackCommonEnclosureTempLocation cpqRackCommonEnclosureTempCurrent cpqRackCommonEnclosureTempThreshold cpqRackCommonEnclosureTempCondition cpqRackCommonEnclosureTempType)) { printf "%s: %s\n", $_, $self->{$_}; } printf "info: %s\n\n", $self->{info}; } 1; nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Server.pm0000644000000000000000000003224012262515026026206 0ustar package HP::Server; use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, productname => 'unknown', }; bless $self, $class; if (! ($self->{runtime}->{plugin}->opts->hostname || $self->{runtime}->{plugin}->opts->snmpwalk)) { bless $self, 'HP::Proliant::CLI'; $self->{method} = 'cli'; } else { $self->check_snmp_and_model(); if ($self->{runtime}->{options}->{servertype}) { $self->{productname} = 'ProLiant' if $self->{runtime}->{options}->{servertype} eq 'proliant'; $self->{productname} = 'BladeSystem' if $self->{runtime}->{options}->{servertype} eq 'bladesystem'; $self->{productname} = 'Storage' if $self->{runtime}->{options}->{servertype} eq 'storage'; } if (! $self->{runtime}->{plugin}->check_messages()) { if ($self->{productname} =~ /ProLiant/) { bless $self, 'HP::Proliant::SNMP'; $self->trace(3, 'using HP::Proliant::SNMP'); } elsif ($self->{productname} =~ /^DL\d+\s*G\d+/) { bless $self, 'HP::Proliant::SNMP'; $self->trace(3, 'using HP::Proliant::SNMP'); } elsif ($self->{productname} =~ /OpenView .* appliance/) { bless $self, 'HP::Proliant::SNMP'; $self->trace(3, 'using HP::Proliant::SNMP'); } elsif ($self->{productname} =~ /BladeSystem/) { bless $self, 'HP::BladeSystem'; $self->trace(3, 'using HP::BladeSystem'); } elsif ($self->{productname} =~ /PROLIANT 4LEE/) { bless $self, 'HP::Storage'; $self->trace(3, 'using HP::Storage'); } elsif ($self->{productname} =~ /X\d+[\s\w]* Network Storage/) { # HP X1600 Network Storage System # HP X1600 G2 Network Storage System bless $self, 'HP::Proliant::SNMP'; $self->trace(3, 'using HP::Proliant::SNMP'); } elsif ($self->{productname} =~ /Storage/) { # fake bless $self, 'HP::Storage'; $self->trace(3, 'using HP::Storage'); } else { $self->add_message(CRITICAL, sprintf('unknown device%s', $self->{productname} eq 'unknown' ? '' : '('.$self->{productname}.')')); } $self->{method} = 'snmp'; } } if ($self->{runtime}->{options}->{blacklist} && -f $self->{runtime}->{options}->{blacklist}) { $self->{runtime}->{options}->{blacklist} = do { local (@ARGV, $/) = $self->{runtime}->{options}->{blacklist}; <> }; } return $self; } sub check_snmp_and_model { # uptime pruefen # dann whoami my $self = shift; if ($self->{runtime}->{plugin}->opts->snmpwalk) { my $response = {}; if (! -f $self->{runtime}->{plugin}->opts->snmpwalk) { $self->{runtime}->{plugin}->add_message(CRITICAL, sprintf 'file %s not found', $self->{runtime}->{plugin}->opts->snmpwalk); } elsif (-x $self->{runtime}->{plugin}->opts->snmpwalk) { my $cmd = sprintf "%s -On -v%s -c%s %s 1.3.6.1.4.1.232 2>&1", $self->{runtime}->{plugin}->opts->snmpwalk, $self->{runtime}->{plugin}->opts->protocol, $self->{runtime}->{plugin}->opts->community, $self->{runtime}->{plugin}->opts->hostname; open(WALK, "$cmd |"); while () { if (/^.*?\.(232\.[\d\.]+) = .*?: (\-*\d+)/) { $response->{'1.3.6.1.4.1.'.$1} = $2; } elsif (/^.*?\.(232\.[\d\.]+) = .*?: "(.*?)"/) { $response->{'1.3.6.1.4.1.'.$1} = $2; $response->{'1.3.6.1.4.1.'.$1} =~ s/\s+$//; } } close WALK; } else { open(MESS, $self->{runtime}->{plugin}->opts->snmpwalk); my $in_string = 0; my $in_hex_string = 0; my $hex_oid = 0; while() { chomp; if ($in_hex_string && /^(([0-9a-fA-F]{2})( [0-9a-fA-F]{2})*)\s*$/) { $response->{$hex_oid} .= " ".$1; } elsif ($in_string) { if (/(.*)"$/) { $response->{$hex_oid} .= $1; $in_string = 0; } else { $response->{$hex_oid} .= $_; } } elsif (/^.*?\.(232\.[\d\.]+) = .*?: (\-*\d+)\s*$/) { # SNMPv2-SMI::enterprises.232.6.2.6.7.1.3.1.4 = INTEGER: 6 $response->{'1.3.6.1.4.1.'.$1} = $2; $in_hex_string = 0; } elsif (/^.*?\.(232\.[\d\.]+) = .*?: "(.*?)"/) { $response->{'1.3.6.1.4.1.'.$1} = $2; $response->{'1.3.6.1.4.1.'.$1} =~ s/\s+$//; $in_hex_string = 0; } elsif (/^.*?\.(232\.[\d\.]+) = (\-*\d+)/) { $response->{'1.3.6.1.4.1.'.$1} = $2; $in_hex_string = 0; } elsif (/^.*?\.(232\.[\d\.]+) = "(.*?)"/) { $response->{'1.3.6.1.4.1.'.$1} = $2; $response->{'1.3.6.1.4.1.'.$1} =~ s/\s+$//; $in_hex_string = 0; } elsif (/^.*?\.(232\.[\d\.]+) = STRING: "(.*?[^"])$/) { $response->{'1.3.6.1.4.1.'.$1} = $2; $response->{'1.3.6.1.4.1.'.$1} =~ s/\s+$//; $in_string = 0; $in_hex_string = 0; } elsif (/^.*?\.(232\.[\d\.]+) = Hex-STRING: (.*)/) { $response->{'1.3.6.1.4.1.'.$1} = $2; $in_hex_string = 1; $hex_oid = '1.3.6.1.4.1.'.$1; } elsif (/^.*?\.(232\.[\d\.]+) =[ ]{1,2}Hex: (.*)/) { $response->{'1.3.6.1.4.1.'.$1} = $2; $in_hex_string = 1; $hex_oid = '1.3.6.1.4.1.'.$1; } } close MESS; } map { $response->{$_} =~ s/^\s+//; $response->{$_} =~ s/\s+$//; } keys %$response; $self->{rawdata} = $response; $self->whoami(); } else { if (eval "require Net::SNMP") { my %params = (); my $net_snmp_version = Net::SNMP->VERSION(); # 5.002000 or 6.000000 $params{'-translate'} = [ -timeticks => 0x0 ]; $params{'-hostname'} = $self->{runtime}->{plugin}->opts->hostname; $params{'-version'} = $self->{runtime}->{plugin}->opts->protocol; if ($self->{runtime}->{plugin}->opts->port) { $params{'-port'} = $self->{runtime}->{plugin}->opts->port; } if ($self->{runtime}->{plugin}->opts->protocol eq '3') { $params{'-username'} = $self->{runtime}->{plugin}->opts->username; if ($self->{runtime}->{plugin}->opts->authpassword) { $params{'-authpassword'} = $self->{runtime}->{plugin}->opts->authpassword; } if ($self->{runtime}->{plugin}->opts->authprotocol) { $params{'-authprotocol'} = $self->{runtime}->{plugin}->opts->authprotocol; } if ($self->{runtime}->{plugin}->opts->privpassword) { $params{'-privpassword'} = $self->{runtime}->{plugin}->opts->privpassword; } if ($self->{runtime}->{plugin}->opts->privprotocol) { $params{'-privprotocol'} = $self->{runtime}->{plugin}->opts->privprotocol; } } else { $params{'-community'} = $self->{runtime}->{plugin}->opts->community; } $self->{runtime}->{snmpparams} = \%params; my ($session, $error) = Net::SNMP->session(%params); $self->{session} = $session; if (! defined $session) { $self->add_message(CRITICAL, 'cannot create session object (maybe wrong hostname)'); $self->trace(1, Data::Dumper::Dumper(\%params)); } else { my $sysUpTime = '1.3.6.1.2.1.1.3.0'; my $result = $session->get_request( -varbindlist => [$sysUpTime] ); if (!defined($result)) { $self->add_message(CRITICAL, 'could not contact snmp agent'); $session->close; } else { $self->trace(3, 'snmp agent answered'); $self->whoami(); } } } else { $self->add_message(CRITICAL, 'could not find Net::SNMP module'); } } } sub whoami { my $self = shift; my $productname = undef; if ($self->{runtime}->{plugin}->opts->snmpwalk) { my $cpqSiProductName = '1.3.6.1.4.1.232.2.2.4.2.0'; my $cpqSsMibRevMajor = '1.3.6.1.4.1.232.8.1.1.0'; my $cpqSsBackplaneModel = '1.3.6.1.4.1.232.8.2.2.6.1.9'.'.1.1'; if ($productname = $self->{rawdata}->{$cpqSiProductName}) { if (! $productname) { $self->{productname} = 'ProLiant'; } else { $self->{productname} = $self->{rawdata}->{$cpqSiProductName}; } } elsif (exists $self->{rawdata}->{$cpqSsBackplaneModel}) { $self->{productname} = $self->{rawdata}->{$cpqSsBackplaneModel}; } elsif (exists $self->{rawdata}->{$cpqSsMibRevMajor}) { # at least there is a CPQSTSYS-MIB $self->{productname} = 'Storage' } else { $self->add_message(CRITICAL, 'snmpwalk returns no product name (cpqsinfo-mib)'); } } else { my $cpqSiProductName = '1.3.6.1.4.1.232.2.2.4.2.0'; my $cpqSsMibRevMajor = '1.3.6.1.4.1.232.8.1.1.0'; my $cpqSsBackplaneModel = '1.3.6.1.4.1.232.8.2.2.6.1.9'.'.1.1'; my $dummy = '1.3.6.1.2.1.1.5.0'; if ($productname = $self->valid_response($cpqSiProductName)) { if ($productname eq '') { $self->{productname} = 'ProLiant'; } else { $self->{productname} = $productname; } } elsif ($productname = $self->valid_response($cpqSsBackplaneModel)) { $self->{productname} = $productname; } elsif ($self->valid_response($cpqSsMibRevMajor)) { # at least there is a CPQSTSYS-MIB $self->{productname} = 'Storage' } else { $self->add_message(CRITICAL, 'snmpwalk returns no product name (cpqsinfo-mib)'); $self->{session}->close; } $self->trace(3, 'whoami: '.$self->{productname}); } } sub valid_response { my $self = shift; my $oid = shift; my $result = $self->{session}->get_request( -varbindlist => [$oid] ); if (!defined($result) || ! defined $result->{$oid} || $result->{$oid} eq 'noSuchInstance' || $result->{$oid} eq 'noSuchObject' || $result->{$oid} eq 'endOfMibView') { return undef; } else { return $result->{$oid}; } } sub trace { my $self = shift; my $level = shift; my $message = shift; if ($self->{runtime}->{options}->{verbose} >= $level) { printf "%s\n", $message; } } sub blacklist { my $self = shift; my $type = shift; my $name = shift; $self->{blacklisted} = $self->is_blacklisted($type, $name); } sub add_blacklist { my $self = shift; my $list = shift; $self->{runtime}->{options}->{blacklist} = join('/', (split('/', $self->{runtime}->{options}->{blacklist}), $list)); } sub is_blacklisted { my $self = shift; my $type = shift; my $name = shift; my $blacklisted = 0; # $name =~ s/\:/-/g; foreach my $bl_items (split(/\//, $self->{runtime}->{options}->{blacklist})) { if ($bl_items =~ /^(\w+):([\:\d\-,]+)$/) { my $bl_type = $1; my $bl_names = $2; foreach my $bl_name (split(/,/, $bl_names)) { if ($bl_type eq $type && $bl_name eq $name) { $blacklisted = 1; } } } elsif ($bl_items =~ /^(\w+)$/) { my $bl_type = $1; if ($bl_type eq $type) { $blacklisted = 1; } } } return $blacklisted; } sub add_message { my $self = shift; my $level = shift; my $message = shift; $self->{runtime}->{plugin}->add_message($level, $message) unless $self->{blacklisted}; if (exists $self->{failed}) { if ($level == UNKNOWN && $self->{failed} == OK) { $self->{failed} = $level; } elsif ($level > $self->{failed}) { $self->{failed} = $level; } } } sub remove_message { my $self = shift; my $level = shift; my $message = shift; $self->{runtime}->{plugin}->remove_message($level) ; } sub has_failed { my $self = shift; return $self->{failed}; } sub add_info { my $self = shift; my $info = shift; $info = $self->{blacklisted} ? $info.' (blacklisted)' : $info; $self->{info} = $info; if (! exists $self->{runtime}->{plugin}->{info}) { $self->{runtime}->{plugin}->{info} = []; } push(@{$self->{runtime}->{plugin}->{info}}, $info); } sub annotate_info { my $self = shift; my $annotation = shift; my $lastinfo = pop(@{$self->{runtime}->{plugin}->{info}}); $lastinfo .= sprintf ' (%s)', $annotation; push(@{$self->{runtime}->{plugin}->{info}}, $lastinfo); } sub add_extendedinfo { my $self = shift; my $info = shift; $self->{extendedinfo} = $info; return if ! $self->{runtime}->{options}->{extendedinfo}; if (! exists $self->{runtime}->{plugin}->{extendedinfo}) { $self->{runtime}->{plugin}->{extendedinfo} = []; } push(@{$self->{runtime}->{plugin}->{extendedinfo}}, $info); } sub get_extendedinfo { my $self = shift; if (! exists $self->{runtime}->{plugin}->{extendedinfo}) { $self->{runtime}->{plugin}->{extendedinfo} = []; } return join(' ', @{$self->{runtime}->{plugin}->{extendedinfo}}); } sub add_summary { my $self = shift; my $summary = shift; if (! exists $self->{runtime}->{plugin}->{summary}) { $self->{runtime}->{plugin}->{summary} = []; } push(@{$self->{runtime}->{plugin}->{summary}}, $summary); } sub get_summary { my $self = shift; if (! exists $self->{runtime}->{plugin}->{summary}) { $self->{runtime}->{plugin}->{summary} = []; } return join(', ', @{$self->{runtime}->{plugin}->{summary}}); } sub dumper { my $self = shift; my $object = shift; my $run = $object->{runtime}; delete $object->{runtime}; printf STDERR "%s\n", Data::Dumper::Dumper($object); $object->{runtime} = $run; } nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant.pm0000644000000000000000000005723212262515026026540 0ustar package HP::Proliant; use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; use Data::Dumper; our @ISA = qw(HP::Server); sub init { my $self = shift; $self->{components} = { powersupply_subsystem => undef, fan_subsystem => undef, temperature_subsystem => undef, cpu_subsystem => undef, memory_subsystem => undef, nic_subsystem => undef, disk_subsystem => undef, asr_subsystem => undef, event_subsystem => undef, }; $self->{serial} = 'unknown'; $self->{product} = 'unknown'; $self->{romversion} = 'unknown'; $self->collect(); if (! $self->{runtime}->{plugin}->check_messages() && ! exists $self->{noinst_hint}) { $self->set_serial(); $self->check_for_buggy_firmware(); $self->analyze_cpus(); $self->analyze_powersupplies(); $self->analyze_fan_subsystem(); $self->analyze_temperatures(); $self->analyze_memory_subsystem(); $self->analyze_nic_subsystem(); $self->analyze_disk_subsystem(); $self->analyze_asr_subsystem(); $self->analyze_event_subsystem(); $self->auto_blacklist(); $self->check_cpus(); $self->check_powersupplies(); $self->check_fan_subsystem(); $self->check_temperatures(); $self->check_memory_subsystem(); $self->check_nic_subsystem(); $self->check_disk_subsystem(); $self->check_asr_subsystem(); $self->check_event_subsystem(); } } sub identify { my $self = shift; foreach (qw(product serial romversion)) { $self->{$_} =~ s/^\s+//; $self->{$_} =~ s/\s+$//; } return sprintf "System: '%s', S/N: '%s', ROM: '%s'", $self->{product}, $self->{serial}, $self->{romversion}; } sub check_for_buggy_firmware { my $self = shift; my @buggyfirmwares = ( "P24 12/11/2001", "P24 11/15/2002", "D13 06/03/2003", "D13 09/15/2004", "P20 12/17/2002" ); $self->{runtime}->{options}->{buggy_firmware} = grep /^$self->{romversion}/, @buggyfirmwares; } sub dump { my $self = shift; printf STDERR "serial %s\n", $self->{serial}; printf STDERR "product %s\n", $self->{product}; printf STDERR "romversion %s\n", $self->{romversion}; printf STDERR "%s\n", Data::Dumper::Dumper($self->{components}); } sub analyze_powersupplies { my $self = shift; $self->{components}->{powersupply_subsystem} = HP::Proliant::Component::PowersupplySubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub analyze_fan_subsystem { my $self = shift; $self->{components}->{fan_subsystem} = HP::Proliant::Component::FanSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub analyze_temperatures { my $self = shift; $self->{components}->{temperature_subsystem} = HP::Proliant::Component::TemperatureSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub analyze_cpus { my $self = shift; $self->{components}->{cpu_subsystem} = HP::Proliant::Component::CpuSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub analyze_memory_subsystem { my $self = shift; $self->{components}->{memory_subsystem} = HP::Proliant::Component::MemorySubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub analyze_nic_subsystem { my $self = shift; return if $self->{method} ne "snmp"; $self->{components}->{nic_subsystem} = HP::Proliant::Component::NicSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub analyze_disk_subsystem { my $self = shift; $self->{components}->{disk_subsystem} = HP::Proliant::Component::DiskSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub analyze_asr_subsystem { my $self = shift; $self->{components}->{asr_subsystem} = HP::Proliant::Component::AsrSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub analyze_event_subsystem { my $self = shift; $self->{components}->{event_subsystem} = HP::Proliant::Component::EventSubsystem->new( rawdata => $self->{rawdata}, method => $self->{method}, runtime => $self->{runtime}, ); } sub check_cpus { my $self = shift; $self->{components}->{cpu_subsystem}->check(); $self->{components}->{cpu_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 2; } sub check_powersupplies { my $self = shift; $self->{components}->{powersupply_subsystem}->check(); $self->{components}->{powersupply_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 2; } sub check_fan_subsystem { my $self = shift; $self->{components}->{fan_subsystem}->check(); $self->{components}->{fan_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 2; } sub check_temperatures { my $self = shift; $self->{components}->{temperature_subsystem}->check(); $self->{components}->{temperature_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 2; } sub check_memory_subsystem { my $self = shift; $self->{components}->{memory_subsystem}->check(); $self->{components}->{memory_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 2; } sub check_nic_subsystem { my $self = shift; return if $self->{method} ne "snmp"; if ($self->{runtime}->{plugin}->{opts}->get('eval-nics')) { $self->{components}->{nic_subsystem}->check(); $self->{components}->{nic_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 2; } } sub check_disk_subsystem { my $self = shift; $self->{components}->{disk_subsystem}->check(); $self->{components}->{disk_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 2; # zum anhaengen an die normale ausgabe... da: 2 logical drives, 5 physical... $self->{runtime}->{plugin}->add_message(OK, $self->{components}->{disk_subsystem}->{summary}) if $self->{components}->{disk_subsystem}->{summary}; } sub check_asr_subsystem { my $self = shift; $self->{components}->{asr_subsystem}->check(); $self->{components}->{asr_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 2; } sub check_event_subsystem { my $self = shift; $self->{components}->{event_subsystem}->check(); $self->{components}->{event_subsystem}->dump() if $self->{runtime}->{options}->{verbose} >= 2; } sub auto_blacklist() { my $self = shift; if ($self->{product} =~ /380 g6/) { # http://bizsupport1.austin.hp.com/bc/docs/support/SupportManual/c01723408/c01723408.pdf seite 19 if ($self->{components}->{cpu_subsystem}->num_cpus() == 1) { $self->add_blacklist('ff/f:5,6'); } } elsif ($self->{product} =~ /380 g6/) { # http://bizsupport1.austin.hp.com/bc/docs/support/SupportManual/c01704762/c01704762.pdf Fan 2 is only required when processor 2 is installed in the server. } } package HP::Proliant::CLI; use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; our @ISA = qw(HP::Proliant); sub collect { my $self = shift; my $hpasmcli = undef; if (($self->{runtime}->{plugin}->opts->hpasmcli) && (-f $self->{runtime}->{plugin}->opts->hpasmcli) && (! -x $self->{runtime}->{plugin}->opts->hpasmcli)) { no strict 'refs'; open(BIRK, $self->{runtime}->{plugin}->opts->hpasmcli); # all output in one file prefixed with server|powersupply|fans|temp|dimm while() { chomp; $self->{rawdata} .= $_."\n"; } close BIRK; # If you run this script and redirect it's output to a file # you can use it for testing purposes with # --hpasmcli # It must not be executable. (chmod 644) my $diag = <<'EOEO'; hpasmcli=$(which hpasmcli) hpacucli=$(which hpacucli) for i in server powersupply fans temp dimm do $hpasmcli -s "show $i" | while read line do printf "%s %s\n" $i "$line" done done if [ -x "$hpacucli" ]; then for i in config status do $hpacucli ctrl all show $i | while read line do printf "%s %s\n" $i "$line" done done fi EOEO } else { #die "exec hpasmcli"; # alles einsammeln und in rawdata stecken my $hpasmcli = undef; $hpasmcli = $self->{runtime}->{plugin}->opts->hpasmcli ? $self->{runtime}->{plugin}->opts->hpasmcli : '/sbin/hpasmcli'; # check if this exists at all # descend the directory if ($self->{runtime}->{plugin}->opts->hpasmcli && -e $self->{runtime}->{plugin}->opts->hpasmcli) { $hpasmcli = $self->{runtime}->{plugin}->opts->hpasmcli; } elsif (-e '/sbin/hpasmcli') { $hpasmcli = '/sbin/hpasmcli'; } else { $hpasmcli = undef; } if ($hpasmcli) { if ($< != 0) { close STDIN; $hpasmcli = "sudo -S ".$hpasmcli; } $self->trace(2, sprintf "calling %s\n", $hpasmcli); $self->check_daemon(); if (! $self->{runtime}->{plugin}->check_messages()) { $self->check_hpasm_client($hpasmcli); if (! $self->{runtime}->{plugin}->check_messages()) { foreach my $component (qw(server fans temp dimm powersupply iml)) { if (open HPASMCLI, "$hpasmcli -s \"show $component\" ; close HPASMCLI; $self->{rawdata} .= join("\n", map { $component.' '.$_; } @output); } } if ($self->{runtime}->{options}->{hpacucli}) { #1 oder 0. pfad selber finden my $hpacucli = undef; if (-e '/usr/sbin/hpacucli') { $hpacucli = '/usr/sbin/hpacucli'; } elsif (-e '/usr/local/sbin/hpacucli') { $hpacucli = '/usr/local/sbin/hpacucli'; } else { $hpacucli = $hpasmcli; $hpacucli =~ s/^sudo\s*//; $hpacucli =~ s/hpasmcli/hpacucli/; $hpacucli = -e $hpacucli ? $hpacucli : undef; } if ($hpacucli) { if ($< != 0) { close STDIN; $hpacucli = "sudo -S ".$hpacucli; } $self->trace(2, sprintf "calling %s\n", $hpacucli); $self->check_hpacu_client($hpacucli); if (! $self->{runtime}->{plugin}->check_messages()) { if (open HPACUCLI, "$hpacucli ctrl all show status 2>&1|") { my @output = ; close HPACUCLI; $self->{rawdata} .= join("\n", map { 'status '.$_; } @output); } if (open HPACUCLI, "$hpacucli ctrl all show config 2>&1|") { my @output = ; close HPACUCLI; $self->{rawdata} .= join("\n", map { 'config '.$_; } @output); if (grep /Syntax error at "config"/, @output) { # older version of hpacucli CLI 7.50.18.0 foreach my $slot (0..10) { if (open HPACUCLI, "$hpacucli ctrl slot=$slot logicaldrive all show 2>&1|") { my @output = ; close HPACUCLI; $self->{rawdata} .= join("\n", map { 'config '.$_; } @output); } if (open HPACUCLI, "$hpacucli ctrl slot=$slot physicaldrive all show 2>&1|") { my @output = ; close HPACUCLI; $self->{rawdata} .= join("\n", map { 'config '.$_; } @output); } } } } } elsif ($self->{runtime}->{options}->{hpacucli} == 2) { # we probably don't have sudo-privileges, but we were compiled with # --enable-hpacucli=maybe # so we cover it up in silence $self->remove_message(UNKNOWN); $self->trace(2, sprintf "calling %s seems to have failed, but nobody cares\n", $hpacucli); } } else { if ($self->{runtime}->{options}->{noinstlevel} eq 'ok') { $self->add_message(OK, 'hpacucli is not installed. let\'s hope the best...'); } else { $self->add_message( uc $self->{runtime}->{options}->{noinstlevel}, 'hpacucli is not installed.'); } } } } } } else { if ($self->{runtime}->{options}->{noinstlevel} eq 'ok') { $self->add_message(OK, 'hpasm is not installed, i can only guess'); $self->{noinst_hint} = 1; } else { $self->add_message( uc $self->{runtime}->{options}->{noinstlevel}, 'hpasmcli is not installed.'); } } } } sub check_daemon { my $self = shift; my $multiproc_os_signatures_files = { '/etc/SuSE-release' => 'VERSION\s*=\s*8', '/etc/trustix-release' => '.*', '/etc/redhat-release' => '.*Pensacola.*', '/etc/debian_version' => '3\.1', '/etc/issue' => '.*Kernel 2\.4\.9-vmnix2.*', # VMware ESX Server 2.5.4 }; if (open PS, "/bin/ps -e -ocmd|") { my $numprocs = 0; my $numcliprocs = 0; my @procs = ; close PS; $numprocs = grep /hpasm.*d$/, map { (split /\s+/, $_)[0] } @procs; $numcliprocs = grep /hpasmcli/, grep !/check_hpasm/, @procs; if (! $numprocs ) { $self->add_message(CRITICAL, 'hpasmd needs to be restarted'); } elsif ($numprocs > 1) { my $known = 0; foreach my $osfile (keys %{$multiproc_os_signatures_files}) { if (-f $osfile) { open OSSIG, $osfile; if (grep /$multiproc_os_signatures_files->{$osfile}/, ) { $known = 1; } close OSSIG; } } if (! $known) { $self->add_message(UNKNOWN, 'multiple hpasmd procs'); } } if ($numcliprocs == 1) { $self->add_message(UNKNOWN, 'another hpasmcli is running'); } elsif ($numcliprocs > 1) { $self->add_message(UNKNOWN, 'hanging hpasmcli processes'); } } } sub check_hpasm_client { my $self = shift; my $hpasmcli = shift; if (open HPASMCLI, "$hpasmcli -s help 2>&1 |") { my @output = ; close HPASMCLI; if (grep /Could not communicate with hpasmd/, @output) { $self->add_message(CRITICAL, 'hpasmd needs to be restarted'); } elsif (grep /(asswor[dt]:)|(You must be root)/, @output) { $self->add_message(UNKNOWN, sprintf "insufficient rights to call %s", $hpasmcli); } elsif (grep /must have a tty/, @output) { $self->add_message(CRITICAL, 'sudo must be configured with requiretty=no (man sudo)'); } elsif (! grep /CLEAR/, @output) { $self->add_message(UNKNOWN, sprintf "insufficient rights to call %s", $hpasmcli); } } else { $self->add_message(UNKNOWN, sprintf "insufficient rights to call %s", $hpasmcli); } } sub check_hpacu_client { my $self = shift; my $hpacucli = shift; if (open HPACUCLI, "$hpacucli help 2>&1 |") { my @output = ; close HPACUCLI; if (grep /Another instance of hpacucli is running/, @output) { $self->add_message(UNKNOWN, 'another hpacucli is running'); } elsif (grep /You need to have administrator rights/, @output) { $self->add_message(UNKNOWN, sprintf "insufficient rights to call %s", $hpacucli); } elsif (grep /(asswor[dt]:)|(You must be root)/, @output) { $self->add_message(UNKNOWN, sprintf "insufficient rights to call %s", $hpacucli); } elsif (! grep /(CLI Syntax)|(ACU CLI)/, @output) { $self->add_message(UNKNOWN, sprintf "insufficient rights to call %s", $hpacucli); } } else { $self->add_message(UNKNOWN, sprintf "insufficient rights to call %s", $hpacucli); } } sub set_serial { my $self = shift; foreach (grep(/^server/, split(/\n/, $self->{rawdata}))) { if (/System\s+:\s+(.*[^\s])/) { $self->{product} = lc $1; } elsif (/Serial No\.\s+:\s+(\w+)/) { $self->{serial} = $1; } elsif (/ROM version\s+:\s+(.*[^\s])/) { $self->{romversion} = $1; } } $self->{serial} = $self->{serial}; $self->{product} = lc $self->{product}; $self->{romversion} = $self->{romversion}; foreach (qw(serial product romversion)) { $self->{$_} =~ s/\s+$//g; } } package HP::Proliant::SNMP; use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; our @ISA = qw(HP::Proliant); sub collect { my $self = shift; my %oidtables = ( system => "1.3.6.1.2.1.1", cpqSeProcessor => "1.3.6.1.4.1.232.1.2.2", cpqHePWSComponent => "1.3.6.1.4.1.232.6.2.9", cpqHeThermal => "1.3.6.1.4.1.232.6.2.6", cpqHeMComponent => "1.3.6.1.4.1.232.6.2.14", cpqDaComponent => "1.3.6.1.4.1.232.3.2", cpqSiComponent => "1.3.6.1.4.1.232.2.2", cpqSeRom => "1.3.6.1.4.1.232.1.2.6", cpqSasComponent => "1.3.6.1.4.1.232.5", cpqIdeComponent => "1.3.6.1.4.1.232.14", cpqFcaComponent => "1.3.6.1.4.1.232.16.2", cpqHeAsr => "1.3.6.1.4.1.232.6.2.5", cpqNic => "1.3.6.1.4.1.232.18.2", cpqHeEventLog => "1.3.6.1.4.1.232.6.2.11", # cpqHeComponent => "1.3.6.1.4.1.232.6.2", # cpqHeFComponent => "1.3.6.1.4.1.232.6.2.6.7", # cpqHeTComponent => "1.3.6.1.4.1.232.6.2.6.8", ); my %oidvalues = ( cpqHeEventLogSupported => "1.3.6.1.4.1.232.6.2.11.1.0", cpqHeEventLogCondition => "1.3.6.1.4.1.232.6.2.11.2.0", cpqNicIfLogMapOverallCondition => "1.3.6.1.4.1.232.18.2.2.2.0", cpqHeThermalTempStatus => "1.3.6.1.4.1.232.6.2.6.3.0", cpqHeThermalSystemFanStatus => "1.3.6.1.4.1.232.6.2.6.4.0", cpqHeThermalCpuFanStatus => "1.3.6.1.4.1.232.6.2.6.5.0", cpqHeAsrStatus => "1.3.6.1.4.1.232.6.2.5.1.0", cpqHeAsrCondition => "1.3.6.1.4.1.232.6.2.5.17.0", ); if ($self->{runtime}->{plugin}->opts->snmpwalk) { my $cpqSeMibCondition = '1.3.6.1.4.1.232.1.1.3.0'; # 2=ok my $cpqHeMibCondition = '1.3.6.1.4.1.232.6.1.3.0'; # hat nicht jeder if ($self->{productname} =~ /4LEE/) { # rindsarsch! $self->{rawdata}->{$cpqHeMibCondition} = 0; } if (! exists $self->{rawdata}->{$cpqHeMibCondition} && ! exists $self->{rawdata}->{$cpqSeMibCondition}) { # vlt. geht doch was $self->add_message(CRITICAL, 'snmpwalk returns no health data (cpqhlth-mib)'); } $self->{fullrawdata} = {}; %{$self->{fullrawdata}} = %{$self->{rawdata}}; $self->{rawdata} = {}; if (! $self->{runtime}->{plugin}->check_messages()) { # for a better simulation, only put those oids into # rawdata which would also be put by a real snmp agent. foreach my $table (keys %oidtables) { my $oid = $oidtables{$table}; $oid =~ s/\./\\./g; my $tmpoids = {}; my $tic = time; map { $tmpoids->{$_} = $self->{fullrawdata}->{$_} } grep /^$oid/, %{$self->{fullrawdata}}; my $tac = time; $self->trace(2, sprintf "%03d seconds for walk %s (%d oids)", $tac - $tic, $table, scalar(keys %{$tmpoids})); map { $self->{rawdata}->{$_} = $tmpoids->{$_} } keys %{$tmpoids}; } my @oids = values %oidvalues; map { $self->{rawdata}->{$_} = $self->{fullrawdata}->{$_} } @oids; } } else { my $net_snmp_version = Net::SNMP->VERSION(); # 5.002000 or 6.000000 #$params{'-translate'} = [ # -all => 0x0 #]; my ($session, $error) = Net::SNMP->session(%{$self->{runtime}->{snmpparams}}); if (! defined $session) { $self->{plugin}->add_message(CRITICAL, 'cannot create session object'); $self->trace(1, Data::Dumper::Dumper($self->{runtime}->{snmpparams})); } else { $session->translate(['-timeticks' => 0]); # revMajor is often used for discovery of hp devices my $cpqHeMibRev = '1.3.6.1.4.1.232.6.1'; my $cpqHeMibRevMajor = '1.3.6.1.4.1.232.6.1.1.0'; my $cpqHeMibCondition = '1.3.6.1.4.1.232.6.1.3.0'; my $result = $session->get_request( -varbindlist => [$cpqHeMibCondition] ); if ($self->{productname} =~ /4LEE/) { # rindsarsch! $result->{$cpqHeMibCondition} = 0; } if (!defined($result) || $result->{$cpqHeMibCondition} eq 'noSuchInstance' || $result->{$cpqHeMibCondition} eq 'noSuchObject' || $result->{$cpqHeMibCondition} eq 'endOfMibView') { $self->add_message(CRITICAL, 'snmpwalk returns no health data (cpqhlth-mib)'); $session->close; } else { # this is not reliable. many agents return 4=failed #if ($result->{$cpqHeMibCondition} != 2) { # $obstacle = "cmapeerstart"; #} } } if (! $self->{runtime}->{plugin}->check_messages()) { # snmp peer is alive $self->trace(2, sprintf "Protocol is %s", $self->{runtime}->{snmpparams}->{'-version'}); $session->translate; my $response = {}; #break the walk up in smaller pieces foreach my $table (keys %oidtables) { my $oid = $oidtables{$table}; my $tic = time; my $tmpresponse = $session->get_table( -baseoid => $oid); if (scalar (keys %{$tmpresponse}) == 0) { $self->trace(2, sprintf "maxrepetitions failed. fallback"); $tmpresponse = $session->get_table( -maxrepetitions => 1, -baseoid => $oid); } my $tac = time; $self->trace(2, sprintf "%03d seconds for walk %s (%d oids)", $tac - $tic, $table, scalar(keys %{$tmpresponse})); map { $response->{$_} = $tmpresponse->{$_} } keys %{$tmpresponse}; } my @oids = values %oidvalues; my $tic = time; my $tmpresponse = $session->get_request( -varbindlist => \@oids, ); my $tac = time; $self->trace(2, sprintf "%03d seconds for get various (%d oids)", $tac - $tic, scalar(keys %{$tmpresponse})); map { $response->{$_} = $tmpresponse->{$_} } keys %{$tmpresponse}; $session->close(); $self->{rawdata} = $response; } } return $self->{runtime}->{plugin}->check_messages(); } sub set_serial { my $self = shift; my $cpqSiSysSerialNum = "1.3.6.1.4.1.232.2.2.2.1.0"; my $cpqSiProductName = "1.3.6.1.4.1.232.2.2.4.2.0"; my $cpqSeSysRomVer = "1.3.6.1.4.1.232.1.2.6.1.0"; $self->{serial} = SNMP::Utils::get_object($self->{rawdata}, $cpqSiSysSerialNum); $self->{product} = SNMP::Utils::get_object($self->{rawdata}, $cpqSiProductName); $self->{romversion} = SNMP::Utils::get_object($self->{rawdata}, $cpqSeSysRomVer); if ($self->{romversion} && $self->{romversion} =~ #/(\d{2}\/\d{2}\/\d{4}).*?([ADP]{1}\d{2}).*/) { /(\d{2}\/\d{2}\/\d{4}).*?Family.*?([A-Z]{1})(\d+).*/) { $self->{romversion} = sprintf("%s%02d %s", $2, $3, $1); } elsif ($self->{romversion} && $self->{romversion} =~ /([ADP]{1}\d{2})\-(\d{2}\/\d{2}\/\d{4})/) { $self->{romversion} = sprintf("%s %s", $1, $2); } if (!$self->{serial} && $self->{romversion}) { # this probably is a very, very old server. $self->{serial} = "METHUSALEM"; $self->{runtime}->{scrapiron} = 1; } $self->{serial} = $self->{serial}; $self->{product} = lc $self->{product}; $self->{romversion} = $self->{romversion}; $self->{runtime}->{product} = $self->{product}; } 1; nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/SNMP/0000755000000000000000000000000012262515026025156 5ustar nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/SNMP/Utils.pm0000644000000000000000000000505612262515026026622 0ustar package SNMP::Utils; use strict; { sub get_indices { my $oids = shift; my $entry = shift; my $numindices = shift; # find all oids beginning with $entry # then skip one field for the sequence # then read the next numindices fields my $entrypat = $entry; $entrypat =~ s/\./\\\./g; my @indices = map { /^$entrypat\.\d+\.(.*)/ && $1; } grep { /^$entrypat/ } keys %{$oids}; my %seen = (); my @o = map {[split /\./]} sort grep !$seen{$_}++, @indices; return @o; } sub get_size { my $oids = shift; my $entry = shift; my $entrypat = $entry; $entrypat =~ s/\./\\\./g; my @entries = grep { /^$entrypat/ } keys %{$oids}; return scalar(@entries); } sub get_object { my $oids = shift; my $object = shift; my @indices = @_; #my $oid = $object.'.'.join('.', @indices); my $oid = $object; $oid .= '.'.join('.', @indices) if (@indices); return $oids->{$oid}; } sub get_object_value { my $oids = shift; my $object = shift; my $values = shift; my @indices = @_; my $key = get_object($oids, $object, @indices); if (defined $key) { return $values->{$key}; } else { return undef; } } #SNMP::Utils::counter([$idxs1, $idxs2], $idx1, $idx2), # this flattens a n-dimensional array and returns the absolute position # of the element at position idx1,idx2,...,idxn # element 1,2 in table 0,0 0,1 0,2 1,0 1,1 1,2 2,0 2,1 2,2 is at pos 6 sub get_number { my $indexlists = shift; #, zeiger auf array aus [1, 2] my @element = @_; my $dimensions = scalar(@{$indexlists->[0]}); my @sorted = (); my $number = 0; if ($dimensions == 1) { @sorted = sort { $a->[0] <=> $b->[0] } @{$indexlists}; } elsif ($dimensions == 2) { @sorted = sort { $a->[0] <=> $b->[0] || $a->[1] <=> $b->[1] } @{$indexlists}; } elsif ($dimensions == 3) { @sorted = sort { $a->[0] <=> $b->[0] || $a->[1] <=> $b->[1] || $a->[2] <=> $b->[2] } @{$indexlists}; } foreach (@sorted) { if ($dimensions == 1) { if ($_->[0] == $element[0]) { last; } } elsif ($dimensions == 2) { if ($_->[0] == $element[0] && $_->[1] == $element[1]) { last; } } elsif ($dimensions == 3) { if ($_->[0] == $element[0] && $_->[1] == $element[1] && $_->[2] == $element[2]) { last; } } $number++; } return ++$number; } } nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/0000755000000000000000000000000012262515026026171 5ustar ././@LongLink0000644000000000000000000000015312262515411011640 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000010312262515026027341 0ustar package HP::Proliant::Component; our @ISA = qw(HP::Proliant); 1; ././@LongLink0000644000000000000000000000015112262515411011636 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000755000000000000000000000000012262515026027345 5ustar ././@LongLink0000644000000000000000000000017612262515411011645 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000755000000000000000000000000012262515026027345 5ustar ././@LongLink0000644000000000000000000000020412262515411011635 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/CLI.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000462712262515026027360 0ustar package HP::Proliant::Component::PowersupplySubsystem::CLI; our @ISA = qw(HP::Proliant::Component::PowersupplySubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, powersupplies => [], powerconverters => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->init(%params); return $self; } sub init { my $self = shift; my %params = @_; my %tmpps = ( runtime => $self->{runtime}, cpqHeFltTolPowerSupplyChassis => 1, ); my $inblock = 0; foreach (grep(/^powersupply/, split(/\n/, $self->{rawdata}))) { s/^powersupply\s*//g; if (/^Power supply #(\d+)/) { if ($inblock) { $inblock = 0; push(@{$self->{powersupplies}}, HP::Proliant::Component::PowersupplySubsystem::Powersupply->new(%tmpps)); %tmpps = ( runtime => $self->{runtime}, cpqHeFltTolPowerSupplyChassis => 1, ); } $tmpps{cpqHeFltTolPowerSupplyBay} = $1; $inblock = 1; } elsif (/\s*Present\s+:\s+(\w+)/) { $tmpps{cpqHeFltTolPowerSupplyPresent} = lc $1 eq 'yes' ? 'present' : lc $1 eq 'no' ? 'absent': 'other'; } elsif (/\s*Redundant\s*:\s+(\w+)/) { $tmpps{cpqHeFltTolPowerSupplyRedundant} = lc $1 eq 'yes' ? 'redundant' : lc $1 eq 'no' ? 'notRedundant' : 'other'; } elsif (/\s*Condition\s*:\s+(\w+)/) { $tmpps{cpqHeFltTolPowerSupplyCondition} = lc $1; } elsif (/\s*Power\s*:\s+(\d+)/) { $tmpps{cpqHeFltTolPowerSupplyCapacityUsed} = $1; } elsif (/\s*Power Supply not present/) { $tmpps{cpqHeFltTolPowerSupplyPresent} = "absent"; $tmpps{cpqHeFltTolPowerSupplyCondition} = "other"; $tmpps{cpqHeFltTolPowerSupplyRedundant} = "notRedundant"; } elsif (/^\s*$/) { if ($inblock) { $inblock = 0; push(@{$self->{powersupplies}}, HP::Proliant::Component::PowersupplySubsystem::Powersupply->new(%tmpps)); %tmpps = ( runtime => $self->{runtime}, cpqHeFltTolPowerSupplyChassis => 1, ); } } } if ($inblock) { push(@{$self->{powersupplies}}, HP::Proliant::Component::PowersupplySubsystem::Powersupply->new(%tmpps)); %tmpps = ( runtime => $params{runtime}, ); } } 1; ././@LongLink0000644000000000000000000000020512262515411011636 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/SNMP.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000600612262515026027351 0ustar package HP::Proliant::Component::PowersupplySubsystem::SNMP; our @ISA = qw(HP::Proliant::Component::PowersupplySubsystem HP::Proliant::Component::SNMP); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, powersupplies => [], powerconverters => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->init(%params); return $self; } sub init { my $self = shift; my %params = @_; my $snmpwalk = $self->{rawdata}; my $oids = { cpqHeFltTolPowerSupplyEntry => "1.3.6.1.4.1.232.6.2.9.3.1", cpqHeFltTolPowerSupplyChassis => "1.3.6.1.4.1.232.6.2.9.3.1.1", cpqHeFltTolPowerSupplyBay => "1.3.6.1.4.1.232.6.2.9.3.1.2", cpqHeFltTolPowerSupplyPresent => "1.3.6.1.4.1.232.6.2.9.3.1.3", cpqHeFltTolPowerSupplyCondition => "1.3.6.1.4.1.232.6.2.9.3.1.4", cpqHeFltTolPowerSupplyRedundant => "1.3.6.1.4.1.232.6.2.9.3.1.9", cpqHeFltTolPowerSupplyPresentValue => { 1 => "other", 2 => "absent", 3 => "present", }, cpqHeFltTolPowerSupplyConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, cpqHeFltTolPowerSupplyCapacityUsed => '1.3.6.1.4.1.232.6.2.9.3.1.7', cpqHeFltTolPowerSupplyCapacityMaximum => '1.3.6.1.4.1.232.6.2.9.3.1.8', cpqHeFltTolPowerSupplyRedundantValue => { 1 => "other", 2 => "notRedundant", 3 => "redundant", }, }; # INDEX { cpqHeFltTolPowerSupplyChassis, cpqHeFltTolPowerSupplyBay } foreach ($self->get_entries($oids, 'cpqHeFltTolPowerSupplyEntry')) { push(@{$self->{powersupplies}}, HP::Proliant::Component::PowersupplySubsystem::Powersupply->new(%{$_})); } $oids = { cpqHePowerConvEntry => "1.3.6.1.4.1.232.6.2.13.3.1", cpqHePowerConvChassis => "1.3.6.1.4.1.232.6.2.13.3.1.1", cpqHePowerConvIndex => "1.3.6.1.4.1.232.6.2.13.3.1.2", cpqHePowerConvPresent => "1.3.6.1.4.1.232.6.2.13.3.1.3", cpqHePowerConvRedundant => "1.3.6.1.4.1.232.6.2.13.3.1.6", cpqHePowerConvCondition => "1.3.6.1.4.1.232.6.2.13.3.1.8", cpqHePowerConvPresentValue => { 1 => "other", 2 => "absent", 3 => "present", }, cpqHePowerConvRedundantValue => { 1 => "other", 2 => "notRedundant", 3 => "redundant", }, cpqHePowerConvConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, cpqHePowerConvHwLocation => "1.3.6.1.4.1.232.6.2.13.3.1.9", }; # INDEX { cpqHePowerConvChassis cpqHePowerConvIndex } foreach ($self->get_entries($oids, 'cpqHePowerConvEntry')) { push(@{$self->{powerconverters}}, HP::Proliant::Component::PowersupplySubsystem::Powerconverter->new(%{$_})); } # keine ahnung, was man damit machen kann } ././@LongLink0000644000000000000000000000016612262515411011644 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/FanSubsystem/nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000755000000000000000000000000012262515026027345 5ustar ././@LongLink0000644000000000000000000000017412262515411011643 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/FanSubsystem/CLI.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000713412262515026027354 0ustar package HP::Proliant::Component::FanSubsystem::CLI; our @ISA = qw(HP::Proliant::Component::FanSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, fans => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->init(%params); return $self; } # partner not available = cpqHeFltTolFanRedundantPartner=0 # cpqHeFltTolFanTypeValue = other sub init { my $self = shift; my %params = @_; my %tmpfan = (); foreach (grep(/^fans/, split(/\n/, $self->{rawdata}))) { s/^fans //g; if (/^#(\d+)\s+([\w#_\/\-]+)\s+(\w+)\s+(\w+)\s+(FAILED|[N\/A\d]+)%*\s+([\w\/]+)\s+(FAILED|[N\/A\d]+)\s+(\w+)/) { %tmpfan = ( cpqHeFltTolFanIndex => $1, cpqHeFltTolFanLocale => lc $2, cpqHeFltTolFanPresent => lc $3, cpqHeFltTolFanSpeed => lc $4, cpqHeFltTolFanPctMax => lc $5, # (FAILED|[N\/A\d]+) cpqHeFltTolFanRedundant => lc $6, cpqHeFltTolFanRedundantPartner => lc $7, # (FAILED|[N\/A\d]+) cpqHeFltTolFanHotPlug => lc $8, ); } elsif (/^#(\d+)\s+([\w#_\/\-]+?)(Yes|No|N\/A)\s+(\w+)\s+(FAILED|[N\/A\d]+)%*\s+([\w\/]+)\s+(FAILED|[N\/A\d]+)\s+(\w+)/) { # #5 SCSI_BACKPLANE_ZONEYes NORMAL N/A .... %tmpfan = ( cpqHeFltTolFanIndex => $1, cpqHeFltTolFanLocale => lc $2, cpqHeFltTolFanPresent => lc $3, cpqHeFltTolFanSpeed => lc $4, cpqHeFltTolFanPctMax => lc $5, cpqHeFltTolFanRedundant => lc $6, cpqHeFltTolFanRedundantPartner => lc $7, cpqHeFltTolFanHotPlug => lc $8, ); } elsif (/^#(\d+)\s+([\w#_\/\-]+)\s+[NOno]+\s/) { # Fan is not installed. #2 CPU#2 No - - No N/A - } elsif (/^#(\d+)/) { main::contact_author("FAN", $_); } if (%tmpfan) { $tmpfan{runtime} = $params{runtime}; $tmpfan{cpqHeFltTolFanChassis} = 1; # geht aus hpasmcli nicht hervor $tmpfan{cpqHeFltTolFanType} = 'other'; if ($tmpfan{cpqHeFltTolFanPctMax} !~ /^\d+$/) { if ($tmpfan{cpqHeFltTolFanSpeed} eq 'normal') { $tmpfan{cpqHeFltTolFanPctMax} = 50; } elsif ($tmpfan{cpqHeFltTolFanSpeed} eq 'high') { $tmpfan{cpqHeFltTolFanPctMax} = 100; } else { $tmpfan{cpqHeFltTolFanPctMax} = 0; } } if($tmpfan{cpqHeFltTolFanSpeed} eq 'failed') { $tmpfan{cpqHeFltTolFanCondition} = 'failed'; } elsif($tmpfan{cpqHeFltTolFanSpeed} eq 'n/a') { $tmpfan{cpqHeFltTolFanCondition} = 'other'; } else { $tmpfan{cpqHeFltTolFanCondition} = 'ok'; } $tmpfan{cpqHeFltTolFanRedundant} = $tmpfan{cpqHeFltTolFanRedundant} eq 'yes' ? 'redundant' : $tmpfan{cpqHeFltTolFanRedundant} eq 'no' ? 'notRedundant' : 'other'; $tmpfan{cpqHeFltTolFanPresent} = $tmpfan{cpqHeFltTolFanPresent} eq 'yes' ? 'present' : $tmpfan{cpqHeFltTolFanPresent} eq 'failed' ? 'present' : $tmpfan{cpqHeFltTolFanPresent} eq 'no' ? 'absent' : 'other'; $tmpfan{cpqHeFltTolFanHotPlug} = $tmpfan{cpqHeFltTolFanHotPlug} eq 'yes' ? 'hotPluggable' : $tmpfan{cpqHeFltTolFanHotPlug} eq 'no' ? 'nonHotPluggable' : 'other'; push(@{$self->{fans}}, HP::Proliant::Component::FanSubsystem::Fan->new(%tmpfan)); %tmpfan = (); } } } sub overall_check { my $self = shift; # nix. nur wegen der gleichheit mit snmp return 0; } 1; ././@LongLink0000644000000000000000000000017512262515411011644 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/FanSubsystem/SNMP.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000001571512262515026027360 0ustar package HP::Proliant::Component::FanSubsystem::SNMP; our @ISA = qw(HP::Proliant::Component::FanSubsystem HP::Proliant::Component::SNMP); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, fans => [], he_fans => [], th_fans => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->overall_init(%params); $self->he_init(%params); $self->te_init(%params); $self->unite(); return $self; } sub overall_init { my $self = shift; my %params = @_; my $snmpwalk = $params{rawdata}; # overall my $cpqHeThermalSystemFanStatus = '1.3.6.1.4.1.232.6.2.6.4.0'; my $cpqHeThermalSystemFanStatusValue = { 1 => 'other', 2 => 'ok', 3 => 'degraded', 4 => 'failed', }; my $cpqHeThermalCpuFanStatus = '1.3.6.1.4.1.232.6.2.6.5.0'; my $cpqHeThermalCpuFanStatusValue = { 1 => 'other', 2 => 'ok', 4 => 'failed', # shutdown }; $self->{sysstatus} = SNMP::Utils::get_object_value( $snmpwalk, $cpqHeThermalSystemFanStatus, $cpqHeThermalSystemFanStatusValue); $self->{cpustatus} = SNMP::Utils::get_object_value( $snmpwalk, $cpqHeThermalCpuFanStatus, $cpqHeThermalCpuFanStatusValue); $self->{sysstatus} |= lc $self->{sysstatus}; $self->{cpustatus} |= lc $self->{cpustatus}; } sub te_init { my $self = shift; my %params = @_; my $snmpwalk = $params{rawdata}; my $ignore_redundancy = $params{ignore_redundancy}; # cpqHeThermalFanTable my $oids = { cpqHeThermalFanEntry => '1.3.6.1.4.1.232.6.2.6.6.1', cpqHeThermalFanIndex => '1.3.6.1.4.1.232.6.2.6.6.1.1', cpqHeThermalFanRequired => '1.3.6.1.4.1.232.6.2.6.6.1.2', cpqHeThermalFanPresent => '1.3.6.1.4.1.232.6.2.6.6.1.3', cpqHeThermalFanCpuFan => '1.3.6.1.4.1.232.6.2.6.6.1.4', cpqHeThermalFanStatus => '1.3.6.1.4.1.232.6.2.6.6.1.5', cpqHeThermalFanHwLocation => '1.3.6.1.4.1.232.6.2.6.6.1.6', cpqHeThermalFanRequiredValue => { 1 => 'other', 2 => 'nonRequired', 3 => 'required', }, cpqHeThermalFanPresentValue => { 1 => 'other', 2 => 'absent', 3 => 'present', }, cpqHeThermalFanCpuFanValue => { 1 => 'other', 2 => 'systemFan', 3 => 'cpuFan', }, cpqHeThermalFanStatusValue => { 1 => 'other', 2 => 'ok', 4 => 'failed', }, }; # INDEX { cpqHeThermalFanIndex } foreach ($self->get_entries($oids, 'cpqHeThermalFanEntry')) { next if ! $_->{cpqHeThermalFanPresent}; push(@{$self->{th_fans}}, HP::Proliant::Component::FanSubsystem::Fan->new(%{$_})); } } sub he_init { my $self = shift; my %params = @_; my $snmpwalk = $params{rawdata}; my $ignore_redundancy = $params{ignore_redundancy}; # cpqHeFltTolFanTable my $oids = { cpqHeFltTolFanEntry => '1.3.6.1.4.1.232.6.2.6.7.1', cpqHeFltTolFanChassis => '1.3.6.1.4.1.232.6.2.6.7.1.1', cpqHeFltTolFanIndex => '1.3.6.1.4.1.232.6.2.6.7.1.2', cpqHeFltTolFanLocale => '1.3.6.1.4.1.232.6.2.6.7.1.3', cpqHeFltTolFanPresent => '1.3.6.1.4.1.232.6.2.6.7.1.4', cpqHeFltTolFanType => '1.3.6.1.4.1.232.6.2.6.7.1.5', cpqHeFltTolFanSpeed => '1.3.6.1.4.1.232.6.2.6.7.1.6', cpqHeFltTolFanRedundant => '1.3.6.1.4.1.232.6.2.6.7.1.7', cpqHeFltTolFanRedundantPartner => '1.3.6.1.4.1.232.6.2.6.7.1.8', cpqHeFltTolFanCondition => '1.3.6.1.4.1.232.6.2.6.7.1.9', cpqHeFltTolFanHotPlug => '1.3.6.1.4.1.232.6.2.6.7.1.10', cpqHeFltTolFanHwLocation => '1.3.6.1.4.1.232.6.2.6.7.1.11', cpqHeFltTolFanCurrentSpeed => '1.3.6.1.4.1.232.6.2.6.7.1.12', cpqHeFltTolFanLocaleValue => { 1 => "other", 2 => "unknown", 3 => "system", 4 => "systemBoard", 5 => "ioBoard", 6 => "cpu", 7 => "memory", 8 => "storage", 9 => "removableMedia", 10 => "powerSupply", 11 => "ambient", 12 => "chassis", 13 => "bridgeCard", }, cpqHeFltTolFanPresentValue => { 1 => "other", 2 => "absent", 3 => "present", }, cpqHeFltTolFanSpeedValue => { 1 => "other", 2 => "normal", 3 => "high", }, cpqHeFltTolFanRedundantValue => { 1 => "other", 2 => "notRedundant", 3 => "redundant", }, cpqHeFltTolFanTypeValue => { 1 => "other", 2 => "tachInput", 3 => "spinDetect", }, cpqHeFltTolFanConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, cpqHeFltTolFanHotPlugValue => { 1 => "other", 2 => "nonHotPluggable", 3 => "hotPluggable", }, }; # INDEX { cpqHeFltTolFanChassis, cpqHeFltTolFanIndex } foreach ($self->get_entries($oids, 'cpqHeFltTolFanEntry')) { next if ! defined $_->{cpqHeFltTolFanIndex}; # z.b. USM65201WS hat nur solche fragmente. die werden erst gar nicht # als fans akzeptiert. dafuer gibts dann die overall condition # SNMPv2-SMI::enterprises.232.6.2.6.7.1.1.0.1 = INTEGER: 0 # SNMPv2-SMI::enterprises.232.6.2.6.7.1.1.0.2 = INTEGER: 0 $_->{cpqHeFltTolFanPctMax} = ($_->{cpqHeFltTolFanPresent} eq 'present') ? 50 : 0; push(@{$self->{he_fans}}, HP::Proliant::Component::FanSubsystem::Fan->new(%{$_})); } } sub unite { my $self = shift; my $tmpfans = {}; foreach (@{$self->{he_fans}}) { $tmpfans->{$_->{cpqHeFltTolFanIndex}} = $_; } foreach (@{$self->{he_fans}}) { if (exists $tmpfans->{$_->{cpqHeFltTolFanRedundantPartner}}) { $_->{partner} = $tmpfans->{$_->{cpqHeFltTolFanRedundantPartner}}; } else { $_->{partner} = undef; } } @{$self->{fans}} = @{$self->{he_fans}}; } sub overall_check { my $self = shift; my $result = 0; $self->blacklist('ofs', ''); if ($self->{sysstatus} && $self->{cpustatus}) { if ($self->{sysstatus} eq 'degraded') { $result = 1; $self->add_message(WARNING, sprintf 'system fan overall status is %s', $self->{sysstatus}); } elsif ($self->{sysstatus} eq 'failed') { $result = 2; $self->add_message(CRITICAL, sprintf 'system fan overall status is %s', $self->{sysstatus}); } if ($self->{cpustatus} eq 'degraded') { $result = 1; $self->add_message(WARNING, sprintf 'cpu fan overall status is %s', $self->{cpustatus}); } elsif ($self->{cpustatus} eq 'failed') { $result = 2; $self->add_message(CRITICAL, sprintf 'cpu fan overall status is %s', $self->{cpustatus}); } $self->add_info(sprintf 'overall fan status: system=%s, cpu=%s', $self->{sysstatus}, $self->{cpustatus}); } else { $result = 0; $self->add_info('this system seems to be water-cooled. no fans found'); } return $result; } 1; ././@LongLink0000644000000000000000000000017312262515411011642 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/MemorySubsystem.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000001403012262515026027345 0ustar package HP::Proliant::Component::MemorySubsystem; our @ISA = qw(HP::Proliant::Component); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, condition => $params{condition}, status => $params{status}, blacklisted => 0, info => undef, extendedinfo => undef, dimms => [], }; bless $self, $class; if ($self->{method} eq 'snmp') { return HP::Proliant::Component::MemorySubsystem::SNMP->new(%params); } elsif ($self->{method} eq 'cli') { return HP::Proliant::Component::MemorySubsystem::CLI->new(%params); } else { die "unknown method"; } } sub check { my $self = shift; my $errorfound = 0; $self->add_info('checking memory'); foreach (@{$self->{dimms}}) { $_->check(); # info ausfuellen } if ((scalar(grep { $_->is_present() && ($_->{condition} ne 'n/a' && $_->{condition} ne 'other' ) } @{$self->{dimms}})) != 0) { foreach (@{$self->{dimms}}) { if (($_->is_present()) && ($_->{condition} ne 'ok')) { $_->add_message(CRITICAL, $_->{info}); $errorfound++; } } } else { if ($self->{runtime}->{options}->{ignore_dimms}) { $self->add_message(OK, sprintf "ignoring %d dimms with status 'n/a' ", scalar(grep { ($_->is_present()) } @{$self->{dimms}})); } elsif ($self->{runtime}->{options}->{buggy_firmware}) { $self->add_message(OK, sprintf "ignoring %d dimms with status 'n/a' because of buggy firmware", scalar(grep { ($_->is_present()) } @{$self->{dimms}})); } else { $self->add_message(WARNING, sprintf "status of all %d dimms is n/a (please upgrade firmware)", scalar(grep { $_->is_present() } @{$self->{dimms}})); $errorfound++; } } foreach (@{$self->{dimms}}) { printf "%s\n", $_->{info} if $self->{runtime}->{options}->{verbose} >= 2; } if (! $errorfound && $self->is_faulty()) { #if ($self->is_faulty()) { $self->add_message(WARNING, sprintf 'overall memory error found'); } } sub dump { my $self = shift; printf "i dump the memory\n"; foreach (@{$self->{dimms}}) { $_->dump(); } } package HP::Proliant::Component::MemorySubsystem::Dimm; our @ISA = qw(HP::Proliant::Component::MemorySubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, cartridge => $params{cartridge}, module => $params{module}, size => $params{size} || 0, status => $params{status}, condition => $params{condition}, type => $params{type}, blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->{name} = sprintf '%s:%s', $self->{cartridge}, $self->{module}; $self->{location} = sprintf 'module %s @ cartridge %s', $self->{module}, $self->{cartridge}; return $self; } sub check { my $self = shift; # check dient nur dazu, info und extended_info zu füllen # die eigentliche bewertung findet eins höher statt $self->blacklist('d', $self->{name}); if (($self->{status} eq 'present') || ($self->{status} eq 'good')) { if ($self->{condition} eq 'other') { $self->add_info(sprintf 'dimm %s (%s) is n/a', $self->{name}, $self->{location}); } elsif ($self->{condition} ne 'ok') { $self->add_info( sprintf "dimm module %s (%s) needs attention (%s)", $self->{name}, $self->{location}, $self->{condition}); } else { $self->add_info(sprintf 'dimm module %s (%s) is %s', $self->{name}, $self->{location}, $self->{condition}); } } elsif ($self->{status} eq 'notPresent') { $self->add_info(sprintf 'dimm module %s (%s) is not present', $self->{name}, $self->{location}); } else { $self->add_info( sprintf "dimm module %s (%s) needs attention (%s)", $self->{name}, $self->{location}, $self->{condition}); } } sub is_present { my $self = shift; my @signs_of_presence = (qw(present good add upgraded doesnotmatch notsupported badconfig degraded)); return scalar(grep { $self->{status} eq $_ } @signs_of_presence); } sub dump { my $self = shift; #printf "[DIMM_%s_%s]\n", $self->{cartridge}, $self->{module}; #foreach (qw(cartridge module size status condition info)) { # printf "%s: %s\n", $_, $self->{$_}; #} #printf "status: %s\n", $self->{status} if exists $self->{status}; #printf "\n"; printf "car %02d mod %02d siz %.0f sta %-12s con %-10s typ %s\n", $self->{cartridge}, $self->{module}, $self->{size}, $self->{status}, $self->{condition}, defined $self->{type} ? $self->{type} : ""; } package HP::Proliant::Component::MemorySubsystem::Cartridge; our @ISA = qw(HP::Proliant::Component::MemorySubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { cpqHeResMemBoardSlotIndex => $params{cpqHeResMemBoardSlotIndex}, cpqHeResMemBoardOnlineStatus => $params{cpqHeResMemBoardOnlineStatus}, cpqHeResMemBoardErrorStatus => $params{cpqHeResMemBoardErrorStatus}, cpqHeResMemBoardNumSockets => $params{cpqHeResMemBoardNumSockets}, cpqHeResMemBoardOsMemSize => $params{cpqHeResMemBoardOsMemSize}, cpqHeResMemBoardTotalMemSize => $params{cpqHeResMemBoardTotalMemSize}, cpqHeResMemBoardCondition => $params{cpqHeResMemBoardCondition}, blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; return $self; } sub dump { my $self = shift; #printf "[CARTRIDGE_%s_%s]\n", $self->{cpqHeResMemBoardSlotIndex}; #foreach (qw(cpqHeResMemBoardSlotIndex cpqHeResMemBoardOnlineStatus # cpqHeResMemBoardErrorStatus cpqHeResMemBoardNumSockets # cpqHeResMemBoardOsMemSize cpqHeResMemBoardTotalMemSize # cpqHeResMemBoardCondition)) { # printf "%s: %s\n", $_, $self->{$_}; #} #printf "\n"; } ././@LongLink0000644000000000000000000000017012262515411011637 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/NicSubsystem.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000001516612262515026027360 0ustar package HP::Proliant::Component::NicSubsystem; our @ISA = qw(HP::Proliant::Component); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, condition => $params{condition}, status => $params{status}, logical_nics => [], physical_nics => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; if ($self->{method} eq 'snmp') { return HP::Proliant::Component::NicSubsystem::SNMP->new(%params); } elsif ($self->{method} eq 'cli') { return HP::Proliant::Component::NicSubsystem::CLI->new(%params); } else { die "unknown method"; } return $self; } sub check { my $self = shift; my $errorfound = 0; $self->add_info('checking nic teams'); if (scalar (@{$self->{logical_nics}}) == 0) { $self->add_info('no logical nics found'); $self->overall_check(); } else { foreach (@{$self->{logical_nics}}) { $_->check(); } } if (scalar (@{$self->{physical_nics}}) == 0) { $self->add_info('no physical nics found. do you connect with slip?'); } else { foreach (@{$self->{physical_nics}}) { $_->check(); } } } sub num_logical_nics { my $self = shift; return scalar @{$self->{logical_nics}}; } sub num_physical_nics { my $self = shift; return scalar @{$self->{physical_nics}}; } sub dump { my $self = shift; foreach (@{$self->{logical_nics}}) { $_->dump(); } foreach (@{$self->{physical_nics}}) { $_->dump(); } } sub overall_check { my $self = shift; if ($self->{lognicstatus} ne "ok") { $self->add_info(sprintf 'overall logical nic status is %s', $self->{lognicstatus}); } } package HP::Proliant::Component::NicSubsystem::LogicalNic; our @ISA = qw(HP::Proliant::Component::NicSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, blacklisted => 0, info => undef, extendedinfo => undef, }; foreach (qw(cpqNicIfLogMapIndex cpqNicIfLogMapIfNumber cpqNicIfLogMapDescription cpqNicIfLogMapGroupType cpqNicIfLogMapAdapterCount cpqNicIfLogMapAdapterOKCount cpqNicIfLogMapPhysicalAdapters cpqNicIfLogMapSwitchoverMode cpqNicIfLogMapCondition cpqNicIfLogMapStatus cpqNicIfLogMapNumSwitchovers cpqNicIfLogMapHwLocation cpqNicIfLogMapSpeed cpqNicIfLogMapVlanCount cpqNicIfLogMapVlans)) { $self->{$_} = $params{$_}; } bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('lni', $self->{cpqNicIfLogMapIndex}); if ($self->{cpqNicIfLogMapAdapterCount} > 0) { if ($self->{cpqNicIfLogMapCondition} eq "other") { # simply ignore this. if there is a physical nic # it is usually unknown/other/scheissegal $self->add_info(sprintf "logical nic %d (%s) is %s", $self->{cpqNicIfLogMapIndex}, $self->{cpqNicIfLogMapDescription}, $self->{cpqNicIfLogMapCondition}); } elsif ($self->{cpqNicIfLogMapCondition} ne "ok") { $self->add_info(sprintf "logical nic %d (%s) is %s (%s)", $self->{cpqNicIfLogMapIndex}, $self->{cpqNicIfLogMapDescription}, $self->{cpqNicIfLogMapCondition}, $self->{cpqNicIfLogMapStatus}); $self->add_message(CRITICAL, $self->{info}); } else { $self->add_info(sprintf "logical nic %d (%s) is %s", $self->{cpqNicIfLogMapIndex}, $self->{cpqNicIfLogMapDescription}, $self->{cpqNicIfLogMapCondition}); } } else { $self->add_info(sprintf "logical nic %d (%s) has 0 physical nics", $self->{cpqNicIfLogMapIndex}, $self->{cpqNicIfLogMapDescription}); } } sub dump { my $self = shift; printf "[LNIC_%s]\n", $self->{cpqNicIfLogMapIndex}; foreach (qw(cpqNicIfLogMapIndex cpqNicIfLogMapIfNumber cpqNicIfLogMapDescription cpqNicIfLogMapAdapterCount cpqNicIfLogMapGroupType cpqNicIfLogMapSwitchoverMode cpqNicIfLogMapCondition cpqNicIfLogMapStatus cpqNicIfLogMapNumSwitchovers cpqNicIfLogMapHwLocation cpqNicIfLogMapSpeed)) { printf "%s: %s\n", $_, $self->{$_}; } printf "info: %s\n", $self->{info}; printf "\n"; } package HP::Proliant::Component::NicSubsystem::PhysicalNic; our @ISA = qw(HP::Proliant::Component::NicSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, blacklisted => 0, info => undef, extendedinfo => undef, }; foreach (qw(cpqNicIfPhysAdapterIndex cpqNicIfPhysAdapterIfNumber cpqNicIfPhysAdapterRole cpqNicIfPhysAdapterDuplexState cpqNicIfPhysAdapterCondition cpqNicIfPhysAdapterState cpqNicIfPhysAdapterStatus cpqNicIfPhysAdapterBadTransmits cpqNicIfPhysAdapterBadReceives)) { $self->{$_} = $params{$_}; } bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('pni', $self->{cpqNicIfPhysAdapterIndex}); if ($self->{cpqNicIfPhysAdapterCondition} eq "other") { # hp doesnt output a clear status. i am optimistic, unknown/other # means "dont care" $self->add_info(sprintf "physical nic %d (%s) is %s", $self->{cpqNicIfPhysAdapterIndex}, $self->{cpqNicIfPhysAdapterRole}, $self->{cpqNicIfPhysAdapterCondition}); } elsif ($self->{cpqNicIfPhysAdapterCondition} ne "ok") { $self->add_info(sprintf "physical nic %d (%s) is %s (%s,%s)", $self->{cpqNicIfPhysAdapterIndex}, $self->{cpqNicIfPhysAdapterRole}, $self->{cpqNicIfPhysAdapterCondition}, $self->{cpqNicIfPhysAdapterState}, $self->{cpqNicIfPhysAdapterStatus}); $self->add_message(CRITICAL, $self->{info}); } else { if ($self->{cpqNicIfPhysAdapterDuplexState} ne "full") { $self->add_info(sprintf "physical nic %d (%s) is %s duplex", $self->{cpqNicIfPhysAdapterIndex}, $self->{cpqNicIfPhysAdapterRole}, $self->{cpqNicIfPhysAdapterDuplexState}); } else { $self->add_info(sprintf "physical nic %d (%s) is %s", $self->{cpqNicIfPhysAdapterIndex}, $self->{cpqNicIfPhysAdapterRole}, $self->{cpqNicIfPhysAdapterCondition}); } } } sub dump { my $self = shift; printf "[PNIC_%s]\n", $self->{cpqNicIfPhysAdapterIndex}; foreach (qw(cpqNicIfPhysAdapterIndex cpqNicIfPhysAdapterIfNumber cpqNicIfPhysAdapterRole cpqNicIfPhysAdapterDuplexState cpqNicIfPhysAdapterCondition cpqNicIfPhysAdapterState cpqNicIfPhysAdapterStatus cpqNicIfPhysAdapterBadTransmits cpqNicIfPhysAdapterBadReceives)) { printf "%s: %s\n", $_, $self->{$_}; } printf "info: %s\n", $self->{info}; printf "\n"; } ././@LongLink0000644000000000000000000000017612262515411011645 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000755000000000000000000000000012262515026027345 5ustar ././@LongLink0000644000000000000000000000020412262515411011635 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/CLI.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000345312262515026027354 0ustar package HP::Proliant::Component::TemperatureSubsystem::CLI; our @ISA = qw(HP::Proliant::Component::TemperatureSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, temperatures => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->init(%params); return $self; } sub init { my $self = shift; my %params = @_; my $tempcnt = 1; foreach (grep(/^temp/, split(/\n/, $params{rawdata}))) { s/^temp\s*//g; if (/^#(\d+)\s+([\w_\/\-#]+)\s+(-*\d+)C\/(\d+)F\s+(\d+)C\/(\d+)F/) { my %params = (); $params{runtime} = $self->{runtime}; $params{cpqHeTemperatureChassis} = 1; $params{cpqHeTemperatureIndex} = $1; $params{cpqHeTemperatureLocale} = lc $2; $params{cpqHeTemperatureCelsius} = $3; $params{cpqHeTemperatureThresholdCelsius} = $5; $params{cpqHeTemperatureCondition} = 'unknown'; push(@{$self->{temperatures}}, HP::Proliant::Component::TemperatureSubsystem::Temperature->new( %params)); } elsif (/^#(\d+)\s+([\w_\/\-#]+)\s+\-\s+(\d+)C\/(\d+)F/) { # #3 CPU#2 - 0C/0F $self->trace(2, sprintf "skipping temperature %s", $_); } elsif (/^#(\d+)\s+([\w_\/\-#]+)\s+(\d+)C\/(\d+)F\s+\-/) { # #3 CPU#2 0C/0F - $self->trace(2, sprintf "skipping temperature %s", $_); } elsif (/^#(\d+)\s+([\w_\/\-#]+)\s+\-\s+\-/) { # #3 CPU#2 - - $self->trace(2, sprintf "skipping temperature %s", $_); } elsif (/^#(\d+)/) { $self->trace(0, sprintf "send this to lausser: %s", $_); } } } 1; ././@LongLink0000644000000000000000000000020512262515411011636 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/SNMP.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000706412262515026027356 0ustar package HP::Proliant::Component::TemperatureSubsystem::SNMP; our @ISA = qw(HP::Proliant::Component::TemperatureSubsystem HP::Proliant::Component::SNMP); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, temperatures => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->overall_init(%params); $self->init(%params); return $self; } sub overall_init { my $self = shift; my %params = @_; my $snmpwalk = $params{rawdata}; # overall my $cpqHeThermalTempStatus = '1.3.6.1.4.1.232.6.2.6.3.0'; my $cpqHeThermalTempStatusValue = { 1 => 'other', 2 => 'ok', 3 => 'degraded', 4 => 'failed', }; $self->{tempstatus} = lc SNMP::Utils::get_object_value( $snmpwalk, $cpqHeThermalTempStatus, $cpqHeThermalTempStatusValue); $self->{tempstatus} |= lc $self->{tempstatus}; } sub init { my $self = shift; my %params = @_; my $snmpwalk = $self->{rawdata}; my $oids = { cpqHeTemperatureEntry => "1.3.6.1.4.1.232.6.2.6.8.1", cpqHeTemperatureChassis => "1.3.6.1.4.1.232.6.2.6.8.1.1", cpqHeTemperatureIndex => "1.3.6.1.4.1.232.6.2.6.8.1.2", cpqHeTemperatureLocale => "1.3.6.1.4.1.232.6.2.6.8.1.3", cpqHeTemperatureCelsius => "1.3.6.1.4.1.232.6.2.6.8.1.4", cpqHeTemperatureThresholdCelsius => "1.3.6.1.4.1.232.6.2.6.8.1.5", cpqHeTemperatureCondition => "1.3.6.1.4.1.232.6.2.6.8.1.6", cpqHeTemperatureThresholdType => "1.3.6.1.4.1.232.6.2.6.8.1.7", cpqHeTemperatureLocaleValue => { 1 => "other", 2 => "unknown", 3 => "system", 4 => "systemBoard", 5 => "ioBoard", 6 => "cpu", 7 => "memory", 8 => "storage", 9 => "removableMedia", 10 => "powerSupply", 11 => "ambient", 12 => "chassis", 13 => "bridgeCard", }, cpqHeTemperatureConditionValue => { 1 => 'other', 2 => 'ok', 3 => 'degraded', 4 => 'failed', }, cpqHeTemperatureThresholdTypeValue => { 1 => 'other', 5 => 'blowout', 9 => 'caution', 15 => 'critical', }, }; # INDEX { cpqHeTemperatureChassis, cpqHeTemperatureIndex } foreach ($self->get_entries($oids, 'cpqHeTemperatureEntry')) { # sieht aus, als wurden die gar nicht existieren. # im ilo4 werden sie als n/a angezeigt next if $_->{cpqHeTemperatureThresholdType} eq "caution" && $_->{cpqHeTemperatureThresholdCelsius} == 0; push(@{$self->{temperatures}}, HP::Proliant::Component::TemperatureSubsystem::Temperature->new(%{$_})); } } sub overall_check { my $self = shift; my $result = 0; $self->blacklist('ots', ''); if ($self->{tempstatus}) { if ($self->{tempstatus} eq "ok") { $result = 0; $self->add_info('all temp sensors are within normal operating range'); } elsif ($self->{tempstatus} eq "degraded") { $result = 1; $self->add_info('a temp sensor is outside of normal operating range'); } elsif ($self->{tempstatus} eq "failed") { $result = 2; $self->add_info('a temp sensor detects a condition that could permanently damage the system'); } elsif ($self->{tempstatus} eq "other") { $result = 0; $self->add_info('temp sensing is not supported by this system or driver'); } } else { $result = 0; $self->add_info('no global temp status found'); } } 1; ././@LongLink0000644000000000000000000000020012262515411011631 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000001635112262515026027355 0ustar package HP::Proliant::Component::TemperatureSubsystem; our @ISA = qw(HP::Proliant::Component); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; ################################## custom_thresholds my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, condition => $params{condition}, status => $params{status}, temperatures => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; if ($params{runtime}->{options}->{customthresholds}) { if (-f $params{runtime}->{options}->{customthresholds}) { $params{runtime}->{options}->{customthresholds} = do { local (@ARGV, $/) = $params{runtime}->{options}->{customthresholds}; <> }; } foreach my $ct_items (split(/\//, $params{runtime}->{options}->{customthresholds})) { if ($ct_items =~ /^(\d+):(\d+)$/) { $params{runtime}->{options}->{thresholds}->{$1} = $2; } else { die sprintf "invalid threshold %s", $ct_items; } } } if ($self->{method} eq 'snmp') { return HP::Proliant::Component::TemperatureSubsystem::SNMP->new(%params); } elsif ($self->{method} eq 'cli') { return HP::Proliant::Component::TemperatureSubsystem::CLI->new(%params); } else { die "unknown method"; } return $self; } sub check { my $self = shift; my $errorfound = 0; $self->add_info('checking temperatures'); if (scalar (@{$self->{temperatures}}) == 0) { #$self->overall_check(); $self->add_info('no temperatures found'); } else { foreach (sort { $a->{cpqHeTemperatureIndex} <=> $b->{cpqHeTemperatureIndex}} @{$self->{temperatures}}) { $_->check(); } } } sub dump { my $self = shift; foreach (@{$self->{temperatures}}) { $_->dump(); } } package HP::Proliant::Component::TemperatureSubsystem::Temperature; our @ISA = qw(HP::Proliant::Component::TemperatureSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, cpqHeTemperatureChassis => $params{cpqHeTemperatureChassis}, cpqHeTemperatureIndex => $params{cpqHeTemperatureIndex}, cpqHeTemperatureLocale => $params{cpqHeTemperatureLocale}, cpqHeTemperatureCelsius => $params{cpqHeTemperatureCelsius}, cpqHeTemperatureThresholdCelsius => $params{cpqHeTemperatureThresholdCelsius}, cpqHeTemperatureCondition => $params{cpqHeTemperatureCondition}, cpqHeTemperatureThresholdType => $params{cpqHeTemperatureThresholdType} || "unknown", blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; if ($params{runtime}->{options}->{celsius}) { $self->{cpqHeTemperatureUnits} = 'C'; $self->{cpqHeTemperature} = $self->{cpqHeTemperatureCelsius}; $self->{cpqHeTemperatureThreshold} = $self->{cpqHeTemperatureThresholdCelsius}; } else { $self->{cpqHeTemperatureUnits} = 'F'; $self->{cpqHeTemperature} = (($self->{cpqHeTemperatureCelsius} * 9) / 5) + 32; $self->{cpqHeTemperatureThreshold} = (($self->{cpqHeTemperatureThresholdCelsius} * 9) / 5) + 32; } my $index = $self->{cpqHeTemperatureIndex}; if (exists $params{runtime}->{options}->{thresholds}->{$index}) { $self->{cpqHeTemperatureThreshold} = $params{runtime}->{options}->{thresholds}->{$index}; } if ($self->{cpqHeTemperatureThresholdCelsius} == -99) { bless $self, 'HP::Proliant::Component::TemperatureSubsystem::SoSTemperature'; } elsif ($self->{cpqHeTemperatureThresholdCelsius} == 0) { # taucht auf, seit man gen8 ueber das ilo abfragen kann bless $self, 'HP::Proliant::Component::TemperatureSubsystem::SoSTemperature'; } return $self; } sub check { my $self = shift; $self->blacklist('t', $self->{cpqHeTemperatureIndex}); if ($self->{cpqHeTemperature} > $self->{cpqHeTemperatureThreshold}) { $self->add_info(sprintf "%d %s temperature too high (%d%s, %d max)", $self->{cpqHeTemperatureIndex}, $self->{cpqHeTemperatureLocale}, $self->{cpqHeTemperature}, $self->{cpqHeTemperatureUnits}, $self->{cpqHeTemperatureThreshold}); $self->add_message(CRITICAL, $self->{info}); } elsif ($self->{cpqHeTemperature} < 0) { # #21 SCSI_BACKPLANE_ZONE -1C/31F 60C/140F OK - can't be true $self->add_info(sprintf "%d %s temperature too low (%d%s)", $self->{cpqHeTemperatureIndex}, $self->{cpqHeTemperatureLocale}, $self->{cpqHeTemperature}, $self->{cpqHeTemperatureUnits}); $self->add_message(CRITICAL, $self->{info}); } else { $self->add_info(sprintf "%d %s temperature is %d%s (%d max)", $self->{cpqHeTemperatureIndex}, $self->{cpqHeTemperatureLocale}, $self->{cpqHeTemperature}, $self->{cpqHeTemperatureUnits}, $self->{cpqHeTemperatureThreshold}); } if ($self->{runtime}->{options}->{perfdata} == 2) { $self->{runtime}->{plugin}->add_perfdata( label => sprintf('temp_%s', $self->{cpqHeTemperatureIndex}), value => $self->{cpqHeTemperature}, warning => $self->{cpqHeTemperatureThreshold}, critical => $self->{cpqHeTemperatureThreshold} ); } elsif ($self->{runtime}->{options}->{perfdata} == 1) { $self->{runtime}->{plugin}->add_perfdata( label => sprintf('temp_%s_%s', $self->{cpqHeTemperatureIndex}, $self->{cpqHeTemperatureLocale}), value => $self->{cpqHeTemperature}, warning => $self->{cpqHeTemperatureThreshold}, critical => $self->{cpqHeTemperatureThreshold} ); } $self->add_extendedinfo(sprintf "temp_%s=%d", $self->{cpqHeTemperatureIndex}, $self->{cpqHeTemperature}); } sub dump { my $self = shift; printf "[TEMP_%s]\n", $self->{cpqHeTemperatureIndex}; foreach (qw(cpqHeTemperatureChassis cpqHeTemperatureIndex cpqHeTemperatureLocale cpqHeTemperatureCelsius cpqHeTemperatureThreshold cpqHeTemperatureThresholdType cpqHeTemperatureCondition)) { printf "%s: %s\n", $_, $self->{$_}; } printf "info: %s\n\n", $self->{info}; } package HP::Proliant::Component::TemperatureSubsystem::SoSTemperature; our @ISA = qw(HP::Proliant::Component::TemperatureSubsystem::Temperature); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub check { my $self = shift; $self->blacklist('t', $self->{cpqHeTemperatureIndex}); $self->add_info(sprintf "%d %s temperature is %d%s (no thresh.)", $self->{cpqHeTemperatureIndex}, $self->{cpqHeTemperatureLocale}, $self->{cpqHeTemperature}, $self->{cpqHeTemperatureUnits}); if ($self->{runtime}->{options}->{perfdata} == 2) { $self->{runtime}->{plugin}->add_perfdata( label => sprintf('temp_%s', $self->{cpqHeTemperatureIndex}), value => $self->{cpqHeTemperature}, ); } elsif ($self->{runtime}->{options}->{perfdata} == 1) { $self->{runtime}->{plugin}->add_perfdata( label => sprintf('temp_%s_%s', $self->{cpqHeTemperatureIndex}, $self->{cpqHeTemperatureLocale}), value => $self->{cpqHeTemperature}, ); } $self->add_extendedinfo(sprintf "temp_%s=%d", $self->{cpqHeTemperatureIndex}, $self->{cpqHeTemperature}); } 1; ././@LongLink0000644000000000000000000000016612262515411011644 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/CpuSubsystem/nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000755000000000000000000000000012262515026027345 5ustar ././@LongLink0000644000000000000000000000017412262515411011643 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/CpuSubsystem/CLI.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000252512262515026027353 0ustar package HP::Proliant::Component::CpuSubsystem::CLI; our @ISA = qw(HP::Proliant::Component::CpuSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, cpus => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->init(%params); return $self; } sub init { my $self = shift; my %params = @_; my %tmpcpu = ( runtime => $params{runtime}, ); my $inblock = 0; foreach (grep(/^server/, split(/\n/, $self->{rawdata}))) { if (/Processor:\s+(\d+)/) { $tmpcpu{cpqSeCpuUnitIndex} = $1; $inblock = 1; } elsif (/Name\s*:\s+(.+?)\s*$/) { $tmpcpu{cpqSeCpuName} = $1; } elsif (/Status\s*:\s+(.+?)\s*$/) { $tmpcpu{cpqSeCpuStatus} = lc $1; } elsif (/Socket\s*:\s+(.+?)\s*$/) { $tmpcpu{cpqSeCpuSlot} = $1; } elsif (/^server\s*$/) { if ($inblock) { $inblock = 0; push(@{$self->{cpus}}, HP::Proliant::Component::CpuSubsystem::Cpu->new(%tmpcpu)); %tmpcpu = ( runtime => $params{runtime}, ); } } } if ($inblock) { push(@{$self->{cpus}}, HP::Proliant::Component::CpuSubsystem::Cpu->new(%tmpcpu)); } } 1; ././@LongLink0000644000000000000000000000017512262515411011644 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/CpuSubsystem/SNMP.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000232312262515026027347 0ustar package HP::Proliant::Component::CpuSubsystem::SNMP; our @ISA = qw(HP::Proliant::Component::CpuSubsystem HP::Proliant::Component::SNMP); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, cpus => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->init(); return $self; } sub init { my $self = shift; my $snmpwalk = $self->{rawdata}; # CPQSTDEQ-MIB my $oids = { cpqSeCpuEntry => '1.3.6.1.4.1.232.1.2.2.1.1', cpqSeCpuUnitIndex => '1.3.6.1.4.1.232.1.2.2.1.1.1', cpqSeCpuSlot => '1.3.6.1.4.1.232.1.2.2.1.1.2', cpqSeCpuName => '1.3.6.1.4.1.232.1.2.2.1.1.3', cpqSeCpuStatus => '1.3.6.1.4.1.232.1.2.2.1.1.6', cpqSeCpuStatusValue => { 1 => "unknown", 2 => "ok", 3 => "degraded", 4 => "failed", 5 => "disabled", }, }; # INDEX { cpqSeCpuUnitIndex } foreach ($self->get_entries($oids, 'cpqSeCpuEntry')) { push(@{$self->{cpus}}, HP::Proliant::Component::CpuSubsystem::Cpu->new(%{$_})); } } 1; ././@LongLink0000644000000000000000000000016712262515411011645 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000755000000000000000000000000012262515026027345 5ustar ././@LongLink0000644000000000000000000000017512262515411011644 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000001727412262515026027362 0ustar package HP::Proliant::Component::DiskSubsystem::Ide; our @ISA = qw(HP::Proliant::Component::DiskSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, controllers => [], physical_drives => [], logical_drives => [], spare_drives => [], condition => undef, blacklisted => 0, }; bless $self, $class; if ($self->{method} eq 'snmp') { bless $self, 'HP::Proliant::Component::DiskSubsystem::Ide::SNMP'; } else { bless $self, 'HP::Proliant::Component::DiskSubsystem::Ide::CLI'; } $self->init(); $self->assemble(); return $self; } sub check { my $self = shift; foreach (@{$self->{controllers}}) { $_->check(); } } sub dump { my $self = shift; foreach (@{$self->{controllers}}) { $_->dump(); } } package HP::Proliant::Component::DiskSubsystem::Ide::Controller; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Ide); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, cpqIdeControllerIndex => $params{cpqIdeControllerIndex}, cpqIdeControllerOverallCondition => $params{cpqIdeControllerOverallCondition}, cpqIdeControllerModel => $params{cpqIdeControllerModel}, cpqIdeControllerSlot => $params{cpqIdeControllerSlot}, # -1 ist sysboard? blacklisted => 0, }; $self->{name} = $params{name} || $self->{cpqIdeControllerIndex}; $self->{controllerindex} = $self->{cpqIdeControllerIndex}; bless $self, $class; return $self; } sub check { my $self = shift; if ($self->{cpqIdeControllerOverallCondition} eq 'other') { if (scalar(@{$self->{physical_drives}})) { $self->add_message(CRITICAL, sprintf 'ide controller %s in slot %s needs attention', $self->{cpqIdeControllerIndex}, $self->{cpqIdeControllerSlot}); $self->add_info(sprintf 'ide controller %s in slot %s needs attention', $self->{cpqIdeControllerIndex}, $self->{cpqIdeControllerSlot}); } else { $self->add_info(sprintf 'ide controller %s in slot %s is ok and unused', $self->{cpqIdeControllerIndex}, $self->{cpqIdeControllerSlot}); $self->{blacklisted} = 1; } } elsif ($self->{cpqIdeControllerOverallCondition} ne 'ok') { $self->add_message(CRITICAL, sprintf 'ide controller %s in slot %s needs attention', $self->{cpqIdeControllerIndex}, $self->{cpqIdeControllerSlot}); $self->add_info(sprintf 'ide controller %s in slot %s needs attention', $self->{cpqIdeControllerIndex}, $self->{cpqIdeControllerSlot}); } else { $self->add_info(sprintf 'ide controller %s in slot %s is ok', $self->{cpqIdeControllerIndex}, $self->{cpqIdeControllerSlot}); } foreach (@{$self->{logical_drives}}) { $_->check(); } foreach (@{$self->{physical_drives}}) { $_->check(); } foreach (@{$self->{spare_drives}}) { $_->check(); } } sub dump { my $self = shift; printf "[IDE_CONTROLLER_%s]\n", $self->{name}; foreach (qw(cpqIdeControllerIndex cpqIdeControllerSlot cpqIdeControllerModel cpqIdeControllerOverallCondition)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; foreach (@{$self->{logical_drives}}) { $_->dump(); } foreach (@{$self->{physical_drives}}) { $_->dump(); } foreach (@{$self->{spare_drives}}) { $_->dump(); } } package HP::Proliant::Component::DiskSubsystem::Ide::LogicalDrive; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Ide); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, cpqIdeLogicalDriveControllerIndex => $params{cpqIdeLogicalDriveControllerIndex}, cpqIdeLogicalDriveIndex => $params{cpqIdeLogicalDriveIndex}, cpqIdeLogicalDriveRaidLevel => $params{cpqIdeLogicalDriveRaidLevel}, cpqIdeLogicalDriveCapacity => $params{cpqIdeLogicalDriveCapacity}, cpqIdeLogicalDriveStatus => $params{cpqIdeLogicalDriveStatus}, cpqIdeLogicalDriveCondition => $params{cpqIdeLogicalDriveCondition}, cpqIdeLogicalDriveDiskIds => $params{cpqIdeLogicalDriveDiskIds}, cpqIdeLogicalDriveSpareIds => $params{cpqIdeLogicalDriveSpareIds}, cpqIdeLogicalDriveRebuildingDisk => $params{cpqIdeLogicalDriveRebuildingDisk}, blacklisted => 0, }; bless $self, $class; $self->{name} = $params{name} || $self->{cpqIdeLogicalDriveControllerIndex}.':'. $self->{cpqIdeLogicalDriveIndex}; $self->{controllerindex} = $self->{cpqIdeLogicalDriveControllerIndex}; return $self; } sub check { my $self = shift; if ($self->{cpqIdeLogicalDriveCondition} ne "ok") { if ($self->{cpqIdeLogicalDriveStatus} =~ /rebuild/) { $self->add_message(WARNING, sprintf "logical drive %s is %s", $self->{name}, $self->{cpqIdeLogicalDriveStatus}); } else { $self->add_message(CRITICAL, sprintf "logical drive %s is %s", $self->{name}, $self->{cpqIdeLogicalDriveStatus}); } } $self->add_info( sprintf "logical drive %s is %s", $self->{name}, $self->{cpqIdeLogicalDriveStatus}); } sub dump { my $self = shift; printf "[LOGICAL_DRIVE]\n"; foreach (qw(cpqIdeLogicalDriveControllerIndex cpqIdeLogicalDriveIndex cpqIdeLogicalDriveRaidLevel cpqIdeLogicalDriveCapacity cpqIdeLogicalDriveDiskIds cpqIdeLogicalDriveSpareIds cpqIdeLogicalDriveRebuildingDisk cpqIdeLogicalDriveStatus cpqIdeLogicalDriveCondition)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } package HP::Proliant::Component::DiskSubsystem::Ide::PhysicalDrive; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Ide); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, cpqIdeAtaDiskControllerIndex => $params{cpqIdeAtaDiskControllerIndex}, cpqIdeAtaDiskIndex => $params{cpqIdeAtaDiskIndex}, cpqIdeAtaDiskModel => $params{cpqIdeAtaDiskModel}, cpqIdeAtaDiskStatus => $params{cpqIdeAtaDiskStatus}, cpqIdeAtaDiskCondition => $params{cpqIdeAtaDiskCondition}, cpqIdeAtaDiskCapacity => $params{cpqIdeAtaDiskCapacity}, cpqIdeAtaDiskLogicalDriveMember => $params{cpqIdeAtaDiskLogicalDriveMember}, cpqIdeAtaDiskIsSpare => $params{cpqIdeAtaDiskIsSpare}, blacklisted => 0, }; $self->{name} = $params{name} || $self->{cpqIdeAtaDiskControllerIndex}.':'. $self->{cpqIdeAtaDiskIndex}; ####vorerst $self->{controllerindex} = $self->{cpqIdeAtaDiskControllerIndex}; bless $self, $class; return $self; } sub check { my $self = shift; if ($self->{cpqIdeAtaDiskCondition} ne 'ok') { $self->add_message(CRITICAL, sprintf "physical drive %s is %s", $self->{name}, $self->{cpqIdeAtaDiskCondition}); } $self->add_info( sprintf "physical drive %s is %s", $self->{name}, $self->{cpqIdeAtaDiskCondition}); } sub dump { my $self = shift; printf "[PHYSICAL_DRIVE]\n"; foreach (qw(cpqIdeAtaDiskControllerIndex cpqIdeAtaDiskIndex cpqIdeAtaDiskModel cpqIdeAtaDiskCapacity cpqIdeAtaDiskLogicalDriveMember cpqIdeAtaDiskStatus cpqIdeAtaDiskCondition)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } package HP::Proliant::Component::DiskSubsystem::Ide::SpareDrive; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Ide); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub dump { my $self = shift; printf "[SPARE_DRIVE]\n"; } 1; ././@LongLink0000644000000000000000000000017312262515411011642 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000755000000000000000000000000012262515026027345 5ustar ././@LongLink0000644000000000000000000000020112262515411011632 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/CLI.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000076012262515026027352 0ustar package HP::Proliant::Component::DiskSubsystem::Ide::CLI; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Ide); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { controllers => [], accelerators => [], physical_drives => [], logical_drives => [], spare_drives => [], blacklisted => 0, }; bless $self, $class; return $self; } sub init { my $self = shift; } 1; ././@LongLink0000644000000000000000000000020212262515411011633 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/SNMP.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000743412262515026027357 0ustar package HP::Proliant::Component::DiskSubsystem::Ide::SNMP; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Ide HP::Proliant::Component::SNMP); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { controllers => [], accelerators => [], physical_drives => [], logical_drives => [], spare_drives => [], blacklisted => 0, }; bless $self, $class; return $self; } sub init { my $self = shift; my $snmpwalk = $self->{rawdata}; # CPQIDE-MIB my $oids = { cpqIdeControllerEntry => '1.3.6.1.4.1.232.14.2.3.1.1', cpqIdeControllerIndex => '1.3.6.1.4.1.232.14.2.3.1.1.1', cpqIdeControllerOverallCondition => '1.3.6.1.4.1.232.14.2.3.1.1.2', cpqIdeControllerModel => '1.3.6.1.4.1.232.14.2.3.1.1.3', cpqIdeControllerSlot => '1.3.6.1.4.1.232.14.2.3.1.1.5', cpqIdeControllerOverallConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, }; # INDEX { cpqIdeControllerIndex } foreach ($self->get_entries($oids, 'cpqIdeControllerEntry')) { push(@{$self->{controllers}}, HP::Proliant::Component::DiskSubsystem::Ide::Controller->new(%{$_})); } $oids = { cpqIdeLogicalDriveEntry => '1.3.6.1.4.1.232.14.2.6.1.1', cpqIdeLogicalDriveControllerIndex => '1.3.6.1.4.1.232.14.2.6.1.1.1', cpqIdeLogicalDriveIndex => '1.3.6.1.4.1.232.14.2.6.1.1.2', cpqIdeLogicalDriveRaidLevel => '1.3.6.1.4.1.232.14.2.6.1.1.3', cpqIdeLogicalDriveCapacity => '1.3.6.1.4.1.232.14.2.6.1.1.4', cpqIdeLogicalDriveStatus => '1.3.6.1.4.1.232.14.2.6.1.1.5', cpqIdeLogicalDriveCondition => '1.3.6.1.4.1.232.14.2.6.1.1.6', cpqIdeLogicalDriveDiskIds => '1.3.6.1.4.1.232.14.2.6.1.1.7', cpqIdeLogicalDriveSpareIds => '1.3.6.1.4.1.232.14.2.6.1.1.9', cpqIdeLogicalDriveRebuildingDisk => '1.3.6.1.4.1.232.14.2.6.1.1.10', cpqIdeLogicalDriveRaidLevelValue => { 1 => "other", 2 => "raid0", 3 => "raid1", 4 => "raid0plus1", }, cpqIdeLogicalDriveStatusValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "rebuilding", 5 => "failed", }, cpqIdeLogicalDriveConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, }; # INDEX { cpqIdeLogicalDriveControllerIndex, cpqIdeLogicalDriveIndex } foreach ($self->get_entries($oids, 'cpqIdeLogicalDriveEntry')) { push(@{$self->{logical_drives}}, HP::Proliant::Component::DiskSubsystem::Ide::LogicalDrive->new(%{$_})); } $oids = { cpqIdeAtaDiskEntry => '1.3.6.1.4.1.232.14.2.4.1.1', cpqIdeAtaDiskControllerIndex => '1.3.6.1.4.1.232.14.2.4.1.1.1', cpqIdeAtaDiskIndex => '1.3.6.1.4.1.232.14.2.4.1.1.2', cpqIdeAtaDiskModel => '1.3.6.1.4.1.232.14.2.4.1.1.3', cpqIdeAtaDiskStatus => '1.3.6.1.4.1.232.14.2.4.1.1.6', cpqIdeAtaDiskCondition => '1.3.6.1.4.1.232.14.2.4.1.1.7', cpqIdeAtaDiskCapacity => '1.3.6.1.4.1.232.14.2.4.1.1.8', cpqIdeAtaDiskLogicalDriveMember => '1.3.6.1.4.1.232.14.2.4.1.1.13', cpqIdeAtaDiskIsSpare => '1.3.6.1.4.1.232.14.2.4.1.1.14', cpqIdeAtaDiskStatusValue => { 1 => "other", 2 => "ok", 3 => "smartError", 4 => "failed", }, cpqIdeAtaDiskConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, }; # INDEX { cpqIdeAtaDiskControllerIndex, cpqIdeAtaDiskIndex } foreach ($self->get_entries($oids, 'cpqIdeAtaDiskEntry')) { push(@{$self->{physical_drives}}, HP::Proliant::Component::DiskSubsystem::Ide::PhysicalDrive->new(%{$_})); } } ././@LongLink0000644000000000000000000000017212262515411011641 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000755000000000000000000000000012262515026027345 5ustar ././@LongLink0000644000000000000000000000020012262515411011631 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/CLI.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000002016212262515026027350 0ustar package HP::Proliant::Component::DiskSubsystem::Da::CLI; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { controllers => [], accelerators => [], physical_drives => [], logical_drives => [], spare_drives => [], blacklisted => 0, }; bless $self, $class; return $self; } sub init { my $self = shift; my $hpacucli = $self->{rawdata}; my $slot = 0; my $type = "unkn"; my @lines = (); my $thistype = 0; my $tmpcntl = {}; my $tmpaccel = {}; my $tmpld = {}; my $tmppd = {}; my $cntlindex = 0; my $ldriveindex = 0; my $pdriveindex = 0; my $incontroller = 0; foreach (split(/\n/, $hpacucli)) { next unless /^status/; next if /^status\s*$/; s/^status\s*//; if (/(MSA[\s\w]+)\s+in\s+(\w+)/) { $incontroller = 1; $slot = $2; $cntlindex++; $tmpcntl->{$slot}->{cpqDaCntlrIndex} = $cntlindex; $tmpcntl->{$slot}->{cpqDaCntlrModel} = $1; $tmpcntl->{$slot}->{cpqDaCntlrSlot} = $slot; } elsif (/([\s\w]+) in Slot\s+(\d+)/) { $incontroller = 1; $slot = $2; $cntlindex++; $tmpcntl->{$slot}->{cpqDaCntlrIndex} = $cntlindex; $tmpcntl->{$slot}->{cpqDaCntlrModel} = $1; $tmpcntl->{$slot}->{cpqDaCntlrSlot} = $slot; } elsif (/Controller Status: (\w+)/) { $tmpcntl->{$slot}->{cpqDaCntlrBoardCondition} = lc $1; $tmpcntl->{$slot}->{cpqDaCntlrCondition} = lc $1; } elsif (/Cache Status: ([\w\s]+?)\s*$/) { # Cache Status: OK # Cache Status: Not Configured # Cache Status: Temporarily Disabled $tmpaccel->{$slot}->{cpqDaAccelCntlrIndex} = $cntlindex; $tmpaccel->{$slot}->{cpqDaAccelSlot} = $slot; #condition: other,ok,degraded,failed #status: other,invalid,enabled,tmpDisabled,permDisabled $tmpaccel->{$slot}->{cpqDaAccelCondition} = lc $1; if ($tmpaccel->{$slot}->{cpqDaAccelCondition} eq 'ok') { $tmpaccel->{$slot}->{cpqDaAccelStatus} = 'enabled'; } elsif ($tmpaccel->{$slot}->{cpqDaAccelCondition} eq 'not configured') { $tmpaccel->{$slot}->{cpqDaAccelCondition} = 'ok'; $tmpaccel->{$slot}->{cpqDaAccelStatus} = 'enabled'; } elsif ($tmpaccel->{$slot}->{cpqDaAccelCondition} eq 'temporarily disabled') { $tmpaccel->{$slot}->{cpqDaAccelCondition} = 'ok'; $tmpaccel->{$slot}->{cpqDaAccelStatus} = 'tmpDisabled'; } elsif ($tmpaccel->{$slot}->{cpqDaAccelCondition} eq 'permanently disabled') { $tmpaccel->{$slot}->{cpqDaAccelCondition} = 'ok'; $tmpaccel->{$slot}->{cpqDaAccelStatus} = 'permDisabled'; } else { $tmpaccel->{$slot}->{cpqDaAccelStatus} = 'enabled'; } } elsif (/Battery.* Status: (\w+)/) { # sowas gibts auch Battery/Capacitor Status: OK $tmpaccel->{$slot}->{cpqDaAccelBattery} = lc $1; } elsif (/^\s*$/) { } } $slot = 0; $cntlindex = 0; $ldriveindex = 0; $pdriveindex = 0; foreach (split(/\n/, $hpacucli)) { next unless /^config/; next if /^config\s*$/; s/^config\s*//; if (/(MSA[\s\w]+)\s+in\s+(\w+)/) { $slot = $2; $cntlindex++; $pdriveindex = 1; } elsif (/([\s\w]+) in Slot\s+(\d+)/) { #if ($slot ne $2 || ! $slot) { $cntlindex++; # 2012-12-15 das passt nicht zur oberen schleife # ich habe keine ahnung, was der hintergrund fuer dieses if ist #} $slot = $2; $pdriveindex = 1; } elsif (/logicaldrive\s+(.+?)\s+\((.*)\)/) { # logicaldrive 1 (683.5 GB, RAID 5, OK) # logicaldrive 1 (683.5 GB, RAID 5, OK) # logicaldrive 2 (442 MB, RAID 1+0, OK) $ldriveindex = $1; $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvCntlrIndex} = $cntlindex; $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvIndex} = $ldriveindex; ($tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvSize}, $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvFaultTol}, $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvCondition}) = map { lc $_ } split(/,\s*/, $2); $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvStatus} = $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvCondition}; $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvPhyDrvIDs} = 'unknown'; } elsif (/physicaldrive\s+(.+?)\s+\((.*)\)/) { # physicaldrive 2:0 (port 2:id 0 , Parallel SCSI, 36.4 GB, OK) # physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SAS, 146 GB, OK) # physicaldrive 1:1 (box 1:bay 1, Parallel SCSI, 146 GB, OK) my $name = $1; my($location, $type, $size, $status) = split(/,/, $2); $status =~ s/^\s+//g; $status =~ s/\s+$//g; $status = lc $status; my %location = (); foreach (split(/:/, $location)) { $location{$1} = $2 if /(\w+)\s+(\w+)/; } $location{box} ||= 0; $location{id} ||= $pdriveindex; $location{bay} ||= $location{id}; $location{port} ||= $location{bay}; $tmppd->{$slot}->{$name}->{name} = lc $name; $tmppd->{$slot}->{$name}->{cpqDaPhyDrvCntlrIndex} = $cntlindex; $tmppd->{$slot}->{$name}->{cpqDaPhyDrvIndex} = $location{id}; $tmppd->{$slot}->{$name}->{cpqDaPhyDrvBay} = $location{bay}; $tmppd->{$slot}->{$name}->{cpqDaPhyDrvBusNumber} = $location{port}; $tmppd->{$slot}->{$name}->{cpqDaPhyDrvSize} = $size; $tmppd->{$slot}->{$name}->{cpqDaPhyDrvStatus} = $status; $tmppd->{$slot}->{$name}->{cpqDaPhyDrvCondition} = $status; $tmppd->{$slot}->{$name}->{ldriveindex} = $ldriveindex || -1; foreach (keys %{$tmppd->{$slot}->{$name}}) { $tmppd->{$slot}->{$name}->{$_} =~ s/^\s+//g; $tmppd->{$slot}->{$name}->{$_} =~ s/\s+$//g; $tmppd->{$slot}->{$name}->{$_} = lc $tmppd->{$slot}->{$name}->{$_}; } $pdriveindex++; } } foreach my $slot (keys %{$tmpcntl}) { if (exists $tmpcntl->{$slot}->{cpqDaCntlrModel} && ! $self->identified($tmpcntl->{$slot}->{cpqDaCntlrModel})) { delete $tmpcntl->{$slot}; delete $tmpaccel->{$slot}; delete $tmpld->{$slot}; delete $tmppd->{$slot}; } } #printf "%s\n", Data::Dumper::Dumper($tmpcntl); #printf "%s\n", Data::Dumper::Dumper($tmpaccel); #printf "%s\n", Data::Dumper::Dumper($tmpld); #printf "%s\n", Data::Dumper::Dumper($tmppd); foreach my $slot (sort { $tmpcntl->{$a}->{cpqDaCntlrIndex} <=> $tmpcntl->{$b}->{cpqDaCntlrIndex} }keys %{$tmpcntl}) { $tmpcntl->{$slot}->{runtime} = $self->{runtime}; push(@{$self->{controllers}}, HP::Proliant::Component::DiskSubsystem::Da::Controller->new( %{$tmpcntl->{$slot}})); } foreach my $slot (sort { $tmpaccel->{$a}->{cpqDaAccelCntlrIndex} <=> $tmpaccel->{$b}->{cpqDaAccelCntlrIndex} } keys %{$tmpaccel}) { $tmpaccel->{$slot}->{runtime} = $self->{runtime}; push(@{$self->{accelerators}}, HP::Proliant::Component::DiskSubsystem::Da::Accelerator->new( %{$tmpaccel->{$slot}})); } foreach my $slot (keys %{$tmpld}) { foreach my $ldriveindex (keys %{$tmpld->{$slot}}) { $tmpld->{$slot}->{$ldriveindex}->{runtime} = $self->{runtime}; push(@{$self->{logical_drives}}, HP::Proliant::Component::DiskSubsystem::Da::LogicalDrive->new( %{$tmpld->{$slot}->{$ldriveindex}})); } foreach my $pdriveindex (sort { (split ':', $a, 2)[0] cmp (split ':', $b, 2)[0] || (split ':', $a, 2)[1] cmp (split ':', $b, 2)[1] || (split ':', $a, 2)[2] <=> (split ':', $b, 2)[2] } keys %{$tmppd->{$slot}}) { $tmppd->{$slot}->{$pdriveindex}->{runtime} = $self->{runtime}; push(@{$self->{physical_drives}}, HP::Proliant::Component::DiskSubsystem::Da::PhysicalDrive->new( %{$tmppd->{$slot}->{$pdriveindex}})); } } } sub identified { my $self = shift; my $info = shift; return 1 if $info =~ /Parallel SCSI/; return 1 if $info =~ /Smart Array/; # Trond: works fine on E200i, P400, E400 return 1 if $info =~ /MSA500/; #return 1 if $info =~ /Smart Array (5|6)/; #return 1 if $info =~ /Smart Array P400i/; # snmp sagt Da, trotz SAS in cli #return 1 if $info =~ /Smart Array P410i/; # dto return 0; } ././@LongLink0000644000000000000000000000020112262515411011632 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/SNMP.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000001334512262515026027355 0ustar package HP::Proliant::Component::DiskSubsystem::Da::SNMP; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da HP::Proliant::Component::SNMP); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { controllers => [], accelerators => [], physical_drives => [], logical_drives => [], spare_drives => [], blacklisted => 0, }; bless $self, $class; return $self; } sub init { my $self = shift; my $snmpwalk = $self->{rawdata}; # CPQIDA-MIB my $oids = { cpqDaCntlrEntry => "1.3.6.1.4.1.232.3.2.2.1.1", cpqDaCntlrIndex => "1.3.6.1.4.1.232.3.2.2.1.1.1", cpqDaCntlrModel => "1.3.6.1.4.1.232.3.2.2.1.1.2", cpqDaCntlrSlot => "1.3.6.1.4.1.232.3.2.2.1.1.5", cpqDaCntlrCondition => "1.3.6.1.4.1.232.3.2.2.1.1.6", cpqDaCntlrBoardCondition => "1.3.6.1.4.1.232.3.2.2.1.1.12", cpqDaCntlrModelValue => { 1 => 'other', 2 => 'ida', 3 => 'idaExpansion', 4 => 'ida-2', 5 => 'smart', 6 => 'smart-2e', 7 => 'smart-2p', 8 => 'smart-2sl', 9 => 'smart-3100es', 10 => 'smart-3200', 11 => 'smart-2dh', 12 => 'smart-221', 13 => 'sa-4250es', 14 => 'sa-4200', 15 => 'sa-integrated', 16 => 'sa-431', 17 => 'sa-5300', 18 => 'raidLc2', 19 => 'sa-5i', 20 => 'sa-532', 21 => 'sa-5312', 22 => 'sa-641', 23 => 'sa-642', 24 => 'sa-6400', 25 => 'sa-6400em', 26 => 'sa-6i', }, cpqDaCntlrConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, cpqDaCntlrBoardConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, }; # INDEX { cpqDaCntlrIndex } foreach ($self->get_entries($oids, 'cpqDaCntlrEntry')) { push(@{$self->{controllers}}, HP::Proliant::Component::DiskSubsystem::Da::Controller->new(%{$_})); } $oids = { cpqDaAccelEntry => "1.3.6.1.4.1.232.3.2.2.2.1", cpqDaAccelCntlrIndex => "1.3.6.1.4.1.232.3.2.2.2.1.1", cpqDaAccelStatus => "1.3.6.1.4.1.232.3.2.2.2.1.2", cpqDaAccelSlot => "1.3.6.1.4.1.232.3.2.2.2.1.5", cpqDaAccelBattery => "1.3.6.1.4.1.232.3.2.2.2.1.6", cpqDaAccelCondition => "1.3.6.1.4.1.232.3.2.2.2.1.9", cpqDaAccelBatteryValue => { 1 => 'other', 2 => 'ok', 3 => 'recharging', 4 => 'failed', 5 => 'degraded', 6 => 'notPresent', }, cpqDaAccelConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, cpqDaAccelStatusValue => { 1 => "other", 2 => "invalid", 3 => "enabled", 4 => "tmpDisabled", 5 => "permDisabled", } }; # INDEX { cpqDaAccelCntlrIndex } foreach ($self->get_entries($oids, 'cpqDaAccelEntry')) { push(@{$self->{accelerators}}, HP::Proliant::Component::DiskSubsystem::Da::Accelerator->new(%{$_})); } $oids = { cpqDaLogDrvEntry => "1.3.6.1.4.1.232.3.2.3.1.1", cpqDaLogDrvCntlrIndex => "1.3.6.1.4.1.232.3.2.3.1.1.1", cpqDaLogDrvIndex => "1.3.6.1.4.1.232.3.2.3.1.1.2", cpqDaLogDrvFaultTol => "1.3.6.1.4.1.232.3.2.3.1.1.3", cpqDaLogDrvStatus => "1.3.6.1.4.1.232.3.2.3.1.1.4", cpqDaLogDrvSize => "1.3.6.1.4.1.232.3.2.3.1.1.9", cpqDaLogDrvPhyDrvIDs => "1.3.6.1.4.1.232.3.2.3.1.1.10", cpqDaLogDrvCondition => "1.3.6.1.4.1.232.3.2.3.1.1.11", cpqDaLogDrvPercentRebuild => "1.3.6.1.4.1.232.3.2.3.1.1.12", cpqDaLogDrvFaultTolValue => { 1 => "other", 2 => "none", 3 => "mirroring", 4 => "dataGuard", 5 => "distribDataGuard", 7 => "advancedDataGuard", }, cpqDaLogDrvConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, cpqDaLogDrvStatusValue => { 1 => "other", 2 => "ok", 3 => "failed", 4 => "unconfigured", 5 => "recovering", 6 => "readyForRebuild", 7 => "rebuilding", 8 => "wrongDrive", 9 => "badConnect", 10 => "overheating", 11 => "shutdown", 12 => "expanding", 13 => "notAvailable", 14 => "queuedForExpansion", }, }; # INDEX { cpqDaLogDrvCntlrIndex, cpqDaLogDrvIndex } foreach ($self->get_entries($oids, 'cpqDaLogDrvEntry')) { $_->{cpqDaLogDrvPhyDrvIDs} ||= 'empty'; push(@{$self->{logical_drives}}, HP::Proliant::Component::DiskSubsystem::Da::LogicalDrive->new(%{$_})); } $oids = { cpqDaPhyDrvEntry => "1.3.6.1.4.1.232.3.2.5.1.1", cpqDaPhyDrvCntlrIndex => "1.3.6.1.4.1.232.3.2.5.1.1.1", cpqDaPhyDrvIndex => "1.3.6.1.4.1.232.3.2.5.1.1.2", cpqDaPhyDrvBay => "1.3.6.1.4.1.232.3.2.5.1.1.5", cpqDaPhyDrvStatus => "1.3.6.1.4.1.232.3.2.5.1.1.6", cpqDaPhyDrvSize => "1.3.6.1.4.1.232.3.2.5.1.1.9", cpqDaPhyDrvCondition => "1.3.6.1.4.1.232.3.2.5.1.1.37", cpqDaPhyDrvBusNumber => "1.3.6.1.4.1.232.3.2.5.1.1.50", cpqDaPhyDrvConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, cpqDaPhyDrvStatusValue => { 1 => "other", 2 => "ok", 3 => "failed", 4 => "predictiveFailure", }, }; # INDEX { cpqDaPhyDrvCntlrIndex, cpqDaPhyDrvIndex } foreach ($self->get_entries($oids, 'cpqDaPhyDrvEntry')) { push(@{$self->{physical_drives}}, HP::Proliant::Component::DiskSubsystem::Da::PhysicalDrive->new(%{$_})); } } ././@LongLink0000644000000000000000000000017512262515411011644 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000002756112262515026027362 0ustar package HP::Proliant::Component::DiskSubsystem::Fca; our @ISA = qw(HP::Proliant::Component::DiskSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, host_controllers => [], controllers => [], accelerators => [], physical_drives => [], logical_drives => [], spare_drives => [], global_status => undef, blacklisted => 0, }; bless $self, $class; if ($self->{method} eq 'snmp') { bless $self, 'HP::Proliant::Component::DiskSubsystem::Fca::SNMP'; } else { bless $self, 'HP::Proliant::Component::DiskSubsystem::Fca::CLI'; } $self->init(); $self->assemble(); return $self; } sub assemble { my $self = shift; $self->trace(3, sprintf "%s controllers und platten zusammenfuehren", ref($self)); $self->trace(3, sprintf "has %d host controllers", scalar(@{$self->{host_controllers}})); $self->trace(3, sprintf "has %d controllers", scalar(@{$self->{controllers}})); $self->trace(3, sprintf "has %d physical_drives", scalar(@{$self->{physical_drives}})); $self->trace(3, sprintf "has %d logical_drives", scalar(@{$self->{logical_drives}})); $self->trace(3, sprintf "has %d spare_drives", scalar(@{$self->{spare_drives}})); } sub check { my $self = shift; foreach (@{$self->{host_controllers}}) { $_->check(); } foreach (@{$self->{controllers}}) { $_->check(); } foreach (@{$self->{accelerators}}) { $_->check(); } foreach (@{$self->{logical_drives}}) { $_->check(); } foreach (@{$self->{physical_drives}}) { $_->check(); } # wozu eigentlich? #if (! $self->has_controllers()) { #$self->{global_status}->check(); #} } sub dump { my $self = shift; foreach (@{$self->{host_controllers}}) { $_->dump(); } foreach (@{$self->{controllers}}) { $_->dump(); } foreach (@{$self->{accelerators}}) { $_->dump(); } foreach (@{$self->{logical_drives}}) { $_->dump(); } foreach (@{$self->{physical_drives}}) { $_->dump(); } #$self->{global_status}->dump(); } package HP::Proliant::Component::DiskSubsystem::Fca::GlobalStatus; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, cpqFcaMibCondition => $params{cpqFcaMibCondition}, }; bless $self, $class; return $self; } sub check { my $self = shift; if ($self->{cpqFcaMibCondition} ne 'ok') { $self->add_message(CRITICAL, sprintf 'fcal overall condition is %s', $self->{cpqFcaMibCondition}); } $self->{info} = sprintf 'fcal overall condition is %s', $self->{cpqFcaMibCondition}; } sub dump { my $self = shift; printf "[FCAL]\n"; foreach (qw(cpqFcaMibCondition)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } package HP::Proliant::Component::DiskSubsystem::Fca::HostController; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, blacklisted => 0, info => undef, extendedinfo => undef, }; map { $self->{$_} = $params{$_} } grep /cpqFcaHostCntlr/, keys %params; $self->{name} = $params{name} || $self->{cpqFcaHostCntlrIndex}; $self->{controllerindex} = $self->{cpqFcaHostCntlrIndex}; bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('fcahc', $self->{name}); my $info = sprintf 'fcal host controller %s in slot %s is %s', $self->{name}, $self->{cpqFcaHostCntlrSlot}, $self->{cpqFcaHostCntlrCondition}; if ($self->{cpqFcaHostCntlrCondition} eq 'other') { $info .= sprintf ' and needs attention (%s)', $self->{cpqFcaHostCntlrStatus}; $self->add_message(CRITICAL, $info); $self->add_info($info); } elsif ($self->{cpqFcaHostCntlrCondition} ne 'ok') { $self->add_message(CRITICAL, $info); $self->add_info($info); } else { $self->add_info($info); } $self->blacklist('fcahco', $self->{name}); $info = sprintf 'fcal host controller %s overall condition is %s', $self->{name}, $self->{cpqFcaHostCntlrOverallCondition}; if ($self->{cpqFcaHostCntlrOverallCondition} ne 'ok') { $self->add_message(WARNING, $info); } $self->add_info($info); } sub dump { my $self = shift; printf "[FCAL_HOST_CONTROLLER_%s]\n", $self->{name}; foreach (qw(cpqFcaHostCntlrIndex cpqFcaHostCntlrSlot cpqFcaHostCntlrModel cpqFcaHostCntlrStatus cpqFcaHostCntlrCondition cpqFcaHostCntlrOverallCondition)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } package HP::Proliant::Component::DiskSubsystem::Fca::Controller; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, blacklisted => 0, info => undef, extendedinfo => undef, }; map { $self->{$_} = $params{$_} } grep /cpqFcaCntlr/, keys %params; $self->{name} = $params{name} || $self->{cpqFcaCntlrBoxIndex}.':'.$self->{cpqFcaCntlrBoxIoSlot}; $self->{controllerindex} = $self->{cpqFcaCntlrBoxIndex}; bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('fcaco', $self->{name}); my $info = sprintf 'fcal controller %s in box %s/slot %s is %s', $self->{name}, $self->{cpqFcaCntlrBoxIndex}, $self->{cpqFcaCntlrBoxIoSlot}, $self->{cpqFcaCntlrCondition}; if ($self->{cpqFcaCntlrCondition} eq 'other') { if (1) { # was ist mit phys. drives? $info .= ' needs attention'; $info .= sprintf(' (%s)', $self->{cpqFcaCntlrStatus}) unless $self->{cpqFcaCntlrStatus} eq 'ok'; $self->add_message(CRITICAL, $info); $self->add_info($info); } else { $self->add_info($info); $self->{blacklisted} = 1; } } elsif ($self->{cpqFcaCntlrCondition} ne 'ok') { $info .= ' needs attention'; $info .= sprintf(' (%s)', $self->{cpqFcaCntlrStatus}) unless $self->{cpqFcaCntlrStatus} eq 'ok'; $self->add_message(CRITICAL, $info); $self->add_info($info); } else { $self->add_info($info); } } sub dump { my $self = shift; printf "[FCAL_CONTROLLER_%s]\n", $self->{name}; foreach (qw(cpqFcaCntlrBoxIndex cpqFcaCntlrBoxIoSlot cpqFcaCntlrModel cpqFcaCntlrStatus cpqFcaCntlrCondition)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } package HP::Proliant::Component::DiskSubsystem::Fca::Accelerator; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, blacklisted => 0, info => undef, extendedinfo => undef, }; map { $self->{$_} = $params{$_} } grep /cpqFcaAccel/, keys %params; $self->{name} = $params{name} || $self->{cpqFcaAccelBoxIndex}.':'.$self->{cpqFcaAccelBoxIoSlot}; $self->{controllerindex} = $self->{cpqFcaAccelBoxIndex}; bless $self, $class; return $self; } sub check { my $self = shift; # !!! cpqFcaAccelStatus $self->blacklist('fcaac', $self->{name}); my $info = sprintf 'fcal accelerator %s in box %s/slot %s is ', $self->{name}, $self->{cpqFcaAccelBoxIndex}, $self->{cpqFcaAccelBoxIoSlot}; if ($self->{cpqFcaAccelStatus} eq 'invalid') { $info .= 'not installed'; $self->add_info($info); } elsif ($self->{cpqFcaAccelStatus} eq 'tmpDisabled') { $info .= 'temp disabled'; $self->add_info($info); } elsif ($self->{cpqFcaAccelCondition} eq 'other') { $info .= sprintf '%s and needs attention (%s)', $self->{cpqFcaAccelCondition}, $self->{cpqFcaAccelErrCode}; $self->add_message(CRITICAL, $info); $self->add_info($info); } elsif ($self->{cpqFcaAccelCondition} ne 'ok') { $info .= sprintf '%s and needs attention (%s)', $self->{cpqFcaAccelCondition}, $self->{cpqFcaAccelErrCode}; $self->add_message(CRITICAL, $info); $self->add_info($info); } else { $info .= sprintf '%s', $self->{cpqFcaAccelCondition}; $self->add_info($info); } } sub dump { my $self = shift; printf "[FCAL_ACCELERATOR_%s]\n", $self->{name}; foreach (qw(cpqFcaAccelBoxIndex cpqFcaAccelBoxIoSlot cpqFcaAccelStatus cpqFcaAccelErrCode cpqFcaAccelBatteryStatus cpqFcaAccelCondition)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } package HP::Proliant::Component::DiskSubsystem::Fca::LogicalDrive; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, blacklisted => 0, info => undef, extendedinfo => undef, }; map { $self->{$_} = $params{$_} } grep /cpqFcaLogDrv/, keys %params; bless $self, $class; $self->{name} = $params{name} || $self->{cpqFcaLogDrvBoxIndex}.':'. $self->{cpqFcaLogDrvIndex}; $self->{controllerindex} = $self->{cpqFcaLogDrvBoxIndex}; return $self; } sub check { my $self = shift; $self->blacklist('fcald', $self->{name}); my $info = sprintf 'logical drive %s (%s) is %s', $self->{name}, $self->{cpqFcaLogDrvFaultTol}, $self->{cpqFcaLogDrvCondition}; if ($self->{cpqFcaLogDrvCondition} ne "ok") { $info .= sprintf ' (%s)', $self->{cpqFcaLogDrvStatus}; if ($self->{cpqFcaLogDrvStatus} =~ /rebuild|recovering|expand/) { $info .= sprintf ' (%s)', $self->{cpqFcaLogDrvStatus}; $self->add_message(WARNING, $info); } else { $self->add_message(CRITICAL, $info); } } $self->add_info($info); } sub dump { my $self = shift; printf "[LOGICAL_DRIVE_%s]\n", $self->{name}; foreach (qw(cpqFcaLogDrvBoxIndex cpqFcaLogDrvIndex cpqFcaLogDrvFaultTol cpqFcaLogDrvStatus cpqFcaLogDrvPercentRebuild cpqFcaLogDrvSize cpqFcaLogDrvPhyDrvIDs cpqFcaLogDrvCondition)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } package HP::Proliant::Component::DiskSubsystem::Fca::PhysicalDrive; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, blacklisted => 0, info => undef, extendedinfo => undef, }; map { $self->{$_} = $params{$_} } grep /cpqFcaPhyDrv/, keys %params; $self->{name} = $params{name} || $self->{cpqFcaPhyDrvBoxIndex}.':'.$self->{cpqFcaPhyDrvIndex}; ####vorerst $self->{controllerindex} = $self->{cpqScsiPhyDrvCntlrIndex}; bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('fcapd', $self->{name}); my $info = sprintf "physical drive %s is %s", $self->{name}, $self->{cpqFcaPhyDrvStatus}; if ($self->{cpqFcaPhyDrvStatus} eq 'unconfigured') { # not part of a logical drive # condition will surely be other } elsif ($self->{cpqFcaPhyDrvCondition} ne 'ok') { $self->add_message(CRITICAL, $info); } $self->add_info($info); } sub dump { my $self = shift; printf "[PHYSICAL_DRIVE_%s]\n", $self->{name}; foreach (qw(cpqFcaPhyDrvBoxIndex cpqFcaPhyDrvIndex cpqFcaPhyDrvModel cpqFcaPhyDrvBay cpqFcaPhyDrvStatus cpqFcaPhyDrvCondition cpqFcaPhyDrvSize cpqFcaPhyDrvBusNumber)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } package HP::Proliant::Component::DiskSubsystem::Fca::SpareDrive; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub dump { my $self = shift; printf "[SPARE_DRIVE]\n"; } 1; ././@LongLink0000644000000000000000000000017412262515411011643 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000002514112262515026027352 0ustar package HP::Proliant::Component::DiskSubsystem::Da; our @ISA = qw(HP::Proliant::Component::DiskSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, controllers => [], accelerators => [], physical_drives => [], logical_drives => [], spare_drives => [], condition => undef, blacklisted => 0, }; bless $self, $class; if ($self->{method} eq 'snmp') { bless $self, 'HP::Proliant::Component::DiskSubsystem::Da::SNMP'; } else { bless $self, 'HP::Proliant::Component::DiskSubsystem::Da::CLI'; } $self->init(); $self->assemble(); return $self; } sub check { my $self = shift; foreach (@{$self->{controllers}}) { $_->check(); } } sub dump { my $self = shift; foreach (@{$self->{controllers}}) { $_->dump(); } } package HP::Proliant::Component::DiskSubsystem::Da::Controller; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, cpqDaCntlrIndex => $params{cpqDaCntlrIndex}, cpqDaCntlrSlot => $params{cpqDaCntlrSlot}, cpqDaCntlrModel => $params{cpqDaCntlrModel}, cpqDaCntlrCondition => $params{cpqDaCntlrCondition}, cpqDaCntlrBoardCondition => $params{cpqDaCntlrBoardCondition}, blacklisted => 0, }; $self->{name} = $params{name} || $self->{cpqDaCntlrSlot}; $self->{controllerindex} = $self->{cpqDaCntlrIndex}; bless $self, $class; return $self; } sub check { my $self = shift; #$self->dumper($self); $self->blacklist('daco', $self->{cpqDaCntlrIndex}); foreach (@{$self->{accelerators}}) { $_->check(); } foreach (@{$self->{logical_drives}}) { $_->check(); } foreach (@{$self->{physical_drives}}) { $_->check(); } foreach (@{$self->{spare_drives}}) { $_->check(); } if ($self->{cpqDaCntlrCondition} eq 'other') { if (scalar(@{$self->{physical_drives}})) { $self->add_message(CRITICAL, sprintf 'da controller %s in slot %s needs attention', $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot}); $self->add_info(sprintf 'da controller %s in slot %s needs attention', $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot}); } else { $self->add_info(sprintf 'da controller %s in slot %s is ok and unused', $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot}); $self->{blacklisted} = 1; } } elsif ($self->{cpqDaCntlrCondition} eq 'degraded') { # maybe only the battery has failed and is disabled, no problem if (scalar(grep { $_->has_failed() && $_->is_disabled() } @{$self->{accelerators}})) { # message was already written in the accel code } else { $self->add_message(CRITICAL, sprintf 'da controller %s in slot %s needs attention', $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot}); $self->add_info(sprintf 'da controller %s in slot %s needs attention', $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot}); } } elsif ($self->{cpqDaCntlrCondition} ne 'ok') { $self->add_message(CRITICAL, sprintf 'da controller %s in slot %s needs attention', $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot}); $self->add_info(sprintf 'da controller %s in slot %s needs attention', $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot}); } else { $self->add_info(sprintf 'da controller %s in slot %s is ok', $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot}); } } sub dump { my $self = shift; printf "[DA_CONTROLLER_%s]\n", $self->{name}; foreach (qw(cpqDaCntlrSlot cpqDaCntlrIndex cpqDaCntlrCondition cpqDaCntlrModel)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; foreach (@{$self->{accelerators}}) { $_->dump(); } foreach (@{$self->{logical_drives}}) { $_->dump(); } foreach (@{$self->{physical_drives}}) { $_->dump(); } foreach (@{$self->{spare_drives}}) { $_->dump(); } } package HP::Proliant::Component::DiskSubsystem::Da::Accelerator; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, cpqDaAccelCntlrIndex => $params{cpqDaAccelCntlrIndex}, cpqDaAccelBattery => $params{cpqDaAccelBattery} || 'notPresent', cpqDaAccelCondition => $params{cpqDaAccelCondition}, cpqDaAccelStatus => $params{cpqDaAccelStatus}, blacklisted => 0, failed => 0, }; $self->{controllerindex} = $self->{cpqDaAccelCntlrIndex}; bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('daac', $self->{cpqDaAccelCntlrIndex}); $self->add_info(sprintf 'controller accelerator is %s', $self->{cpqDaAccelCondition}); if ($self->{cpqDaAccelStatus} ne "enabled") { } elsif ($self->{cpqDaAccelCondition} ne "ok") { if ($self->{cpqDaAccelBattery} eq "failed" && $self->{cpqDaAccelStatus} eq "tmpDisabled") { # handled later } else { $self->add_message(CRITICAL, "controller accelerator needs attention"); } } $self->blacklist('daacb', $self->{cpqDaAccelCntlrIndex}); $self->add_info(sprintf 'controller accelerator battery is %s', $self->{cpqDaAccelBattery}); if ($self->{cpqDaAccelBattery} eq "notPresent") { } elsif ($self->{cpqDaAccelBattery} eq "recharging") { $self->add_message(WARNING, "controller accelerator battery recharging"); } elsif ($self->{cpqDaAccelBattery} eq "failed" && $self->{cpqDaAccelStatus} eq "tmpDisabled") { $self->add_message(WARNING, "controller accelerator battery needs attention"); } elsif ($self->{cpqDaAccelBattery} ne "ok") { # (other) failed degraded $self->add_message(CRITICAL, "controller accelerator battery needs attention"); } } sub has_failed { my $self = shift; return $self->{cpqDaAccelStatus} =~ /Disabled/ ? 1 : 0; } sub is_disabled { my $self = shift; return $self->{cpqDaAccelStatus} =~ /Disabled/ ? 1 : 0; } sub dump { my $self = shift; printf "[ACCELERATOR]\n"; foreach (qw(cpqDaAccelCntlrIndex cpqDaAccelBattery cpqDaAccelStatus cpqDaAccelCondition)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } package HP::Proliant::Component::DiskSubsystem::Da::LogicalDrive; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, cpqDaLogDrvIndex => $params{cpqDaLogDrvIndex}, cpqDaLogDrvCntlrIndex => $params{cpqDaLogDrvCntlrIndex}, cpqDaLogDrvSize => $params{cpqDaLogDrvSize}, cpqDaLogDrvFaultTol => $params{cpqDaLogDrvFaultTol}, cpqDaLogDrvPercentRebuild => $params{cpqDaLogDrvPercentRebuild}, cpqDaLogDrvStatus => $params{cpqDaLogDrvStatus}, cpqDaLogDrvCondition => $params{cpqDaLogDrvCondition}, cpqDaLogDrvPhyDrvIDs => $params{cpqDaLogDrvPhyDrvIDs}, blacklisted => 0, }; bless $self, $class; $self->{name} = $params{name} || $self->{cpqDaLogDrvCntlrIndex}.':'.$self->{cpqDaLogDrvIndex}; ##vorerst $self->{controllerindex} = $self->{cpqDaLogDrvCntlrIndex}; if (! $self->{cpqDaLogDrvPercentRebuild} || $self->{cpqDaLogDrvPercentRebuild} == 4294967295) { $self->{cpqDaLogDrvPercentRebuild} = 100; } return $self; } sub check { my $self = shift; $self->blacklist('dald', $self->{name}); $self->add_info(sprintf "logical drive %s is %s (%s)", $self->{name}, $self->{cpqDaLogDrvStatus}, $self->{cpqDaLogDrvFaultTol}); if ($self->{cpqDaLogDrvCondition} ne "ok") { if ($self->{cpqDaLogDrvStatus} =~ /rebuild|recovering|recovery|expanding|queued/) { $self->add_message(WARNING, sprintf "logical drive %s is %s", $self->{name}, $self->{cpqDaLogDrvStatus}); } else { $self->add_message(CRITICAL, sprintf "logical drive %s is %s", $self->{name}, $self->{cpqDaLogDrvStatus}); } } } sub dump { my $self = shift; printf "[LOGICAL_DRIVE]\n"; foreach (qw(cpqDaLogDrvCntlrIndex cpqDaLogDrvIndex cpqDaLogDrvSize cpqDaLogDrvFaultTol cpqDaLogDrvStatus cpqDaLogDrvCondition cpqDaLogDrvPercentRebuild cpqDaLogDrvPhyDrvIDs)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } package HP::Proliant::Component::DiskSubsystem::Da::PhysicalDrive; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, name => $params{name}, cpqDaPhyDrvCntlrIndex => $params{cpqDaPhyDrvCntlrIndex}, cpqDaPhyDrvIndex => $params{cpqDaPhyDrvIndex}, cpqDaPhyDrvBay => $params{cpqDaPhyDrvBay}, cpqDaPhyDrvBusNumber => $params{cpqDaPhyDrvBusNumber}, cpqDaPhyDrvSize => $params{cpqDaPhyDrvSize}, cpqDaPhyDrvStatus => $params{cpqDaPhyDrvStatus}, cpqDaPhyDrvCondition => $params{cpqDaPhyDrvCondition}, blacklisted => 0, }; bless $self, $class; $self->{name} = $params{name} || $self->{cpqDaPhyDrvCntlrIndex}.':'.$self->{cpqDaPhyDrvIndex}; ##vorerst $self->{controllerindex} = $self->{cpqDaPhyDrvCntlrIndex}; return $self; } sub check { my $self = shift; $self->blacklist('dapd', $self->{name}); $self->add_info( sprintf "physical drive %s is %s", $self->{name}, $self->{cpqDaPhyDrvCondition}); if ($self->{cpqDaPhyDrvCondition} ne 'ok') { $self->add_message(CRITICAL, sprintf "physical drive %s is %s", $self->{name}, $self->{cpqDaPhyDrvCondition}); } } sub dump { my $self = shift; printf "[PHYSICAL_DRIVE]\n"; foreach (qw(cpqDaPhyDrvCntlrIndex cpqDaPhyDrvIndex cpqDaPhyDrvBay cpqDaPhyDrvBusNumber cpqDaPhyDrvSize cpqDaPhyDrvStatus cpqDaPhyDrvCondition)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } package HP::Proliant::Component::DiskSubsystem::Da::SpareDrive; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub dump { my $self = shift; printf "[SPARE_DRIVE]\n"; foreach (qw(cpqDaPhyDrvCntlrIndex cpqDaPhyDrvIndex cpqDaPhyDrvBay cpqDaPhyDrvBusNumber cpqDaPhyDrvSize cpqDaPhyDrvStatus cpqDaPhyDrvCondition)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } 1; ././@LongLink0000644000000000000000000000017312262515411011642 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000755000000000000000000000000012262515026027345 5ustar ././@LongLink0000644000000000000000000000020112262515411011632 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/CLI.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000126312262515026027351 0ustar package HP::Proliant::Component::DiskSubsystem::Fca::CLI; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { controllers => [], accelerators => [], physical_drives => [], logical_drives => [], spare_drives => [], blacklisted => 0, }; bless $self, $class; return $self; } sub init { my $self = shift; # ..... $self->{global_status} = HP::Proliant::Component::DiskSubsystem::Fca::GlobalStatus->new( runtime => $self->{runtime}, cpqFcaMibCondition => 'n/a', ); } 1; ././@LongLink0000644000000000000000000000020212262515411011633 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/SNMP.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000002054212262515026027352 0ustar package HP::Proliant::Component::DiskSubsystem::Fca::SNMP; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca HP::Proliant::Component::SNMP); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { controllers => [], accelerators => [], physical_drives => [], logical_drives => [], spare_drives => [], blacklisted => 0, }; bless $self, $class; return $self; } sub init { my $self = shift; my $snmpwalk = $self->{rawdata}; # CPQFCA-MIB my $oids = { cpqFcaHostCntlrEntry => '1.3.6.1.4.1.232.16.2.7.1.1', cpqFcaHostCntlrIndex => '1.3.6.1.4.1.232.16.2.7.1.1.1', cpqFcaHostCntlrSlot => '1.3.6.1.4.1.232.16.2.7.1.1.2', cpqFcaHostCntlrModel => '1.3.6.1.4.1.232.16.2.7.1.1.3', cpqFcaHostCntlrStatus => '1.3.6.1.4.1.232.16.2.7.1.1.4', cpqFcaHostCntlrCondition => '1.3.6.1.4.1.232.16.2.7.1.1.5', cpqFcaHostCntlrOverallCondition => '1.3.6.1.4.1.232.16.2.7.1.1.8', cpqFcaHostCntlrModelValue => { 1 => "other", 2 => "fchc-p", 3 => "fchc-e", 4 => "fchc64", 5 => "sa-sam", 6 => "fca-2101", 7 => "sw64-33", 8 => "fca-221x", 9 => "dpfcmc", }, cpqFcaHostCntlrStatusValue => { 1 => "other", 2 => "ok", 3 => "failed", 4 => "shutdown", 5 => "loopDegraded", 6 => "loopFailed", }, cpqFcaHostCntlrConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, cpqFcaHostCntlrOverallConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, # cntrl + alle associated storage boxes }; # INDEX { cpqFcaHostCntlrIndex } foreach ($self->get_entries($oids, 'cpqFcaHostCntlrEntry')) { push(@{$self->{host_controllers}}, HP::Proliant::Component::DiskSubsystem::Fca::HostController->new(%{$_})); } $oids = { cpqFcaCntlrEntry => '1.3.6.1.4.1.232.16.2.2.1.1', cpqFcaCntlrBoxIndex => '1.3.6.1.4.1.232.16.2.2.1.1.1', cpqFcaCntlrBoxIoSlot => '1.3.6.1.4.1.232.16.2.2.1.1.2', cpqFcaCntlrModel => '1.3.6.1.4.1.232.16.2.2.1.1.3', cpqFcaCntlrStatus => '1.3.6.1.4.1.232.16.2.2.1.1.5', cpqFcaCntlrCondition => '1.3.6.1.4.1.232.16.2.2.1.1.6', cpqFcaCntlrModelValue => { 1 => "other", 2 => "fibreArray", 3 => "msa1000", 4 => "smartArrayClusterStorage", 5 => "hsg80", 6 => "hsv110", 7 => "msa500g2", 8 => "msa20", }, cpqFcaCntlrStatusValue => { 1 => "other", 2 => "ok", 3 => "failed", 4 => "offline", 4 => "redundantPathOffline", }, cpqFcaCntlrConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, }; # INDEX { cpqFcaCntlrBoxIndex, cpqFcaCntlrBoxIoSlot } foreach ($self->get_entries($oids, 'cpqFcaCntlrEntry')) { push(@{$self->{controllers}}, HP::Proliant::Component::DiskSubsystem::Fca::Controller->new(%{$_})); } $oids = { cpqFcaAccelEntry => '1.3.6.1.4.1.232.16.2.2.2.1', cpqFcaAccelBoxIndex => '1.3.6.1.4.1.232.16.2.2.2.1.1', cpqFcaAccelBoxIoSlot => '1.3.6.1.4.1.232.16.2.2.2.1.2', cpqFcaAccelStatus => '1.3.6.1.4.1.232.16.2.2.2.1.3', cpqFcaAccelErrCode => '1.3.6.1.4.1.232.16.2.2.2.1.5', cpqFcaAccelBatteryStatus => '1.3.6.1.4.1.232.16.2.2.2.1.6', cpqFcaAccelCondition => '1.3.6.1.4.1.232.16.2.2.2.1.9', cpqFcaAccelStatusValue => { 1 => "other", 2 => "invalid", 3 => "enabled", 4 => "tmpDisabled", 5 => "permDisabled", }, cpqFcaAccelErrCodeValue => { 1 => 'other', 2 => 'invalid', 3 => 'badConfig', 4 => 'lowBattery', 5 => 'disableCmd', 6 => 'noResources', 7 => 'notConnected', 8 => 'badMirrorData', 9 => 'readErr', 10 => 'writeErr', 11 => 'configCmd', 12 => 'expandInProgress', 13 => 'snapshotInProgress', 14 => 'redundantLowBattery', 15 => 'redundantSizeMismatch', 16 => 'redundantCacheFailure', 17 => 'excessiveEccErrors', 19 => 'postEccErrors', }, cpqFcaAccelBatteryStatusValue => { 1 => 'other', 2 => 'ok', 3 => 'recharging', 4 => 'failed', 5 => 'degraded', 6 => 'notPresent', }, cpqFcaAccelConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, }; # INDEX { cpqFcaAccelBoxIndex, cpqFcaAccelBoxIoSlot } foreach ($self->get_entries($oids, 'cpqFcaAccelEntry')) { push(@{$self->{accelerators}}, HP::Proliant::Component::DiskSubsystem::Fca::Accelerator->new(%{$_})); } $oids = { cpqFcaLogDrvEntry => '1.3.6.1.4.1.232.16.2.3.1.1', cpqFcaLogDrvBoxIndex => '1.3.6.1.4.1.232.16.2.3.1.1.1', cpqFcaLogDrvIndex => '1.3.6.1.4.1.232.16.2.3.1.1.2', cpqFcaLogDrvFaultTol => '1.3.6.1.4.1.232.16.2.3.1.1.3', cpqFcaLogDrvStatus => '1.3.6.1.4.1.232.16.2.3.1.1.4', cpqFcaLogDrvPercentRebuild => '1.3.6.1.4.1.232.16.2.3.1.1.6', cpqFcaLogDrvSize => '1.3.6.1.4.1.232.16.2.3.1.1.9', cpqFcaLogDrvPhyDrvIDs => '1.3.6.1.4.1.232.16.2.3.1.1.10', cpqFcaLogDrvCondition => '1.3.6.1.4.1.232.16.2.3.1.1.11', cpqFcaLogDrvFaultTolValue => { 1 => 'other', 2 => 'none', 3 => 'mirroring', 4 => 'dataGuard', 5 => 'distribDataGuard', 7 => 'advancedDataGuard', }, cpqFcaLogDrvStatusValue => { 1 => 'other', 2 => 'ok', 3 => 'failed', 4 => 'unconfigured', 5 => 'recovering', 6 => 'readyForRebuild', 7 => 'rebuilding', 8 => 'wrongDrive', 9 => 'badConnect', 10 => 'overheating', 11 => 'shutdown', 12 => 'expanding', 13 => 'notAvailable', 14 => 'queuedForExpansion', 15 => 'hardError', }, cpqFcaLogDrvConditionValue => { 1 => 'other', 2 => 'ok', 3 => 'degraded', 4 => 'failed', }, }; # INDEX { cpqFcaLogDrvBoxIndex, cpqFcaLogDrvIndex } foreach ($self->get_entries($oids, 'cpqFcaLogDrvEntry')) { push(@{$self->{logical_drives}}, HP::Proliant::Component::DiskSubsystem::Fca::LogicalDrive->new(%{$_})); } $oids = { cpqFcaPhyDrvEntry => '1.3.6.1.4.1.232.16.2.5.1.1', cpqFcaPhyDrvBoxIndex => '1.3.6.1.4.1.232.16.2.5.1.1.1', cpqFcaPhyDrvIndex => '1.3.6.1.4.1.232.16.2.5.1.1.2', cpqFcaPhyDrvModel => '1.3.6.1.4.1.232.16.2.5.1.1.3', cpqFcaPhyDrvBay => '1.3.6.1.4.1.232.16.2.5.1.1.5', cpqFcaPhyDrvStatus => '1.3.6.1.4.1.232.16.2.5.1.1.6', cpqFcaPhyDrvCondition => '1.3.6.1.4.1.232.16.2.5.1.1.31', cpqFcaPhyDrvSize => '1.3.6.1.4.1.232.16.2.5.1.1.38', cpqFcaPhyDrvBusNumber => '1.3.6.1.4.1.232.16.2.5.1.1.42', cpqFcaPhyDrvStatusValue => { 1 => 'other', 2 => 'unconfigured', 3 => 'ok', 4 => 'threshExceeded', 5 => 'predictiveFailure', 6 => 'failed', }, cpqFcaPhyDrvConditionValue => { 1 => 'other', 2 => 'ok', 3 => 'degraded', 4 => 'failed', }, }; # INDEX { cpqFcaPhyDrvBoxIndex, cpqFcaPhyDrvIndex } foreach ($self->get_entries($oids, 'cpqFcaPhyDrvEntry')) { push(@{$self->{physical_drives}}, HP::Proliant::Component::DiskSubsystem::Fca::PhysicalDrive->new(%{$_})); } $oids = { cpqFcaMibRevMajor => '1.3.6.1.4.1.232.16.1.1.0', cpqFcaMibRevMinor => '1.3.6.1.4.1.232.16.1.2.0', cpqFcaMibCondition => '1.3.6.1.4.1.232.16.1.3.0', cpqFcaMibConditionValue => { 1 => 'other', 2 => 'ok', 3 => 'degraded', 4 => 'failed', }, }; $self->{global_status} = HP::Proliant::Component::DiskSubsystem::Fca::GlobalStatus->new( runtime => $self->{runtime}, cpqFcaMibCondition => SNMP::Utils::get_object_value($snmpwalk, $oids->{cpqFcaMibCondition}, $oids->{cpqFcaMibConditionValue}) ); } ././@LongLink0000644000000000000000000000017612262515411011645 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000001363512262515026027357 0ustar package HP::Proliant::Component::DiskSubsystem::Scsi; our @ISA = qw(HP::Proliant::Component::DiskSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, controllers => [], physical_drives => [], logical_drives => [], spare_drives => [], condition => undef, blacklisted => 0, }; bless $self, $class; if ($self->{method} eq 'snmp') { bless $self, 'HP::Proliant::Component::DiskSubsystem::Scsi::SNMP'; } else { bless $self, 'HP::Proliant::Component::DiskSubsystem::Scsi::CLI'; } $self->init(); $self->assemble(); return $self; } sub check { my $self = shift; foreach (@{$self->{controllers}}) { $_->check(); } } sub dump { my $self = shift; foreach (@{$self->{controllers}}) { $_->dump(); } } package HP::Proliant::Component::DiskSubsystem::Scsi::Controller; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Scsi); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, blacklisted => 0, info => undef, extendedinfo => undef, }; map { $self->{$_} = $params{$_} } grep /cpqScsiCntlr/, keys %params; $self->{name} = $params{name} || $params{cpqScsiCntlrIndex}.':'.$params{cpqScsiCntlrBusIndex}; $self->{controllerindex} = $self->{cpqScsiCntlrIndex}; bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('scco', $self->{name}); my $info = sprintf 'scsi controller %s in slot %s is %s', $self->{name}, $self->{cpqScsiCntlrSlot}, $self->{cpqScsiCntlrCondition}; if ($self->{cpqScsiCntlrCondition} eq 'other') { if (scalar(@{$self->{physical_drives}})) { $info .= ' and needs attention'; $self->add_message(CRITICAL, $info); $self->add_info($info); } else { $info .= ' and unused'; $self->add_info($info); $self->{blacklisted} = 1; } } elsif ($self->{cpqScsiCntlrCondition} ne 'ok') { $info .= ' and needs attention'; $self->add_message(CRITICAL, $info); $self->add_info($info); } else { $self->add_info($info); } foreach (@{$self->{logical_drives}}) { $_->check(); } foreach (@{$self->{physical_drives}}) { $_->check(); } foreach (@{$self->{spare_drives}}) { $_->check(); } } sub dump { my $self = shift; printf "[SCSI_CONTROLLER_%s]\n", $self->{name}; foreach (qw(cpqScsiCntlrIndex cpqScsiCntlrBusIndex cpqScsiCntlrSlot cpqScsiCntlrStatus cpqScsiCntlrCondition cpqScsiCntlrHwLocation)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; foreach (@{$self->{logical_drives}}) { $_->dump(); } foreach (@{$self->{physical_drives}}) { $_->dump(); } foreach (@{$self->{spare_drives}}) { $_->dump(); } } package HP::Proliant::Component::DiskSubsystem::Scsi::LogicalDrive; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Scsi); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, blacklisted => 0, info => undef, extendedinfo => undef, }; map { $self->{$_} = $params{$_} } grep /cpqScsiLogDrv/, keys %params; $self->{name} = $params{name} || $params{cpqScsiLogDrvCntlrIndex}.':'.$params{cpqScsiLogDrvBusIndex}.':'.$params{cpqScsiLogDrvIndex}; bless $self, $class; $self->{controllerindex} = $self->{cpqScsiLogDrvCntlrIndex}; return $self; } sub check { my $self = shift; $self->blacklist('scld', $self->{name}); my $info = sprintf 'logical drive %s is %s', $self->{name}, $self->{cpqScsiLogDrvStatus}; if ($self->{cpqScsiLogDrvCondition} ne "ok") { if ($self->{cpqScsiLogDrvStatus} =~ /rebuild|recovering/) { $self->add_message(WARNING, $info); } else { $self->add_message(CRITICAL, $info); } } $self->add_info($info); } sub dump { my $self = shift; printf "[LOGICAL_DRIVE_%s]\n", $self->{name}; foreach (qw(cpqScsiLogDrvCntlrIndex cpqScsiLogDrvBusIndex cpqScsiLogDrvIndex cpqScsiLogDrvFaultTol cpqScsiLogDrvStatus cpqScsiLogDrvSize cpqScsiLogDrvPhyDrvIDs cpqScsiLogDrvCondition)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } package HP::Proliant::Component::DiskSubsystem::Scsi::PhysicalDrive; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Scsi); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, blacklisted => 0, info => undef, extendedinfo => undef, }; map { $self->{$_} = $params{$_} } grep /cpqScsiPhyDrv/, keys %params; $self->{name} = $params{name} || $self->{cpqScsiPhyDrvCntlrIndex}.':'.$self->{cpqScsiPhyDrvBusIndex}.':'.$self->{cpqScsiPhyDrvIndex}; $self->{controllerindex} = $self->{cpqScsiPhyDrvCntlrIndex}; bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('scpd', $self->{name}); my $info = sprintf 'physical drive %s is %s', $self->{name}, $self->{cpqScsiPhyDrvCondition}; if ($self->{cpqScsiPhyDrvCondition} ne 'ok') { $self->add_message(CRITICAL, $info); } $self->add_info($info); } sub dump { my $self = shift; printf "[PHYSICAL_DRIVE_%s]\n", $self->{name}; foreach (qw(cpqScsiPhyDrvCntlrIndex cpqScsiPhyDrvBusIndex cpqScsiPhyDrvIndex cpqScsiPhyDrvStatus cpqScsiPhyDrvSize cpqScsiPhyDrvCondition)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } package HP::Proliant::Component::DiskSubsystem::Scsi::SpareDrive; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Scsi); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub dump { my $self = shift; printf "[SPARE_DRIVE]\n"; } 1; ././@LongLink0000644000000000000000000000017312262515411011642 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000755000000000000000000000000012262515026027345 5ustar ././@LongLink0000644000000000000000000000020112262515411011632 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/CLI.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000076012262515026027352 0ustar package HP::Proliant::Component::DiskSubsystem::Sas::CLI; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Sas); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { controllers => [], accelerators => [], physical_drives => [], logical_drives => [], spare_drives => [], blacklisted => 0, }; bless $self, $class; return $self; } sub init { my $self = shift; } 1; ././@LongLink0000644000000000000000000000020212262515411011633 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/SNMP.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000732312262515026027354 0ustar package HP::Proliant::Component::DiskSubsystem::Sas::SNMP; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Sas HP::Proliant::Component::SNMP); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { controllers => [], accelerators => [], physical_drives => [], logical_drives => [], spare_drives => [], blacklisted => 0, }; bless $self, $class; return $self; } sub init { my $self = shift; my $snmpwalk = $self->{rawdata}; # CPQSCSI-MIB my $oids = { cpqSasHbaEntry => "1.3.6.1.4.1.232.5.5.1.1.1", cpqSasHbaIndex => "1.3.6.1.4.1.232.5.5.1.1.1.1", cpqSasHbaLocation => "1.3.6.1.4.1.232.5.5.1.1.1.2", cpqSasHbaSlot => "1.3.6.1.4.1.232.5.5.1.1.1.6", cpqSasHbaStatus => "1.3.6.1.4.1.232.5.5.1.1.1.4", cpqSasHbaStatusValue => { 1 => "other", 2 => "ok", 3 => "failed", }, cpqSasHbaCondition => "1.3.6.1.4.1.232.5.5.1.1.1.5", cpqSasHbaConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, }; # INDEX { cpqSasHbaIndex } foreach ($self->get_entries($oids, 'cpqSasHbaEntry')) { push(@{$self->{controllers}}, HP::Proliant::Component::DiskSubsystem::Sas::Controller->new(%{$_})); } $oids = { cpqSasLogDrvEntry => "1.3.6.1.4.1.232.5.5.3.1.1", cpqSasLogDrvHbaIndex => "1.3.6.1.4.1.232.5.5.3.1.1.1", cpqSasLogDrvIndex => "1.3.6.1.4.1.232.5.5.3.1.1.2", cpqSasLogDrvStatus => "1.3.6.1.4.1.232.5.5.3.1.1.4", cpqSasLogDrvCondition => "1.3.6.1.4.1.232.5.5.3.1.1.5", cpqSasLogDrvRebuildingPercent => "1.3.6.1.4.1.232.5.5.3.1.1.12", cpqSasLogDrvRaidLevel => "1.3.6.1.4.1.232.5.5.3.1.1.3", cpqSasLogDrvRaidLevelValue => { 1 => "other", 2 => "raid0", 3 => "raid1", 4 => "raid0plus1", 5 => "raid5", 6 => "raid15", 7 => "volume", }, cpqSasLogDrvConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, cpqSasLogDrvStatusValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "rebuilding", 5 => "failed", 6 => "offline", } }; # INDEX { cpqSasLogDrvCntlrIndex, cpqSasLogDrvIndex } foreach ($self->get_entries($oids, 'cpqSasLogDrvEntry')) { push(@{$self->{logical_drives}}, HP::Proliant::Component::DiskSubsystem::Sas::LogicalDrive->new(%{$_})); } $oids = { cpqSasPhyDrvEntry => "1.3.6.1.4.1.232.5.5.2.1.1", cpqSasPhyDrvHbaIndex => "1.3.6.1.4.1.232.5.5.2.1.1.1", cpqSasPhyDrvIndex => "1.3.6.1.4.1.232.5.5.2.1.1.2", cpqSasPhyDrvLocationString => "1.3.6.1.4.1.232.5.5.2.1.1.3", cpqSasPhyDrvStatus => "1.3.6.1.4.1.232.5.5.2.1.1.5", cpqSasPhyDrvSize => "1.3.6.1.4.1.232.5.5.2.1.1.8", cpqSasPhyDrvCondition => "1.3.6.1.4.1.232.5.5.2.1.1.6", cpqSasPhyDrvConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, cpqSasPhyDrvStatusValue => { 1 => "other", 2 => "ok", 3 => "predictiveFailure", 4 => "offline", 5 => "failed", 6 => "missingWasOk", 7 => "missingWasPredictiveFailure", 8 => "missingWasOffline", 9 => "missingWasFailed", }, }; # INDEX { cpqPhyLogDrvCntlrIndex, cpqSasPhyDrvIndex } foreach ($self->get_entries($oids, 'cpqSasPhyDrvEntry')) { push(@{$self->{physical_drives}}, HP::Proliant::Component::DiskSubsystem::Sas::PhysicalDrive->new(%{$_})); } } ././@LongLink0000644000000000000000000000017512262515411011644 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000001600312262515026027347 0ustar package HP::Proliant::Component::DiskSubsystem::Sas; our @ISA = qw(HP::Proliant::Component::DiskSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, controllers => [], physical_drives => [], logical_drives => [], spare_drives => [], condition => undef, blacklisted => 0, }; bless $self, $class; if ($self->{method} eq 'snmp') { bless $self, 'HP::Proliant::Component::DiskSubsystem::Sas::SNMP'; } else { bless $self, 'HP::Proliant::Component::DiskSubsystem::Sas::CLI'; } $self->init(); $self->assemble(); return $self; } sub check { my $self = shift; foreach (@{$self->{controllers}}) { $_->check(); } } sub dump { my $self = shift; foreach (@{$self->{controllers}}) { $_->dump(); } } package HP::Proliant::Component::DiskSubsystem::Sas::Controller; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Sas); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, cpqSasHbaIndex => $params{cpqSasHbaIndex}, cpqSasHbaLocation => $params{cpqSasHbaLocation}, cpqSasHbaSlot => $params{cpqSasHbaSlot}, cpqSasHbaStatus => $params{cpqSasHbaStatus}, cpqSasHbaCondition => $params{cpqSasHbaCondition}, blacklisted => 0, }; $self->{name} = $params{name} || $self->{cpqSasHbaSlot}; $self->{controllerindex} = $self->{cpqSasHbaIndex}; bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('saco', $self->{cpqSasHbaSlot}); if ($self->{cpqSasHbaCondition} eq 'other') { if (scalar(@{$self->{physical_drives}})) { $self->add_message(CRITICAL, sprintf 'sas controller in slot %s needs attention', $self->{cpqSasHbaSlot}); $self->add_info(sprintf 'sas controller in slot %s needs attention', $self->{cpqSasHbaSlot}); } else { $self->add_info(sprintf 'sas controller in slot %s is ok and unused', $self->{cpqSasHbaSlot}); $self->{blacklisted} = 1; } } elsif ($self->{cpqSasHbaCondition} ne 'ok') { $self->add_message(CRITICAL, sprintf 'sas controller in slot %s needs attention', $self->{cpqSasHbaSlot}); $self->add_info(sprintf 'sas controller in slot %s needs attention', $self->{cpqSasHbaSlot}); } else { $self->add_info(sprintf 'sas controller in slot %s is ok', $self->{cpqSasHbaSlot}); } foreach (@{$self->{logical_drives}}) { $_->check(); } foreach (@{$self->{physical_drives}}) { $_->check(); } foreach (@{$self->{spare_drives}}) { $_->check(); } } sub dump { my $self = shift; printf "[SAS_HBA%s]\n", $self->{name}; foreach (qw(cpqSasHbaSlot cpqSasHbaIndex cpqSasHbaCondition cpqSasHbaStatus cpqSasHbaLocation)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; foreach (@{$self->{logical_drives}}) { $_->dump(); } foreach (@{$self->{physical_drives}}) { $_->dump(); } foreach (@{$self->{spare_drives}}) { $_->dump(); } } package HP::Proliant::Component::DiskSubsystem::Sas::LogicalDrive; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Sas); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, cpqSasLogDrvHbaIndex => $params{cpqSasLogDrvHbaIndex}, cpqSasLogDrvIndex => $params{cpqSasLogDrvIndex}, cpqSasLogDrvStatus => $params{cpqSasLogDrvStatus}, cpqSasLogDrvCondition => $params{cpqSasLogDrvCondition}, cpqSasLogDrvRebuildingPercent => $params{cpqSasLogDrvRebuildingPercent}, cpqSasLogDrvRaidLevel => $params{cpqSasLogDrvRaidLevel}, blacklisted => 0, }; bless $self, $class; $self->{name} = $params{name} || $self->{cpqSasLogDrvHbaIndex}.':'.$self->{cpqSasLogDrvIndex}; ####vorerst $self->{controllerindex} = $self->{cpqSasLogDrvHbaIndex}; if (! $self->{cpqSasLogDrvRebuildingPercent} || $self->{cpqSasLogDrvRebuildingPercent} == 4294967295) { $self->{cpqSasLogDrvRebuildingPercent} = 100; } return $self; } sub check { my $self = shift; $self->blacklist('sald', $self->{name}); if ($self->{cpqSasLogDrvCondition} ne "ok") { if ($self->{cpqSasLogDrvStatus} =~ /rebuild|recovering|expanding|queued/) { $self->add_message(WARNING, sprintf "logical drive %s is %s", $self->{name}, $self->{cpqSasLogDrvStatus}); } else { $self->add_message(CRITICAL, sprintf "logical drive %s is %s", $self->{name}, $self->{cpqSasLogDrvStatus}); } } $self->add_info( sprintf "logical drive %s is %s (%s)", $self->{name}, $self->{cpqSasLogDrvStatus}, $self->{cpqSasLogDrvRaidLevel}); } sub dump { my $self = shift; printf "[LOGICAL_DRIVE]\n"; foreach (qw(cpqSasLogDrvHbaIndex cpqSasLogDrvIndex cpqSasLogDrvRaidLevel cpqSasLogDrvStatus cpqSasLogDrvCondition cpqSasLogDrvRebuildingPercent)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } package HP::Proliant::Component::DiskSubsystem::Sas::PhysicalDrive; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Sas); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, cpqSasPhyDrvHbaIndex => $params{cpqSasPhyDrvHbaIndex}, cpqSasPhyDrvIndex => $params{cpqSasPhyDrvIndex}, cpqSasPhyDrvLocationString => $params{cpqSasPhyDrvLocationString}, cpqSasPhyDrvStatus => $params{cpqSasPhyDrvStatus}, cpqSasPhyDrvSize => $params{cpqSasPhyDrvSize}, cpqSasPhyDrvCondition => $params{cpqSasPhyDrvCondition}, blacklisted => 0, }; $self->{name} = $params{name} || $self->{cpqSasPhyDrvHbaIndex}.':'.$self->{cpqSasPhyDrvIndex}; ####vorerst $self->{controllerindex} = $self->{cpqSasPhyDrvHbaIndex}; bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('sapd', $self->{name}); if ($self->{cpqSasPhyDrvCondition} ne 'ok') { $self->add_message(CRITICAL, sprintf "physical drive %s is %s", $self->{name}, $self->{cpqSasPhyDrvCondition}); } $self->add_info( sprintf "physical drive %s is %s", $self->{name}, $self->{cpqSasPhyDrvCondition}); } sub dump { my $self = shift; printf "[PHYSICAL_DRIVE]\n"; foreach (qw(cpqSasPhyDrvHbaIndex cpqSasPhyDrvIndex cpqSasPhyDrvLocationString cpqSasPhyDrvSize cpqSasPhyDrvStatus cpqSasPhyDrvCondition)) { printf "%s: %s\n", $_, $self->{$_}; } printf "\n"; } package HP::Proliant::Component::DiskSubsystem::Sas::SpareDrive; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Sas); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub dump { my $self = shift; printf "[SPARE_DRIVE]\n"; } 1; ././@LongLink0000644000000000000000000000017412262515411011643 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000755000000000000000000000000012262515026027345 5ustar ././@LongLink0000644000000000000000000000020212262515411011633 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/CLI.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000076212262515026027354 0ustar package HP::Proliant::Component::DiskSubsystem::Scsi::CLI; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Scsi); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { controllers => [], accelerators => [], physical_drives => [], logical_drives => [], spare_drives => [], blacklisted => 0, }; bless $self, $class; return $self; } sub init { my $self = shift; } 1; ././@LongLink0000644000000000000000000000020312262515411011634 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/SNMP.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000001022312262515026027345 0ustar package HP::Proliant::Component::DiskSubsystem::Scsi::SNMP; our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Scsi HP::Proliant::Component::SNMP); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { controllers => [], accelerators => [], physical_drives => [], logical_drives => [], spare_drives => [], blacklisted => 0, }; bless $self, $class; return $self; } sub init { my $self = shift; my $snmpwalk = $self->{rawdata}; # CPQSCSI-MIB my $oids = { cpqScsiCntlrEntry => '1.3.6.1.4.1.232.5.2.2.1.1', cpqScsiCntlrIndex => '1.3.6.1.4.1.232.5.2.2.1.1.1', cpqScsiCntlrBusIndex => '1.3.6.1.4.1.232.5.2.2.1.1.2', cpqScsiCntlrSlot => '1.3.6.1.4.1.232.5.2.2.1.1.6', cpqScsiCntlrStatus => '1.3.6.1.4.1.232.5.2.2.1.1.7', cpqScsiCntlrCondition => '1.3.6.1.4.1.232.5.2.2.1.1.12', cpqScsiCntlrHwLocation => '1.3.6.1.4.1.232.5.2.2.1.1.16', cpqScsiCntlrStatusValue => { 1 => "other", 2 => "ok", 3 => "failed", }, cpqScsiCntlrConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", } }; # INDEX { cpqScsiCntlrIndex, cpqScsiCntlrBusIndex } foreach ($self->get_entries($oids, 'cpqScsiCntlrEntry')) { push(@{$self->{controllers}}, HP::Proliant::Component::DiskSubsystem::Scsi::Controller->new(%{$_})); } $oids = { cpqScsiLogDrvEntry => '1.3.6.1.4.1.232.5.2.3.1.1', cpqScsiLogDrvCntlrIndex => '1.3.6.1.4.1.232.5.2.3.1.1.1', cpqScsiLogDrvBusIndex => '1.3.6.1.4.1.232.5.2.3.1.1.2', cpqScsiLogDrvIndex => '1.3.6.1.4.1.232.5.2.3.1.1.3', cpqScsiLogDrvFaultTol => '1.3.6.1.4.1.232.5.2.3.1.1.4', cpqScsiLogDrvStatus => '1.3.6.1.4.1.232.5.2.3.1.1.5', cpqScsiLogDrvSize => '1.3.6.1.4.1.232.5.2.3.1.1.6', cpqScsiLogDrvPhyDrvIDs => '1.3.6.1.4.1.232.5.2.3.1.1.7', cpqScsiLogDrvCondition => '1.3.6.1.4.1.232.5.2.3.1.1.8', cpqScsiLogDrvStatusValue => { 1 => "other", 2 => "ok", 3 => "failed", 4 => "unconfigured", 5 => "recovering", 6 => "readyForRebuild", 7 => "rebuilding", 8 => "wrongDrive", 9 => "badConnect", }, cpqScsiLogDrvConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, cpqScsiLogDrvFaultTolValue => { 1 => "other", 2 => "none", 3 => "mirroring", 4 => "dataGuard", 5 => "distribDataGuard", }, }; # INDEX { cpqScsiLogDrvCntlrIndex, cpqScsiLogDrvBusIndex, cpqScsiLogDrvIndex } foreach ($self->get_entries($oids, 'cpqScsiLogDrvEntry')) { push(@{$self->{logical_drives}}, HP::Proliant::Component::DiskSubsystem::Scsi::LogicalDrive->new(%{$_})); } $oids = { cpqScsiPhyDrvEntry => '1.3.6.1.4.1.232.5.2.4.1.1', cpqScsiPhyDrvCntlrIndex => '1.3.6.1.4.1.232.5.2.4.1.1.1', cpqScsiPhyDrvBusIndex => '1.3.6.1.4.1.232.5.2.4.1.1.2', cpqScsiPhyDrvIndex => '1.3.6.1.4.1.232.5.2.4.1.1.3', cpqScsiPhyDrvStatus => '1.3.6.1.4.1.232.5.2.4.1.1.9', cpqScsiPhyDrvSize => '1.3.6.1.4.1.232.5.2.4.1.1.7', cpqScsiPhyDrvCondition => '1.3.6.1.4.1.232.5.2.4.1.1.26', cpqScsiPhyDrvConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, cpqScsiPhyDrvStatusValue => { 1 => "other", 2 => "ok", 3 => "failed", 4 => "notConfigured", 5 => "badCable", 6 => "missingWasOk", 7 => "missingWasFailed", 8 => "predictiveFailure", 9 => "missingWasPredictiveFailure", 10 => "offline", 11 => "missingWasOffline", 12 => "hardError", }, }; # INDEX { cpqScsiPhyDrvCntlrIndex, cpqScsiPhyDrvBusIndex, cpqScsiPhyDrvIndex } foreach ($self->get_entries($oids, 'cpqScsiPhyDrvEntry')) { push(@{$self->{physical_drives}}, HP::Proliant::Component::DiskSubsystem::Scsi::PhysicalDrive->new(%{$_})); } } ././@LongLink0000644000000000000000000000016012262515411011636 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/SNMP.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000356712262515026027362 0ustar package HP::Proliant::Component::SNMP; sub get_entries { my $self = shift; my $oids = shift; my $entry = shift; my $snmpwalk = $self->{rawdata}; my @params = (); my @indices = SNMP::Utils::get_indices($snmpwalk, $oids->{$entry}); foreach (@indices) { my @idx = @{$_}; my %params = ( runtime => $self->{runtime}, ); my $maxdimension = scalar(@idx) - 1; foreach my $idxnr (1..scalar(@idx)) { $params{'index'.$idxnr} = $_->[$idxnr - 1]; } foreach my $oid (keys %{$oids}) { next if $oid =~ /Entry$/; next if $oid =~ /Value$/; if (exists $oids->{$oid.'Value'}) { $params{$oid} = SNMP::Utils::get_object_value( $snmpwalk, $oids->{$oid}, $oids->{$oid.'Value'}, @idx); if (! defined $params{$oid}) { my $numerical_value = SNMP::Utils::get_object( $snmpwalk, $oids->{$oid}, @idx); if (! defined $numerical_value) { # maschine liefert schrott $params{$oid} = 'value_unknown'; } else { $params{$oid} = 'value_'.SNMP::Utils::get_object( $snmpwalk, $oids->{$oid}, @idx); } } } else { $params{$oid} = SNMP::Utils::get_object( $snmpwalk, $oids->{$oid}, @idx); } } push(@params, \%params); } return @params; } sub mib { my $self = shift; my $mib = shift; my $condition = { 0 => 'other', 1 => 'ok', 2 => 'degraded', 3 => 'failed', }; my $MibRevMajor = $mib.'.1.0'; my $MibRevMinor = $mib.'.2.0'; my $MibRevCondition = $mib.'.3.0'; return ( $self->SNMP::Utils::get_object($self->{rawdata}, $MibRevMajor), $self->SNMP::Utils::get_object($self->{rawdata}, $MibRevMinor), $self->SNMP::Utils::get_object_value($self->{rawdata}, $MibRevCondition, $condition)); }; 1; ././@LongLink0000644000000000000000000000016612262515411011644 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/NicSubsystem/nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000755000000000000000000000000012262515026027345 5ustar ././@LongLink0000644000000000000000000000017512262515411011644 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/NicSubsystem/SNMP.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000001540312262515026027352 0ustar package HP::Proliant::Component::NicSubsystem::SNMP; our @ISA = qw(HP::Proliant::Component::NicSubsystem HP::Proliant::Component::SNMP); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, blacklisted => 0, info => undef, extendedinfo => undef, logical_nics => [], physical_nics => [], }; bless $self, $class; $self->overall_init(%params); $self->init(); return $self; } sub overall_init { my $self = shift; my %params = @_; my $snmpwalk = $params{rawdata}; # overall my $cpqNicIfLogMapOverallCondition = '1.3.6.1.4.1.232.18.2.2.2.0'; my $cpqNicIfLogMapOverallConditionValue = { 1 => 'other', 2 => 'ok', 3 => 'degraded', 4 => 'failed', }; $self->{lognicstatus} = lc SNMP::Utils::get_object_value( $snmpwalk, $cpqNicIfLogMapOverallCondition, $cpqNicIfLogMapOverallConditionValue); } sub init { my $self = shift; my $snmpwalk = $self->{rawdata}; my $ifconnect = {}; # CPQNIC-MIB my $oids = { cpqNicIfLogMapEntry => '1.3.6.1.4.1.232.18.2.2.1.1', cpqNicIfLogMapIndex => '1.3.6.1.4.1.232.18.2.2.1.1.1', cpqNicIfLogMapIfNumber => '1.3.6.1.4.1.232.18.2.2.1.1.2', cpqNicIfLogMapDescription => '1.3.6.1.4.1.232.18.2.2.1.1.3', cpqNicIfLogMapGroupType => '1.3.6.1.4.1.232.18.2.2.1.1.4', cpqNicIfLogMapAdapterCount => '1.3.6.1.4.1.232.18.2.2.1.1.5', cpqNicIfLogMapAdapterOKCount => '1.3.6.1.4.1.232.18.2.2.1.1.6', cpqNicIfLogMapPhysicalAdapters => '1.3.6.1.4.1.232.18.2.2.1.1.7', cpqNicIfLogMapMACAddress => '1.3.6.1.4.1.232.18.2.2.1.1.8', cpqNicIfLogMapSwitchoverMode => '1.3.6.1.4.1.232.18.2.2.1.1.9', cpqNicIfLogMapCondition => '1.3.6.1.4.1.232.18.2.2.1.1.10', cpqNicIfLogMapStatus => '1.3.6.1.4.1.232.18.2.2.1.1.11', cpqNicIfLogMapNumSwitchovers => '1.3.6.1.4.1.232.18.2.2.1.1.12', cpqNicIfLogMapHwLocation => '1.3.6.1.4.1.232.18.2.2.1.1.13', cpqNicIfLogMapSpeed => '1.3.6.1.4.1.232.18.2.2.1.1.14', cpqNicIfLogMapVlanCount => '1.3.6.1.4.1.232.18.2.2.1.1.15', cpqNicIfLogMapVlans => '1.3.6.1.4.1.232.18.2.2.1.1.16', cpqNicIfLogMapGroupTypeValue => { 1 => "unknown", 2 => "none", 3 => "redundantPair", 4 => "nft", 5 => "alb", 6 => "fec", 7 => "gec", 8 => "ad", 9 => "slb", 10 => "tlb", 11 => "redundancySet", }, cpqNicIfLogMapConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, cpqNicIfLogMapStatusValue => { 1 => "unknown", 2 => "ok", 3 => "primaryFailed", 4 => "standbyFailed", 5 => "groupFailed", 6 => "redundancyReduced", 7 => "redundancyLost", }, cpqNicIfLogMapSwitchoverModeValue => { 1 => "unknown", 2 => "none", 3 => "manual", 4 => "switchOnFail", 5 => "preferredPrimary", }, }; # INDEX { cpqNicIfLogMapIndex } foreach ($self->get_entries($oids, 'cpqNicIfLogMapEntry')) { push(@{$self->{logical_nics}}, HP::Proliant::Component::NicSubsystem::LogicalNic->new(%{$_}) ); } $oids = { cpqNicIfPhysAdapterEntry => '1.3.6.1.4.1.232.18.2.3.1.1', cpqNicIfPhysAdapterIndex => '1.3.6.1.4.1.232.18.2.3.1.1.1', cpqNicIfPhysAdapterIfNumber => '1.3.6.1.4.1.232.18.2.3.1.1.2', cpqNicIfPhysAdapterRole => '1.3.6.1.4.1.232.18.2.3.1.1.3', cpqNicIfPhysAdapterMACAddress => '1.3.6.1.4.1.232.18.2.3.1.1.4', cpqNicIfPhysAdapterSlot => '1.3.6.1.4.1.232.18.2.3.1.1.5', cpqNicIfPhysAdapterIoAddr => '1.3.6.1.4.1.232.18.2.3.1.1.6', cpqNicIfPhysAdapterIrq => '1.3.6.1.4.1.232.18.2.3.1.1.7', cpqNicIfPhysAdapterDma => '1.3.6.1.4.1.232.18.2.3.1.1.8', cpqNicIfPhysAdapterMemAddr => '1.3.6.1.4.1.232.18.2.3.1.1.9', cpqNicIfPhysAdapterPort => '1.3.6.1.4.1.232.18.2.3.1.1.10', cpqNicIfPhysAdapterDuplexState => '1.3.6.1.4.1.232.18.2.3.1.1.11', cpqNicIfPhysAdapterCondition => '1.3.6.1.4.1.232.18.2.3.1.1.12', cpqNicIfPhysAdapterState => '1.3.6.1.4.1.232.18.2.3.1.1.13', cpqNicIfPhysAdapterStatus => '1.3.6.1.4.1.232.18.2.3.1.1.14', cpqNicIfPhysAdapterStatsValid => '1.3.6.1.4.1.232.18.2.3.1.1.15', cpqNicIfPhysAdapterGoodTransmits => '1.3.6.1.4.1.232.18.2.3.1.1.16', cpqNicIfPhysAdapterGoodReceives => '1.3.6.1.4.1.232.18.2.3.1.1.17', cpqNicIfPhysAdapterBadTransmits => '1.3.6.1.4.1.232.18.2.3.1.1.18', cpqNicIfPhysAdapterBadReceives => '1.3.6.1.4.1.232.18.2.3.1.1.19', cpqNicIfPhysAdapterAlignmentErrors => '1.3.6.1.4.1.232.18.2.3.1.1.20', cpqNicIfPhysAdapterFCSErrors => '1.3.6.1.4.1.232.18.2.3.1.1.21', cpqNicIfPhysAdapterSingleCollisionFrames => '1.3.6.1.4.1.232.18.2.3.1.1.22', cpqNicIfPhysAdapterMultipleCollisionFrames => '1.3.6.1.4.1.232.18.2.3.1.1.23', cpqNicIfPhysAdapterDeferredTransmissions => '1.3.6.1.4.1.232.18.2.3.1.1.24', cpqNicIfPhysAdapterLateCollisions => '1.3.6.1.4.1.232.18.2.3.1.1.25', cpqNicIfPhysAdapterExcessiveCollisions => '1.3.6.1.4.1.232.18.2.3.1.1.26', cpqNicIfPhysAdapterInternalMacTransmitErrors => '1.3.6.1.4.1.232.18.2.3.1.1.27', cpqNicIfPhysAdapterCarrierSenseErrors => '1.3.6.1.4.1.232.18.2.3.1.1.28', cpqNicIfPhysAdapterFrameTooLongs => '1.3.6.1.4.1.232.18.2.3.1.1.29', cpqNicIfPhysAdapterInternalMacReceiveErrors => '1.3.6.1.4.1.232.18.2.3.1.1.30', cpqNicIfPhysAdapterHwLocation => '1.3.6.1.4.1.232.18.2.3.1.1.31', cpqNicIfPhysAdapterPartNumber => '1.3.6.1.4.1.232.18.2.3.1.1.32', cpqNicIfPhysAdapterRoleValue => { 1 => "unknown", 2 => "primary", 3 => "secondary", 4 => "member", 5 => "txRx", 6 => "tx", 7 => "standby", 8 => "none", 255 => "notApplicable", }, cpqNicIfPhysAdapterDuplexStateValue => { 1 => "unknown", 2 => "half", 3 => "full", }, cpqNicIfPhysAdapterConditionValue => { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }, cpqNicIfPhysAdapterStateValue => { 1 => "unknown", 2 => "ok", 3 => "standby", 4 => "failed", }, cpqNicIfPhysAdapterStatusValue => { 1 => "unknown", 2 => "ok", 3 => "generalFailure", 4 => "linkFailure", }, }; # INDEX { cpqNicIfPhysAdapterIndex } foreach ($self->get_entries($oids, 'cpqNicIfPhysAdapterEntry')) { push(@{$self->{physical_nics}}, HP::Proliant::Component::NicSubsystem::PhysicalNic->new(%{$_})); } } 1; ././@LongLink0000644000000000000000000000020012262515411011631 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000001572712262515026027363 0ustar package HP::Proliant::Component::PowersupplySubsystem; our @ISA = qw(HP::Proliant::Component); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, condition => $params{condition}, status => $params{status}, powersupplies => [], powerconverters => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; if ($self->{method} eq 'snmp') { return HP::Proliant::Component::PowersupplySubsystem::SNMP->new(%params); } elsif ($self->{method} eq 'cli') { return HP::Proliant::Component::PowersupplySubsystem::CLI->new(%params); } else { die "unknown method"; } return $self; } sub check { my $self = shift; my $errorfound = 0; $self->add_info('checking power supplies'); if (scalar (@{$self->{powersupplies}}) == 0) { #$self->overall_check(); } else { foreach (@{$self->{powersupplies}}) { $_->check(); } } } sub dump { my $self = shift; foreach (@{$self->{powersupplies}}) { $_->dump(); } } package HP::Proliant::Component::PowersupplySubsystem::Powersupply; our @ISA = qw(HP::Proliant::Component::PowersupplySubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, cpqHeFltTolPowerSupplyChassis => $params{cpqHeFltTolPowerSupplyChassis}, cpqHeFltTolPowerSupplyBay => $params{cpqHeFltTolPowerSupplyBay}, cpqHeFltTolPowerSupplyPresent => $params{cpqHeFltTolPowerSupplyPresent}, cpqHeFltTolPowerSupplyCondition => $params{cpqHeFltTolPowerSupplyCondition}, cpqHeFltTolPowerSupplyRedundant => $params{cpqHeFltTolPowerSupplyRedundant}, cpqHeFltTolPowerSupplyCapacityUsed => $params{cpqHeFltTolPowerSupplyCapacityUsed} || 0, cpqHeFltTolPowerSupplyCapacityMaximum => $params{cpqHeFltTolPowerSupplyCapacityMaximum} || 0, blacklisted => 0, info => undef, extendexinfo => undef, }; bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('p', $self->{cpqHeFltTolPowerSupplyBay}); if ($self->{cpqHeFltTolPowerSupplyPresent} eq "present") { if ($self->{cpqHeFltTolPowerSupplyCondition} ne "ok") { if ($self->{cpqHeFltTolPowerSupplyCondition} eq "other") { $self->add_info(sprintf "powersupply %d is missing", $self->{cpqHeFltTolPowerSupplyBay}); } else { $self->add_info(sprintf "powersupply %d needs attention (%s)", $self->{cpqHeFltTolPowerSupplyBay}, $self->{cpqHeFltTolPowerSupplyCondition}); } $self->add_message(CRITICAL, $self->{info}); } else { $self->add_info(sprintf "powersupply %d is %s", $self->{cpqHeFltTolPowerSupplyBay}, $self->{cpqHeFltTolPowerSupplyCondition}); } $self->add_extendedinfo(sprintf "ps_%s=%s", $self->{cpqHeFltTolPowerSupplyBay}, $self->{cpqHeFltTolPowerSupplyCondition}); if ($self->{cpqHeFltTolPowerSupplyCapacityUsed} && $self->{cpqHeFltTolPowerSupplyCapacityMaximum}) { if ($self->{runtime}->{options}->{perfdata}) { $self->{runtime}->{plugin}->add_perfdata( label => sprintf("pc_%s", $self->{cpqHeFltTolPowerSupplyBay}), value => $self->{cpqHeFltTolPowerSupplyCapacityUsed}, warning => $self->{cpqHeFltTolPowerSupplyCapacityMaximum}, critical => $self->{cpqHeFltTolPowerSupplyCapacityMaximum} ); } } elsif ($self->{cpqHeFltTolPowerSupplyCapacityUsed}) { if ($self->{runtime}->{options}->{perfdata}) { $self->{runtime}->{plugin}->add_perfdata( label => sprintf("pc_%s", $self->{cpqHeFltTolPowerSupplyBay}), value => $self->{cpqHeFltTolPowerSupplyCapacityUsed} ); } } } else { $self->add_info(sprintf "powersupply %d is %s", $self->{cpqHeFltTolPowerSupplyBay}, $self->{cpqHeFltTolPowerSupplyPresent}); $self->add_extendedinfo(sprintf "ps_%s=%s", $self->{cpqHeFltTolPowerSupplyBay}, $self->{cpqHeFltTolPowerSupplyPresent}); } } sub dump { my $self = shift; printf "[PS_%s]\n", $self->{cpqHeFltTolPowerSupplyBay}; foreach (qw(cpqHeFltTolPowerSupplyBay cpqHeFltTolPowerSupplyChassis cpqHeFltTolPowerSupplyPresent cpqHeFltTolPowerSupplyCondition cpqHeFltTolPowerSupplyRedundant cpqHeFltTolPowerSupplyCapacityUsed cpqHeFltTolPowerSupplyCapacityMaximum)) { printf "%s: %s\n", $_, $self->{$_}; } printf "info: %s\n\n", $self->{info}; } package HP::Proliant::Component::PowersupplySubsystem::Powerconverter; our @ISA = qw(HP::Proliant::Component::PowersupplySubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, cpqHePowerConvEntry => $params{cpqHePowerConvEntry}, cpqHePowerConvChassis => $params{cpqHePowerConvChassis}, cpqHePowerConvIndex => $params{cpqHePowerConvIndex}, cpqHePowerConvPresent => $params{cpqHePowerConvPresent}, cpqHePowerConvRedundant => $params{cpqHePowerConvRedundant}, cpqHePowerConvCondition => $params{cpqHePowerConvCondition}, cpqHePowerConvHwLocation => $params{cpqHePowerConvHwLocation}, blacklisted => 0, info => undef, extendexinfo => undef, }; bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('pc', $self->{cpqHePowerConvIndex}); if ($self->{cpqHePowerConvPresent} eq "present") { if ($self->{cpqHePowerConvCondition} ne "ok") { if ($self->{cpqHePowerConvCondition} eq "other") { $self->add_info(sprintf "powerconverter %d is missing", $self->{cpqHePowerConvIndex}); } else { $self->add_info(sprintf "powerconverter %d needs attention (%s)", $self->{cpqHePowerConvIndex}, $self->{cpqHePowerConvCondition}); } $self->add_message(CRITICAL, $self->{info}); } else { $self->add_info(sprintf "powerconverter %d is %s", $self->{cpqHePowerConvIndex}, $self->{cpqHePowerConvCondition}); } $self->add_extendedinfo(sprintf "pc_%s=%s", $self->{cpqHePowerConvIndex}, $self->{cpqHePowerConvCondition}); } else { $self->add_info(sprintf "powerconverter %d is %s", $self->{cpqHePowerConvIndex}, $self->{cpqHePowerConvPresent}); $self->add_extendedinfo(sprintf "pc_%s=%s", $self->{cpqHePowerConvIndex}, $self->{cpqHePowerConvPresent}); } } sub dump { my $self = shift; printf "[PS_%s]\n", ($self->{cpqHePowerConvChassis} ? $self->{cpqHePowerConvChassis}.":" : "").$self->{cpqHePowerConvIndex}; foreach (qw(cpqHePowerConvIndex cpqHePowerConvPresent cpqHePowerConvRedundant cpqHePowerConvCondition)) { printf "%s: %s\n", $_, $self->{$_}; } printf "info: %s\n\n", $self->{info}; } 1; ././@LongLink0000644000000000000000000000017012262515411011637 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/EventSubsystem/nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000755000000000000000000000000012262515026027345 5ustar ././@LongLink0000644000000000000000000000017612262515411011645 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/EventSubsystem/CLI.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000403112262515026027345 0ustar package HP::Proliant::Component::EventSubsystem::CLI; our @ISA = qw(HP::Proliant::Component::EventSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; use Time::Local; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, events => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->init(%params); return $self; } sub init { my $self = shift; my %params = @_; my %tmpevent = ( runtime => $params{runtime}, ); my $inblock = 0; foreach (grep(/^iml/, split(/\n/, $self->{rawdata}))) { s/^iml\s*//g; if (/^Event:\s+(\d+)\s+[\w]+:\s+(\d+)\/(\d+)\/(\d+)\s+(\d+):(\d+)/) { # Event: 31 Added: 09/22/2011 05:11 # 1 2 3 4 5 6 $tmpevent{cpqHeEventLogEntryNumber} = $1; if ($4 == 0) { # Event: 29 Added: 00/00/0000 00:00 $tmpevent{cpqHeEventLogUpdateTime} = 0; } else { eval { $tmpevent{cpqHeEventLogUpdateTime} = timelocal(0, $6, $5, $3, $2 - 1, $4); }; if ($@) { # Event: 10 Added: 27/27/2027 27:27 $tmpevent{cpqHeEventLogUpdateTime} = 0; } } $inblock = 1; } elsif (/^(\w+):\s+(.*?)\s+\-\s+(.*)/) { $tmpevent{cpqHeEventLogEntrySeverity} = $1; $tmpevent{cpqHeEventLogEntryClass} = $2; $tmpevent{cpqHeEventLogErrorDesc} = $3; if ($tmpevent{cpqHeEventLogErrorDesc} =~ /.*?:\s+(\d+)/) { $tmpevent{cpqHeEventLogEntryCode} = $1; } else { $tmpevent{cpqHeEventLogEntryCode} = 0; } } elsif (/^\s*$/) { if ($inblock) { $inblock = 0; push(@{$self->{events}}, HP::Proliant::Component::EventSubsystem::Event->new(%tmpevent)); %tmpevent = ( runtime => $params{runtime}, ); } } } if ($inblock) { push(@{$self->{events}}, HP::Proliant::Component::EventSubsystem::Event->new(%tmpevent)); } } 1; ././@LongLink0000644000000000000000000000017712262515411011646 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/EventSubsystem/SNMP.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000002234012262515026027350 0ustar package HP::Proliant::Component::EventSubsystem::SNMP; our @ISA = qw(HP::Proliant::Component::EventSubsystem HP::Proliant::Component::SNMP); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; use Time::Local; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, events => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->overall_init(%params); $self->init(%params); return $self; } sub overall_init { my $self = shift; my %params = @_; my $snmpwalk = $params{rawdata}; # overall my $cpqHeEventLogSupported = '1.3.6.1.4.1.232.6.2.11.1.0'; my $cpqHeEventLogSupportedValue = { 1 => 'other', 2 => 'notSupported', 3 => 'supported', 4 => 'clear', }; my $cpqHeEventLogCondition = '1.3.6.1.4.1.232.6.2.11.2.0'; my $cpqHeEventLogConditionValue = { 1 => 'other', 2 => 'ok', 3 => 'degraded', 4 => 'failed', }; $self->{eventsupp} = SNMP::Utils::get_object_value( $snmpwalk, $cpqHeEventLogSupported, $cpqHeEventLogSupportedValue); $self->{eventstatus} = SNMP::Utils::get_object_value( $snmpwalk, $cpqHeEventLogCondition, $cpqHeEventLogConditionValue); $self->{eventsupp} |= lc $self->{eventsupp}; $self->{eventstatus} |= lc $self->{eventstatus}; } sub init { my $self = shift; my %params = @_; my $snmpwalk = $self->{rawdata}; my $oids = { cpqHeEventLogEntry => "1.3.6.1.4.1.232.6.2.11.3.1", cpqHeEventLogEntryNumber => "1.3.6.1.4.1.232.6.2.11.3.1.1", cpqHeEventLogEntrySeverity => "1.3.6.1.4.1.232.6.2.11.3.1.2", cpqHeEventLogEntryClass => "1.3.6.1.4.1.232.6.2.11.3.1.3", cpqHeEventLogEntryCode => "1.3.6.1.4.1.232.6.2.11.3.1.4", cpqHeEventLogEntryCount => "1.3.6.1.4.1.232.6.2.11.3.1.5", cpqHeEventLogInitialTime => "1.3.6.1.4.1.232.6.2.11.3.1.6", cpqHeEventLogUpdateTime => "1.3.6.1.4.1.232.6.2.11.3.1.7", cpqHeEventLogErrorDesc => "1.3.6.1.4.1.232.6.2.11.3.1.8", cpqHeEventLogEntryClassValue => { # 2 Fan Failure (Fan 1, Location I/O Board) # Internal Storage System Overheating (Slot 0, Zone 1, Location Storage, Temperature Unknown) # System Fans Not Redundant (Location I/O Board) # MY MUSTARD: only critical events should lead to an alert, if at all. The caution events mean "loss of redundancy". # We monitor temperatures and fan status anyway. #2 => "", # 3 Corrected Memory Error threshold exceeded (System Memory, Memory Module 1) # Uncorrectable Memory Error detected by ROM-based memory validation (Board 1, Memory Module 4) # MY MUSTARD: threshold exceeded is caution. Uncorrectable errors are critical. Both should be detected anyway. 3 => "Main Memory", # 4 Accelerator Cache Memory Parity Error (Socket 1) #4 => "", # 5 Processor Correctable error threshold exceeded (Board 0, Processor 2) #5 => "", # 6 Unrecoverable Intermodule Bus error (Error code 0x00000000) #6 => "", # 8 PCI Bus Error (Slot 0, Bus 0, Device 0, Function 0) 8 => "PCI Bus", # 10 1720-S.M.A.R.T. Hard Drive Detects Imminent Failure # POST Error: 201-Memory Error Multi-bit error occurred during memory initialization, Board 1, Bank B. Bank containing DIMM(s) has been disabled.. # POST Error: 201-Memory Error Single-bit error occured during memory initialization, Board 1, DIMM 1. Bank containing DIMM(s) has been disabled.. # POST Error: 207-Memory Configuration Warning - memory boards should be installed sequentially. # POST Error: 210-Memory Board Failure on board 4. # POST Error: 210-Memory Board Power Fault on board 3. # POST Error: 207-Memory initialization error on Memory Board 5 DIMM 7. The operating system may not have access to all of the memory installed in the system.. # POST Error: 207-Invalid Memory Configuration-Mismatched DIMMs within DIMM Bank Memory in Bank A Not Utilized.. 10 => "POST Messages", 11 => "Power Subsystem", 13 => "ASR", # 14 Automatic Operating System Shutdown Initiated Due to Overheat Condition # Automatic Operating System Shutdown Initiated Due to Fan Failure # Blue Screen Trap (BugCheck, STOP: 0x00000050 (0x9CB2C5B4, 0x00000001, 0x00000004, 0x00000000)) # Operating System failure (BugCheck, STOP: 0x000000AB (0x00000005, 0x00000488, 0x00000000, 0x00000002)) 14 => "OS Class", # 15 Unknown Event (Class 15, Code 255) #15 => "", # 17 Network Adapter Link Down (Slot 0, Port 4) # Network Adapters Redundancy Reduced (Slot 0, Port 1) 17 => "Network Adapter", # 19 Drive Array Device Failure (Slot 0, Bus 2, Bay 4) # Internal SAS Enclosure Device Failure (Bay 1, Box 1, Port 2I, Slot 1) #19 => "", # 20 An Unrecoverable System Error (NMI) has occurred # Unrecoverable System Error has occurred (Error code 0x01AE0E2F, 0x00000000) 20 => "Unrecoverable System Error", # 32 ROM flashed (New version: 01/09/2008) 32 => "System Revision", # 33 IML Cleared (Administrator) # IML cleared through HP ProLiant Health Agent (cmahealthd) # Insight Diagnostics Note: Physisches Festplattenlaufwerk 5, Controller Steckplatz 0-Diagnosis: Fehlgeschlagen 33 => "Maintenance Note", # 34 New Chassis Connected (Enclosure Address 27AC) # Loss Of Chassis Connectivity (Enclosure Serial Number 8004******) # Server Blade Enclosure Server Blade Inserted (Slot 16, Enclosure Address 0000) #34 => "", }, cpqHeEventLogEntrySeverityValue => { 2 => "informational", 3 => "infoWithAlert", 6 => "repaired", 9 => "caution", 15 => "critical", }, # Time # 07 D8 09 02 11 11 }; # INDEX { cpqHeEventLogEntryNumber } foreach ($self->get_entries($oids, 'cpqHeEventLogEntry')) { if ($_->{cpqHeEventLogInitialTime} =~ /^(([0-9a-fA-F]{2})( [0-9a-fA-F]{2})*)\s*$/) { $_->{cpqHeEventLogInitialTime} =~ s/ //; my ($year, $month, $day, $hour, $min) = map { hex($_) } split(/\s+/, $_->{cpqHeEventLogInitialTime}); if ($year == 0) { $_->{cpqHeEventLogInitialTime} = 0; } else { eval { $_->{cpqHeEventLogInitialTime} = timelocal(0, $min, $hour, $day, $month - 1, $year); }; if ($@) { $_->{cpqHeEventLogInitialTime} = 0; } } } elsif ($_->{cpqHeEventLogInitialTime} =~ /^0x([0-9a-fA-F]{4})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/) { my ($year, $month, $day, $hour, $min) = map { hex($_) } ($1, $2, $3, $4, $5); if ($year == 0) { $_->{cpqHeEventLogInitialTime} = 0; } else { eval { $_->{cpqHeEventLogInitialTime} = timelocal(0, $min, $hour, $day, $month - 1, $year); }; if ($@) { $_->{cpqHeEventLogInitialTime} = 0; } } } elsif ($_->{cpqHeEventLogInitialTime} =~ /^\0\0\0\0\0\0/) { $_->{cpqHeEventLogInitialTime} = 0; } if ($_->{cpqHeEventLogUpdateTime} =~ /^(([0-9a-fA-F]{2})( [0-9a-fA-F]{2})*)\s*$/) { $_->{cpqHeEventLogUpdateTime} =~ s/ //; my ($year, $month, $day, $hour, $min) = map { hex($_) } split(/\s+/, $_->{cpqHeEventLogUpdateTime}); if ($year == 0) { $_->{cpqHeEventLogUpdateTime} = 0; } else { eval { $_->{cpqHeEventLogUpdateTime} = timelocal(0, $min, $hour, $day, $month - 1, $year); }; if ($@) { $_->{cpqHeEventLogUpdateTime} = 0; } } } elsif ($_->{cpqHeEventLogUpdateTime} =~ /^0x([0-9a-fA-F]{4})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/) { my ($year, $month, $day, $hour, $min) = map { hex($_) } ($1, $2, $3, $4, $5); if ($year == 0) { $_->{cpqHeEventLogUpdateTime} = 0; } else { eval { $_->{cpqHeEventLogUpdateTime} = timelocal(0, $min, $hour, $day, $month - 1, $year); }; if ($@) { $_->{cpqHeEventLogUpdateTime} = 0; } } } elsif ($_->{cpqHeEventLogUpdateTime} =~ /^\0\0\0\0\0\0/) { $_->{cpqHeEventLogUpdateTime} = 0; } if ($_->{cpqHeEventLogErrorDesc} =~ /^(([0-9a-fA-F]{2})(\s+[0-9a-fA-F]{2})*)\s*$/) { $_->{cpqHeEventLogErrorDesc} = join "", map { chr($_) } map { if (hex($_) > 127) { 20; } else { hex($_) } } split(/\s+/, $_->{cpqHeEventLogErrorDesc}); } push(@{$self->{events}}, HP::Proliant::Component::EventSubsystem::Event->new(%{$_})); } } sub overall_check { my $self = shift; my $result = 0; $self->blacklist('oe', ''); if ($self->{eventsupp} && $self->{eventsupp} eq "supported") { if ($self->{eventstatus} eq "ok") { $result = 0; $self->add_info('eventlog system is ok'); } else { $result = 0; $self->add_info(sprintf "eventlog system is %s", $self->{eventstatus}); } } else { $result = 0; $self->add_info('no event status found'); } } 1; ././@LongLink0000644000000000000000000000016612262515411011644 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/AsrSubsystem/nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000755000000000000000000000000012262515026027345 5ustar ././@LongLink0000644000000000000000000000017412262515411011643 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/AsrSubsystem/CLI.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000110112262515026027340 0ustar package HP::Proliant::Component::AsrSubsystem::CLI; our @ISA = qw(HP::Proliant::Component::AsrSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->init(%params); return $self; } sub init { my $self = shift; my %params = @_; } sub overall_check { my $self = shift; my %params = @_; } 1; ././@LongLink0000644000000000000000000000017512262515411011644 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/AsrSubsystem/SNMP.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000341112262515026027346 0ustar package HP::Proliant::Component::AsrSubsystem::SNMP; our @ISA = qw(HP::Proliant::Component::AsrSubsystem HP::Proliant::Component::SNMP); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->overall_init(%params); return $self; } sub overall_init { my $self = shift; my %params = @_; my $snmpwalk = $params{rawdata}; my $cpqHeAsrStatus = "1.3.6.1.4.1.232.6.2.5.1.0"; my $cpqHeAsrStatusValue = { 1 => "other", 2 => "notAvailable", 3 => "disabled", 4 => "enabled", }; my $cpqHeAsrCondition = "1.3.6.1.4.1.232.6.2.5.17.0"; my $cpqHeAsrConditionValue = { 1 => "other", 2 => "ok", 3 => "degraded", 4 => "failed", }; $self->{asrcondition} = SNMP::Utils::get_object_value( $snmpwalk, $cpqHeAsrCondition, $cpqHeAsrConditionValue); $self->{asrstatus} = SNMP::Utils::get_object_value( $snmpwalk, $cpqHeAsrStatus, $cpqHeAsrStatusValue); $self->{asrcondition} |= lc $self->{asrcondition}; $self->{asrstatus} |= lc $self->{asrstatus}; } sub overall_check { my $self = shift; my $result = 0; $self->blacklist('asr', ''); if ($self->{asrstatus} and $self->{asrstatus} eq "enabled") { my $info = sprintf 'ASR overall condition is %s', $self->{asrcondition}; if ($self->{asrcondition} eq "degraded") { $self->add_message(WARNING, $info); } elsif ($self->{asrcondition} eq "failed") { $self->add_message(CRITICAL, $info); } $self->add_info($info); } else { $self->add_info('This system does not have ASR.'); } } 1; ././@LongLink0000644000000000000000000000017212262515411011641 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/EventSubsystem.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000002015212262515026027347 0ustar package HP::Proliant::Component::EventSubsystem; our @ISA = qw(HP::Proliant::Component); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, condition => $params{condition}, status => $params{status}, events => [], blacklisted => 0, info => undef, extendedinfo => undef, boottime => 0, }; bless $self, $class; if ($self->{method} eq 'snmp') { $self = HP::Proliant::Component::EventSubsystem::SNMP->new(%params); my $sysUpTime = SNMP::Utils::get_object( $self->{rawdata}, '1.3.6.1.2.1.1.3.0') || 3600*24*100; $self->{boottime} = int(time - $sysUpTime / 100); } elsif ($self->{method} eq 'cli') { $self = HP::Proliant::Component::EventSubsystem::CLI->new(%params); my $uptime = do { local (@ARGV, $/) = "/proc/uptime"; my $x = <>; close ARGV; $x }; # also watch 10 minutes of booting before the operating system starts ticking $self->{boottime} = time - int((split(/\s+/, $uptime))[0]) - 600; } else { die "unknown method"; } # repair dates my $lasttime = 0; for my $event (reverse @{$self->{events}}) { if ($event->{cpqHeEventLogUpdateTime} != 0) { $lasttime = $event->{cpqHeEventLogUpdateTime}; } else { $event->{cpqHeEventLogUpdateTime} = $lasttime; } } # maybe the most recent events had zero timestamps. # fill them up with timestamps from the past. for my $event (@{$self->{events}}) { if ($event->{cpqHeEventLogUpdateTime} != 0) { $lasttime = $event->{cpqHeEventLogUpdateTime}; } else { $event->{cpqHeEventLogUpdateTime} = $lasttime; } } # we need the boottime in the event's check method for my $event (@{$self->{events}}) { $event->{boottime} = $self->{boottime}; } return $self; } sub check { my $self = shift; my $errorfound = 0; $self->add_info('checking events'); if (scalar (@{$self->{events}}) == 0) { #$self->overall_check(); $self->add_info('no events found'); } else { foreach (sort { $a->{cpqHeEventLogEntryNumber} <=> $b->{cpqHeEventLogEntryNumber}} @{$self->{events}}) { $_->check($self->{warningtime}, $self->{criticaltime}); } } } sub dump { my $self = shift; foreach (@{$self->{events}}) { $_->dump(); } } package HP::Proliant::Component::EventSubsystem::Event; our @ISA = qw(HP::Proliant::Component::EventSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; { our $interesting_events = { # POST Error: 201-Memory Error Multi-bit error occurred during memory initialization, Board 1, Bank B. Bank containing DIMM(s) has been disabled.. # POST Error: 201-Memory Error Single-bit error occured during memory initialization, Board 1, DIMM 1. Bank containing DIMM(s) has been disabled.. # POST Error: 207-Memory initialization error on Memory Board 5 DIMM 7. The operating system may not have access to all of the memory installed in the system.. # POST Error: 207-Invalid Memory Configuration-Mismatched DIMMs within DIMM Bank Memory in Bank A Not Utilized.. # POST Error: 210 - Quick Path Interconnect (QPI) Link Degradation. A QPI link is operating in a degraded performace state.. 'POST Messages' => [ '201-Memory', '207-Memory', '210\s*-\s*Quick Path Interconnect.*degraded.*' ], 'Main Memory' => [ 'Corrected Memory Error threshold exceeded', 'Uncorrectable Memory Error', ], }; } sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, cpqHeEventLogEntryNumber => $params{cpqHeEventLogEntryNumber}, cpqHeEventLogEntrySeverity => lc $params{cpqHeEventLogEntrySeverity}, cpqHeEventLogEntryClass => $params{cpqHeEventLogEntryClass}, cpqHeEventLogEntryCount => $params{cpqHeEventLogEntryCount} || 1, cpqHeEventLogInitialTime => $params{cpqHeEventLogInitialTime}, cpqHeEventLogUpdateTime => $params{cpqHeEventLogUpdateTime}, cpqHeEventLogErrorDesc => $params{cpqHeEventLogErrorDesc}, blacklisted => 0, info => undef, extendedinfo => undef, }; if (! $self->{cpqHeEventLogInitialTime}) { $self->{cpqHeEventLogInitialTime} = $self->{cpqHeEventLogUpdateTime}; } # # #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # |warn |crit |now # #<----- ignore -------><----- warning ------><---------- critical ---------> # # If we have --eventrange / # Very young events are shown as critical # If the event gets older, it is shown as warning # At some time, the event is no longer shown # Without --eventrange the event is shown as critical until you manually repair it if ($params{runtime}->{options}->{eventrange}) { my ($warningrange, $criticalrange) = split(/\//, $params{runtime}->{options}->{eventrange}); if (! $criticalrange) { $criticalrange = $warningrange; } if ($criticalrange =~ /^(\d+)[s]*$/) { $criticalrange = $1; } elsif ($criticalrange =~ /^(\d+)m$/) { $criticalrange = $1 * 60; } elsif ($criticalrange =~ /^(\d+)h$/) { $criticalrange = $1 * 3600; } elsif ($criticalrange =~ /^(\d+)d$/) { $criticalrange = $1 * 3600 * 24; } else { die "range has to be [smhd]"; } if ($warningrange =~ /^(\d+)[s]*$/) { $warningrange = $1; } elsif ($warningrange =~ /^(\d+)m$/) { $warningrange = $1 * 60; } elsif ($warningrange =~ /^(\d+)h$/) { $warningrange = $1 * 3600; } elsif ($warningrange =~ /^(\d+)d$/) { $warningrange = $1 * 3600 * 24; } else { die "range has to be [smhd]"; } $self->{warningtime} = time - $warningrange; $self->{criticaltime} = time - $criticalrange; } else { $self->{warningtime} = 0; $self->{criticaltime} = 0; } bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('evt', $self->{cpqHeEventLogEntryNumber}); # only check severity "critical" and "caution" # optional: only check interesting events # POST events only if they date maximum from reboot-5min # younger than critical? -> critical # $self->add_info(sprintf "Event: %d Added: %s Class: (%s) %s %s", $self->{cpqHeEventLogEntryNumber}, $self->{cpqHeEventLogUpdateTime}, $self->{cpqHeEventLogEntryClass}, $self->{cpqHeEventLogEntrySeverity}, $self->{cpqHeEventLogErrorDesc}); if ($self->{cpqHeEventLogEntrySeverity} eq "caution" || $self->{cpqHeEventLogEntrySeverity} eq "critical") { # also watch 10 minutes of booting before the operating system starts ticking if ($self->{cpqHeEventLogUpdateTime} >= $self->{boottime}) { foreach my $class (keys %{$HP::Proliant::Component::EventSubsystem::Event::interesting_events}) { foreach my $pattern (@{$HP::Proliant::Component::EventSubsystem::Event::interesting_events->{$class}}) { if ($self->{cpqHeEventLogErrorDesc} =~ /$pattern/) { if ($self->{cpqHeEventLogUpdateTime} < $self->{warningtime}) { # you didn't care for this problem too long. # don't say i didn't warn you. if (0) { # auto-ack? } last; } elsif ($self->{cpqHeEventLogUpdateTime} < $self->{criticaltime}) { $self->add_message(WARNING, $self->{info}); last; } else { $self->add_message(CRITICAL, $self->{info}); last; } } } } } } else { # info, repair... } } sub dump { my $self = shift; printf "[EVENT_%s]\n", $self->{cpqHeEventLogEntryNumber}; foreach (qw(cpqHeEventLogEntryNumber cpqHeEventLogEntrySeverity cpqHeEventLogEntryCount cpqHeEventLogInitialTime cpqHeEventLogUpdateTime cpqHeEventLogErrorDesc)) { if ($_ =~ /.*Time$/) { printf "%s: %s\n", $_, scalar localtime $self->{$_}; } else { printf "%s: %s\n", $_, $self->{$_}; } } printf "info: %s\n\n", $self->{info}; } 1; ././@LongLink0000644000000000000000000000017012262515411011637 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/AsrSubsystem.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000166712262515026027361 0ustar package HP::Proliant::Component::AsrSubsystem; our @ISA = qw(HP::Proliant::Component); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, condition => $params{condition}, status => $params{status}, temperatures => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; if ($self->{method} eq 'snmp') { return HP::Proliant::Component::AsrSubsystem::SNMP->new(%params); } elsif ($self->{method} eq 'cli') { return HP::Proliant::Component::AsrSubsystem::CLI->new(%params); } else { die "unknown method"; } return $self; } sub check { my $self = shift; my $errorfound = 0; $self->add_info('checking ASR'); $self->overall_check(); } sub dump { my $self = shift; } 1; ././@LongLink0000644000000000000000000000017112262515411011640 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/MemorySubsystem/nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000755000000000000000000000000012262515026027345 5ustar ././@LongLink0000644000000000000000000000017712262515411011646 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/MemorySubsystem/CLI.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000516312262515026027354 0ustar package HP::Proliant::Component::MemorySubsystem::CLI; our @ISA = qw(HP::Proliant::Component::MemorySubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, dimms => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->init(%params); return $self; } sub init { my $self = shift; my %params = @_; $self->{dimms} = []; my %tmpdimm = ( runtime => $params{runtime}, ); my $inblock = 0; foreach (grep(/^dimm/, split(/\n/, $self->{rawdata}))) { s/^dimm\s*$//g; if (/Cartridge #:\s+(\d+)/ || /Processor #:\s+(\d+)/) { # neuerdings (g6) tauchen hier prozessor- statt cartridge-angaben auf $tmpdimm{cartridge} = $1; $tmpdimm{board} = $1; $inblock = 1; } elsif (/Module #:\s+(\d+)/) { $tmpdimm{module} = $1; } elsif (/Present:\s+(\w+)/) { $tmpdimm{status} = lc $1 eq 'yes' ? 'present' : lc $1 eq 'no' ? 'notPresent' : 'other'; } elsif (/Status:\s+(.+?)\s*$/) { $tmpdimm{condition} = lc $1 =~ /degraded/ ? 'degraded' : lc $1 eq 'ok' ? 'ok' : lc $1 =~ /n\/a/ ? 'n/a' : 'other'; } elsif (/Size:\s+(\d+)\s*(.+?)\s*$/) { $tmpdimm{size} = $1 * (lc $2 eq 'mb' ? 1024*1024 : lc $2 eq 'gb' ? 1024*1024*1024 : 1); } elsif (/^\s*$/) { if ($inblock) { $inblock = 0; push(@{$self->{dimms}}, HP::Proliant::Component::MemorySubsystem::Dimm->new(%tmpdimm)); %tmpdimm = ( runtime => $params{runtime}, ); } } elsif (/(\d+)\s+(\d+)\s+(\w+)\s+(0x\w+)\s+(0x\w+)\s+(\d+[MGT]B)\s+(\d+MHz)\s+(\w+)/) { $tmpdimm{cartridge} = $1; $tmpdimm{module} = $2; $tmpdimm{status} = lc $3 eq 'yes' ? 'present' : lc $3 eq 'no' ? 'notPresent' : 'other'; my $formfactor = $4; my $memorytype = $5; my $memorysize = $6; my $memoryspeed = $7; $tmpdimm{condition} = lc $8 =~ /degraded/ ? 'degraded' : lc $8 eq 'ok' ? 'ok' : lc $8 =~ /n\/a/ ? 'n/a' : 'other'; $memorysize =~ /(\d+)([MGT]B)/; $tmpdimm{size} = $1 * (lc $2 eq 'mb' ? 1024*1024 : lc $2 eq 'gb' ? 1024*1024*1024 : 1); push(@{$self->{dimms}}, HP::Proliant::Component::MemorySubsystem::Dimm->new(%tmpdimm)); } } if ($inblock) { push(@{$self->{dimms}}, HP::Proliant::Component::MemorySubsystem::Dimm->new(%tmpdimm)); } } sub is_faulty { my $self = shift; return 0; # cli hat so einen globalen status nicht } 1; ././@LongLink0000644000000000000000000000020012262515411011631 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/MemorySubsystem/SNMP.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000006323212262515026027355 0ustar package HP::Proliant::Component::MemorySubsystem::SNMP; our @ISA = qw(HP::Proliant::Component::MemorySubsystem HP::Proliant::Component::SNMP); use strict; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, dimms => [], si_dimms => [], he_dimms => [], h2_dimms => [], he_cartridges => [], h2_cartridges => [], si_overall_condition => undef, he_overall_condition => undef, h2_overall_condition => undef, blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; $self->si_init(); $self->he_init(); $self->he_cartridge_init(); $self->h2_init(); #$self->h2_cartridge_init(); $self->condense(); return $self; } sub si_init { my $self = shift; my $snmpwalk = $self->{rawdata}; my $oids = { cpqSiMemModuleEntry => '1.3.6.1.4.1.232.2.2.4.5.1', cpqSiMemBoardIndex => '1.3.6.1.4.1.232.2.2.4.5.1.1', cpqSiMemModuleIndex => '1.3.6.1.4.1.232.2.2.4.5.1.2', cpqSiMemModuleSize => '1.3.6.1.4.1.232.2.2.4.5.1.3', cpqSiMemModuleType => '1.3.6.1.4.1.232.2.2.4.5.1.4', cpqSiMemECCStatus => '1.3.6.1.4.1.232.2.2.4.5.1.11', cpqSiMemModuleHwLocation => '1.3.6.1.4.1.232.2.2.4.5.1.12', cpqSiMemModuleTypeValue => { 1 => 'other', 2 => 'board', 3 => 'cpqSingleWidthModule', 4 => 'cpqDoubleWidthModule', 5 => 'simm', 6 => 'pcmcia', 7 => 'compaq-specific', 8 => 'dimm', 9 => 'smallOutlineDimm', 10 => 'rimm', 11 => 'srimm', }, cpqSiMemECCStatusValue => { 0 => "n/a", 1 => "other", 2 => "ok", 3 => "degraded", 4 => "degradedModuleIndexUnknown", 34 => 'n/a', # es ist zum kotzen... 104 => 'n/a', }, }; # INDEX { cpqSiMemBoardIndex, cpqSiMemModuleIndex } foreach ($self->get_entries($oids, 'cpqSiMemModuleEntry')) { $_->{cartridge} = $_->{cpqSiMemBoardIndex}; $_->{module} = $_->{cpqSiMemModuleIndex}; next if (! defined $_->{cartridge} || ! defined $_->{module}); $_->{size} = $_->{cpqSiMemModuleSize}; $_->{type} = $_->{cpqSiMemModuleType}; $_->{condition} = $_->{cpqSiMemECCStatus}; $_->{status} = ($_->{cpqSiMemModuleSize} > 0) ? 'present' : 'notPresent'; push(@{$self->{si_dimms}}, HP::Proliant::Component::MemorySubsystem::Dimm->new(%{$_}) ); } my $cpqSiMemECCCondition = '1.3.6.1.4.1.232.2.2.4.15.0'; my $cpqSiMemECCConditionValue = { 1 => 'other', 2 => 'ok', 3 => 'degraded', }; $self->{si_overall_condition} = SNMP::Utils::get_object_value( $self->{rawdata}, $cpqSiMemECCCondition, $cpqSiMemECCConditionValue); $self->trace(2, sprintf 'overall si condition is %s', $self->{si_overall_condition} || 'undefined'); } sub he_init { my $self = shift; my $snmpwalk = $self->{rawdata}; my $oids = { cpqHeResMemModuleEntry => '1.3.6.1.4.1.232.6.2.14.11.1', cpqHeResMemBoardIndex => '1.3.6.1.4.1.232.6.2.14.11.1.1', cpqHeResMemModuleIndex => '1.3.6.1.4.1.232.6.2.14.11.1.2', cpqHeResMemModuleStatus => '1.3.6.1.4.1.232.6.2.14.11.1.4', cpqHeResMemModuleCondition => '1.3.6.1.4.1.232.6.2.14.11.1.5', cpqHeResMemModuleStatusValue => { 1 => "other", # unknown or could not be determined 2 => "notPresent", # not present or un-initialized 3 => "present", # present but not in use 4 => "good", # present and in use. ecc threshold not exceeded 5 => "add", # added but not yet in use 6 => "upgrade", # upgraded but not yet in use 7 => "missing", # expected but missing 8 => "doesNotMatch", # does not match the other modules in the bank 9 => "notSupported", # module not supported 10 => "badConfig", # violates add/upgrade configuration 11 => "degraded", # ecc exceeds threshold }, # condition = status of the correctable memory errors cpqHeResMemModuleConditionValue => { 0 => "n/a", # this appears only with buggy firmwares. # (only 1 module shows up) 1 => "other", 2 => "ok", 3 => "degraded", }, }; my $tablesize = SNMP::Utils::get_size($snmpwalk, $oids->{cpqHeResMemModuleEntry}); # INDEX { cpqHeResMemBoardIndex, cpqHeResMemModuleIndex } foreach ($self->get_entries($oids, 'cpqHeResMemModuleEntry')) { $_->{cartridge} = $_->{cpqHeResMemBoardIndex}; $_->{module} = $_->{cpqHeResMemModuleIndex}; $_->{present} = $_->{cpqHeResMemModuleStatus}; $_->{status} = $_->{cpqHeResMemModuleStatus}; $_->{condition} = $_->{cpqHeResMemModuleCondition}; if ((! defined $_->{module}) && ($_->{cartridge} == 0)) { $_->{module} = $_->{index2}; # auf dem systemboard verbaut } push(@{$self->{he_dimms}}, HP::Proliant::Component::MemorySubsystem::Dimm->new(%{$_}) ) unless (! defined $_->{cartridge} || ! defined $_->{module} || $tablesize == 1); } my $cpqHeResilientMemCondition = '1.3.6.1.4.1.232.6.2.14.4.0'; my $cpqHeResilientMemConditionValue = { 1 => 'other', 2 => 'ok', 3 => 'degraded', }; $self->{he_overall_condition} = SNMP::Utils::get_object_value( $self->{rawdata}, $cpqHeResilientMemCondition, $cpqHeResilientMemConditionValue); $self->trace(2, sprintf 'overall he condition is %s', $self->{hei_overall_condition} || 'undefined'); } sub he_cartridge_init { my $self = shift; my $snmpwalk = $self->{rawdata}; my $oids = { cpqHeResMemBoardEntry => '1.3.6.1.4.1.232.6.2.14.10.1', cpqHeResMemBoardSlotIndex => '1.3.6.1.4.1.232.6.2.14.10.1.1', cpqHeResMemBoardOnlineStatus => '1.3.6.1.4.1.232.6.2.14.10.1.2', cpqHeResMemBoardErrorStatus => '1.3.6.1.4.1.232.6.2.14.10.1.3', cpqHeResMemBoardNumSockets => '1.3.6.1.4.1.232.6.2.14.10.1.5', cpqHeResMemBoardOsMemSize => '1.3.6.1.4.1.232.6.2.14.10.1.6', cpqHeResMemBoardTotalMemSize => '1.3.6.1.4.1.232.6.2.14.10.1.7', cpqHeResMemBoardCondition => '1.3.6.1.4.1.232.6.2.14.10.1.8', # onlinestatus cpqHeResMemBoardOnlineStatusValue => { 0 => "n/a", # this appears only with buggy firmwares. # (only 1 module shows up) 1 => "other", 2 => "present", 3 => "absent", }, cpqHeResMemBoardErrorStatusValue => { 1 => "other", # 2 => "noError", # 3 => "dimmEccError", # 4 => "unlockError", # 5 => "configError", # 6 => "busError", # 7 => "powerError", # }, # condition = status of the correctable memory errors cpqHeResMemBoardConditionValue => { 0 => "n/a", # this appears only with buggy firmwares. # (only 1 module shows up) 1 => "other", 2 => "ok", 3 => "degraded", }, }; my $tablesize = SNMP::Utils::get_size($snmpwalk, $oids->{cpqHeResMemBoardEntry}); # INDEX { cpqHeResMemBoardIndex, cpqHeResMemBoardIndex } foreach ($self->get_entries($oids, 'cpqHeResMemBoardEntry')) { push(@{$self->{he_cartridges}}, HP::Proliant::Component::MemorySubsystem::Cartridge->new(%{$_}) ) unless (! defined $_->{cpqHeResMemBoardSlotIndex} || $tablesize == 1); } } sub h2_init { my $self = shift; my $snmpwalk = $self->{rawdata}; my $oids = { cpqHeResMem2ModuleEntry => '1.3.6.1.4.1.232.6.2.14.13.1', cpqHeResMem2BoardNum => '1.3.6.1.4.1.232.6.2.14.13.1.2', cpqHeResMem2ModuleNum => '1.3.6.1.4.1.232.6.2.14.13.1.5', cpqHeResMem2ModuleStatus => '1.3.6.1.4.1.232.6.2.14.13.1.19', cpqHeResMem2ModuleCondition => '1.3.6.1.4.1.232.6.2.14.13.1.20', cpqHeResMem2ModuleSize => '1.3.6.1.4.1.232.6.2.14.13.1.6', cpqHeResMem2ModuleStatusValue => { 1 => "other", # unknown or could not be determined 2 => "notPresent", # not present or un-initialized 3 => "present", # present but not in use 4 => "good", # present and in use. ecc threshold not exceeded 5 => "add", # added but not yet in use 6 => "upgrade", # upgraded but not yet in use 7 => "missing", # expected but missing 8 => "doesNotMatch", # does not match the other modules in the bank 9 => "notSupported", # module not supported 10 => "badConfig", # violates add/upgrade configuration 11 => "degraded", # ecc exceeds threshold }, # condition = status of the correctable memory errors cpqHeResMem2ModuleConditionValue => { 0 => "n/a", # this appears only with buggy firmwares. # (only 1 module shows up) 1 => "other", 2 => "ok", 3 => "degraded", }, }; # INDEX { cpqHeResMem2ModuleNum } my $lastboard = 0; my $lastmodule = 0; my $myboard= 0; my $hpboard = 0; foreach (sort { $a->{index1} <=> $b->{index1} } $self->get_entries($oids, 'cpqHeResMem2ModuleEntry')) { $hpboard = $_->{cpqHeResMem2BoardNum}; # dass hier faelschlicherweise 0 zurueckkommt, wundert mich schon # gar nicht mehr $_->{module} = $_->{cpqHeResMem2ModuleNum}; if ($_->{module} < $lastmodule) { # sieht so aus, als haette man es mit einem neuen board zu tun # da hp zu bloed ist, selber hochzuzaehlen, muss ich das tun $myboard++; } $lastmodule = $_->{cpqHeResMem2ModuleNum}; $_->{cartridge} = ($myboard != $hpboard) ? $myboard : $hpboard; $_->{present} = $_->{cpqHeResMem2ModuleStatus}; $_->{status} = $_->{cpqHeResMem2ModuleStatus}; $_->{condition} = $_->{cpqHeResMem2ModuleCondition}; $_->{size} = $_->{cpqHeResMem2ModuleSize}; push(@{$self->{h2_dimms}}, HP::Proliant::Component::MemorySubsystem::Dimm->new(%{$_}) ) unless (! defined $_->{cpqHeResMem2BoardNum} || ! defined $_->{cpqHeResMem2ModuleNum}); } } sub h2_cartridge_init { my $self = shift; my $snmpwalk = $self->{rawdata}; my $oids = { cpqHeResMem2BoardEntry => '1.3.6.1.4.1.232.6.2.14.12.1', cpqHeResMem2BoardIndex => '1.3.6.1.4.1.232.6.2.14.12.1.1', cpqHeResMem2BoardOnlineStatus => '1.3.6.1.4.1.232.6.2.14.12.1.5', cpqHeResMem2BoardErrorStatus => '1.3.6.1.4.1.232.6.2.14.12.1.6', cpqHeResMem2BoardNumSockets => '1.3.6.1.4.1.232.6.2.14.12.1.8', cpqHeResMem2BoardOsMemSize => '1.3.6.1.4.1.232.6.2.14.12.1.9', cpqHeResMem2BoardTotalMemSize => '1.3.6.1.4.1.232.6.2.14.12.1.10', cpqHeResMem2BoardCondition => '1.3.6.1.4.1.232.6.2.14.12.1.11', # onlinestatus cpqHeResMem2BoardOnlineStatusValue => { 0 => "n/a", # this appears only with buggy firmwares. # (only 1 module shows up) 1 => "other", 2 => "present", 3 => "absent", }, cpqHeResMem2BoardErrorStatusValue => { 1 => "other", # 2 => "noError", # 3 => "dimmEccError", # 4 => "unlockError", # 5 => "configError", # 6 => "busError", # 7 => "powerError", # }, # condition = status of the correctable memory errors cpqHeResMem2BoardConditionValue => { 0 => "n/a", # this appears only with buggy firmwares. # (only 1 module shows up) 1 => "other", 2 => "ok", 3 => "degraded", }, }; my $tablesize = SNMP::Utils::get_size($snmpwalk, $oids->{cpqHeResMemBoardEntry}); # INDEX { cpqHeResMem2BoardIndex, cpqHeResMem2BoardIndex } foreach ($self->get_entries($oids, 'cpqHeResMem2BoardEntry')) { push(@{$self->{h2_cartridges}}, HP::Proliant::Component::MemorySubsystem::Cartridge->new(%{$_}) ) unless (! defined $_->{cpqHeRes2MemBoardIndex} || $tablesize == 1); } } sub condense { my $self = shift; my $snmpwalk = $self->{rawdata}; # wenn saemtliche dimms n/a sind # wenn ignore dimms: ignoring %d dimms with status 'n/a' # wenn buggyfirmware: ignoring %d dimms with status 'n/a' because of buggy firmware # if buggy firmware : condition n/a ist normal # ignore-dimms : # es gibt si_dimms und he_dimms my $si_dimms = scalar(@{$self->{si_dimms}}); my $he_dimms = scalar(@{$self->{he_dimms}}); my $h2_dimms = scalar(@{$self->{h2_dimms}}); $self->trace(2, sprintf "SI: %02d HE: %02d H2: %02d", $si_dimms, $he_dimms, $h2_dimms) if ($self->{runtime}->{options}->{verbose} >= 2); foreach ($self->get_si_boards()) { printf "SI%02d-> ", $_ if ($self->{runtime}->{options}->{verbose} >= 2); foreach ($self->get_si_modules($_)) { printf "%02d ", $_ if ($self->{runtime}->{options}->{verbose} >= 2); } printf "\n" if ($self->{runtime}->{options}->{verbose} >= 2); } foreach ($self->get_he_boards()) { printf "HE%02d-> ", $_ if ($self->{runtime}->{options}->{verbose} >= 2); foreach ($self->get_he_modules($_)) { printf "%02d ", $_ if ($self->{runtime}->{options}->{verbose} >= 2); } printf "\n" if ($self->{runtime}->{options}->{verbose} >= 2); } foreach ($self->get_h2_boards()) { printf "H2%02d-> ", $_ if ($self->{runtime}->{options}->{verbose} >= 2); foreach ($self->get_h2_modules($_)) { printf "%02d ", $_ if ($self->{runtime}->{options}->{verbose} >= 2); } printf "\n" if ($self->{runtime}->{options}->{verbose} >= 2); } if (($h2_dimms == 0) && ($he_dimms == 0) && ($si_dimms > 0)) { printf "TYP1 %s\n", $self->{runtime}->{product} if ($self->{runtime}->{options}->{verbose} >= 2); @{$self->{dimms}} = $self->update_si_with_si(); } elsif (($h2_dimms == 0) && ($he_dimms > 0) && ($si_dimms > 0)) { printf "TYP2 %s\n", $self->{runtime}->{product} if ($self->{runtime}->{options}->{verbose} >= 2); @{$self->{dimms}} = $self->update_si_with_he(); } elsif (($h2_dimms == 0) && ($he_dimms > 0) && ($si_dimms == 0)) { printf "TYP3 %s\n", $self->{runtime}->{product} if ($self->{runtime}->{options}->{verbose} >= 2); @{$self->{dimms}} = $self->update_he_with_he(); } elsif (($h2_dimms > 0) && ($he_dimms == 0) && ($si_dimms == 0)) { printf "TYP4 %s\n", $self->{runtime}->{product} if ($self->{runtime}->{options}->{verbose} >= 2); @{$self->{dimms}} = $self->update_h2_with_h2(); } elsif (($h2_dimms > 0) && ($he_dimms > 0) && ($si_dimms == 0)) { printf "TYP5 %s\n", $self->{runtime}->{product} if ($self->{runtime}->{options}->{verbose} >= 2); @{$self->{dimms}} = $self->update_he_with_h2(); } elsif (($h2_dimms > 0) && ($he_dimms == 0) && ($si_dimms > 0)) { printf "TYP6 %s\n", $self->{runtime}->{product} if ($self->{runtime}->{options}->{verbose} >= 2); @{$self->{dimms}} = $self->update_si_with_h2(); } elsif (($h2_dimms > 0) && ($he_dimms > 0) && ($si_dimms > 0)) { if ($h2_dimms > $si_dimms) { printf "TYP7 %s\n", $self->{runtime}->{product} if ($self->{runtime}->{options}->{verbose} >= 2); @{$self->{dimms}} = $self->update_he_with_h2(); } else { printf "TYP8 %s\n", $self->{runtime}->{product} if ($self->{runtime}->{options}->{verbose} >= 2); @{$self->{dimms}} = $self->update_si_with_he(); } } else { printf "TYPX %s\n", $self->{runtime}->{product} if ($self->{runtime}->{options}->{verbose} >= 2); } my $all_dimms = scalar(@{$self->{dimms}}); $self->trace(2, sprintf "ALL: %02d", $all_dimms); } sub dump { my $self = shift; if ($self->{runtime}->{options}->{verbose} > 2) { printf "[SI]\n"; foreach (@{$self->{si_dimms}}) { $_->dump(); } printf "[HE]\n"; foreach (@{$self->{he_dimms}}) { $_->dump(); } printf "[H2]\n"; foreach (@{$self->{h2_dimms}}) { $_->dump(); } } $self->SUPER::dump(); } sub update_si_with_si { my $self = shift; my $snmpwalk = $self->{rawdata}; my @dimms = (); my $repaircondition = undef; # wenn si keine statusinformationen liefert, dann besteht die chance # dass ein undokumentiertes he-fragment vorliegt # 1.3.6.1.4.1.232.6.2.14.11.1.1.0. my $cpqHeResMemModuleEntry = "1.3.6.1.4.1.232.6.2.14.11.1"; if (SNMP::Utils::get_size($snmpwalk, $cpqHeResMemModuleEntry) == 1) { $repaircondition = lc SNMP::Utils::get_object( $snmpwalk, $cpqHeResMemModuleEntry.'.1.0.'.scalar(@{$self->{si_dimms}})); # repaircondition 0 (ok) biegt alles wieder gerade } else { # anderer versuch if ($self->{si_overall_condition} && $self->{si_overall_condition} eq 'ok') { $repaircondition = 0; } } foreach my $si_dimm (@{$self->{si_dimms}}) { if (($si_dimm->{condition} eq 'n/a') || ($si_dimm->{condition} eq 'other')) { $si_dimm->{condition} = 'ok' if (defined $repaircondition && $repaircondition == 0); } push(@dimms, HP::Proliant::Component::MemorySubsystem::Dimm->new( runtime => $si_dimm->{runtime}, cartridge => $si_dimm->{cartridge}, module => $si_dimm->{module}, size => $si_dimm->{size}, status => $si_dimm->{status}, condition => $si_dimm->{condition}, )); } return @dimms; } sub update_si_with_he { my $self = shift; my @dimms = (); my $first_si_cartridge = ($self->get_si_boards())[0]; my $first_he_cartridge = ($self->get_he_boards())[0]; my $offset = 0; if (scalar(@{$self->{si_dimms}}) == scalar(@{$self->{he_dimms}})) { # aufpassen! sowas kann vorkommen: si cartridge 0...6, he cartridge 1...7 if ($first_si_cartridge != $first_he_cartridge) { # README case 5 $offset = $first_si_cartridge - $first_he_cartridge; } } elsif ((scalar(@{$self->{si_dimms}}) > 1) && (scalar(@{$self->{he_dimms}}) == 1)) { # siehe update_si_with_si. he-fragment return $self->update_si_with_si(); } else { # z.b. 4 si notpresent, 4 si present, 4 he } foreach my $si_dimm (@{$self->{si_dimms}}) { if (($si_dimm->{condition} eq 'n/a') || ($si_dimm->{condition} eq 'other')) { if (my $he_dimm = $self->get_he_module( $si_dimm->{cartridge} - $offset, $si_dimm->{module})) { # vielleicht hat he mehr ahnung $si_dimm->{condition} = $he_dimm->{condition}; if (($si_dimm->{condition} eq 'n/a') || ($si_dimm->{condition} eq 'other')) { # wenns immer noch kein brauchbares ergebnis gibt.... if ($self->{he_overall_condition} && $self->{he_overall_condition} eq 'ok') { # wird schon stimmen... $si_dimm->{condition} = 'ok'; } else { # ansonsten stellen wir uns dumm $si_dimm->{status} = 'notPresent'; } } } else { # in dem fall zeigt si unbestueckte cartridges an } } push(@dimms, HP::Proliant::Component::MemorySubsystem::Dimm->new( runtime => $si_dimm->{runtime}, cartridge => $si_dimm->{cartridge}, module => $si_dimm->{module}, size => $si_dimm->{size}, status => $si_dimm->{status}, condition => $si_dimm->{condition}, )); } return @dimms; } sub update_he_with_he { my $self = shift; my @dimms = (); foreach my $he_dimm (@{$self->{he_dimms}}) { push(@dimms, HP::Proliant::Component::MemorySubsystem::Dimm->new( runtime => $he_dimm->{runtime}, cartridge => $he_dimm->{cartridge}, module => $he_dimm->{module}, size => $he_dimm->{size}, status => $he_dimm->{status}, condition => $he_dimm->{condition}, )); } return @dimms; } sub update_si_with_h2 { my $self = shift; my @dimms = (); my $first_si_cartridge = ($self->get_si_boards())[0]; my $first_h2_cartridge = ($self->get_h2_boards())[0]; my $offset = 0; if (scalar(@{$self->{si_dimms}}) == scalar(@{$self->{h2_dimms}})) { # aufpassen! sowas kann vorkommen: si cartridge 0...6, he cartridge 1...7 if ($first_si_cartridge != $first_h2_cartridge) { # README case 5 $offset = $first_si_cartridge - $first_h2_cartridge; } } else { # z.b. 4 si notpresent, 4 si present, 4 he } foreach my $si_dimm (@{$self->{si_dimms}}) { if (($si_dimm->{condition} eq 'n/a') || ($si_dimm->{condition} eq 'other')) { if (my $h2_dimm = $self->get_h2_module( $si_dimm->{cartridge} - $offset, $si_dimm->{module})) { # vielleicht hat h2 mehr ahnung $si_dimm->{condition} = $h2_dimm->{condition}; if (1) { # ist zwar da, aber irgendwie auskonfiguriert $si_dimm->{status} = 'notPresent' if $h2_dimm->{status} eq 'other'; } } else { # in dem fall zeigt si unbestueckte cartridges an } } push(@dimms, HP::Proliant::Component::MemorySubsystem::Dimm->new( runtime => $si_dimm->{runtime}, cartridge => $si_dimm->{cartridge}, module => $si_dimm->{module}, size => $si_dimm->{size}, status => $si_dimm->{status}, condition => $si_dimm->{condition}, )); } return @dimms; } sub update_he_with_h2 { my $self = shift; my @dimms = (); my $first_he_cartridge = ($self->get_he_boards())[0]; my $first_h2_cartridge = ($self->get_h2_boards())[0]; my $offset = 0; # auch hier koennte sowas u.u.vorkommen: he cartridge 0..6, h2 cartridge 1..7 # ich habs zwar nie gesehen, aber wer weiss... if ($first_h2_cartridge != $first_he_cartridge) { $offset = $first_h2_cartridge - $first_he_cartridge; } foreach my $he_dimm (@{$self->{he_dimms}}) { if (($he_dimm->{condition} eq 'n/a') || ($he_dimm->{condition} eq 'other')) { if (my $h2_dimm = $self->get_h2_module( $he_dimm->{cartridge} + $offset, $he_dimm->{module})) { # vielleicht hat h2 mehr ahnung $he_dimm->{condition} = $h2_dimm->{condition}; if (1) { # ist zwar da, aber irgendwie auskonfiguriert $he_dimm->{status} = 'notPresent' if $h2_dimm->{status} eq 'other'; } } else { # in dem fall weiss he mehr als h2 } } if ($he_dimm->{size} == 0) { if (my $h2_dimm = $self->get_h2_module( $he_dimm->{cartridge} + $offset, $he_dimm->{module})) { $he_dimm->{size} = $h2_dimm->{size}; # h2 beinhaltet eine size-oid } } push(@dimms, HP::Proliant::Component::MemorySubsystem::Dimm->new( runtime => $he_dimm->{runtime}, cartridge => $he_dimm->{cartridge}, module => $he_dimm->{module}, size => $he_dimm->{size}, status => $he_dimm->{status}, condition => $he_dimm->{condition}, )); } return @dimms; } sub update_h2_with_h2 { my $self = shift; my @dimms = (); foreach my $h2_dimm (@{$self->{h2_dimms}}) { push(@dimms, HP::Proliant::Component::MemorySubsystem::Dimm->new( runtime => $h2_dimm->{runtime}, cartridge => $h2_dimm->{cartridge}, module => $h2_dimm->{module}, size => $h2_dimm->{size}, status => $h2_dimm->{status}, condition => $h2_dimm->{condition}, )); } return @dimms; } sub is_faulty { my $self = shift; if (scalar(@{$self->{si_dimms}}) > 0 && scalar(@{$self->{he_dimms}}) > 0) { return $self->si_is_faulty() || $self->he_is_faulty(); } elsif (scalar(@{$self->{si_dimms}}) > 0 && scalar(@{$self->{he_dimms}}) == 0) { return $self->si_is_faulty(); } elsif (scalar(@{$self->{si_dimms}}) == 0 && scalar(@{$self->{he_dimms}}) > 0) { return $self->he_is_faulty(); } else { return 0; } } sub si_is_faulty { my $self = shift; return ! defined $self->{si_overall_condition} ? 0 : $self->{si_overall_condition} eq 'degraded' ? 1 : 0; } sub si_is_ok { my $self = shift; return ! defined $self->{si_overall_condition} ? 1 : $self->{si_overall_condition} eq 'ok' ? 1 : 0; } sub he_is_faulty { my $self = shift; return ! defined $self->{he_overall_condition} ? 0 : $self->{he_overall_condition} eq 'degraded' ? 1 : 0; } sub he_is_ok { my $self = shift; return ! defined $self->{he_overall_condition} ? 1 : $self->{he_overall_condition} eq 'ok' ? 1 : 0; } sub get_si_boards { my $self = shift; my %found = (); foreach (@{$self->{si_dimms}}) { $found{$_->{cartridge}} = 1; } return sort { $a <=> $b } keys %found; } sub get_si_modules { my $self = shift; my $board = shift; my %found = (); foreach (grep { $_->{cartridge} == $board } @{$self->{si_dimms}}) { $found{$_->{module}} = 1; } return sort { $a <=> $b } keys %found; } sub get_he_boards { my $self = shift; my %found = (); foreach (@{$self->{he_dimms}}) { $found{$_->{cartridge}} = 1; } return sort { $a <=> $b } keys %found; } sub get_he_modules { my $self = shift; my $board = shift; my %found = (); foreach (grep { $_->{cartridge} == $board } @{$self->{he_dimms}}) { $found{$_->{module}} = 1; } return sort { $a <=> $b } keys %found; } sub get_he_module { my $self = shift; my $board = shift; my $module = shift; my $found = (grep { $_->{cartridge} == $board && $_->{module} == $module } @{$self->{he_dimms}})[0]; return $found; } sub get_h2_boards { my $self = shift; my %found = (); # foreach (@{$self->{h2_dimms}}) { $found{$_->{cartridge}} = 1; } return sort { $a <=> $b } keys %found; } sub get_h2_modules { my $self = shift; my $board = shift; my %found = (); foreach (grep { $_->{cartridge} == $board } @{$self->{h2_dimms}}) { $found{$_->{module}} = 1; } return sort { $a <=> $b } keys %found; } sub get_h2_module { my $self = shift; my $board = shift; my $module = shift; my $found = (grep { $_->{cartridge} == $board && $_->{module} == $module } @{$self->{h2_dimms}})[0]; return $found; } ././@LongLink0000644000000000000000000000017012262515411011637 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/CpuSubsystem.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000000554712262515026027362 0ustar package HP::Proliant::Component::CpuSubsystem; our @ISA = qw(HP::Proliant::Component); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; ################################## scrapiron ########## my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, condition => $params{condition}, status => $params{status}, cpus => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; if ($self->{method} eq 'snmp') { return HP::Proliant::Component::CpuSubsystem::SNMP->new(%params); } elsif ($self->{method} eq 'cli') { return HP::Proliant::Component::CpuSubsystem::CLI->new(%params); } else { die "unknown method"; } return $self; } sub check { my $self = shift; my $errorfound = 0; $self->add_info('checking cpus'); if (scalar (@{$self->{cpus}}) == 0) { # sachen gibts..... # $self->overall_check(); # sowas ist mir nur einmal untergekommen } else { foreach (@{$self->{cpus}}) { $_->check(); } } } sub num_cpus { my $self = shift; return scalar @{$self->{cpus}}; } sub dump { my $self = shift; foreach (@{$self->{cpus}}) { $_->dump(); } } package HP::Proliant::Component::CpuSubsystem::Cpu; our @ISA = qw(HP::Proliant::Component::CpuSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, cpqSeCpuSlot => $params{cpqSeCpuSlot}, cpqSeCpuUnitIndex => $params{cpqSeCpuUnitIndex}, cpqSeCpuName => $params{cpqSeCpuName}, cpqSeCpuStatus => $params{cpqSeCpuStatus}, blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; return $self; } sub check { my $self = shift; $self->blacklist('c', $self->{cpqSeCpuUnitIndex}); if ($self->{cpqSeCpuStatus} ne "ok") { if ($self->{runtime}->{options}{scrapiron} && ($self->{cpqSeCpuStatus} eq "unknown")) { $self->add_info(sprintf "cpu %d probably ok (%s)", $self->{cpqSeCpuUnitIndex}, $self->{cpqSeCpuStatus}); } else { $self->add_info(sprintf "cpu %d needs attention (%s)", $self->{cpqSeCpuUnitIndex}, $self->{cpqSeCpuStatus}); $self->add_message(CRITICAL, $self->{info}); } } else { $self->add_info(sprintf "cpu %d is %s", $self->{cpqSeCpuUnitIndex}, $self->{cpqSeCpuStatus}); } $self->add_extendedinfo(sprintf "cpu_%s=%s", $self->{cpqSeCpuUnitIndex}, $self->{cpqSeCpuStatus}); } sub dump { my $self = shift; printf "[CPU_%s]\n", $self->{cpqSeCpuUnitIndex}; foreach (qw(cpqSeCpuSlot cpqSeCpuUnitIndex cpqSeCpuName cpqSeCpuStatus)) { printf "%s: %s\n", $_, $self->{$_}; } printf "info: %s\n", $self->{info}; printf "\n"; } ././@LongLink0000644000000000000000000000017112262515411011640 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000001060512262515026027351 0ustar package HP::Proliant::Component::DiskSubsystem; our @ISA = qw(HP::Proliant::Component); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, da_subsystem => undef, sas_da_subsystem => undef, ide_da_subsystem => undef, fca_da_subsystem => undef, scsi_da_subsystem => undef, condition => $params{condition}, blacklisted => 0, }; bless $self, $class; $self->init(); return $self; } sub init { my $self = shift; $self->{da_subsystem} = HP::Proliant::Component::DiskSubsystem::Da->new( runtime => $self->{runtime}, rawdata => $self->{rawdata}, method => $self->{method}, ); $self->{sas_subsystem} = HP::Proliant::Component::DiskSubsystem::Sas->new( runtime => $self->{runtime}, rawdata => $self->{rawdata}, method => $self->{method}, ); $self->{scsi_subsystem} = HP::Proliant::Component::DiskSubsystem::Scsi->new( runtime => $self->{runtime}, rawdata => $self->{rawdata}, method => $self->{method}, ); $self->{ide_subsystem} = HP::Proliant::Component::DiskSubsystem::Ide->new( runtime => $self->{runtime}, rawdata => $self->{rawdata}, method => $self->{method}, ); $self->{fca_subsystem} = HP::Proliant::Component::DiskSubsystem::Fca->new( runtime => $self->{runtime}, rawdata => $self->{rawdata}, method => $self->{method}, ); } sub check { my $self = shift; $self->add_info('checking disk subsystem'); $self->{da_subsystem}->check(); $self->{sas_subsystem}->check(); $self->{scsi_subsystem}->check(); $self->{ide_subsystem}->check(); $self->{fca_subsystem}->check(); $self->disk_summary(); } sub dump { my $self = shift; $self->{da_subsystem}->dump(); $self->{sas_subsystem}->dump(); $self->{scsi_subsystem}->dump(); $self->{ide_subsystem}->dump(); $self->{fca_subsystem}->dump(); } sub disk_summary { my $self = shift; foreach my $subsys (qw(da sas scsi ide fca)) { if (my $pd = $self->{$subsys.'_subsystem'}->has_physical_drives()) { my $ld = $self->{$subsys.'_subsystem'}->has_logical_drives(); $self->add_summary(sprintf '%s: %d logical drives, %d physical drives', $subsys, $ld, $pd); } } } sub assemble { my $self = shift; $self->trace(3, sprintf "%s controllers und platten zusammenfuehren", ref($self)); $self->trace(3, sprintf "has %d controllers", scalar(@{$self->{controllers}})); $self->trace(3, sprintf "has %d accelerators", scalar(@{$self->{accelerators}})) if exists $self->{accelerators}; $self->trace(3, sprintf "has %d physical_drives", scalar(@{$self->{physical_drives}})); $self->trace(3, sprintf "has %d logical_drives", scalar(@{$self->{logical_drives}})); $self->trace(3, sprintf "has %d spare_drives", scalar(@{$self->{spare_drives}})); my $found = { accelerators => {}, logical_drives => {}, physical_drives => {}, spare_drives => {}, }; # found->{komponente}->{controllerindex} ist ein array # von teilen, die zu einem controller gehoeren foreach my $item (qw(accelerators logical_drives physical_drives spare_drives)) { foreach (@{$self->{$item}}) { $found->{item}->{$_->{controllerindex}} = [] unless exists $found->{$item}->{$_->{controllerindex}}; push(@{$found->{$item}->{$_->{controllerindex}}}, $_); } } foreach my $item (qw(accelerators logical_drives physical_drives spare_drives)) { foreach (@{$self->{controllers}}) { if (exists $found->{$item}->{$_->{controllerindex}}) { $_->{$item} = $found->{$item}->{$_->{controllerindex}}; delete $found->{$item}->{$_->{controllerindex}}; } else { $_->{$item} = []; # z.b. ein leerer controller: physical_drives = [] } } } # was jetzt noch in $found uebrig ist, gehoert zu keinem controller # d.h. komponenten mit ungueltigen cnrtlindex wurden gefunden } sub has_controllers { my $self = shift; return scalar(@{$self->{controllers}}); } sub has_accelerators { my $self = shift; return exists $self->{accelerators} ? scalar(@{$self->{accelerators}}) : 0; } sub has_physical_drives { my $self = shift; return scalar(@{$self->{physical_drives}}); } sub has_logical_drives { my $self = shift; return scalar(@{$self->{logical_drives}}); } 1; ././@LongLink0000644000000000000000000000017012262515411011637 Lustar rootrootnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Component/FanSubsystem.pmnagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/HP/Proliant/Compon0000644000000000000000000002243612262515026027356 0ustar package HP::Proliant::Component::FanSubsystem; our @ISA = qw(HP::Proliant::Component); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; ################################## fan_redundancy ########## my %params = @_; my $self = { runtime => $params{runtime}, rawdata => $params{rawdata}, method => $params{method}, condition => $params{condition}, status => $params{status}, fans => [], blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; if ($self->{method} eq 'snmp') { return HP::Proliant::Component::FanSubsystem::SNMP->new(%params); } elsif ($self->{method} eq 'cli') { return HP::Proliant::Component::FanSubsystem::CLI->new(%params); } else { die 'unknown method'; } return $self; } sub check { my $self = shift; my $errorfound = 0; $self->add_info('checking fans'); $self->blacklist('ff', ''); if (scalar (@{$self->{fans}}) == 0) { $self->overall_check(); # sowas ist mir nur einmal untergekommen # die maschine hatte alles in allem nur 2 oids (cpqHeFltTolFanChassis) # SNMPv2-SMI::enterprises.232.6.2.6.7.1.1.0.1 = INTEGER: 0 # SNMPv2-SMI::enterprises.232.6.2.6.7.1.1.0.2 = INTEGER: 0 } else { my $overallhealth = $self->overall_check(); foreach (@{$self->{fans}}) { $_->{overallhealth} = $overallhealth; $_->check(); } } } sub dump { my $self = shift; foreach (@{$self->{fans}}) { $_->dump(); } } sub get_fan_by_index { my $self = shift; my $index; foreach (@{$self->{fans}}) { return $_ if exists $_->{cpqHeFltTolFanIndex} && $_->{cpqHeFltTolFanIndex} == $index; } return undef; } package HP::Proliant::Component::FanSubsystem::Fan; our @ISA = qw(HP::Proliant::Component::FanSubsystem); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; if (exists $params{cpqHeFltTolFanRedundant}) { return HP::Proliant::Component::FanSubsystem::Fan::FTol->new(%params); } else { return HP::Proliant::Component::FanSubsystem::Fan::Thermal->new(%params); } } package HP::Proliant::Component::FanSubsystem::Fan::FTol; our @ISA = qw(HP::Proliant::Component::FanSubsystem::Fan); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, cpqHeFltTolFanChassis => $params{cpqHeFltTolFanChassis}, cpqHeFltTolFanIndex => $params{cpqHeFltTolFanIndex}, cpqHeFltTolFanLocale => $params{cpqHeFltTolFanLocale}, cpqHeFltTolFanPresent => $params{cpqHeFltTolFanPresent}, cpqHeFltTolFanType => $params{cpqHeFltTolFanType}, cpqHeFltTolFanSpeed => $params{cpqHeFltTolFanSpeed}, cpqHeFltTolFanRedundant => $params{cpqHeFltTolFanRedundant}, cpqHeFltTolFanRedundantPartner => $params{cpqHeFltTolFanRedundantPartner}, cpqHeFltTolFanCondition => $params{cpqHeFltTolFanCondition}, cpqHeFltTolFanPctMax => $params{cpqHeFltTolFanPctMax}, #!!! cpqHeFltTolFanHotPlug => $params{cpqHeFltTolFanHotPlug}, #!!! partner => $params{partner}, blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; if (($self->{cpqHeFltTolFanRedundant} eq 'redundant') && ((! defined $self->{cpqHeFltTolFanRedundantPartner}) || (! $self->{cpqHeFltTolFanRedundantPartner}))) { $self->{cpqHeFltTolFanRedundant} = 'notRedundant'; # cpqHeFltTolFanRedundantPartner=0: partner not avail } return $self; } sub check { my $self = shift; $self->blacklist('f', $self->{cpqHeFltTolFanIndex}); $self->add_info(sprintf 'fan %d is %s, speed is %s, pctmax is %s%%, '. 'location is %s, redundance is %s, partner is %s', $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanPresent}, $self->{cpqHeFltTolFanSpeed}, $self->{cpqHeFltTolFanPctMax}, $self->{cpqHeFltTolFanLocale}, $self->{cpqHeFltTolFanRedundant}, $self->{cpqHeFltTolFanRedundantPartner}); $self->add_extendedinfo(sprintf 'fan_%s=%d%%', $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanPctMax}); if ($self->{cpqHeFltTolFanPresent} eq 'present') { if ($self->{cpqHeFltTolFanSpeed} eq 'high') { $self->add_info(sprintf 'fan %d (%s) runs at high speed', $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale}); $self->add_message(CRITICAL, $self->{info}); } elsif ($self->{cpqHeFltTolFanSpeed} ne 'normal') { $self->add_info(sprintf 'fan %d (%s) needs attention', $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale}); $self->add_message(CRITICAL, $self->{info}); } if ($self->{cpqHeFltTolFanCondition} eq 'failed') { $self->add_info(sprintf 'fan %d (%s) failed', $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale}); $self->add_message(CRITICAL, $self->{info}); } elsif ($self->{cpqHeFltTolFanCondition} eq 'degraded') { $self->add_info(sprintf 'fan %d (%s) degraded', $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale}); $self->add_message(WARNING, $self->{info}); } elsif ($self->{cpqHeFltTolFanCondition} ne 'ok') { $self->add_info(sprintf 'fan %d (%s) is not ok', $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale}); $self->add_message(WARNING, $self->{info}); } if ($self->{cpqHeFltTolFanRedundant} eq 'notRedundant') { # sieht so aus, als waere notRedundant und partner=0 normal z.b. dl360 # das duerfte der fall sein, wenn nur eine cpu verbaut wurde und # statt einem redundanten paar nur dummies drinstecken. # "This specifies if the fan is in a redundant configuration" # notRedundant heisst also sowohl nicht redundant wegen ausfall # des partners als auch von haus aus nicht redundant ausgelegt if ($self->{cpqHeFltTolFanRedundantPartner}) { # nicht redundant, hat aber einen partner. da muss man genauer # hinschauen #if (my $partner = $self->{partner}) { #} if ($self->{overallhealth}) { # da ist sogar das system der meinung, dass etwas faul ist if (! $self->{runtime}->{options}->{ignore_fan_redundancy}) { $self->add_info(sprintf 'fan %d (%s) is not redundant', $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale}); $self->add_message(WARNING, $self->{info}); } } else { # das ist wohl so gewollt, dass einzelne fans eingebaut werden, # obwohl redundante paerchen vorgesehen sind. # scheint davon abzuhaengen, wieviele cpus geordert wurden. } } } elsif ($self->{cpqHeFltTolFanRedundant} eq 'other') { #seen on a dl320 g5p with bios from 2008. # maybe redundancy is not supported at all } } elsif ($self->{cpqHeFltTolFanPresent} eq 'failed') { # from cli $self->add_info(sprintf 'fan %d (%s) failed', $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale}); $self->add_message(CRITICAL, $self->{info}); } elsif ($self->{cpqHeFltTolFanPresent} eq 'absent') { $self->add_info(sprintf 'fan %d (%s) needs attention (is absent)', $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale}); # weiss nicht, ob absent auch kaputt bedeuten kann # wenn nicht, dann wuerde man sich hier dumm und daemlich blacklisten #$self->add_message(CRITICAL, $self->{info}); $self->add_message(WARNING, $self->{info}) if $self->{overallhealth}; } if ($self->{runtime}->{options}->{perfdata}) { $self->{runtime}->{plugin}->add_perfdata( label => sprintf('fan_%s', $self->{cpqHeFltTolFanIndex}), value => $self->{cpqHeFltTolFanPctMax}, uom => '%', ); } } sub dump { my $self = shift; printf "[FAN_%s]\n", $self->{cpqHeFltTolFanIndex}; foreach (qw(cpqHeFltTolFanChassis cpqHeFltTolFanIndex cpqHeFltTolFanLocale cpqHeFltTolFanPresent cpqHeFltTolFanType cpqHeFltTolFanSpeed cpqHeFltTolFanRedundant cpqHeFltTolFanRedundantPartner cpqHeFltTolFanCondition cpqHeFltTolFanHotPlug)) { printf "%s: %s\n", $_, $self->{$_}; } printf "info: %s\n", $self->{info}; printf "\n"; } package HP::Proliant::Component::FanSubsystem::Fan::Thermal; our @ISA = qw(HP::Proliant::Component::FanSubsystem::Fan); use strict; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; sub new { my $class = shift; my %params = @_; my $self = { runtime => $params{runtime}, cpqHeThermalFanIndex => $params{cpqHeThermalFanIndex}, cpqHeThermalFanRequired => $params{cpqHeThermalFanRequired}, cpqHeThermalFanPresent => $params{cpqHeThermalFanPresent}, cpqHeThermalFanCpuFan => $params{cpqHeThermalFanCpuFan}, cpqHeThermalFanStatus => $params{cpqHeThermalFanStatus}, cpqHeThermalFanHwLocation => $params{cpqHeThermalFanHwLocation}, blacklisted => 0, info => undef, extendedinfo => undef, }; bless $self, $class; return $self; } sub check { my $self = shift; } sub dump { my $self = shift; printf "[FAN_%s]\n", $self->{cpqHeThermalFanIndex}; foreach (qw(cpqHeThermalFanIndex cpqHeThermalFanRequired cpqHeThermalFanPresent cpqHeThermalFanCpuFan cpqHeThermalFanStatus cpqHeThermalFanHwLocation)) { printf "%s: %s\n", $_, $self->{$_}; } printf "info: %s\n", $self->{info}; printf "\n"; } nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/subst.in0000644000000000000000000000266412262515026025572 0ustar #!/usr/bin/awk function which(c,path) { cmd = "test -x " c; if (system(cmd)==0) { return c; } sub(/\/.*\//,"",c); for (dir in path) { cmd = "test -x " path[dir] "/" c; if (system(cmd)==0) { return path[dir] "/" c; } } return c; } # used to replace "use lib utils.pm" with "use lib @libexecdir" # function led() { led1 = "@libexecdir@"; led2 = "@exec_prefix@"; led3 = "@prefix@"; if ( match(led1, /^\$\{exec_prefix\}/ ) != 0 ) { return "\"" led3 "/libexec\" " ; } return "\"" led1 "\"" ; } BEGIN { split(ENVIRON["PATH"] ":/sbin:/usr/sbin",path,/:/); } # scripting language (first line) /^#! ?\/.*\/python/ {sub(/^#! ?\/.*\/python/,"#! @PYTHON@");} /^#! ?\/.*\/perl/ {sub(/^#! ?\/.*\/perl/,"#! @PERL@");} /^#! ?\/.*\/[a-z]{0,2}awk/ {sub(/^#! ?\/.*\/[a-z]{0,2}awk/,"#! @AWK@");} /^#! ?\/.*\/sh/ {sub(/^#! ?\/.*\/sh/,"#! @SHELL@");} # add to libexecdir to INC for perl utils.pm /^use/ { if (/lib/) { if (/utils.pm|"."/ ) {sub(/utils.pm|"."/,led() )} } } # Replace the placeholders with the values from configure /#PERL#/ {sub(/#PERL#/,"@PERL@");} /my \$NOINSTLEVEL = 'unknown'/ {sub(/unknown/,"@NOINSTLEVEL@");} /my \$CELSIUS = 1;/ {sub(/1/,"@CELSIUS@");} /my \$PERFDATA = 1;/ {sub(/1/,"@PERFDATA@");} /my \$EXTENDEDINFO = 1;/ {sub(/1/,"@EXTENDEDINFO@");} /my \$HWINFO = 1;/ {sub(/1/,"@HWINFO@");} /my \$HPACUCLI = 1;/ {sub(/1/,"@HPACUCLI@");} /version => '.*',/ {sub(/'.*'/,"'@PACKAGE_VERSION@'");} { print; } nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/plugins-scripts/Makefile.in0000644000000000000000000003221112262515026026136 0ustar # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins-scripts DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/subst.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = subst am__installdirs = "$(DESTDIR)$(libexecdir)" libexecSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(libexec_SCRIPTS) SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) VPATH = $(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CELSIUS = @CELSIUS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EXTENDEDINFO = @EXTENDEDINFO@ HPACUCLI = @HPACUCLI@ HWINFO = @HWINFO@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_OPTS = @INSTALL_OPTS@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NOINSTLEVEL = @NOINSTLEVEL@ 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@ PERFDATA = @PERFDATA@ PERL = @PERL@ RELEASE = @RELEASE@ SET_MAKE = @SET_MAKE@ SH = @SH@ SHELL = @SHELL@ STRIP = @STRIP@ SUPPORT = @SUPPORT@ VERSION = @VERSION@ WARRANTY = @WARRANTY@ ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ 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@ SED = /bin/sed GREP = /bin/grep CAT = /bin/cat ECHO = /bin/echo SUFFIXES = .pl .pm .sh libexec_SCRIPTS = check_hpasm MY_MODULES = EXTRA_MODULES = \ Nagios/MiniPlugin.pm \ HP/SNMP/Utils.pm \ HP/Proliant/Component/EventSubsystem.pm \ HP/Proliant/Component/EventSubsystem/CLI.pm \ HP/Proliant/Component/EventSubsystem/SNMP.pm \ HP/Proliant/Component/PowersupplySubsystem.pm \ HP/Proliant/Component/PowersupplySubsystem/CLI.pm \ HP/Proliant/Component/PowersupplySubsystem/SNMP.pm \ HP/Proliant/Component/TemperatureSubsystem.pm \ HP/Proliant/Component/TemperatureSubsystem/CLI.pm \ HP/Proliant/Component/TemperatureSubsystem/SNMP.pm \ HP/Proliant/Component/CpuSubsystem.pm \ HP/Proliant/Component/CpuSubsystem/CLI.pm \ HP/Proliant/Component/CpuSubsystem/SNMP.pm \ HP/Proliant/Component/FanSubsystem.pm \ HP/Proliant/Component/FanSubsystem/CLI.pm \ HP/Proliant/Component/FanSubsystem/SNMP.pm \ HP/Proliant/Component/MemorySubsystem/CLI.pm \ HP/Proliant/Component/MemorySubsystem/SNMP.pm \ HP/Proliant/Component/MemorySubsystem.pm \ HP/Proliant/Component/NicSubsystem/SNMP.pm \ HP/Proliant/Component/NicSubsystem.pm \ HP/Proliant/Component/AsrSubsystem/CLI.pm \ HP/Proliant/Component/AsrSubsystem/SNMP.pm \ HP/Proliant/Component/AsrSubsystem.pm \ HP/Proliant/Component/SNMP.pm \ HP/Proliant/Component/DiskSubsystem/Da/CLI.pm \ HP/Proliant/Component/DiskSubsystem/Da/SNMP.pm \ HP/Proliant/Component/DiskSubsystem/Da.pm \ HP/Proliant/Component/DiskSubsystem/Sas/CLI.pm \ HP/Proliant/Component/DiskSubsystem/Sas/SNMP.pm \ HP/Proliant/Component/DiskSubsystem/Sas.pm \ HP/Proliant/Component/DiskSubsystem/Scsi/CLI.pm \ HP/Proliant/Component/DiskSubsystem/Scsi/SNMP.pm \ HP/Proliant/Component/DiskSubsystem/Scsi.pm \ HP/Proliant/Component/DiskSubsystem/Ide/CLI.pm \ HP/Proliant/Component/DiskSubsystem/Ide/SNMP.pm \ HP/Proliant/Component/DiskSubsystem/Ide.pm \ HP/Proliant/Component/DiskSubsystem/Fca/CLI.pm \ HP/Proliant/Component/DiskSubsystem/Fca/SNMP.pm \ HP/Proliant/Component/DiskSubsystem/Fca.pm \ HP/Proliant/Component/DiskSubsystem.pm \ HP/Proliant/Component.pm \ HP/Proliant.pm \ HP/BladeSystem/Component/CommonEnclosureSubsystem.pm \ HP/BladeSystem/Component/CommonEnclosureSubsystem/FanSubsystem.pm \ HP/BladeSystem/Component/CommonEnclosureSubsystem/TempSubsystem.pm \ HP/BladeSystem/Component/CommonEnclosureSubsystem/FuseSubsystem.pm \ HP/BladeSystem/Component/CommonEnclosureSubsystem/ManagerSubsystem.pm \ HP/BladeSystem/Component/PowerEnclosureSubsystem.pm \ HP/BladeSystem/Component/PowerSupplySubsystem.pm \ HP/BladeSystem/Component/NetConnectorSubsystem.pm \ HP/BladeSystem/Component/ServerBladeSubsystem.pm \ HP/BladeSystem/Component.pm \ HP/BladeSystem.pm \ HP/Storage.pm \ HP/Server.pm EXTRA_DIST = check_hpasm.pl $(EXTRA_MODULES) CLEANFILES = $(libexec_SCRIPTS) AM_INSTALL_PROGRAM_FLAGS = @INSTALL_OPTS@ all: all-am .SUFFIXES: .SUFFIXES: .pl .pm .sh $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins-scripts/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins-scripts/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh subst: $(top_builddir)/config.status $(srcdir)/subst.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libexecSCRIPTS: $(libexec_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(libexecdir)" || $(mkdir_p) "$(DESTDIR)$(libexecdir)" @list='$(libexec_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(libexecSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \ $(libexecSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(libexecdir)/$$f"; \ else :; fi; \ done uninstall-libexecSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(libexec_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \ rm -f "$(DESTDIR)$(libexecdir)/$$f"; \ done uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) $(mkdir_p) $(distdir)/HP $(distdir)/HP/BladeSystem $(distdir)/HP/BladeSystem/Component $(distdir)/HP/BladeSystem/Component/CommonEnclosureSubsystem $(distdir)/HP/Proliant $(distdir)/HP/Proliant/Component $(distdir)/HP/Proliant/Component/AsrSubsystem $(distdir)/HP/Proliant/Component/CpuSubsystem $(distdir)/HP/Proliant/Component/DiskSubsystem $(distdir)/HP/Proliant/Component/DiskSubsystem/Da $(distdir)/HP/Proliant/Component/DiskSubsystem/Fca $(distdir)/HP/Proliant/Component/DiskSubsystem/Ide $(distdir)/HP/Proliant/Component/DiskSubsystem/Sas $(distdir)/HP/Proliant/Component/DiskSubsystem/Scsi $(distdir)/HP/Proliant/Component/EventSubsystem $(distdir)/HP/Proliant/Component/FanSubsystem $(distdir)/HP/Proliant/Component/MemorySubsystem $(distdir)/HP/Proliant/Component/NicSubsystem $(distdir)/HP/Proliant/Component/PowersupplySubsystem $(distdir)/HP/Proliant/Component/TemperatureSubsystem $(distdir)/HP/SNMP $(distdir)/Nagios @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(libexecdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libexecSCRIPTS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-libexecSCRIPTS .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ install-libexecSCRIPTS install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \ uninstall-libexecSCRIPTS .pm : $(AWK) -f ./subst $< > $@ chmod +x $@ .pl : $(AWK) -f ./subst $< > $@ chmod +x $@ .sh : $(AWK) -f ./subst $< > $@ chmod +x $@ $(libexec_SCRIPTS) : $(EXTRA_DIST) $(ECHO) "#! #PERL# -w" | $(AWK) -f ./subst > $@ $(ECHO) >> $@ for m in ${EXTRA_MODULES}; do \ $(SED) -e 's/^1;//g' < $$m | $(AWK) -f ./subst | $(GREP) -v "use Nagios::Plugin" >> $@; \ done $(ECHO) "package main;" >> $@ $(CAT) check_hpasm.pl | $(AWK) -f ./subst >> $@ chmod +x $@ #| $(GREP) -v "use Nagios" >> $@; # 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: nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/NEWS0000644000000000000000000000000012262515026021411 0ustar nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/configure.in0000644000000000000000000000731412262515026023242 0ustar dnl Process this file with autoconf to produce a configure script. AC_REVISION ($Revision: 1.150 $) AC_PREREQ(2.58) AC_INIT(check_hpasm,4.6.3.2) AM_INIT_AUTOMAKE([1.9 tar-pax]) 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) AC_PROG_MAKE_SET AC_PROG_AWK WARRANTY="This plugin comes with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of the plugin 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 gerhard.lausser@consol.de if you have questions\nregarding use of this software.\nPlease include version information with all correspondence (when possible,\nuse output from the --version option of the plugin itself).\n" AC_SUBST(SUPPORT) 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(noinst_level, ACX_HELP_STRING([--with-noinst-level=LEVEL], [error level if hpasm is not installed]), with_noinst_level=$withval, with_noinst_level=unknown) AC_SUBST(NOINSTLEVEL, $with_noinst_level) AC_ARG_WITH(degrees, ACX_HELP_STRING([--with-degrees=UNIT], [which temperature unit to use. (celsius or fahrenheit)]), with_degrees=$withval, with_degrees=unknown) case "$with_degrees" in fahrenheit) AC_SUBST(CELSIUS, 0) ;; *) AC_SUBST(CELSIUS, 1) ;; esac AC_ARG_ENABLE([perfdata], [ --enable-perfdata wether to output perfdata (default=no)], ,enable_perfdata=no) if test x"$enable_perfdata" = xyes ; then AC_SUBST(PERFDATA, 1) else AC_SUBST(PERFDATA, 0) fi AC_ARG_ENABLE([extendedinfo], [ --enable-extendedinfo wether to output extended info (default=no)], ,enable_extendedinfo=no) if test x"$enable_extendedinfo" = xyes ; then AC_SUBST(EXTENDEDINFO, 1) else AC_SUBST(EXTENDEDINFO, 0) fi AC_ARG_ENABLE([hwinfo], [ --disable-hwinfo wether to output model desc., serial no., bios version (default=yes)], ,enable_hwinfo=yes) if test x"$enable_hwinfo" = xyes ; then AC_SUBST(HWINFO, 1) else AC_SUBST(HWINFO, 0) fi AC_ARG_ENABLE([hpacucli], [ --enable-hpacucli wether to check raid status with hpacucli (default=no)], ,enable_hpacucli=no) if test x"$enable_hpacucli" = xyes ; then AC_SUBST(HPACUCLI, 1) elif test x"$enable_hpacucli" = xmaybe ; then AC_SUBST(HPACUCLI, 2) else AC_SUBST(HPACUCLI, 0) fi case "$host_os" in *hp*) defaulttrustedpath=/bin:/sbin:/usr/bin:/usr/sbin:/usr/contrib/bin ;; *) defaulttrustedpath=/bin:/sbin:/usr/bin:/usr/sbin ;; esac EXTRAS= dnl PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/local/sbin:$PATH dnl Checks for programs. 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_OUTPUT( Makefile plugins-scripts/Makefile plugins-scripts/subst ) ACX_FEATURE([with],[perl]) ACX_FEATURE([with],[nagios-user]) ACX_FEATURE([with],[nagios-group]) ACX_FEATURE([with],[noinst-level]) ACX_FEATURE([with],[degrees]) ACX_FEATURE([enable],[perfdata]) ACX_FEATURE([enable],[extendedinfo]) ACX_FEATURE([enable],[hwinfo]) ACX_FEATURE([enable],[hpacucli]) nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/ChangeLog0000644000000000000000000001766012262515026022510 0ustar ####################################### # Changelog of the check_hpasm plugin # ####################################### 4.6.3.2 2013-03-19 - fix a bug in proliant/gen8/ilo temperature thresholds (Thanks Kai Benninghoff and Stephane Loeuillet) 4.6.3.1 2013-01-10 - fix a bug in da disk in local mode - fix a bux in overall_init proliant nics (Thanks Fanming Jen) 4.6.3 2012-11-25 - gen8 should work now - fix the problem with -99 degrees - fix the problem with binary zero EventUpdateTime 4.6.2.1 2012-11-09 - some bugfixes in bladecenter temperatures (Thanks Thomas Reichel) 4.6.2 2012-08-20 - fix some bugs in snmpget where the system responded with undef values 4.6.1 2012-08-14 - fix a small bug in boottime - skip pagination in long "show iml" lists - make bulk requests if possible 4.6 2012-06-07 - output power consumption as performance data (only newer proliant models) - support older <=7 versions of hpacucli - add another error log: Uncorrectable Memory Error - raise the default timeout from 15 to 60 seconds 4.5.3.1 2012-04-19 - change the way --snmpwalk reads oids from a file 4.5.3 2012-03-26 - fix a bug in snmp-eventlogs 4.5.2 2012-03-06 - add another error log: Main Memory - Corrected Memory Error threshold exceeded 4.5.1 2012-02 - add another error log: 210 - Quick Path Interconnect (QPI) Link Degradation - remove watt percent for blade center power supply - make the snmp oid collection phase shorter for blade center 4.5 2012-01-26 - output power consumption perfdata for BladeCenters - correctly identify dl388g7 (Thanks lilei8) 4.4 2011-12-16 - add checks for power converters - add checks for nic teaming (experimental!!, must be enabled with --eval-nics) - fix a bug with invalid date/time from iml - fix a bug in blade enclosure manager verbose output - add msa2xxx storage sensors 4.3 2011-10-14 - add monitoring of IML events (Thanks Klaus) esp. Memory initialization error... The OS may not have access to all of the memory installed in the system 4.2.5 - G2 series of X1660 storage systems are now correctly detected. (Thanks Andre Zaborowski) - blacklisting for SAS controller & disks was added (Thanks Jewi) 4.2.4.1 2011-08-09 - dimm output of G7 hpasmcli (under Solaris) is now handled (Thanks Ron Waffle) 4.2.4 2011-07-21 add a check for asr (Thanks Ingmar Verheij http://www.ingmarverheij.com/) 4.2.3 2011-07-21 - add a global temperature check when no temperature sensors are found - check power converters if no fault tolerant power supplies are found 4.2.2.1 2011-04-17 - fix a bug when a wrong --hostname was used (Thanks Wim Savenberg) 4.2.2 2011-01-21 - add support for msa500 and hpasmcli (Thanks Kalle Andersson) 4.2.1.1 - added support for x1** nas storage, which was detected as storage but in fact is like a proliant (Thanks Maik Schulz) 4.2.1 - added timeout handling - better hpacucli da controller handling - fix a bug in memory detection (0 dimms were shown) (Thanks Anthony Cano) - better handling for failed and disabled controller batteries. warning only. 4.2 2010-03-20 - added temperatures for bladesystems (although not implemented by HP) - added fuses for bladesystems - added enclosure managers for bladesystems - added blacklisting for scsi devices (scco,scld,scpd) (Thanks Marco Hill) - added blacklisting for overall fan status (ofs) (Thanks Thomas Jampen) 4.1.2.1 2010-03-03 - fixed a harmless bug in BladeCenter::Powersupply output 4.1.2 2010-02-09 - fixed a severe bug in detecting multiple logical drives with hpacucli (Thanks Trond Hasle) 4.1.1 2010-01-07 - detect more smart array types when run in local mode (Thanks Trond Hasle) 4.1 2009-12-07 - added more details for bladecenters (power suppl., server blades) - fixed a bug in powersupply checks with hpasmcli (Thanks Guillaume) 4.0.1 2009-12-02 - added the missing output for --help - non-redundant fans are now tolerated if the global fan status says "ok" - added detection for servers with a hidden model description - fixed a bug in celsius-fahrenheit-conversion 4.0 2009-11-30 - added support for the new g6-models - complete rewrite of the code - autodetection for proliant, bladecenter and storage - detailed dump of the hardware with -vvv - new format for blacklist 3.5.1 2009-04-22 - fixed a bug where the server didn't reveal serial no. and rom rev. (thanks Daniel Rich) - fixed a bug in the snmpv3 code. 3.5 2009-03-20 - added support for SNMPv3 - added new parameter --port 3.2.1 2009-02-26 - fixed a bug which showed degraded dimms as missing. (thanks matt at adicio.com) 3.2 2009-02-20 - added support for external disk arrays. (M. M. has a MSA20) 3.1.1.1 2009-02-13 - added an error message when sudo was configured with requiretty=yes. (thanks Jeff The Riffer) 3.1.1 2009-02-06 - fixed a bug which caused ugly perl warnings. (thanks Martin Hofmann and Bill Katz) 3.1 2009-01-21 - added support for sas and ide controllers/disks (only with snmp) 3.0.7.2 2009-01-16 - minor bugfix for dl320g5+hpasmcli+fan+n/a. (thanks Bruce Jackson) 3.0.7.1 2008-12-05 - minor bugfix. snmpwalk now uses -On 3.0.7 2008-11-29 - bugfix in controller blacklists (thanks Maurice Moric) - no need for Net::SNMP with --snmpwalk /usr/bin/snmpwalk 3.0.6 2008-10-30 - buxfix in ignore-dimms (thanks tumtliw) 3.0.5 2008-10-23 - higher speed through decreased amount of transferred oids (thanks Yannick Gravel) - new switch --ignore-fan-redundancy for old boxes without double fans 3.0.4 2008-09-18 - rewrote snmp memory checking for better handling of missing health info - new configure option --enable-extendedinfo (outputs lots of crap) 3.0.3.2 2008-09-11 - --protocol ist now optional (this was a bug) 3.0.3.1 2008-09-10 - Only accept 1, 2 or 2c as SNMP protocol - Try both bulk walk and get-next 3.0.3 2008-08-11 - cpqSiMem instead of cpqHeResMem - new parameter --protocol (default: 2c) - cpqHeComponents are fetched with get-next instead of get-bulk (Net::SNMP grr) 3.0.2 2008-08-01 - skip memory checking if snmp returns garbage - bugfix in numbering of snmp table indexes 3.0.1 2008-07-31 - bugfix in customthresholds&snmp (thanks TheCry) - broke up the snmpwalk into smaller pieces. 3.0 2008-07-20 - first release with snmp support for remote checks (thanks Matthias Flacke) - simulation is possible with --snmpwalk or --hpasmcli 2.0.3.3 - 2008-05-22 Brangerdog - support fan partner# 0 with proliant support pack 8.0 (thanks Mark Wagner) 2.0.3.2 - 2008-05-03 - fixed a typo in README 2.0.3.1 - 2008-04-16 - fixed a bug in path to perl binary - fixed a bug in --enable-perfdata (thanks Birk Bohne) 2.0.3 - 2008-04-09 - fixed a bug in dimm code - added blacklisting for raid controllers (thanks Andreas Schrogl) - added blacklisting for cache&battery (thanks Harrold Nabben) 2.0.2 - 2008-02-11 - empty cpu&fan sockets are now properly handled 2.0.1 - 2008-02-08 - multiline output for nagios 3.x 2.0 - 2008-02-08 - complete code redesign - integrated raid checking with hpacucli (thanks Kelly Kristiaan van Vliet who was the first to propose this feature) (thanks Mess for calling me "FAULE SAU!!!") 1.6.2.2 - 2008-01-18 - added debian 3.1 to the osses where multiple hpasmd are considered normal. 1.6.2.1 - 2007-12-12 - fixed a bug which caused overlooked fans. Thanks Michael Krebs. - such unknown patterns which might be important will be reported now. 1.6.2 - 2007-11-16 - Marcus Fleige contributed the -i and a more meaningful ok output 1.6.1 - 2007-11-07 - fixed a bug which caused overlooked failed fans 1.6 - 2007-07-27 - added performance data for fan speed and temperatures 1.5.1 - 2007-07-11 - hpasmcli can also be a link - fixed a bug, so more fan locations can be found 1.5 - 2007-06-14 - added support for userdefined temperature thresholds (Kelly Kristiaan van Vliet) 1.4 - 2007-05-22 - added support for hpasmxld und hpasmlited 1.3 - 2007-04-17 - added --with-degree to configure (celsius or fahrenheit output) added -b/--blacklist added trustix 2.2 to the osses where multipel hpasmd are considered normal. 1.2 - 2007-04-16 - added --with-noinst-level 1.1 - 2007-04-14 - First public release nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/missing0000755000000000000000000002466612262515026022341 0ustar #! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2003-09-02.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # 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. # 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. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/COPYING0000644000000000000000000004312712262515026021766 0ustar 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. nagios-plugins-contrib-9.20140106/check_hpasm/check_hpasm-4.6.3.2/Makefile.in0000644000000000000000000004267212262515026023004 0ustar # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS TODO config.guess config.sub install-sh \ missing subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = 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@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CELSIUS = @CELSIUS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EXTENDEDINFO = @EXTENDEDINFO@ HPACUCLI = @HPACUCLI@ HWINFO = @HWINFO@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_OPTS = @INSTALL_OPTS@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NOINSTLEVEL = @NOINSTLEVEL@ 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@ PERFDATA = @PERFDATA@ PERL = @PERL@ RELEASE = @RELEASE@ SET_MAKE = @SET_MAKE@ SH = @SH@ SHELL = @SHELL@ STRIP = @STRIP@ SUPPORT = @SUPPORT@ VERSION = @VERSION@ WARRANTY = @WARRANTY@ ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ 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@ SUBDIRS = plugins-scripts all: 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) 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): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ 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) \ || eval $$failcom; \ 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: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ 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) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ 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) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/plugins-scripts @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='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (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 -755 -exec chmod a+rwx,go+rx {} \; -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 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | 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 tardir=$(distdir) && $(am__tar) | 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 | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.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" \ $(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 ../.. && umask 077 && mkdir "$$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 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-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-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-hook \ dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic 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 # 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: nagios-plugins-contrib-9.20140106/check_memory/0000755000000000000000000000000012262515026016051 5ustar nagios-plugins-contrib-9.20140106/check_memory/check_memory0000644000000000000000000001101412262515026020436 0ustar #!/usr/bin/perl # # check_memory - Check free(1) data against given tresholds # # Copyright (C) 2007 Thomas Guyot-Sionnest # # 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. # use strict; use warnings; use vars qw($PROGNAME $VERSION $FREECMD $UNIT); use Nagios::Plugin; $PROGNAME = "check_memory"; $VERSION = '1.0'; $FREECMD = '/usr/bin/free'; $UNIT = 'M'; my $np = Nagios::Plugin->new( usage => "Usage: %s [ -w ] [ -c ]\n" . ' [ -u ]', version => $VERSION, plugin => $PROGNAME, shortname => uc($PROGNAME), blurb => 'Check free(1) data against given tresholds', timeout => 30, ); $np->add_arg( spec => 'warning|w=s', help => "-w, --warning=THRESHOLD\n" . " Warning threshold (in *bytes*) for free memory. See\n" . " http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT\n" . " for the threshold format. Alternatively this can be defined as a percentage\n" . ' of minimum free memory (warning and critical must be in the same format).', required => 0, ); $np->add_arg( spec => 'critical|c=s', help => "-c, --critical=THRESHOLD\n" . " Critical threshold (in *bytes*) for free memory. See\n" . " http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT\n" . " for the threshold format. Alternatively this can be defined as a percentage\n" . ' of minimum free memory (warning and critical must be in the same format).', required => 0, ); $np->add_arg( spec => 'unit|u=s', help => "-u, --unit=UNIT\n" . " Unit to use for human-redeable output. Can be 'b', 'K' 'M' or 'G' for\n" . " bytes, KiB, MiB or GiB respectively (default: '$UNIT').", default => $UNIT, required => 0, ); $np->getopts; # Assign, then check args my $multiple; my $unit = $np->opts->unit; if ($unit eq 'M') { $multiple = 1024 * 1024; } elsif ( $unit eq 'K') { $multiple = 1024; } elsif ( $unit eq 'b') { $multiple = 1; } elsif ( $unit eq 'G') { $multiple = 1024 * 1024 * 1024; } else { $np->nagios_exit('UNKNOWN', "Unit must be one of 'b', 'K', 'M' or 'G', case-sensitive."); } my $verbose = $np->opts->verbose; # Would better fit later but doing it here validates thresholds my $warning = $np->opts->warning; my $critical = $np->opts->critical; $np->set_thresholds( warning => ((defined($warning) && $warning !~ /^\d+%$/) ? $warning : undef), critical => ((defined($critical) && $critical !~ /^\d+%$/) ? $critical : undef), ); # Better safe than sorry alarm $np->opts->timeout; # We always get bytes, then calculate units ourselves (Who knows... what if $FREECMD is on an offline device) warn("Running: '$FREECMD -b'\n") if ($verbose); open(RESULT, "$FREECMD -b |") or $np->nagios_exit('CRITICAL', "Could not run $FREECMD"); warn("Output from $FREECMD:\n") if ($verbose > 1); my ($used, $free); while () { warn(" $_") if ($verbose > 1); next unless (m#^\-/\+\ buffers/cache:\s*(\d+)\s+(\d+)#); $used = $1; $free = $2; } close(RESULT); alarm(0); $np->nagios_exit('CRITICAL', "Unable to interpret $FREECMD output") if (!defined($free)); my $total = $used + $free; if (defined($warning) && $warning =~ /^\d+%$/) { if ($warning) { $warning =~ s/%//; $warning = $total / 100 * $warning; $warning .= ':'; } warn("Calculated threshold (from percentage): warn=>$warning\n") if ($verbose); } if (defined($critical) && $critical =~ /^\d+%$/) { if ($critical) { $critical =~ s/%//; $critical = $total / 100 * $critical; $critical .= ':'; } warn("Calculated threshold (from percentage): crit=>$critical\n") if ($verbose); } $np->set_thresholds( warning => $warning, critical => $critical, ); $np->add_perfdata( label => "free", value => $free, uom => 'b', threshold => $np->threshold, ); my $freeprint = int($free/$multiple); $np->nagios_exit($np->check_threshold($free), "$freeprint$unit free"); nagios-plugins-contrib-9.20140106/check_memory/control0000644000000000000000000000106512262515026017456 0ustar Homepage: https://www.monitoringexchange.org/inventory/Check-Plugins/Operating-Systems/Linux/check_memory Watch: https://www.monitoringexchange.org/inventory/Check-Plugins/Operating-Systems/Linux/check_memory >check_memory v.([0-9.]+) Uploaders: Bernd Zeimetz Description: plugin to check for free memory This plugin excludes the system cache and buffer, because on some system with very stable memory usage it is perfectly normal for system cache to fill in all available memory. Recommends: libnagios-plugin-perl (>= 0.31) Version: 1.0 nagios-plugins-contrib-9.20140106/check_memory/copyright0000644000000000000000000000134412262515026020006 0ustar Copyright (C) 2007 Thomas Guyot-Sionnest 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. nagios-plugins-contrib-9.20140106/check_memory/Makefile0000644000000000000000000000002512262515026017506 0ustar include ../common.mk nagios-plugins-contrib-9.20140106/check_clamav/0000755000000000000000000000000012262515026016004 5ustar nagios-plugins-contrib-9.20140106/check_clamav/check_clamav0000644000000000000000000001502112262515026020326 0ustar #!/usr/bin/perl -w # # Copyright (c) 2005-2008 Darren Spruell # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # ################################################################################ # This script is used to compare the version and signature level of the # currently running clamd daemon with the latest available versions listed in # the TXT record for current.cvd.clamav.net. # # In order to use this script, you might need to make the following adjustments: # - Set the "use lib" path correctly (where utils.pm is located.) # - Set the path to your clamd binary in $clamd_cmd. # # This plugin requires the Net::DNS Perl module. ################################################################################ # Plugin directory / home of utils.pm. use lib "/usr/local/libexec/nagios"; use utils qw(%ERRORS &print_revision &support &usage); use Getopt::Long qw(:config no_ignore_case bundling); use File::Basename; use Net::DNS; use strict; # Path to installed clamd binary. my $clamd_cmd = "/usr/local/sbin/clamd"; # Leave the rest of this alone: my $prog_name = basename $0; my $prog_ver = "1.2"; my $warn_val = 1; # Default - override with -w arg my $crit_val = 2; # Default - override with -c arg my $help_val = 0; # Off unless -h arg my $verb_val = 0; # Off unless -v arg my $vers_val = 0; # Off unless -V arg my ($msg, $rev_word, $rr, $status, $status_print); # Gives us a way to print out verbose debug information to the screen when user # passes in a -v argument. # print_debug() should receive one parameter: a text string to print out. sub print_debug() { my $message = shift; if ($verb_val == 1) { print "DEBUG: " . $message . "\n"; } } # Looks up and returns the current CVD version information from # clamav.net. sub lookup_current() { my $res = Net::DNS::Resolver->new; my $query = $res->search("current.cvd.clamav.net", "TXT"); if ($query) { foreach $rr (grep { $_->type eq 'TXT' } $query->answer) { &print_debug("Net::DNS found result: (TXT) " . $rr->txtdata); return $rr->txtdata; } } else { warn "query failed: ", $res->errorstring, "\n"; } } # comp_sig_ver() should receive three parameters: remote signature database # version, local signature database version, and build date of local # signatures database. sub comp_sig_ver() { my $sig_rem = shift; my $sig_local = shift; my $sig_date = shift; my $diff = 0; my $msg = ""; if ($sig_local != $sig_rem) { $diff = $sig_rem - $sig_local; $rev_word = ($diff == 1) ? "revision" : "revisions"; if ($diff >= $crit_val) { &print_debug("Installed daily.cvd is behind clamav.net"); $status = $ERRORS{'CRITICAL'}; # Will exit with CRITICAL status $status_print = "CRITICAL"; } elsif ($diff >= $warn_val) { &print_debug("Installed daily.cvd is behind clamav.net"); $status = $ERRORS{'WARNING'}; # Will exit with WARNING status $status_print = "WARNING"; } else { &print_debug("Installed daily.cvd is behind clamav.net"); $status = $ERRORS{'OK'}; # Will exit with OK status $status_print = "OK"; } $msg = "ClamAV " . $status_print . ": daily.cvd " . $sig_local . " out of date by " . $diff . " " . $rev_word; } else { &print_debug("Installed daily.cvd matches latest from clamav.net"); $status = $ERRORS{'OK'}; # Will exit with OK status $msg = "ClamAV OK: daily.cvd " . $sig_local . " (" . $sig_date . ") is up to date"; } return $msg, $status; } # Show usage information sub show_help() { print < Perl Check ClamAV daily.cvd plugin for Nagios Usage: $prog_name [-w ] [-c ] [-V] [-v] [-h] -w, --warning=INTEGER Number of revisions behind current daily.cvd to generate a warning state (Default: 1) -c, --critical=INTEGER Number of revisions behind current daily.cvd to generate a critical state (Default: 2) -V, --version Output version information for the plugin -v, --verbose Enable verbose output -h, --help Show this help END } GetOptions ( "w=i" => \$warn_val, "warning=i" => \$warn_val, "c=i" => \$crit_val, "critical=i" => \$crit_val, "h" => \$help_val, "help" => \$help_val, "V" => \$vers_val, "version" => \$vers_val, "v" => \$verb_val, "verbose" => \$verb_val, ); if ($help_val != 0) { &show_help; exit $ERRORS{'OK'}; } if ($vers_val != 0) { &print_revision($prog_name,$prog_ver); exit $ERRORS{'OK'}; } # Make sure the binary exists. if (-x $clamd_cmd) { &print_debug("Found clamd at $clamd_cmd"); } else { &print_debug("Can't execute clamd at $clamd_cmd"); die("FATAL: Unable to execute $clamd_cmd"); } &print_debug("Threshhold values: warning=$warn_val, critical=$crit_val"); # Should return something like: ClamAV 0.87.1/1205/Wed Dec 7 07:00:48 2005 chomp(my $clamd_ver = `$clamd_cmd -V`); # Should return something like: 0.87.1:34:1206:1134072033:1 chomp(my $dnstxt_ver = &lookup_current()); # Parse what we get from clamd -V and our DNS query my @clamdresults = split(/\//,$clamd_ver); my @txtresults = split(/:/,$dnstxt_ver); # Get the currently running ClamAV sig level and cvd date out of this my $local_latest_daily = $clamdresults[1]; my $local_latest_date = $clamdresults[2]; &print_debug("Local daily.cvd dated $local_latest_date"); &print_debug("Local daily.cvd version = $local_latest_daily"); # Get the latest ClamAV daily signatures version out of this my $clamav_latest_daily = $txtresults[2]; &print_debug("Latest daily.cvd version = $clamav_latest_daily"); my @prog_sig_res = &comp_sig_ver($clamav_latest_daily, $local_latest_daily, $local_latest_date); print $prog_sig_res[0] . "\n"; exit $prog_sig_res[1]; nagios-plugins-contrib-9.20140106/check_clamav/control0000644000000000000000000000113212262515026017404 0ustar Homepage: http://exchange.nagios.org/directory/Plugins/Anti-2DVirus/ClamAV/ClamAV-check-plugin/details Watch: http://exchange.nagios.org/directory/Plugins/Anti-2DVirus/ClamAV/ClamAV-check-plugin/details check_clamav plugin v([0-9.]+) Uploaders: Bernd Zeimetz Description: plugin to check for clamav signature freshness This script is used to compare the version and signature level of the currently running clamd daemon with the latest available versions listed in the TXT record for current.cvd.clamav.net. Recommends: nagios-plugins-basic, libnet-dns-perl Version: 1.2 nagios-plugins-contrib-9.20140106/check_clamav/copyright0000644000000000000000000000136712262515026017746 0ustar Copyright (c) 2005-2008 Darren Spruell Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. nagios-plugins-contrib-9.20140106/check_clamav/Makefile0000644000000000000000000000002512262515026017441 0ustar include ../common.mk nagios-plugins-contrib-9.20140106/check_raid/0000755000000000000000000000000012262515026015460 5ustar nagios-plugins-contrib-9.20140106/check_raid/check_raid0000644000000000000000000025645612262515026017501 0ustar #!/usr/bin/perl # vim:ts=4:sw=4:noet # Nagios EPN Workaround: # nagios: -epn # # Check RAID status. Look for any known types of RAID configurations, and check them all. # Return CRITICAL if in a DEGRADED or FAILED state. # Return UNKNOWN if there are no RAID configs that can be found. # Return WARNING if rebuilding or initialising # # 2004-2006 Steve Shipway, university of auckland, # http://www.steveshipway.org/forum/viewtopic.php?f=20&t=417&p=3211 # Steve Shipway Thanks M Carmier for megaraid section. # 2009-2013 Elan Ruusamäe # Requires: Perl 5.8 for the open(my $fh , '-|', @CMD) syntax. # You can workaround for earlier Perl it as: # open(my $fh , join(" ", @CMD, '|') or return; # http://perldoc.perl.org/perl58delta.html#PerlIO-is-Now-The-Default # # License: GPL v2 # Homepage: https://github.com/glensc/nagios-plugin-check_raid # Changes: https://github.com/glensc/nagios-plugin-check_raid/blob/master/ChangeLog.md # Nagios Exchange Entry: http://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/RAID-Controllers/check_raid/details # Reporting Bugs: https://github.com/glensc/nagios-plugin-check_raid#reporting-bugs # # You can also mail patches directly to Elan Ruusamäe , # but please attach them in unified format (diff -u) against latest version in github. # # Supports: # - Adaptec AAC RAID via aaccli or afacli or arcconf # - AIX software RAID via lsvg # - HP/Compaq Smart Array via cciss_vol_status (hpsa supported too) # - HP Smart Array Controllers and MSA Controllers via hpacucli (see hapacucli readme) # - HP Smart Array (MSA1500) via serial line # - Linux 3ware SATA RAID via tw_cli # - Linux Device Mapper RAID via dmraid # - Linux DPT/I2O hardware RAID controllers via /proc/scsi/dpt_i2o # - Linux GDTH hardware RAID controllers via /proc/scsi/gdth # - Linux LSI MegaRaid hardware RAID via CmdTool2 # - Linux LSI MegaRaid hardware RAID via megarc # - Linux LSI MegaRaid hardware RAID via /proc/megaraid # - Linux MegaIDE hardware RAID controllers via /proc/megaide # - Linux MPT hardware RAID via mpt-status # - Linux software RAID (md) via /proc/mdstat # - LSI Logic MegaRAID SAS series via MegaCli # - LSI MegaRaid via lsraid # - Serveraid IPS via ipssend # - Solaris software RAID via metastat # - Areca SATA RAID Support via cli64/cli32 # - Detecting SCSI devices or hosts with lsscsi use warnings; use strict; { package utils; my @EXPORT = qw(which $sudo); my @EXPORT_OK = @EXPORT; # registered plugins our @plugins; # devices to ignore our @ignore; # debug level our $debug = 0; # paths for which() our @paths = split /:/, $ENV{'PATH'}; unshift(@paths, qw(/usr/local/nrpe /usr/local/bin /sbin /usr/sbin /bin /usr/sbin)); # lookup program from list of possibele filenames # search is performed from $PATH plus additional hardcoded @paths sub which { for my $prog (@_) { for my $path (@paths) { return "$path/$prog" if -x "$path/$prog"; } } return undef; } our $sudo = which('sudo'); } # package utils { package plugin; use Carp qw(croak); # Nagios standard error codes my (%ERRORS) = (OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3); # status to set when RAID is in resync state our $resync_status = $ERRORS{WARNING}; # return list of programs this plugin needs # @internal sub program_names { } # return hash of canonical commands that plugin can use # @internal sub commands { {} } # return sudo rules if program needs it # may be SCALAR or LIST of scalars # @internal sub sudo { (); } # constructor for plugins sub new { my $class = shift; croak 'Odd number of elements in argument hash' if @_ % 2; my $self = { program_names => [ $class->program_names ], commands => $class->commands, sudo => $class->sudo ? $utils::sudo : '', @_, name => $class, status => undef, message => undef, perfdata => undef, longoutput => undef, }; # lookup program, if not defined by params if (!$self->{program}) { $self->{program} = utils::which(@{$self->{program_names}}); } return bless $self, $class; } # see if plugin is active (disabled or no tools available) sub active { my $this = shift; # program not found return 0 unless $this->{program}; # program not executable -x $this->{program}; } # set status code for plugin result # does not overwrite status with lower value # returns the current status code sub status { my ($this, $status) = @_; if (defined $status) { $this->{status} = $status unless defined($this->{status}) and $status < $this->{status}; } $this->{status}; } sub set_critical_as_warning { $ERRORS{CRITICAL} = $ERRORS{WARNING}; } # helper to set status to WARNING # returns $this to allow fluent api sub warning { my ($this) = @_; $this->status($ERRORS{WARNING}); return $this; } # helper to set status to CRITICAL # returns $this to allow fluent api sub critical { my ($this) = @_; $this->status($ERRORS{CRITICAL}); return $this; } # helper to set status to UNKNOWN # returns $this to allow fluent api sub unknown { my ($this) = @_; $this->status($ERRORS{UNKNOWN}); return $this; } # helper to set status to OK sub ok { my ($this) = @_; $this->status($ERRORS{OK}); return $this; } # helper to set status for resync # returns $this to allow fluent api sub resync { my ($this) = @_; $this->status($resync_status); return $this; } # setup status message text sub message { my ($this, $message) = @_; if (defined $message) { # TODO: append if already something there $this->{message} = $message; } $this->{message}; } # Set performance data output. sub perfdata { my ($this, $perfdata) = @_; if (defined $perfdata) { # TODO: append if already something there $this->{perfdata} = $perfdata; } $this->{perfdata}; } # Set plugin long output. sub longoutput { my ($this, $longoutput) = @_; if (defined $longoutput) { # TODO: append if already something there $this->{longoutput} = $longoutput; } $this->{longoutput}; } # a helper to join similar statuses for items # instead of printing # 0: OK, 1: OK, 2: OK, 3: NOK, 4: OK # it would print # 0-2,4: OK, 3: NOK # takes as input list: # { status => @items } sub join_status { my $this = shift; my %status = %{$_[0]}; my @status; for my $status (sort {$a cmp $b} keys %status) { my $disks = $status{$status}; my @s; foreach my $disk (@$disks) { push(@s, $disk); } push(@status, join(',', @s).'='.$status); } return join ' ', @status; } # return true if parameter is not in ignore list sub valid($) { my $this = shift; my ($v) = lc $_[0]; foreach (@utils::ignore) { return 0 if lc $_ eq $v; } return 1; } use constant K => 1024; use constant M => K * 1024; use constant G => M * 1024; use constant T => G * 1024; sub format_bytes($) { my $this = shift; my ($bytes) = @_; if ($bytes > T) { return sprintf("%.2f TiB", $bytes / T); } if ($bytes > G) { return sprintf("%.2f GiB", $bytes / G); } if ($bytes > M) { return sprintf("%.2f MiB", $bytes / M); } if ($bytes > K) { return sprintf("%.2f KiB", $bytes / K); } return "$bytes B"; } # build up command for $command # returns open filehandle to process output # if command fails, program is exited (caller needs not to worry) sub cmd { my ($this, $command, $cb) = @_; # build up command my @CMD = $this->{program}; # add sudo if program needs unshift(@CMD, $this->{sudo}, '-A') if $> and $this->{sudo}; my $args = $this->{commands}{$command} or croak "command '$command' not defined"; # callback to replace args in command my $cb_ = sub { my $param = shift; if ($cb) { if (ref $cb eq 'HASH' and exists $cb->{$param}) { return wantarray ? @{$cb->{$param}} : $cb->{$param}; } return &$cb($param) if ref $cb eq 'CODE'; } if ($param eq '@CMD') { # command wanted, but not found croak "Command for $this->{name} not found" unless defined $this->{program}; return @CMD; } return $param; }; # add command arguments my @cmd; for my $arg (@$args) { local $_ = $arg; # can't do arrays with s/// # this limits that @arg must be single argument if (/@/) { push(@cmd, $cb_->($_)); } else { s/([\$]\w+)/$cb_->($1)/ge; push(@cmd, $_); } } my $op = shift @cmd; my $fh; if ($op eq '=' and ref $cb eq 'SCALAR') { # Special: use open2 use IPC::Open2; warn "DEBUG EXEC: $op @cmd" if $utils::debug; my $pid = open2($fh, $$cb, @cmd) or croak "open2 failed: @cmd: $!"; } elsif ($op eq '>&2') { # Special: same as '|-' but reads both STDERR and STDOUT use IPC::Open3; warn "DEBUG EXEC: $op @cmd" if $utils::debug; my $pid = open3(undef, $fh, $cb, @cmd); } else { warn "DEBUG EXEC: @cmd" if $utils::debug; open($fh, $op, @cmd) or croak "open failed: @cmd: $!"; } # for dir handles, reopen as opendir if (-d $fh) { undef($fh); warn "DEBUG OPENDIR: $cmd[0]" if $utils::debug; opendir($fh, $cmd[0]) or croak "opendir failed: @cmd: $!"; } return $fh; } } # package plugin package lsscsi; use base 'plugin'; push(@utils::plugins, __PACKAGE__); sub program_names { __PACKAGE__; } sub commands { { 'lsscsi list' => ['-|', '@CMD', '-g'], } } # scan lsscsi output sub scan { my $this = shift; # Scan such output: # [0:0:0:0] disk HP LOGICAL VOLUME 3.00 /dev/sda /dev/sg0 # [0:3:0:0] storage HP P410i 3.00 - /dev/sg1 # or without sg driver: # [0:0:0:0] disk HP LOGICAL VOLUME 3.00 /dev/sda - # [0:3:0:0] storage HP P410i 3.00 - - my $fh = $this->cmd('lsscsi list'); my @sdevs; while (<$fh>) { chop; if (my($hctl, $type, $vendor, $model, $rev, $devnode, $sgnode) = m{^ \[([\d:]+)\] # SCSI Controller, SCSI bus, SCSI target, and SCSI LUN \s+(\S+) # type \s+(\S+) # vendor \s+(.*?) # model, match everything as it may contain spaces \s+(\S+) # revision \s+((?:/dev/\S+|-)) # /dev node \s+((?:/dev/\S+|-)) # /dev/sg node }x) { push(@sdevs, { 'hctl' => $hctl, 'type' => $type, 'vendor' => $vendor, 'model' => $model, 'rev' => $rev, 'devnode' => $devnode, 'sgnode' => $sgnode, }); } } close $fh; return wantarray ? @sdevs : \@sdevs; } package metastat; # Solaris, software RAID use base 'plugin'; # Status: BROKEN: no test data #push(@utils::plugins, __PACKAGE__); sub program_names { __PACKAGE__; } sub commands { { 'status' => ['-|', '@CMD'], } } sub sudo { my $cmd = shift->{program}; "CHECK_RAID ALL=(root) NOPASSWD: $cmd" } sub check { my $this = shift; my ($d, $sd); # status messages pushed here my @status; my $fh = $this->cmd('status'); while (<$fh>) { if (/^(\S+):/) { $d = $1; $sd = ''; next; } if (/Submirror \d+:\s+(\S+)/) { $sd = $1; next; } if (my($s) = /State: (\S.+)/) { if ($sd and valid($sd) and valid($d)) { if ($s =~ /Okay/i) { # no worries... } elsif ($s =~ /Resync/i) { $this->resync; } else { $this->critical; } push(@status, "$d:$sd:$s"); } } } close $fh; return unless @status; $this->message(join(' ', @status)); } package megaide; # MegaIDE RAID controller use base 'plugin'; # register # Status: BROKEN: no test data #push(@utils::plugins, __PACKAGE__); sub sudo { my $cat = utils::which('cat'); "CHECK_RAID ALL=(root) NOPASSWD: $cat /proc/megaide/0/status"; } sub check { my $this = shift; my $fh; # status messages pushed here my @status; foreach my $f () { # / silly comment to fix vim syntax hilighting if (-r $f) { open $fh, '<', $f or next; =cut } else { my @CMD = ($cat, $f); unshift(@CMD, $sudo) if $> and $sudo; open($fh , '-|', @CMD) or next; =cut } while (<$fh>) { next unless (my($s, $n) = /Status\s*:\s*(\S+).*Logical Drive.*:\s*(\d+)/i); next unless $this->valid($n); if ($s ne 'ONLINE') { $this->critical; push(@status, "$n:$s"); } else { push(@status, "$n:$s"); } last; } close $fh; } return unless @status; $this->message(join(' ', @status)); } package mdstat; # Linux Multi-Device (md) use base 'plugin'; # register push(@utils::plugins, __PACKAGE__); sub commands { { 'mdstat' => ['<', '/proc/mdstat'], } } sub active ($) { my ($this) = @_; # easy way out. no /proc/mdstat return 0 unless -e $this->{commands}{mdstat}[1]; # extra check if mdstat is empty my @md = $this->parse; return $#md >= 0; } sub parse { my $this = shift; my (@md, %md); my $fh = $this->cmd('mdstat'); while (<$fh>) { chomp; # skip first line next if (/^Personalities : /); # kernel-3.0.101/drivers/md/md.c, md_seq_show # md1 : active raid1 sdb2[0] sda2[1] if (my($dev, $active, $ro, $rest) = m{^ (\S+)\s+:\s+ # mdname (\S+)\s+ # active: "inactive", "active" (\((?:auto-)?read-only\))? # readonly (.+) # personality name + disks }x) { my @parts = split /\s/, $rest; my $re = qr{^ (\S+) # devname (?:\[(\d+)\]) # desc_nr (?:\((.)\))? # flags: (W|F|S) - WriteMostly, Faulty, Spare $}x; my @disks = (); my $personality; while (my($disk) = pop @parts) { last if !$disk; if ($disk !~ $re) { $personality = $disk; last; } my($dev, $number, $flags) = $disk =~ $re; push(@disks, { 'dev' => $dev, 'number' => int($number), 'flags' => $flags || '', }); } die "Unexpected parse" if @parts; # first line resets %md %md = (dev => $dev, personality => $personality, readonly => $ro, active => $active, disks => [ @disks ]); next; } # variations: #" 8008320 blocks [2/2] [UU]" #" 58291648 blocks 64k rounding" - linear #" 5288 blocks super external:imsm" #" 20969472 blocks super 1.2 512k chunks" # # Metadata version: # This is one of # - 'none' for arrays with no metadata (good luck...) # - 'external' for arrays with externally managed metadata, # - or N.M for internally known formats # if (my($b, $mdv, $status) = m{^ \s+(\d+)\sblocks\s+ # blocks # metadata version (super\s(?: (?:\d+\.\d+) | # N.M (?:external:\S+) | (?:non-persistent) ))?\s* (.+) # mddev->pers->status (raid specific) $}x) { # linux-2.6.33/drivers/md/dm-raid1.c, device_status_char # A => Alive - No failures # D => Dead - A write failure occurred leaving mirror out-of-sync # S => Sync - A sychronization failure occurred, mirror out-of-sync # R => Read - A read failure occurred, mirror data unaffected # U => for the rest my ($s) = $status =~ /\s+\[([ADSRU_]+)\]/; $md{status} = $s || ''; $md{blocks} = int($b); $md{md_version} = $mdv; # if external try to parse dev if ($mdv) { ($md{md_external}) = $mdv =~ m{external:(\S+)}; } next; } # linux-2.6.33/drivers/md/md.c, md_seq_show if (my($action) = m{(resync=(?:PENDING|DELAYED))}) { $md{resync_status} = $action; next; } # linux-2.6.33/drivers/md/md.c, status_resync # [==>..................] resync = 13.0% (95900032/732515712) finish=175.4min speed=60459K/sec # [=>...................] check = 8.8% (34390144/390443648) finish=194.2min speed=30550K/sec if (my($action, $perc, $eta, $speed) = m{(resync|recovery|check|reshape)\s+=\s+([\d.]+%) \(\d+/\d+\) finish=([\d.]+min) speed=(\d+K/sec)}) { $md{resync_status} = "$action:$perc $speed ETA: $eta"; next; } # we need empty line denoting end of one md next unless /^\s*$/; next unless $this->valid($md{dev}); push(@md, { %md } ) if %md; } close $fh; return wantarray ? @md : \@md; } sub check { my $this = shift; my (@status); my @md = $this->parse; foreach (@md) { my %md = %$_; # common status my $size = $this->format_bytes($md{blocks} * 1024); my $personality = $md{personality} ? " $md{personality}" : ""; my $s = "$md{dev}($size$personality):"; # failed disks my @fd = map { $_->{dev} } grep { $_->{flags} =~ /F/ } @{$md{disks}}; # raid0 is just there or its not. raid0 can't degrade. # same for linear, no $md_status available if ($personality =~ /linear|raid0/) { $s .= "OK"; } elsif ($md{resync_status}) { $this->resync; $s .= "$md{status} ($md{resync_status})"; } elsif ($md{status} =~ /_/) { $this->critical; my $fd = join(',', @fd); $s .= "F:$fd:$md{status}"; } elsif (@fd > 0) { # FIXME: this is same as above? $this->warning; $s .= "hot-spare failure:". join(",", @{$md{failed_disks}}) .":$md{status}"; } else { $s .= "$md{status}"; } push(@status, $s); } return unless @status; # denote this plugin as ran ok $this->ok; $this->message(join(', ', @status)); } package lsraid; # Linux, software RAID use base 'plugin'; # register # Broken: missing test data #push(@utils::plugins, __PACKAGE__); sub program_names { __PACKAGE__; } sub commands { { 'list' => ['-|', '@CMD', '-A', '-p'], } } sub sudo { my ($this, $deep) = @_; # quick check when running check return 1 unless $deep; my $cmd = $this->{program}; "CHECK_RAID ALL=(root) NOPASSWD: $cmd -A -p" } sub check { my $this = shift; # status messages pushed here my @status; my $fh = $this->cmd('list'); while (<$fh>) { next unless (my($n, $s) = m{/dev/(\S+) \S+ (\S+)}); next unless $this->valid($n); if ($s =~ /good|online/) { # no worries } elsif ($s =~ /sync/) { $this->warning; } else { $this->critical; } push(@status, "$n:$s"); } close $fh; return unless @status; $this->message(join(', ', @status)); } package megacli; # MegaRAID SAS 8xxx controllers # based on info from here: # http://www.bxtra.net/Articles/2008-09-16/Dell-Perc6i-RAID-Monitoring-Script-using-MegaCli-LSI-CentOS-52-64-bits # TODO: http://www.techno-obscura.com/~delgado/code/check_megaraid_sas # TODO: process several adapters # TODO: process drive temperatures # TODO: check error counts # TODO: hostspare information use base 'plugin'; # register push(@utils::plugins, __PACKAGE__); sub program_names { qw(MegaCli64 MegaCli megacli); } sub commands { { 'pdlist' => ['-|', '@CMD', '-PDList', '-aALL', '-NoLog'], 'ldinfo' => ['-|', '@CMD', '-LdInfo', '-Lall', '-aALL', '-NoLog'], 'battery' => ['-|', '@CMD', '-AdpBbuCmd', '-GetBbuStatus', '-aALL', '-NoLog'], } } # TODO: process from COMMANDS sub sudo { my ($this, $deep) = @_; # quick check when running check return 1 unless $deep; my $cmd = $this->{program}; ( "CHECK_RAID ALL=(root) NOPASSWD: $cmd -PDList -aALL -NoLog", "CHECK_RAID ALL=(root) NOPASSWD: $cmd -LdInfo -Lall -aALL -NoLog", "CHECK_RAID ALL=(root) NOPASSWD: $cmd -AdpBbuCmd -GetBbuStatus -aALL -NoLog", ); } sub check { my $this = shift; my $fh = $this->cmd('pdlist'); my (@status, @pdata, @longout, @devs, @vols, @bats, %cur, $rc); $rc = -1; while (<$fh>) { if (my($s) = /Device Id: (\S+)/) { push(@devs, { %cur }) if %cur; %cur = ( dev => $s, state => undef, name => undef ); next; } if (my($s) = /Firmware state: (.+)/) { # strip the extra state: # 'Hotspare, Spun Up' # 'Hotspare, Spun down' # 'Online, Spun Up' # 'Online, Spun Up' # 'Online, Spun down' # 'Unconfigured(bad)' # 'Unconfigured(good), Spun Up' # 'Unconfigured(good), Spun down' $s =~ s/,.+//; $cur{state} = $s; next; } if (my($s) = /Inquiry Data: (.+)/) { # trim some spaces $s =~ s/\s+/ /g; $s =~ s/^\s+|\s+$//g; $cur{name} = $s; next; } if (my($s) = /Exit Code: (\d+x\d+)/) { $rc = hex($s); } } unless (close $fh) { $this->critical; } $this->critical if $rc; push(@devs, { %cur }) if %cur; my %cur_vol; $fh = $this->cmd('ldinfo'); $rc = -1; while (<$fh>) { if (my($drive_id, $target_id) = /Virtual (?:Disk|Drive)\s*:\s*(\d+)\s*\(Target Id:\s*(\d+)\)/i) { push(@vols, { %cur_vol }) if %cur_vol; # Default to DriveID:TragetID in case no Name is given ... %cur_vol = ( name => "DISK$drive_id.$target_id", state => undef ); next; } if (my($name) = /Name\s*:\s*(\S+)/) { # Add a symbolic name, if given $cur_vol{name} = $name; next; } if (my($s) = /State\s*:\s*(\S+)/) { $cur_vol{state} = $s; next; } if (my($s) = /Exit Code: (\d+x\d+)/) { $rc = hex($s); } } unless (close $fh) { $this->critical; } $this->critical if $rc; push(@vols, { %cur_vol }) if %cur_vol; # check battery $fh = $this->cmd('battery'); my (%cur_bat); while (<$fh>) { if (my($s) = /BBU status for Adapter: (.+)/) { push(@bats, { %cur_bat }) if %cur_bat; %cur_bat = ( name => $s, state => '???', missing => undef, learn_requested => undef, replacement_required => undef, pack_will_fail => undef, temperature => undef, temperature_state => undef, voltage => undef, voltage_state => undef ); next; } if (my($s) = /Battery State\s*: (.+)/) { $cur_bat{state} = $s; next; } if (my($s) = /Battery Pack Missing\s*: (\w*)/) { $cur_bat{missing} = $s; next; } if (my($s) = /Battery Replacement required\s*: (\w*)/) { $cur_bat{replacement_required} = $s; next; } if (my($s) = /Pack is about to fail & should be replaced\s*: (\w*)/) { $cur_bat{pack_will_fail} = $s; next; } # Temperature: 18 C if (my($s) = /Temperature: (\d+) C/) { $cur_bat{temperature} = $s; next; } # Temperature : OK if (my($s) = / Temperature\s*: (\w*)/) { $cur_bat{temperature_state} = $s; next; } # Voltage: 4074 mV if (my($s) = /Voltage: (\d+) mV/) { $cur_bat{voltage} = $s; next; } # Voltage : OK if (my($s) = /Voltage\s*: (\w*)/) { $cur_bat{voltage_state} = $s; next; } } close $fh; push(@bats, { %cur_bat}) if %cur_bat; my @vstatus; foreach my $vol (@vols) { push(@vstatus, sprintf "%s:%s", $vol->{name}, $vol->{state}); if ($vol->{state} ne 'Optimal') { $this->critical; } } my %dstatus; foreach my $dev (@devs) { if ($dev->{state} eq 'Online' || $dev->{state} eq 'Hotspare' || $dev->{state} eq 'Unconfigured(good)') { push(@{$dstatus{$dev->{state}}}, sprintf "%02d", $dev->{dev}); } else { $this->critical; # TODO: process other statuses push(@{$dstatus{$dev->{state}}}, sprintf "%02d (%s)", $dev->{dev}, $dev->{name}); } } my (%bstatus, @bpdata, @blongout); foreach my $bat (@bats) { if ($bat->{state} !~ /Operational|Optimal/) { $this->critical; } if ($bat->{missing} ne 'No') { $this->critical; } if ($bat->{replacement_required} ne 'No') { $this->critical; } if (defined($bat->{pack_will_fail}) && $bat->{pack_will_fail} ne 'No') { $this->critical; } if ($bat->{temperature_state} ne 'OK') { $this->critical; } if ($bat->{voltage_state} ne 'OK') { $this->critical; } # Short output. # # CRITICAL: megacli:[Volumes(1): NoName:Optimal; Devices(2): 06,07=Online; Batteries(1): 0=Non Operational] push(@{$bstatus{$bat->{state}}}, sprintf "%d", $bat->{name}); # Performance data. # Return current battery temparature & voltage. # # Battery0=18;4074 push(@bpdata, sprintf "Battery%s=%s;%s", $bat->{name}, $bat->{temperature}, $bat->{voltage}); # Long output. # Detailed plugin output. # # Battery0: # - State: Non Operational # - Missing: No # - Replacement required: Yes # - About to fail: No # - Temperature: OK (18 °C) # - Voltage: OK (4015 mV) push(@blongout, join("\n", grep {/./} "Battery$bat->{name}:", " - State: $bat->{state}", " - Missing: $bat->{missing}", " - Replacement required: $bat->{replacement_required}", defined($bat->{pack_will_fail}) ? " - About to fail: $bat->{pack_will_fail}" : "", " - Temperature: $bat->{temperature_state} ($bat->{temperature} C)", " - Voltage: $bat->{voltage_state} ($bat->{voltage} mV)", )); } push(@status, 'Volumes(' . ($#vols + 1) . '): ' . join(',', @vstatus) . '; Devices(' . ($#devs + 1) . '): ' . $this->join_status(\%dstatus) . (@bats ? '; Batteries(' . ($#bats + 1) . '): ' . $this->join_status(\%bstatus) : '') ); push(@pdata, join('\n', @bpdata) ); push(@longout, join('\n', @blongout) ); return unless @status; # denote this plugin as ran ok $this->ok; $this->message(join(' ', @status)); $this->perfdata(join(' ', @pdata)); $this->longoutput(join(' ', @longout)); } package lsvg; # AIX LVM use base 'plugin'; # register # Status: broken (no test data) #push(@utils::plugins, __PACKAGE__); sub program_names { __PACKAGE__; } sub commands { { 'lsvg' => ['-|', '@CMD'], 'lsvg list' => ['-|', '@CMD', '-l', '$vg'], } } sub sudo { my ($this, $deep) = @_; # quick check when running check return 1 unless $deep; my $cmd = $this->{program}; ( "CHECK_RAID ALL=(root) NOPASSWD: $cmd", "CHECK_RAID ALL=(root) NOPASSWD: $cmd -l *", ) } sub check { my $this = shift; # status messages pushed here my @status; my @vg; my $fh = $this->cmd('lsvg'); while (<$fh>) { chomp; push @vg, $_; } close $fh; foreach my $vg (@vg) { next unless $this->valid($vg); # skip entire VG my $fh = $this->cmd('lsvg list', { '$vg' => $vg }); while (<$fh>) { my @f = split /\s/; my ($n, $s) = ($f[0], $f[5]); next if (!$this->valid($n) or !$s); next if ($f[3] eq $f[2]); # not a mirrored LV if ($s =~ m#open/(\S+)#i) { $s = $1; if ($s ne 'syncd') { $this->critical; } push(@status, "lvm:$n:$s"); } } close $fh; } return unless @status; $this->message(join(', ', @status)); } package ips; # Serveraid IPS # Tested on IBM xSeries 346 servers with Adaptec ServeRAID 7k controllers. # The ipssend version was v7.12.14. use base 'plugin'; # register push(@utils::plugins, __PACKAGE__); sub program_names { qw(ipssend); } sub commands { { 'list logical drive' => ['-|', '@CMD', 'GETCONFIG', '1', 'LD'], } } sub sudo { my ($this, $deep) = @_; # quick check when running check return 1 unless $deep; my $cmd = $this->{program}; "CHECK_RAID ALL=(root) NOPASSWD: $cmd getconfig 1 LD" } sub check { my $this = shift; # status messages pushed here my @status; my $n; my $fh = $this->cmd('list logical drive'); while (<$fh>) { if (/drive number (\d+)/i){ $n = $1; next; } next unless $n; next unless $this->valid($n); next unless (my($s, $c) = /Status .*: (\S+)\s+(\S+)/); if ($c =~ /SYN|RBL/i ) { # resynching $this->resync; } elsif ($c !~ /OKY/i) { # not OK $this->critical; } push(@status, "$n:$s"); } close $fh; return unless @status; $this->ok->message(join(', ', @status)); } package aaccli; # Adaptec ServeRAID use base 'plugin'; # register push(@utils::plugins, __PACKAGE__); sub program_names { __PACKAGE__; } sub commands { { 'container list' => ['=', '@CMD'], } } sub sudo { my ($this, $deep) = @_; # quick check when running check return 1 unless $deep; my $cmd = $this->{program}; "CHECK_RAID ALL=(root) NOPASSWD: $cmd container list /full" } sub check { my $this = shift; # status messages pushed here my @status; my $write = ""; $write .= "open aac0\n"; $write .= "container list /full\n"; $write .= "exit\n"; my $read = $this->cmd('container list', \$write); #File foo receiving all output. # #AAC0> #COMMAND: container list /full=TRUE #Executing: container list /full=TRUE #Num Total Oth Stripe Scsi Partition Creation #Label Type Size Ctr Size Usage C:ID:L Offset:Size State RO Lk Task Done% Ent Date Time #----- ------ ------ --- ------ ------- ------ ------------- ------- -- -- ------- ------ --- ------ -------- # 0 Mirror 74.5GB Open 0:02:0 64.0KB:74.5GB Normal 0 051006 13:48:54 # /dev/sda Auth 0:03:0 64.0KB:74.5GB Normal 1 051006 13:48:54 # # #AAC0> #COMMAND: logfile end #Executing: logfile end while (<$read>) { if (my($dsk, $stat) = /(\d:\d\d?:\d+)\s+\S+:\S+\s+(\S+)/) { next unless $this->valid($dsk); $dsk =~ s#:#/#g; next unless $this->valid($dsk); push(@status, "$dsk:$stat"); $this->critical if ($stat eq "Broken"); $this->warning if ($stat eq "Rebuild"); $this->warning if ($stat eq "Bld/Vfy"); $this->critical if ($stat eq "Missing"); if ($stat eq "Verify") { $this->resync; } $this->warning if ($stat eq "VfyRepl"); } } close $read; return unless @status; $this->message(join(', ', @status)); } package afacli; # Adaptec AACRAID use base 'plugin'; # register push(@utils::plugins, __PACKAGE__); sub program_names { __PACKAGE__; } sub commands { { 'container list' => ['=', '@CMD'], } } sub check { my $this = shift; # status messages pushed here my @status; my $write = ""; $write .= "open afa0\n"; $write .= "container list /full\n"; $write .= "exit\n"; my $read = $this->cmd('container list', \$write); while (<$read>) { # 0 Mirror 465GB Valid 0:00:0 64.0KB: 465GB Normal 0 032511 17:55:06 # /dev/sda root 0:01:0 64.0KB: 465GB Normal 1 032511 17:55:06 if (my($dsk, $stat) = /(\d:\d\d?:\d+)\s+\S+:\s?\S+\s+(\S+)/) { next unless $this->valid($dsk); $dsk =~ s#:#/#g; next unless $this->valid($dsk); push(@status, "$dsk:$stat"); $this->critical if ($stat eq "Broken"); $this->warning if ($stat eq "Rebuild"); $this->warning if ($stat eq "Bld/Vfy"); $this->critical if ($stat eq "Missing"); if ($stat eq "Verify") { $this->resync; } $this->warning if ($stat eq "VfyRepl"); } } close $read; return unless @status; $this->ok->message(join(', ', @status)); } package mpt; use base 'plugin'; # LSILogic MPT ServeRAID # register push(@utils::plugins, __PACKAGE__); sub program_names { qw(mpt-status); } sub commands { { 'status' => ['-|', '@CMD'], 'sync status' => ['-|', '@CMD', '-n'], } } sub sudo { my ($this, $deep) = @_; # quick check when running check return 1 unless $deep; my $cmd = $this->{program}; ( "CHECK_RAID ALL=(root) NOPASSWD: $cmd", "CHECK_RAID ALL=(root) NOPASSWD: $cmd -n", ); } sub parse { my $this = shift; my (%ld, %pd); my $fh = $this->cmd('status'); my %VolumeTypesHuman = ( IS => 'RAID-0', IME => 'RAID-1E', IM => 'RAID-1', ); while (<$fh>) { chomp; # mpt-status.c __print_volume_classic # ioc0 vol_id 0 type IM, 2 phy, 136 GB, state OPTIMAL, flags ENABLED if (my($vioc, $vol_id, $type, $disks, $vol_size, $vol_state, $vol_flags) = /^ioc(\d+)\s+ vol_id\s(\d+)\s type\s(\S+),\s (\d+)\sphy,\s (\d+)\sGB,\s state\s(\S+),\s flags\s(.+)/x) { $ld{$vol_id} = { ioc => int($vioc), vol_id => int($vol_id), # one of: IS, IME, IM vol_type => $type, raid_level => $VolumeTypesHuman{$type}, phy_disks => int($disks), size => int($vol_size), # one of: OPTIMAL, DEGRADED, FAILED, UNKNOWN status => $vol_state, # array of: ENABLED, QUIESCED, RESYNC_IN_PROGRESS, VOLUME_INACTIVE or NONE flags => [ split ' ', $vol_flags ], }; } # ./include/lsi/mpi_cnfg.h # typedef struct _RAID_PHYS_DISK_INQUIRY_DATA # { # U8 VendorID[8]; /* 00h */ # U8 ProductID[16]; /* 08h */ # U8 ProductRevLevel[4]; /* 18h */ # U8 Info[32]; /* 1Ch */ # } # mpt-status.c __print_physdisk_classic # ioc0 phy 0 scsi_id 0 IBM-ESXS PYH146C3-ETS10FN RXQN, 136 GB, state ONLINE, flags NONE # ioc0 phy 0 scsi_id 1 ATA ST3808110AS J , 74 GB, state ONLINE, flags NONE # ioc0 phy 0 scsi_id 1 ATA Hitachi HUA72101 AJ0A, 931 GB, state ONLINE, flags NONE elsif (my($pioc, $num, $phy_id, $vendor, $prod_id, $rev, $size, $state, $flags) = /^ioc(\d+)\s+ phy\s(\d+)\s scsi_id\s(\d+)\s (.{8})\s+(.{16})\s+(.{4})\s*,\s (\d+)\sGB,\s state\s(\S+),\s flags\s(.+)/x) { $pd{$num} = { ioc => int($pioc), num => int($num), phy_id => int($phy_id), vendor => $vendor, prod_id => $prod_id, rev => $rev, size => int($size), # one of: ONLINE, MISSING, NOT_COMPATIBLE, FAILED, INITIALIZING, OFFLINE_REQUESTED, FAILED_REQUESTED, OTHER_OFFLINE, UNKNOWN status => $state, # array of: OUT_OF_SYNC, QUIESCED or NONE flags => [ split ' ', $flags ], }; } else { warn "mpt unparsed: [$_]\n"; $this->unknown; } } close $fh; # extra parse, if mpt-status has -n flag, can process also resync state # TODO: if -n becames default can do this all in one run my $resyncing = grep {/RESYNC_IN_PROGRESS/} map { @{$_->{flags}} } values %ld; if ($resyncing) { my $fh = $this->cmd('sync status'); while (<$fh>) { if (/^ioc:\d+/) { # ignore } # mpt-status.c GetResyncPercentage # scsi_id:0 70% elsif (my($scsi_id, $percent) = /^scsi_id:(\d)+ (\d+)%/) { $pd{$scsi_id}{resync} = int($percent); } else { warn "mpt: [$_]\n"; $this->unknown; } } close $fh; } return { 'logical' => { %ld }, 'physical' => { %pd }, }; } sub check { my $this = shift; # status messages pushed here my @status; my $status = $this->parse; # process logical units while (my($d, $u) = each %{$status->{logical}}) { next unless $this->valid($d); my $s = $u->{status}; if ($s =~ /INITIAL|INACTIVE/) { $this->warning; } elsif ($s =~ /RESYNC/) { $this->resync; } elsif ($s =~ /DEGRADED|FAILED/) { $this->critical; } elsif ($s !~ /ONLINE|OPTIMAL/) { $this->unknown; } # FIXME: this resync_in_progress is separate state of same as value in status? if (grep { /RESYNC_IN_PROGRESS/ } @{$u->{flags}}) { # find matching disks my @disks = grep {$_->{ioc} eq $u->{ioc} } values %{$status->{physical}}; # collect percent for each disk my @percent = map { $_->{resync}.'%'} @disks; $s .= ' RESYNCING: '.join('/', @percent); } push(@status, "Volume $d ($u->{raid_level}, $u->{phy_disks} disks, $u->{size} GiB): $s"); } # process physical units while (my($d, $u) = each %{$status->{physical}}) { my $s = $u->{status}; # remove uninteresting flags my @flags = grep {!/NONE/} @{$u->{flags}}; # skip print if nothing in flags and disk is ONLINE next unless @flags and $s eq 'ONLINE'; $s .= ' ' . join(' ', @flags); push(@status, "Disk $d ($u->{size} GiB):$s"); $this->critical; } return unless @status; $this->ok->message(join(', ', @status)); } package megaraid; # MegaRAID use base 'plugin'; # register # Status: BROKEN: no test data #push(@utils::plugins, __PACKAGE__); sub sudo { my $cat = utils::which('cat'); my @sudo; foreach my $mr () { push(@sudo, "CHECK_RAID ALL=(root) NOPASSWD: $cat $mr") if -d $mr; } @sudo; } sub check { my $this = shift; # status messages pushed here my @status; foreach my $f () { # vim/ my $fh; if (-r $f) { open $fh, '<', $f or next; =cut } else { my @CMD = ($cat, $f); unshift(@CMD, $sudo) if $> and $sudo; open($fh , '-|', @CMD) or next; =cut } my ($n) = $f =~ m{/proc/megaraid/([^/]+)}; while (<$fh>) { if (my($s) = /logical drive\s*:\s*\d+.*, state\s*:\s*(\S+)/i) { if ($s ne 'optimal') { $this->critical; } push(@status, "$n: $s"); last; } } close $fh; } return unless @status; $this->message(join(', ', @status)); } package gdth; # Linux gdth RAID use base 'plugin'; # register push(@utils::plugins, __PACKAGE__); sub commands { { 'proc' => ['<', '/proc/scsi/gdth'], 'proc entry' => ['<', '/proc/scsi/gdth/$controller'], } } sub active ($) { my ($this) = @_; return -d $this->{commands}{proc}[1]; } sub parse { my $this = shift; my $fh = $this->cmd('proc'); my @c = grep { !/^\./ } readdir($fh); close($fh); my %c; for my $c (@c) { my (%ld, %ad, %pd, %l, %a, %p, $section); my $fh = $this->cmd('proc entry', { '$controller' => $c }); while (<$fh>) { chomp; # new section start if (my($s) = /^(\w.+):$/) { $section = $s; %a = %l = %p = (); next; } # skip unknown sections next unless /^\s/ or /^$/; # process each section if ($section eq 'Driver Parameters') { # nothing useful } elsif ($section eq 'Disk Array Controller Information') { # nothing useful } elsif ($section eq 'Physical Devices') { # Chn/ID/LUN: B/05/0 Name: FUJITSU MAX3147NC 0104 # Capacity [MB]: 140239 To Log. Drive: 5 # Retries: 1 Reassigns: 0 # Grown Defects: 1 if (my($id, $n, $rv) = m{^\s+Chn/ID/LUN:\s+(\S+)\s+Name:\s+(.+)(.{4})$}) { $n =~ s/\s+$//; $p{id} = $id; $p{name} = $n; $p{revision} = $rv; } elsif (my($unit, $c, $d) = m/^\s+Capacity\s\[(.B)\]:\s+(\d+)\s+To Log\. Drive:\s+(\d+|--)/) { $p{capacity} = int($c); $p{capacity_unit} = $unit; $p{drive} = $d; } elsif (my($r, $ra) = m/^\s+Retries:\s+(\d+)\s+Reassigns:\s+(\d+)/) { $p{retries} = int($r); $p{reassigns} = int($ra); } elsif (my($gd) = m/^\s+Grown Defects:\s+(\d+)/) { $p{defects} = int($gd); } elsif (/^$/) { if ($p{capacity} == 0 and $p{name} =~ /SCA HSBP/) { # HSBP is not a disk, so do not consider this an error # http://support.gateway.com/s/Servers/COMPO/MOTHERBD/4000832/4000832si69.shtml # Raid Hot Swap Backplane driver (recognized as "ESG-SHV SCA HSBP M16 SCSI Processor Device") # Chn/ID/LUN: B/06/0 Name: ESG-SHV SCA HSBP M16 0.05 # Capacity [MB]: 0 To Log. Drive: -- next; } $pd{$p{id}} = { %p }; } else { warn "[$section] [$_]\n"; $this->unknown; } } elsif ($section eq 'Logical Drives') { # Number: 3 Status: ok # Slave Number: 15 Status: ok (older kernels) # Capacity [MB]: 69974 Type: Disk if (my($num, $s) = m/^\s+(?:Slave )?Number:\s+(\d+)\s+Status:\s+(\S+)/) { $l{number} = int($num); $l{status} = $s; } elsif (my($unit, $c, $t) = m/^\s+Capacity\s\[(.B)\]:\s+(\d+)\s+Type:\s+(\S+)/) { $l{capacity} = "$c $unit"; $l{type} = $t; } elsif (my($md, $id) = m/^\s+Missing Drv\.:\s+(\d+)\s+Invalid Drv\.:\s+(\d+|--)/) { $l{missing} = int($md); $l{invalid} = int($id); } elsif (my($n) = m/^\s+To Array Drv\.:\s+(\d+|--)/) { $l{array} = $n; } elsif (/^$/) { $ld{$l{number}} = { %l }; } else { warn "[$section] [$_]\n"; $this->unknown; } } elsif ($section eq 'Array Drives') { # Number: 0 Status: fail # Capacity [MB]: 349872 Type: RAID-5 if (my($num, $s) = m/^\s+Number:\s+(\d+)\s+Status:\s+(\S+)/) { $a{number} = int($num); $a{status} = $s; } elsif (my($unit, $c, $t) = m/^\s+Capacity\s\[(.B)\]:\s+(\d+)\s+Type:\s+(\S+)/) { $a{capacity} = "$c $unit"; $a{type} = $t; } elsif (/^(?: --)?$/) { if (%a) { $ad{$a{number}} = { %a }; } } else { warn "[$section] [$_]\n"; $this->unknown; } } elsif ($section eq 'Host Drives') { # nothing useful } elsif ($section eq 'Controller Events') { # nothing useful } } close($fh); $c{$c} = { id => $c, array => { %ad }, logical => { %ld }, physical => { %pd } }; } return \%c; } sub check { my $this = shift; # status messages pushed here my @status; my $controllers = $this->parse; # process each controller separately for my $c (values %$controllers) { # array status my @ad; for my $n (sort {$a cmp $b} keys %{$c->{array}}) { my $ad = $c->{array}->{$n}; if ($ad->{status} ne "ready") { $this->critical; } push(@ad, "Array $ad->{number}($ad->{type}) $ad->{status}"); } # older raids have no Array drives, Look into Logical Drives for type!=Disk unless (@ad) { for my $n (sort {$a cmp $b} keys %{$c->{logical}}) { my $ld = $c->{logical}->{$n}; if ($ld->{type} eq "Disk") { next; } # emulate Array Drive my $s = "Array($ld->{type}) $ld->{status}"; # check for missing drives if ($ld->{missing} > 0) { $this->warning; $s .= " ($ld->{missing} missing drives)"; } push(@ad, $s); } } # logical drive status my %ld; for my $n (sort {$a cmp $b} keys %{$c->{logical}}) { my $ld = $c->{logical}->{$n}; if ($ld->{status} ne "ok") { $this->critical; } push(@{$ld{$ld->{status}}}, $ld->{number}); } # physical drive status my @pd; for my $n (sort {$a cmp $b} keys %{$c->{physical}}) { my $pd = $c->{physical}->{$n}; my @ds; # TODO: make tresholds configurable if ($pd->{defects} > 300) { $this->critical; push(@ds, "grown defects critical: $pd->{defects}"); } elsif ($pd->{defects} > 30) { $this->warning; push(@ds, "grown defects warning: $pd->{defects}"); } # report disk being not assigned if ($pd->{drive} eq '--') { push(@ds, "not assigned"); } if (@ds) { push(@pd, "Disk $pd->{id}($pd->{name}) ". join(', ', @ds)); } } my @cd; push(@cd, @ad) if @ad; push(@cd, "Logical Drives: ". $this->join_status(\%ld)); push(@cd, @pd) if @pd; push(@status, "Controller $c->{id}: ". join('; ', @cd)); } return unless @status; # denote this plugin as ran ok $this->ok; $this->message(join('; ', @status)); } package dpt_i2o; use base 'plugin'; # register push(@utils::plugins, __PACKAGE__); sub commands { { 'proc' => ['<', '/proc/scsi/dpt_i2o'], 'proc entry' => ['<', '/proc/scsi/dpt_i2o/$controller'], } } sub active ($) { my ($this) = @_; return -d $this->{commands}{proc}[1]; } sub check { my $this = shift; # status messages pushed here my @status; my $fh = $this->cmd('proc'); my @c = grep { !/^\./ } readdir($fh); close($fh); # TODO: check for failed disks! for my $c (@c) { my $fh = $this->cmd('proc entry', { '$controller' => $c }); while (<$fh>) { if (my ($c, $t, $l, $s) = m/TID=\d+,\s+\(Channel=(\d+),\s+Target=(\d+),\s+Lun=(\d+)\)\s+\((\S+)\)/) { if ($s ne "online") { $this->critical; } push(@status, "$c,$t,$l:$s"); } } close($fh); } return unless @status; # denote this plugin as ran ok $this->ok; $this->message(join(', ', @status)); } package tw_cli; # TODO: rename to 3ware? # 3ware SATA RAID # check designed from check_3ware.sh by: # Sander Klein # http://www.pictura-dp.nl/ # Version 20070706 use base 'plugin'; # register push(@utils::plugins, __PACKAGE__); sub program_names { qw(tw_cli-9xxx tw_cli tw-cli); } sub commands { { 'info' => ['-|', '@CMD', 'info'], 'unitstatus' => ['-|', '@CMD', 'info', '$controller', 'unitstatus'], 'drivestatus' => ['-|', '@CMD', 'info', '$controller', 'drivestatus'], } } sub sudo { my ($this, $deep) = @_; # quick check when running check return 1 unless $deep; my $cmd = $this->{program}; "CHECK_RAID ALL=(root) NOPASSWD: $cmd info*"; } sub check { my $this = shift; # status messages pushed here my @status; my (@c); # scan controllers my $fh = $this->cmd('info'); while (<$fh>) { if (my($c, $model) = /^(c\d+)\s+(\S+)/) { push(@c, [$c, $model]); } } close $fh; unless (@c) { $this->warning; $this->message("No Adapters were found on this machine"); return; } for my $i (@c) { my ($c, $model) = @$i; # check each unit on controllers $fh = $this->cmd('unitstatus', { '$controller' => $c }); my @cstatus; while (<$fh>) { next unless (my($u, $s, $p, $p2) = /^(u\d+)\s+\S+\s+(\S+)\s+(\S+)\s+(\S+)/); if ($s eq 'OK') { push(@cstatus, "$u:$s"); } elsif ($s =~ 'INITIALIZING|MIGRATING') { $this->warning; push(@cstatus, "$u:$s $p2"); } elsif ($s eq 'VERIFYING') { $this->resync; push(@cstatus, "$u:$s $p2"); } elsif ($s eq 'REBUILDING') { $this->warning; push(@cstatus, "$u:$s $p"); } elsif ($s eq 'DEGRADED') { $this->critical; push(@cstatus, "$u:$s"); } else { push(@cstatus, "$u:$_"); $this->unknown; } push(@status, "$c($model): ". join(',', @cstatus)); } close $fh; # check individual disk status $fh = $this->cmd('drivestatus', { '$controller' => $c }); my (@p, @ds); while (<$fh>) { next unless (my($p, $s,) = /^(p\d+)\s+(\S+)\s+.+\s+.+\s+.+/); push(@ds, "$p:$s"); foreach (@ds) { $this->critical unless (/p\d+:(OK|NOT-PRESENT)/); } } push(@status, "(disks: ".join(' ', @ds). ")"); close $fh; } return unless @status; $this->ok->message(join(', ', @status)); } package arcconf; # Adaptec AAC-RAID # check designed from check-aacraid.py, Anchor System - # Oliver Hookins, Paul De Audney, Barney Desmond. # Perl port (check_raid) by Elan Ruusamäe. use base 'plugin'; # register push(@utils::plugins, __PACKAGE__); sub program_names { __PACKAGE__; } sub commands { { 'getstatus' => ['-|', '@CMD', 'GETSTATUS', '1'], 'getconfig' => ['-|', '@CMD', 'GETCONFIG', '1', 'AL'], } } sub sudo { my ($this, $deep) = @_; # quick check when running check return 1 unless $deep; my $cmd = $this->{program}; ( "CHECK_RAID ALL=(root) NOPASSWD: $cmd GETSTATUS 1", "CHECK_RAID ALL=(root) NOPASSWD: $cmd GETCONFIG 1 AL", ); } sub parse_error { my ($this, $message) = @_; $this->unknown->message("Parse Error: $message"); } # parse GETSTATUS command # parses # - number of controllers # - logical device tasks (if any running) sub parse_status { my ($this) = @_; my $count = 0; my $ok = 0; my $fh = $this->cmd('getstatus'); my %s; # controller task my %task; while (<$fh>) { chomp; # empty line next if /^$/; # termination if (/^Command completed successfully/) { $ok = 1; last; } if (my($c) = /^Controllers found: (\d+)/) { $count = int($c); next; } # termination if (/^(\S.+) Task:$/) { $task{type} = $1; next; } if (/^\s+Logical device\s+: (\d+)/) { $task{device} = $1; } elsif (/^\s+Task ID\s+: (\d+)/) { $task{id} = $1; } elsif (/^\s+Current operation\s+: (.+)/) { $task{operation} = $1; } elsif (/^\s+Status\s+: (.+)/) { $task{status} = $1; } elsif (/^\s+Priority\s+: (.+)/) { $task{priority} = $1; } elsif (/^\s+Percentage complete\s+: (\d+)/) { $task{percent} = $1; } else { warn "Unknown line: [$_]"; # FIXME: ->message() gets overwritten later on $this->unknown->message("Unknown line: [$_]"); } } close($fh); # Tasks seem to be Controller specific, but as we don't support over one controller, let it be global $s{tasks} = { %task } if %task; if ($count > 1) { # don't know how to handle this, so better just fail $this->unknown->message("More than one Controller found, this is not yet supported due lack of input data."); return undef; } if ($count == 0) { # if command completed, but no controllers, # assume no hardware present if (!$ok) { $this->unknown->message("No controllers found!"); } return undef; } $s{controllers} = $count; return \%s; } # parse GETCONFIG command # parses # - ... sub parse_config { my ($this, $status) = @_; # Controller information, Logical/Physical device info my (%c, @ld, $ld, @pd, $pd); my $fh = $this->cmd('getconfig'); my ($section, $subsection, $ok); while (<$fh>) { chomp; # empty line if (/^$/) { next; } if (/^Command completed successfully/) { $ok = 1; last; } if (my($c) = /^Controllers found: (\d+)/) { if ($c != $status->{controllers}) { # internal error?! $this->unknown->message("Controller count mismatch"); } next; } # section start if (/^---+/) { if (my($s) = <$fh> =~ /^(\w.+)$/) { $section = $s; unless (<$fh> =~ /^---+/) { $this->parse_error($_); } undef($ld); undef($pd); undef($subsection); next; } $this->parse_error($_); } # sub section start # there are also sections in subsections, but currently section names # are unique enough if (/^\s+---+/) { if (my($s) = <$fh> =~ /^\s+(\S.+?)\s*?$/) { $subsection = $s; unless (<$fh> =~ /^\s+---+/) { $this->parse_error($_); } next; } $this->parse_error($_); } next unless defined $section; if ($section eq 'Controller information') { if (not defined $subsection) { # TODO: battery stuff is under subsection "Controller Battery Information" if (my($s) = /Controller Status\s*:\s*(.+)/) { $c{status} = $s; } elsif (my($df) = /Defunct disk drive count\s+:\s*(\d+)/) { $c{defunct_count} = int($df); } elsif (my($td, $fd, $dd) = m{Logical devices/Failed/Degraded\s*:\s*(\d+)/(\d+)/(\d+)}) { $c{logical_count} = int($td); $c{logical_failed} = int($fd); $c{logical_degraded} = int($fd); } elsif (my($td2, $fd2, $dd2) = m{Logical drives/Offline/Critical\s*:\s*(\d+)/(\d+)/(\d+)}) { # ARCCONF 9.30 $c{logical_count} = int($td2); $c{logical_offline} = int($fd2); $c{logical_critical} = int($fd2); } } elsif ($subsection eq 'Controller Battery Information') { if (my($bs) = /^\s+Status\s*:\s*(.*)$/) { $c{battery_status} = $bs; } elsif (my($bt) = /Over temperature\s*:\s*(.+)$/) { $c{battery_overtemp} = $bt; } elsif (my($bc) = /Capacity remaining\s*:\s*(\d+)\s*percent.*$/) { $c{battery_capacity} = int($bc); } elsif (my($d, $h, $m) = /Time remaining \(at current draw\)\s*:\s*(\d+) days, (\d+) hours, (\d+) minutes/) { $c{battery_time} = int($d) * 1440 + int($h) * 60 + int($m); $c{battery_time_full} = "${d}d${h}h${m}m"; } else { warn "Battery not parsed: [$_]\n"; } } elsif ($subsection eq 'Controller ZMM Information') { if (my($bs) = /^\s+Status\s*:\s*(.*)$/) { $c{zmm_status} = $bs; } else { warn "ZMM not parsed: [$_]\n"; } } elsif ($subsection eq 'Controller Version Information') { # not parsed yet } elsif ($subsection eq 'Controller Vital Product Data') { # not parsed yet } elsif ($subsection eq 'Controller Cache Backup Unit Information') { # not parsed yet } elsif ($subsection eq 'Supercap Information') { # this is actually sub section of cache backup unit # not parsed yet } elsif ($subsection eq 'Controller Vital Product Data') { # not parsed yet } else { warn "SUBSECTION of [$section] NOT PARSED: [$subsection] [$_]\n"; } } elsif ($section eq 'Physical Device information') { if (my($n) = /Device #(\d+)/) { $pd = int($n); } elsif (my($ps) = /Power State\s+:\s+(.+)/) { $pd[$pd]{power_state} = $ps; } elsif (my($st) = /^\s+State\s+:\s+(.+)/) { $pd[$pd]{status} = $st; } elsif (my($su) = /Supported\s+:\s+(.+)/) { $pd[$pd]{supported} = $su; } elsif (my($vnd) = /Vendor\s+:\s*(.*)/) { # allow edits, i.e removed 'Vendor' value from test data $pd[$pd]{vendor} = $vnd; } elsif (my($mod) = /Model\s+:\s+(.+)/) { $pd[$pd]{model} = $mod; } elsif (my($fw) = /Firmware\s+:\s+(.+)/) { $pd[$pd]{firmware} = $fw; } elsif (my($sn) = /Serial number\s+:\s+(.+)/) { $pd[$pd]{serial} = $sn; } elsif (my($wwn) = /World-wide name\s+:\s+(.+)/) { $pd[$pd]{wwn} = $wwn; } elsif (my($sz) = /Size\s+:\s+(.+)/) { $pd[$pd]{size} = $sz; } elsif (my($wc) = /Write Cache\s+:\s+(.+)/) { $pd[$pd]{write_cache} = $wc; } elsif (my($ssd) = /SSD\s+:\s+(.+)/) { $pd[$pd]{ssd} = $ssd; } elsif (my($fru) = /FRU\s+:\s+(.+)/) { $pd[$pd]{fru} = $fru; } elsif (my($esd) = /Reported ESD(?:\(.+\))?\s+:\s+(.+)/) { $pd[$pd]{esd} = $esd; } elsif (my($ncq) = /NCQ status\s+:\s+(.+)/) { $pd[$pd]{ncq} = $ncq; } elsif (my($pfa) = /PFA\s+:\s+(.+)/) { $pd[$pd]{pfa} = $pfa; } elsif (my($e) = /Enclosure ID\s+:\s+(.+)/) { $pd[$pd]{enclosure} = $e; } elsif (my($t) = /Type\s+:\s+(.+)/) { $pd[$pd]{type} = $t; } elsif (my($smart) = /S\.M\.A\.R\.T\.(?:\s+warnings)?\s+:\s+(.+)/) { $pd[$pd]{smart} = $smart; } elsif (my($speed) = /Transfer Speed\s+:\s+(.+)/) { $pd[$pd]{speed} = $speed; } elsif (my($l) = /Reported Location\s+:\s+(.+)/) { $pd[$pd]{location} = $l; } elsif (my($sps) = /Supported Power States\s+:\s+(.+)/) { $pd[$pd]{power_states} = $sps; } elsif (my($cd) = /Reported Channel,Device(?:\(.+\))?\s+:\s+(.+)/) { $pd[$pd]{cd} = $cd; } elsif (my($type) = /Device is an?\s+(.+)/) { $pd[$pd]{devtype} = $type; } elsif (/Status of Enclosure services device/) { while (<$fh>) { last if /^$/; if (my($temp) = /Temperature\s+(.+)/) { $pd[$pd]{enclosure_temp} = $temp; } # here's actually more to parse } } else { warn "Unparsed Physical Device data: [$_]\n"; } } elsif ($section =~ /Logical (device|drive) information/) { if (my($n) = /Logical (?:device|drive) number (\d+)/) { $ld = int($n); $ld[$ld]{id} = $n; } elsif (my($s) = /Status of logical (?:device|drive)\s+:\s+(.+)/) { $ld[$ld]{status} = $s; } elsif (my($ln) = /Logical (?:device|drive) name\s+:\s+(.+)/) { $ld[$ld]{name} = $ln; } elsif (my($rl) = /RAID level\s+:\s+(.+)/) { $ld[$ld]{raid} = $rl; } elsif (my($sz) = /Size\s+:\s+(.+)/) { $ld[$ld]{size} = $sz; } elsif (my($fs) = /Failed stripes\s+:\s+(.+)/) { $ld[$ld]{failed_stripes} = $fs; } elsif (my($ds) = /Defunct segments\s+:\s+(.+)/) { $ld[$ld]{defunct_segments} = $ds; } else { # Write-cache mode : Not supported] # Partitioned : Yes] # Number of segments : 2] # Drive(s) (Channel,Device) : 0,0 0,1] # Defunct segments : No] } } elsif ($section =~ /MaxCache 3\.0 information/) { # not parsed yet } else { warn "NOT PARSED: [$section] [$_]\n"; } } close $fh; $this->unknown->message("Command did not succeed") unless defined $ok; return { controller => \%c, logical => \@ld, physical => \@pd }; } # NB: side effect: ARCCONF changes current directory to /var/log sub parse { my ($this) = @_; # we chdir to /var/log, as tool is creating 'UcliEvt.log' chdir('/var/log') || chdir('/'); my ($status, $config); $status = $this->parse_status or return; $config = $this->parse_config($status) or return; return { %$status, %$config }; } sub check { my $this = shift; my $data = $this->parse; $this->unknown,return unless $data; # status messages pushed here my @status; # check for controller status for my $c ($data->{controller}) { $this->critical if $c->{status} !~ /Optimal|Okay/; push(@status, "Controller:$c->{status}"); if ($c->{defunct_count} > 0) { $this->critical; push(@status, "Defunct drives:$c->{defunct_count}"); } if (defined $c->{logical_failed} && $c->{logical_failed} > 0) { $this->critical; push(@status, "Failed drives:$c->{logical_failed}"); } if (defined $c->{logical_degraded} && $c->{logical_degraded} > 0) { $this->critical; push(@status, "Degraded drives:$c->{logical_degraded}"); } if (defined $c->{logical_offline} && $c->{logical_offline} > 0) { $this->critical; push(@status, "Offline drives:$c->{logical_offline}"); } if (defined $c->{logical_critical} && $c->{logical_critical} > 0) { $this->critical; push(@status, "Critical drives:$c->{logical_critical}"); } if (defined $c->{logical_degraded} && $c->{logical_degraded} > 0) { $this->critical; push(@status, "Degraded drives:$c->{logical_degraded}"); } # current (logical device) tasks if ($data->{tasks}->{operation} ne 'None') { # just print it. no status change my $task = $data->{tasks}; push(@status, "$task->{type} #$task->{device}: $task->{operation}: $task->{status} $task->{percent}%"); } # ZMM (Zero-Maintenance Module) status if (defined($c->{zmm_status})) { push(@status, "ZMM Status: $c->{zmm_status}"); } # Battery status if (defined($c->{battery_status}) and $c->{battery_status} ne "Not Installed") { push(@status, "Battery Status: $c->{battery_status}"); if ($c->{battery_overtemp} ne "No") { $this->critical; push(@status, "Battery Overtemp: $c->{battery_overtemp}"); } push(@status, "Battery Capacity Remaining: $c->{battery_capacity}%"); if ($c->{battery_capacity} < 50) { $this->critical; } if ($c->{battery_capacity} < 25) { $this->warning; } if ($c->{battery_time} < 1440) { $this->warning; } if ($c->{battery_time} < 720) { $this->critical; } if ($c->{battery_time} < 60) { push(@status, "Battery Time: $c->{battery_time}m"); } else { push(@status, "Battery Time: $c->{battery_time_full}"); } } } # check for logical devices for my $ld (@{$data->{logical}}) { next unless $ld; # FIXME: fix that script assumes controllers start from '0' $this->critical if $ld->{status} !~ /Optimal|Okay/; my $id = $ld->{id}; if ($ld->{name}) { $id = "$id($ld->{name})"; } push(@status, "Logical Device $id:$ld->{status}"); if (defined $ld->{failed_stripes} && $ld->{failed_stripes} ne 'No') { push(@status, "Failed stripes: $ld->{failed_stripes}"); } if (defined $ld->{defunct_segments} && $ld->{defunct_segments} ne 'No') { push(@status, "Defunct segments: $ld->{defunct_segments}"); } } # check for physical devices my %pd; for my $pd (@{$data->{physical}}) { # skip not disks next if $pd->{devtype} =~ 'Enclosure services device'; $this->critical if $pd->{status} !~ /Online/; my $id = $pd->{serial} || $pd->{wwn}; push(@{$pd{$pd->{status}}}, $id); } push(@status, "Drives: ".$this->join_status(\%pd)) if %pd; $this->ok->message(join(', ', @status)); } package megarc; # LSI MegaRaid or Dell Perc arrays # Check the status of all arrays on all Lsi MegaRaid controllers on the local # machine. Uses the megarc program written by Lsi to get the status of all # arrays on all local Lsi MegaRaid controllers. # # check designed from check_lsi_megaraid: # http://www.monitoringexchange.org/cgi-bin/page.cgi?g=Detailed/2416.html;d=1 # Perl port (check_raid) by Elan Ruusamäe. use base 'plugin'; # register push(@utils::plugins, __PACKAGE__); sub program_names { __PACKAGE__; } sub commands { { 'controller list' => ['-|', '@CMD', '-AllAdpInfo', '-nolog'], 'controller config' => ['-|', '@CMD', '-dispCfg', '-a$controller', '-nolog'], } } sub sudo { my ($this, $deep) = @_; # quick check when running check return 1 unless $deep; my $cmd = $this->{program}; ( "CHECK_RAID ALL=(root) NOPASSWD: $cmd -AllAdpInfo -nolog", "CHECK_RAID ALL=(root) NOPASSWD: $cmd -dispCfg -a* -nolog", ); } sub check { my $this = shift; # status messages pushed here my @status; # get controllers my $fh = $this->cmd('controller list'); my @lines = <$fh>; close $fh; if ($lines[11] =~ /No Adapters Found/) { $this->warning; $this->message("No LSI adapters were found on this machine"); return; } my @c; foreach (@lines[12..$#lines]) { if (my ($id) = /^\s*(\d+)/) { push(@c, int($id)); } } unless (@c) { $this->warning; $this->message("No LSI adapters were found on this machine"); return; } foreach my $c (@c) { my $fh = $this->cmd('controller config', { '$controller' => $c }); my (%d, %s, $ld); while (<$fh>) { # Logical Drive : 0( Adapter: 0 ): Status: OPTIMAL if (my($d, $s) = /Logical Drive\s+:\s+(\d+).+Status:\s+(\S+)/) { $ld = $d; $s{$ld} = $s; next; } # SpanDepth :01 RaidLevel: 5 RdAhead : Adaptive Cache: DirectIo if (my($s) = /RaidLevel:\s+(\S+)/) { $d{$ld} = $s if defined $ld; next; } } close $fh; # now process the details unless (keys %d) { $this->message("No arrays found on controller $c"); $this->warning; return; } while (my($d, $s) = each %s) { if ($s ne 'OPTIMAL') { # The Array number here is incremented by one because of the # inconsistent way that the LSI tools count arrays. # This brings it back in line with the view in the bios # and from megamgr.bin where the array counting starts at # 1 instead of 0 push(@status, "Array ".(int($d) + 1)." status is ".$s{$d}." (Raid-$s on adapter $c)"); $this->critical; next; } push(@status, "Logical Drive $d: $s"); } } return unless @status; $this->ok->message(join(', ', @status)); } package cmdtool2; use base 'plugin'; # register push(@utils::plugins, __PACKAGE__); sub program_names { 'CmdTool2'; } sub commands { { 'adapter list' => ['-|', '@CMD', , '-AdpAllInfo', '-aALL', '-nolog'], 'adapter config' => ['-|', '@CMD', '-CfgDsply', '-a$adapter', '-nolog'], } } sub sudo { my ($this, $deep) = @_; # quick check when running check return 1 unless $deep; my $cmd = $this->{program}; ( "CHECK_RAID ALL=(root) NOPASSWD: $cmd -AdpAllInfo -aALL -nolog", "CHECK_RAID ALL=(root) NOPASSWD: $cmd -CfgDsply -a* -nolog", ); } sub check { my $this = shift; # status messages pushed here my @status; # get adapters my $fh = $this->cmd('adapter list'); my @c; while (<$fh>) { if (my($c) = /^Adapter #(\d+)/) { push(@c, $c); } } close $fh; unless (@c) { $this->warning; $this->message("No LSI adapters were found on this machine"); return; } foreach my $c (@c) { my $fh = $this->cmd('adapter config', { '$adapter' => $c }); my ($d); while (<$fh>) { # DISK GROUPS: 0 if (my($s) = /^DISK GROUPS: (\d+)/) { $d = int($s); next; } # State: Optimal if (my($s) = /^State: (\S+)$/) { if ($s ne 'Optimal') { $this->critical; } push(@status, "Logical Drive $c,$d: $s"); } } } return unless @status; # denote this plugin as ran ok $this->ok; $this->message(join(', ', @status)); } package cciss; use base 'plugin'; # register push(@utils::plugins, __PACKAGE__); sub program_names { 'cciss_vol_status'; } sub commands { { 'detect hpsa' => ['<', '/sys/module/hpsa/refcnt'], 'controller status' => ['-|', '@CMD', '@devs'], 'detect cciss' => ['<', '/proc/driver/cciss'], 'cciss proc' => ['<', '/proc/driver/cciss/$controller'], } } sub sudo { my ($this, $deep) = @_; # quick check when running check return 1 unless $deep; my $cmd = $this->{program}; my @sudo; my @cciss_devs = $this->detect; if (@cciss_devs) { my $c = join(' ', @cciss_devs); push(@sudo, "CHECK_RAID ALL=(root) NOPASSWD: $cmd $c"); } my @cciss_disks = $this->detect_disks(@cciss_devs); if (@cciss_disks) { my $smartctl = smartctl->new(); my $cmd = $smartctl->{program}; foreach my $ref (@cciss_disks) { my ($dev, $diskopt, $disk) = @$ref; # escape comma for sudo $diskopt =~ s/,/\\$&/g; push(@sudo, "CHECK_RAID ALL=(root) NOPASSWD: $cmd -H $dev $diskopt$disk"); } } return @sudo; } # detects if hpsa (formerly cciss) is present in system sub detect { my $this = shift; my ($fh, @devs); # check hpsa devs eval { $fh = $this->cmd('detect hpsa'); }; if ($fh) { my $refcnt = <$fh>; close $fh; if ($refcnt) { # TODO: how to figure which sgX is actually in use? # for now we collect all, and expect cciss_vol_status to ignore unknowns # refcnt seems to match number of sg devs: /sys/class/scsi_generic/sg* for (my $i = 0; $i < $refcnt; $i++) { my $dev = "/dev/sg$i"; # filter via valid() so could exclude devs push(@devs, $dev) if $this->valid($dev); } } } undef($fh); # check legacy cciss devs eval { $fh = $this->cmd('detect cciss'); }; if ($fh) { my @c = grep { !/^\./ } readdir($fh); close($fh); # find controllers # cciss0: HP Smart Array P400i Controller # Board ID: 0x3235103c # Firmware Version: 4.06 # IRQ: 98 # Logical drives: 1 # Current Q depth: 0 # Current # commands on controller: 0 # Max Q depth since init: 249 # Max # commands on controller since init: 275 # Max SG entries since init: 31 # Sequential access devices: 0 # # cciss/c0d0: 220.12GB RAID 1(1+0) for my $c (@c) { my $fh = $this->cmd('cciss proc', { '$controller' => $c }); while (<$fh>) { # check "c*d0" - iterate over each controller next unless (my($dev) = m{^(cciss/c\d+d0):}); $dev = "/dev/$dev"; # filter via valid() so could exclude devs push(@devs, $dev) if $this->valid($dev); } close $fh; } } undef($fh); return wantarray ? @devs : \@devs; } # build list of cciss disks # used by smartctl check # just return all disks (0..15) for each cciss dev found sub detect_disks { my $this = shift; my @devs; # build devices list for smartctl foreach my $scsi_dev (@_) { foreach my $disk (0..15) { push(@devs, [ $scsi_dev, '-dcciss,', $disk ]); } } return wantarray ? @devs : \@devs; } sub check { my $this = shift; my @devs = $this->detect; unless (@devs) { $this->warning; $this->message("No Smart Array Adapters were found on this machine"); return; } # status messages pushed here my @status; # add all devs at once, cciss_vol_status can do that my $fh = $this->cmd('controller status', { '@devs' => \@devs }); while (<$fh>) { chomp; # strip for better pattern matching s/\.\s*$//; # /dev/cciss/c0d0: (Smart Array P400i) RAID 1 Volume 0 status: OK # /dev/sda: (Smart Array P410i) RAID 1 Volume 0 status: OK. if (my($s) = /status: (.*?)$/) { if ($s !~ '^OK') { $this->critical; } push(@status, $_); } } close($fh); unless (@status) { return; } # denote this plugin as ran ok $this->ok; $this->message(join(', ', @status)); # allow skip for testing unless ($this->{no_smartctl}) { # check also individual disk health my @disks = $this->detect_disks(@devs); if (@disks) { # inherit smartctl command from our commands (testing) my %params = (); $params{commands}{smartctl} = $this->{commands}{smartctl} if $this->{commands}{smartctl}; my $smartctl = smartctl->new(%params); # do not perform check if smartctl is missing if ($smartctl->active) { $smartctl->check(@disks); # XXX this is hack, as we have no proper subcommand check support $this->message($this->message . " " .$smartctl->message); if ($smartctl->status > 0) { $this->critical; } } } } } package hp_msa; use base 'plugin'; # do not register, better use hpacucli #push(@utils::plugins, __PACKAGE__); sub new { my $self = shift; $self->SUPER::new(tty_device => "/dev/ttyS0", @_); } sub active { my $this = shift; return $this->detect; } # check from /sys if there are any MSA VOLUME's present. sub detect { my $this = shift; for my $file () { open my $fh, '<', $file or next; my $model = <$fh>; close($fh); return 1 if ($model =~ /^MSA.+VOLUME/); } return 0; } sub check { my $this = shift; my $ctldevice = $this->{tty_device}; # status messages pushed here my @status; my %opts = (); $opts{lockdir} = $this->{lockdir} if $this->{lockdir}; my $modem = SerialLine->new($ctldevice, %opts); my $fh = $modem->open(); unless ($fh) { $this->warning; $this->message("Can't open $ctldevice"); return; } # check first controller print $fh "\r"; print $fh "show globals\r"; print $fh "show this_controller\r"; print $fh "show other_controller\r"; # this will issue termination match, ie. invalid command print $fh "exit\r"; my ($c, %c, %t); while (<$fh>) { chomp; s/[\n\r]$//; last if /Invalid CLI command/; # Temperature: # EMU: 23 Celsius, 73 Fahrenheit # PS1: 22 Celsius, 71 Fahrenheit # PS2: 22 Celsius, 71 Fahrenheit if (my($s, $c) = /(\S+): (\d+) Celsius,\s+\d+ Fahrenheit/) { $t{$s} = int($c); next; } # Controller 1 (right controller): if (my($s) = /^(Controller \d+)/) { $c = $s; $c{$c} = []; next; } # Surface Scan: Running, LUN 10 (68% Complete) if (my($s, $m) = /Surface Scan:\s+(\S+)[,.]\s*(.*)/) { if ($s eq 'Running') { my ($l, $p) = $m =~ m{(LUN \d+) \((\d+)% Complete\)}; push(@{$c{$c}}, "Surface: $l ($p%)"); $this->warning; } elsif ($s ne 'Complete') { push(@{$c{$c}}, "Surface: $s, $m"); $this->warning; } next; } # Rebuild Status: Running, LUN 0 (67% Complete) if (my($s, $m) = /Rebuild Status:\s+(\S+)[,.]\s*(.*)/) { if ($s eq 'Running') { my ($l, $p) = $m =~ m{(LUN \d+) \((\d+)% Complete\)}; push(@{$c{$c}}, "Rebuild: $l ($p%)"); $this->warning; } elsif ($s ne 'Complete') { push(@{$c{$c}}, "Rebuild: $s, $m"); $this->warning; } next; } # Expansion: Complete. if (my($s, $m) = /Expansion:\s+(\S+)[.,]\s*(.*)/) { if ($s eq 'Running') { my ($l, $p) = $m =~ m{(LUN \d+) \((\d+)% Complete\)}; push(@{$c{$c}}, "Expansion: $l ($p%)"); $this->warning; } elsif ($s ne 'Complete') { push(@{$c{$c}}, "Expansion: $s, $m"); $this->warning; } next; } } $modem->close(); foreach $c (sort { $a cmp $b } keys %c) { my $s = $c{$c}; $s = join(', ', @$s); $s = 'OK' unless $s; push(@status, "$c: $s"); } # check that no temp is over the treshold my $warn = 28; my $crit = 33; while (my($t, $c) = each %t) { if ($c > $crit) { push(@status, "$t: ${c}C"); $this->critical; } elsif ($c > $warn) { push(@status, "$t: ${c}C"); $this->warning; } } return unless @status; $this->message(join(', ', @status)); } package sas2ircu; # LSI SAS-2 controllers using the SAS-2 Integrated RAID Configuration Utility (SAS2IRCU) # Based on the SAS-2 Integrated RAID Configuration Utility (SAS2IRCU) User Guide # http://www.lsi.com/downloads/Public/Host%20Bus%20Adapters/Host%20Bus%20Adapters%20Common%20Files/SAS_SATA_6G_P12/SAS2IRCU_User_Guide.pdf use base 'plugin'; # register push(@utils::plugins, __PACKAGE__); sub program_names { __PACKAGE__; } sub commands { { 'controller list' => ['-|', '@CMD', 'LIST'], 'controller status' => ['-|', '@CMD', '$controller', 'STATUS'], } } sub sudo { my ($this, $deep) = @_; # quick check when running check return 1 unless $deep; my $cmd = $this->{program}; ( "CHECK_RAID ALL=(root) NOPASSWD: $cmd LIST", "CHECK_RAID ALL=(root) NOPASSWD: $cmd * STATUS", ); } # detect controllers for sas2ircu sub detect { my $this = shift; my @ctrls; my $fh = $this->cmd('controller list'); my $success = 0; while (<$fh>) { chomp; # Adapter Vendor Device SubSys SubSys # Index Type ID ID Pci Address Ven ID Dev ID # ----- ------------ ------ ------ ----------------- ------ ------ # 0 SAS2008 1000h 72h 00h:03h:00h:00h 1028h 1f1eh if (my($c) = /^\s*(\d+)\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+\s*$/) { push(@ctrls, $c); } $success = 1 if /SAS2IRCU: Utility Completed Successfully/; } unless (close $fh) { $this->critical; } unless ($success) { $this->critical; } return wantarray ? @ctrls : \@ctrls; } sub check { my $this = shift; my @ctrls = $this->detect; my @status; # determine the RAID states of each controller foreach my $c (@ctrls) { my $fh = $this->cmd('controller status', { '$controller' => $c }); my $state; my $success = 0; while (<$fh>) { chomp; # match adapter lines if (my($s) = /^\s*Volume state\s*:\s*(\w+)\s*$/) { $state = $s; if ($state ne "Optimal") { $this->critical; } } $success = 1 if /SAS2IRCU: Utility Completed Successfully/; } unless (close $fh) { $this->critical; $state = $!; } unless ($success) { $this->critical; $state = "SAS2IRCU Unknown exit"; } unless ($state) { $state = "Unknown Error"; } push(@status, "ctrl #$c: $state") } return unless @status; $this->ok->message(join(', ', @status)); } package smartctl; use base 'plugin'; # no registering as standalone plugin #push(@utils::plugins, __PACKAGE__); sub program_names { __PACKAGE__; } sub commands { { 'smartctl' => ['-|', '@CMD', '-H', '$dev', '$diskopt$disk'], } } sub sudo { my ($this, $deep) = @_; # quick check when running check return 1 unless $deep; # nothing, as not standalone plugin yet } # check for -H parameter for physical disks # this is currently called out from cciss plugin # @param device list # device list being an array of: # - device to check (/dev/cciss/c0d0) # - disk options (-dcciss) # - disk number (0..15) sub check { my $this = shift; my @devs = @_; unless (@devs) { $this->warning; $this->message("No devices to check"); return; } # status message for devs, latter just joined for shorter messages my %status; foreach my $ref (@devs) { my ($dev, $diskopt, $disk) = @$ref; my $fh = $this->cmd('smartctl', { '$dev' => $dev, '$diskopt' => $diskopt => '$disk' => $disk }); while (<$fh>) { chomp; # SMART Health Status: HARDWARE IMPENDING FAILURE GENERAL HARD DRIVE FAILURE [asc=5d, ascq=10] if (my($s, $sc) = /SMART Health Status: (.*?)(\s*\[asc=\w+, ascq=\w+\])?$/) { # use shorter output, message that hpacucli would use if ($s eq 'HARDWARE IMPENDING FAILURE GENERAL HARD DRIVE FAILURE') { $s = 'Predictive Failure'; } if ($s eq 'Predictive Failure') { $this->warning; } elsif ($s !~ '^OK') { $this->critical; } push(@{$status{$s}}, $dev.'#'.$disk); } } close($fh); } return unless %status; $this->ok->message($this->join_status(\%status)); } package hpacucli; use base 'plugin'; # register push(@utils::plugins, __PACKAGE__); sub program_names { __PACKAGE__; } sub commands { { 'controller status' => ['-|', '@CMD', 'controller', 'all', 'show', 'status'], 'logicaldrive status' => ['-|', '@CMD', 'controller', '$target', 'logicaldrive', 'all', 'show'], } } sub sudo { my ($this, $deep) = @_; # quick check when running check return 1 unless $deep; my $cmd = $this->{program}; ( "CHECK_RAID ALL=(root) NOPASSWD: $cmd controller all show status", "CHECK_RAID ALL=(root) NOPASSWD: $cmd controller * logicaldrive all show", ); } sub check { my $this = shift; # status messages pushed here my @status; # TODO: allow target customize: # hpacucli is of format: # [controller all|slot=#|wwn=#|chassisname="AAA"|serialnumber=#|chassisserialnumber=#|ctrlpath=#:# ] # [array all|] # [physicaldrive all|allunassigned|[#:]#:#|[#:]#:#-[#:]#:#] # [logicaldrive all|#] # [enclosure all|#:#|serialnumber=#|chassisname=#] # [licensekey all|] # Scan controllers my (%targets); my $fh = $this->cmd('controller status'); while (<$fh>) { # Numeric slot if (my($model, $slot) = /^(\S.+) in Slot (\d+)/) { $targets{"slot=$slot"} = $model; next; } # Named Entry if (my($model, $cn) = /^(\S.+) in (.+)/) { $targets{"chassisname=$cn"} = $cn; next; } } close $fh; unless (%targets) { $this->warning; $this->message("No Controllers were found on this machine"); return; } # Scan logical drives while (my($target, $model) = each %targets) { # check each controllers my $fh = $this->cmd('logicaldrive status', { '$target' => $target }); my ($array, %array); while (<$fh>) { # "array A" # "array A (Failed)" # "array B (Failed)" if (my($a, $s) = /^\s+array (\S+)(?:\s*\((\S+)\))?$/) { $array = $a; # Offset 0 is Array own status # XXX: I don't like this one: undef could be false positive $array{$array}[0] = $s || 'OK'; } # skip if no active array yet next unless $array; # logicaldrive 1 (68.3 GB, RAID 1, OK) # capture only status if (my($drive, $s) = /^\s+logicaldrive (\d+) \([\d.]+ .B, [^,]+, (\S+)\)$/) { # Offset 1 is each logical drive status $array{$array}[1]{$drive} = $s; } } close $fh; my @cstatus; while (my($array, $d) = each %array) { my ($astatus, $ld) = @$d; if ($astatus eq 'OK') { push(@cstatus, "Array $array($astatus)"); } else { my @astatus; # extra details for non-normal arrays foreach my $lun (sort { $a cmp $b } keys %$ld) { my $s = $ld->{$lun}; push(@astatus, "LUN$lun:$s"); if ($s eq 'OK' or $s eq 'Disabled') { } elsif ($s eq 'Failed' or $s eq 'Interim Recovery Mode') { $this->critical; } elsif ($s eq 'Rebuild' or $s eq 'Recover') { $this->warning; } } push(@cstatus, "Array $array($astatus)[". join(',', @astatus). "]"); } } push(@status, "$model: ".join(', ', @cstatus)); } return unless @status; $this->ok->message(join(', ', @status)); } package areca; ## Areca SATA RAID Support ## requires cli64 or cli32 binaries ## For links to manuals and binaries, see this issue: ## https://github.com/glensc/nagios-plugin-check_raid/issues/10 use base 'plugin'; # register push(@utils::plugins, __PACKAGE__); sub program_names { qw(areca-cli areca_cli64 areca_cli32 cli64 cli32); } sub commands { { 'rsf info' => ['-|', '@CMD', 'rsf', 'info'], 'disk info' => ['-|', '@CMD', 'disk', 'info'], } } sub sudo { my ($this, $deep) = @_; # quick check when running check return 1 unless $deep; my $cmd = $this->{program}; ( "CHECK_RAID ALL=(root) NOPASSWD: $cmd rsf info", "CHECK_RAID ALL=(root) NOPASSWD: $cmd disk info", ); } # plugin check # can store its exit code in $this->status # can output its message in $this->message sub check { my $this = shift; ## Check Array Status my (@status, %arrays); my $fh = $this->cmd('rsf info'); while (<$fh>) { =cut # Name Disks TotalCap FreeCap MinDiskCap State # Name Disks TotalCap FreeCap DiskChannels State =============================================================================== 1 Raid Set # 000 23 34500.0GB 0.0GB 1500.0GB Normal 1 Raid Set # 00 15 15000.0GB 0.0GB 123G567C9AB48EF Normal 1 data 15 11250.0GB 0.0GB 123456789ABCDEF Normal 1 data 15 11250.0GB 0.0GB 123456789ABCDEF Initializing =============================================================================== =cut next unless (my($id, $n, $s) = m{^ \s*(\d+) # Id \s+(.+) # Name \s+\d+ # Disks \s+\S+ # TotalCap \s+\S+ # FreeCap \s+\S+ # MinDiskCap/DiskChannels \s+(\S+)\s* # State $}x); # trim trailing spaces from name $n =~ s/\s+$//; if ($s =~ /[Rr]e[Bb]uild/) { $this->warning; } elsif ($s !~ /[Nn]ormal|[Rr]e[Bb]uild|Checking|Initializing/) { $this->critical; } push(@status, "Array#$id($n): $s"); $arrays{$n} = [ $id, $s ]; } close $fh; ## Check Drive Status $fh = $this->cmd('disk info'); my %drivestatus; while (<$fh>) { chomp; =cut # Enc# Slot# ModelName Capacity Usage =============================================================================== 1 01 Slot#1 N.A. 0.0GB N.A. 8 01 Slot#8 N.A. 0.0GB N.A. 9 02 SLOT 01 ST31500341AS 1500.3GB Raid Set # 000 11 02 SLOT 03 ST31500341AS 1500.3GB Raid Set # 000 # Ch# ModelName Capacity Usage =============================================================================== 1 1 ST31000340NS 1000.2GB Raid Set # 00 6 6 ST31000340NS 1000.2GB Raid Set # 00 3 3 WDC WD7500AYYS-01RCA0 750.2GB data 4 4 WDC WD7500AYYS-01RCA0 750.2GB data 16 16 WDC WD7500AYYS-01RCA0 750.2GB HotSpare[Global] =cut next unless my($id, $model, $usage) = m{^ \s*(\d+) # Id \s+\d+ # Channel/Enclosure (not reliable, tests 1,2,12 differ) \s+(.+) # ModelName \s+\d+.\d\S+ # Capacity \s+(.+) # Usage (Raid Name) }x; # trim trailing spaces from name $usage =~ s/\s+$//; # Asssume model N.A. means the slot not in use # we could also check for Capacity being zero, but this seems more # reliable. next if $usage eq 'N.A.'; # use array id in output: shorter my $array_id = defined($arrays{$usage}) ? ($arrays{$usage})->[0] : undef; my $array_name = defined $array_id ? "Array#$array_id" : $usage; # assume critical if Usage is not one of: # - existing Array name # - HotSpare # - Rebuild if (defined($arrays{$usage})) { # Disk in Array named $usage push(@{$drivestatus{$array_name}}, $id); } elsif ($usage =~ /[Rr]e[Bb]uild/) { # rebuild marks warning push(@{$drivestatus{$array_name}}, $id); $this->warning; } elsif ($usage =~ /HotSpare/) { # hotspare is OK push(@{$drivestatus{$array_name}}, $id); } else { push(@{$drivestatus{$array_name}}, $id); $this->critical; } } close $fh; push(@status, "Drive Assignment: ".$this->join_status(\%drivestatus)) if %drivestatus; $this->ok->message(join(', ', @status)); } package dmraid; use base 'plugin'; # register push(@utils::plugins, __PACKAGE__); sub program_names { __PACKAGE__; } sub commands { { 'read' => ['-|', '@CMD', '-r'], } } sub sudo { my ($this, $deep) = @_; # quick check when running check return 1 unless $deep; my $cmd = $this->{program}; "CHECK_RAID ALL=(root) NOPASSWD: $cmd -r"; } # parse arrays, return data indexed by array name sub parse { my $this = shift; my (%arrays); my $fh = $this->cmd('read'); while (<$fh>) { chomp; next unless (my($device, $format, $name, $type, $status, $sectors) = m{^ # /dev/sda: jmicron, "jmicron_JRAID", mirror, ok, 781385728 sectors, data@ 0 (/dev/\S+):\s # device (\S+),\s # format "([^"]+)",\s # name (mirror|stripe[d]?),\s # type (\w+),\s # status (\d+)\ssectors,.* # sectors $}x); next unless $this->valid($device); # trim trailing spaces from name $name =~ s/\s+$//; my $member = { 'device' => $device, 'format' => $format, 'type' => $type, 'status' => $status, 'size' => $sectors, }; push(@{$arrays{$name}}, $member); } close $fh; return \%arrays; } # plugin check # can store its exit code in $this->status # can output its message in $this->message sub check { my $this = shift; my (@status); ## Check Array and Drive Status my $arrays = $this->parse; while (my($name, $array) = each(%$arrays)) { my @s; foreach my $dev (@$array) { if ($dev->{status} =~ m/sync|rebuild/i) { $this->warning; } elsif ($dev->{status} !~ m/ok/i) { $this->critical; } my $size = $this->format_bytes($dev->{size}); push(@s, "$dev->{device}($dev->{type}, $size): $dev->{status}"); } push(@status, "$name: " . join(', ', @s)); } return unless @status; # denote that this plugin as ran ok, not died unexpectedly $this->ok->message(join(' ', @status)); } { package main; # do nothing in library mode return 1 if caller; use strict; use warnings; use Getopt::Long; my ($opt_V, $opt_d, $opt_h, $opt_W, $opt_S, $opt_p, $opt_l); my (%ERRORS) = (OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3); my ($VERSION) = "3.0.5"; my ($message, $status, $perfdata, $longoutput); my ($opt_O) = $ERRORS{UNKNOWN}; ##################################################################### $ENV{'BASH_ENV'} = ''; $ENV{'ENV'} = ''; # find first existing file from list of file paths sub find_file { for my $file (@_) { return $file if -f $file; } return undef; } sub print_usage() { print join "\n", "Usage: check_raid [-h] [-V] [-S] [-O] [list of devices to ignore]", "", "Options:", " -h, --help", " Print help screen", " -V, --version", " Print version information", " -S, --sudoers", " Setup sudo rules", " -W, --warnonly", " Treat CRITICAL errors as WARNING", " -p, --plugin ", " Force the use of selected plugins, comma separated", " -l, --list-plugins", " Lists active plugins", " --resync=STATE", " Set status as STATE if RAID is in resync state. Defaults to WARNING", " --noraid=STATE", " Return STATE if no RAID controller is found. Defaults to UNKNOWN", ""; } sub print_help() { print "check_raid, v$VERSION\n"; print "Copyright (c) 2004-2006 Steve Shipway, Copyright (c) 2009-2013, Elan Ruusamäe This plugin reports the current server's RAID status https://github.com/glensc/nagios-plugin-check_raid "; print_usage(); } sub sudoers { my ($dry_run) = @_; # build values to be added # go over all registered plugins my @sudo; foreach my $pn (@utils::plugins) { my $plugin = $pn->new; # skip inactive plugins (disabled or no tools available) next unless $plugin->active; # collect sudo rules my @rules = $plugin->sudo(1) or next; push(@sudo, @rules); } unless (@sudo) { warn "Your configuration does not need to use sudo, sudoers not updated\n"; return; } my @rules = join "\n", ( "", # setup alias, so we could easily remove these later by matching lines with 'CHECK_RAID' # also this avoids installing ourselves twice. "# Lines matching CHECK_RAID added by $0 -S on ". scalar localtime, "User_Alias CHECK_RAID=nagios", # actual rules from plugins join("\n", @sudo), "", ); if ($dry_run) { warn "Content to be inserted to sudo rules:\n"; warn "--- sudoers ---\n"; print @rules; warn "--- sudoers ---\n"; return; } my $sudoers = find_file('/usr/local/etc/sudoers', '/etc/sudoers'); my $visudo = utils::which('visudo'); die "Unable to find sudoers file.\n" unless -f $sudoers; die "Unable to write to sudoers file '$sudoers'.\n" unless -w $sudoers; die "visudo program not found\n" unless -x $visudo; warn "Updating file $sudoers\n"; # NOTE: secure as visudo itself: /etc is root owned my $new = $sudoers.".new.".$$; # setup to have sane perm for new sudoers file umask(0227); # insert old sudoers open my $old, '<', $sudoers or die $!; open my $fh, '>', $new or die $!; while (<$old>) { print $fh $_; } close $old or die $!; # insert new rules print $fh @rules; close $fh; # validate sudoers system($visudo, '-c', '-f', $new) == 0 or unlink($new),exit $? >> 8; # use the new file rename($new, $sudoers) or die $!; warn "$sudoers file updated.\n"; } # Print active plugins sub print_active_plugins { # go over all registered plugins foreach my $pn (@utils::plugins) { my $plugin = $pn->new; # skip inactive plugins (disabled or no tools available) next unless $plugin->active; # print plugin name print $plugin->{name}."\n"; } } sub setstate { my ($key, $opt, $value) = @_; unless (exists $ERRORS{$value}) { print "Invalid value: '$value' for --$opt\n"; exit $ERRORS{UNKNOWN}; } $$key = $ERRORS{$value}; } Getopt::Long::Configure('bundling'); GetOptions( 'V' => \$opt_V, 'version' => \$opt_V, 'd' => \$opt_d, 'h' => \$opt_h, 'help' => \$opt_h, 'S' => \$opt_S, 'sudoers' => \$opt_S, 'W' => \$opt_W, 'warnonly' => \$opt_W, 'resync=s' => sub { setstate(\$plugin::resync_status, @_); }, 'noraid=s' => sub { setstate(\$opt_O, @_); }, 'p=s' => \$opt_p, 'plugin=s' => \$opt_p, 'l' => \$opt_l, 'list-plugins' => \$opt_l, ) or exit($ERRORS{UNKNOWN}); if ($opt_S) { sudoers($opt_d); exit 0; } @utils::ignore = @ARGV if @ARGV; if ($opt_V) { print "check_raid Version $VERSION\n"; exit $ERRORS{'OK'}; } if ($opt_h) { print_help(); exit $ERRORS{'OK'}; } if ($opt_W) { plugin->set_critical_as_warning; } if ($opt_l) { print_active_plugins; exit $ERRORS{'OK'}; } $status = $ERRORS{OK}; $message = ''; $utils::debug = $opt_d; my @plugins = $opt_p ? grep { my $p = $_; grep { /^$p$/ } split(/,/, $opt_p) } @utils::plugins : @utils::plugins; foreach my $pn (@plugins) { my $plugin = $pn->new; # skip inactive plugins (disabled or no tools available) next unless $plugin->active; # skip if no check method (not standalone checker) next unless $plugin->can('check'); # perform the check $plugin->check; # collect results unless (defined $plugin->status) { $status = $ERRORS{UNKNOWN} if $ERRORS{UNKNOWN} > $status; $message .= '; ' if $message; $message .= "$pn:[Plugin error]"; next; } $status = $plugin->status if $plugin->status > $status; $message .= '; ' if $message; $message .= "$pn:[".$plugin->message."]"; $message .= ' | ' . $plugin->perfdata if $plugin->perfdata; $message .= "\n" . $plugin->longoutput if $plugin->longoutput; } if ($message) { if ($status == $ERRORS{OK}) { print "OK: "; } elsif ($status == $ERRORS{WARNING}) { print "WARNING: "; } elsif ($status == $ERRORS{CRITICAL}) { print "CRITICAL: "; } else { print "UNKNOWN: "; } print "$message\n"; } elsif ($opt_O) { $status = $ERRORS{OK}; print "No RAID configuration found\n"; } else { $status = $ERRORS{UNKNOWN}; print "No RAID configuration found (tried: ", join(', ', @plugins), ")\n"; } exit $status; } # package main package SerialLine; # Package dealing with connecting to serial line and handling UUCP style locks. use Carp; sub new { my $self = shift; my $class = ref($self) || $self; my $device = shift; my $this = { lockdir => "/var/lock", @_, lockfile => undef, device => $device, fh => undef, }; bless($this, $class); } sub lock { my $self = shift; # create lock in style: /var/lock/LCK..ttyS0 my $device = shift; my ($lockfile) = $self->{device} =~ m#/dev/(.+)#; $lockfile = "$self->{lockdir}/LCK..$lockfile"; if (-e $lockfile) { return 0; } open(my $fh, '>', $lockfile) || croak "Can't create lock: $lockfile\n"; print $fh $$; close($fh); $self->{lockfile} = $lockfile; } sub open { my $self = shift; $self->lock or return; # open the device open(my $fh, '+>', $self->{device}) || croak "Couldn't open $self->{device}, $!\n"; $self->{fh} = $fh; } sub close { my $self = shift; if ($self->{fh}) { close($self->{fh}); undef($self->{fh}); unlink $self->{lockfile} or carp $!; } } sub DESTROY { my $self = shift; $self->close(); } nagios-plugins-contrib-9.20140106/check_raid/control0000644000000000000000000000250512262515026017065 0ustar Homepage: https://github.com/glensc/nagios-plugin-check_raid Watch: https://github.com/glensc/nagios-plugin-check_raid "/glensc/nagios-plugin-check_raid/tree/([0-9.]+)" Suggests: cciss-vol-status, mpt-status Version: 3.0.5 Uploaders: Bernd Zeimetz Description: plugin to check sw/hw RAID status The plugin looks for any known types of RAID configurations, and checks them all. . Supports: - Adaptec AAC RAID via aaccli or afacli or arcconf - AIX software RAID via lsvg - HP/Compaq Smart Array via cciss_vol_status (hpsa supported too) - HP Smart Array Controllers and MSA Controllers via hpacucli - HP Smart Array (MSA1500) via serial line - Linux 3ware SATA RAID via tw_cli - Linux Device Mapper RAID via dmraid - Linux DPT/I2O hardware RAID controllers via /proc/scsi/dpt_i2o - Linux GDTH hardware RAID controllers via /proc/scsi/gdth - Linux LSI MegaRaid hardware RAID via CmdTool2 - Linux LSI MegaRaid hardware RAID via megarc - Linux LSI MegaRaid hardware RAID via /proc/megaraid - Linux MegaIDE hardware RAID controllers via /proc/megaide - Linux MPT hardware RAID via mpt-status - Linux software RAID (md) via /proc/mdstat - LSI Logic MegaRAID SAS series via MegaCli - LSI MegaRaid via lsraid - Serveraid IPS via ipssend - Solaris software RAID via metastat - Areca SATA RAID Support via cli64/cli32 nagios-plugins-contrib-9.20140106/check_raid/copyright0000644000000000000000000000037412262515026017417 0ustar 2004-2006 Steve Shipway, university of auckland, 2009-2013 Elan Ruusamäe License: GPL v2 On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". nagios-plugins-contrib-9.20140106/check_raid/Makefile0000644000000000000000000000005112262515026017114 0ustar #/usr/bin/make -f include ../common.mk nagios-plugins-contrib-9.20140106/check_haproxy/0000755000000000000000000000000012262515026016233 5ustar nagios-plugins-contrib-9.20140106/check_haproxy/check_haproxy0000644000000000000000000002023012262515026021002 0ustar #!/usr/bin/perl -w # # Copyright (c) 2010 Stéphane Urbanovski # # 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 # # $Id: $ use strict; # should never be differently :-) use warnings; use Locale::gettext; use File::Basename; # get basename() use POSIX qw(setlocale); use Time::HiRes qw(time); # get microtime use POSIX qw(mktime); use Nagios::Plugin ; use LWP::UserAgent; # http client use HTTP::Request; # used by LWP::UserAgent use HTTP::Status; # to get http err msg use Data::Dumper; my $PROGNAME = basename($0); '$Revision: 1.0 $' =~ /^.*(\d+\.\d+) \$$/; # Use The Revision from RCS/CVS/SVN my $VERSION = $1; my $DEBUG = 0; my $TIMEOUT = 9; # i18n : setlocale(LC_MESSAGES, ''); textdomain('nagios-plugins-perl'); my $np = Nagios::Plugin->new( version => $VERSION, blurb => _gt('Plugin to check HAProxy stats url'), usage => "Usage: %s [ -v|--verbose ] -u [-t ] [-U ] [-P ] [ -c|--critical= ] [ -w|--warning= ]", timeout => $TIMEOUT+1 ); $np->add_arg ( spec => 'debug|d', help => _gt('Debug level'), default => 0, ); $np->add_arg ( spec => 'username|U=s', help => _gt('Username for HTTP Auth'), required => 0, ); $np->add_arg ( spec => 'password|P=s', help => _gt('Password for HTTP Auth'), required => 0, ); $np->add_arg ( spec => 'w=f', help => _gt('Warning request time threshold (in seconds)'), default => 2, label => 'FLOAT' ); $np->add_arg ( spec => 'c=f', help => _gt('Critical request time threshold (in seconds)'), default => 10, label => 'FLOAT' ); $np->add_arg ( spec => 'url|u=s', help => _gt('URL of the HAProxy csv statistics page.'), required => 1, ); $np->getopts; $DEBUG = $np->opts->get('debug'); my $verbose = $np->opts->get('verbose'); my $username = $np->opts->get('username'); my $password = $np->opts->get('password'); # Thresholds : # time my $warn_t = $np->opts->get('w'); my $crit_t = $np->opts->get('c'); my $url = $np->opts->get('url'); # Create a LWP user agent object: my $ua = new LWP::UserAgent( 'env_proxy' => 0, 'timeout' => $TIMEOUT, ); $ua->agent(basename($0)); # Workaround for LWP bug : $ua->parse_head(0); if ( defined($ENV{'http_proxy'}) ) { # Normal http proxy : $ua->proxy(['http'], $ENV{'http_proxy'}); # Https must use Crypt::SSLeay https proxy (to use CONNECT method instead of GET) $ENV{'HTTPS_PROXY'} = $ENV{'http_proxy'}; } # Build and submit an http request : my $request = HTTP::Request->new('GET', $url); # Authenticate if username and password are supplied if ( defined($username) && defined($password) ) { $request->authorization_basic($username, $password); } my $timer = time(); my $http_response = $ua->request( $request ); $timer = time()-$timer; my $status = $np->check_threshold( 'check' => $timer, 'warning' => $warn_t, 'critical' => $crit_t, ); $np->add_perfdata( 'label' => 't', 'value' => sprintf('%.6f',$timer), 'min' => 0, 'uom' => 's', 'threshold' => $np->threshold() ); if ( $status > OK ) { $np->add_message($status, sprintf(_gt("Response time degraded: %.6fs !"),$timer) ); } my $message = 'msg'; if ( $http_response->is_error() ) { my $err = $http_response->code." ".status_message($http_response->code)." (".$http_response->message.")"; $np->add_message(CRITICAL, _gt("HTTP error: ").$err ); } elsif ( ! $http_response->is_success() ) { my $err = $http_response->code." ".status_message($http_response->code)." (".$http_response->message.")"; $np->add_message(CRITICAL, _gt("Internal error: ").$err ); } ($status, $message) = $np->check_messages(); if ( $http_response->is_success() ) { # Get xml content ... my $stats = $http_response->content; if ($DEBUG) { print "------------------===http output===------------------\n$stats\n-----------------------------------------------------\n"; print "t=".$timer."s\n"; }; my @fields = (); my @rows = split(/\n/,$stats); if ( $rows[0] =~ /#\ \w+/ ) { $rows[0] =~ s/#\ //; @fields = split(/\,/,$rows[0]); } else { $np->nagios_exit(UNKNOWN, _gt("Can't find csv header !") ); } my %stats = (); for ( my $y = 1; $y < $#rows; $y++ ) { my @values = split(/\,/,$rows[$y]); if ( !defined($stats{$values[0]}) ) { $stats{$values[0]} = {}; } if ( !defined($stats{$values[0]}{$values[1]}) ) { $stats{$values[0]}{$values[1]} = {}; } for ( my $x = 2,; $x <= $#values; $x++ ) { # $stats{pxname}{svname}{valuename} $stats{$values[0]}{$values[1]}{$fields[$x]} = $values[$x]; } } # print Dumper(\%stats); my %stats2 = (); my $okMsg = ''; foreach my $pxname ( keys(%stats) ) { $stats2{$pxname} = { 'act' => 0, 'acttot' => 0, 'bck' => 0, 'bcktot' => 0, 'scur' => 0, 'slim' => 0, }; foreach my $svname ( keys(%{$stats{$pxname}}) ) { if ( $stats{$pxname}{$svname}{'type'} eq '2' ) { my $svstatus = $stats{$pxname}{$svname}{'status'} eq 'UP'; my $active = $stats{$pxname}{$svname}{'act'} eq '1'; my $activeDescr = $active ? _gt("Active service") :_gt("Backup service") ; if ( $stats{$pxname}{$svname}{'status'} eq 'UP' ) { logD( sprintf(_gt("%s '%s' is up on '%s' proxy."),$activeDescr,$svname,$pxname) ); } elsif ( $stats{$pxname}{$svname}{'status'} eq 'DOWN' ) { $np->add_message(CRITICAL, sprintf(_gt("%s '%s' is DOWN on '%s' proxy !"),$activeDescr,$svname,$pxname) ); } if ( $stats{$pxname}{$svname}{'act'} eq '1' ) { $stats2{$pxname}{'acttot'}++; $stats2{$pxname}{'act'} += $svstatus; } elsif ($stats{$pxname}{$svname}{'bck'} eq '1') { $stats2{$pxname}{'bcktot'}++; $stats2{$pxname}{'bck'} += $svstatus; } $stats2{$pxname}{'scur'} += $stats{$pxname}{$svname}{'scur'}; logD( "Current sessions : ".$stats{$pxname}{$svname}{'scur'} ); } elsif ( $stats{$pxname}{$svname}{'type'} eq '0' ) { $stats2{$pxname}{'slim'} = $stats{$pxname}{$svname}{'slim'}; } } if ( $stats2{$pxname}{'acttot'} > 0 ) { $okMsg .= ' '.$pxname.' (Active: '.$stats2{$pxname}{'act'}.'/'.$stats2{$pxname}{'acttot'}; if ( $stats2{$pxname}{'bcktot'} > 0 ) { $okMsg .= ' , Backup: '.$stats2{$pxname}{'bck'}.'/'.$stats2{$pxname}{'bcktot'}; } $okMsg .= ')'; $np->add_perfdata( 'label' => 'sess_'.$pxname, 'value' => $stats2{$pxname}{'scur'}, 'min' => 0, 'uom' => 'sessions', 'max' => $stats2{$pxname}{'slim'}, ); } } # print Dumper(\%stats2); ($status, $message) = $np->check_messages('join' => ' '); if ( $status == OK ) { $message = $okMsg; } } # if ( $verbose ) { # ($status, $message) = $np->check_messages('join' => '
','join_all' => '
'); # } else { # ($status, $message) = $np->check_messages('join' => '
'); # } $np->nagios_exit($status, $message ); sub logD { print STDERR 'DEBUG: '.$_[0]."\n" if ($DEBUG); } sub logW { print STDERR 'WARNING: '.$_[0]."\n" if ($DEBUG); } # Gettext wrapper sub _gt { return gettext($_[0]); } __END__ =head1 NAME This Nagios plugins check the statistics url provided by HAProxy (http://haproxy.1wt.eu/). =head1 NAGIOS CONGIGURATIONS In F you have to add : define command { command_name check_haproxy command_line $USER1$/check_haproxy.pl -u $ARG1$ } In F you just have to add something like : define service { host_name haproxy.exemple.org normal_check_interval 10 retry_check_interval 5 contact_groups linux-admins service_description HAProxy check_command check_haproxy!http://haproxy.exemple.org/haproxy?stats;csv } =head1 AUTHOR Stéphane Urbanovski =cutnagios-plugins-contrib-9.20140106/check_haproxy/control0000644000000000000000000000066612262515026017646 0ustar Homepage: http://cvs.orion.education.fr/viewvc/viewvc.cgi/nagios-plugins-perl/trunk/plugins/check_haproxy.pl?view=log Watch: http://cvs.orion.education.fr/viewvc/viewvc.cgi/nagios-plugins-perl/trunk/plugins/check_haproxy.pl?view=log Recommends: liblocale-gettext-perl, liblwp-useragent-determined-perl Version: rev135 Uploaders: Jan Wagner Description: plugin check the HAProxy statistics url nagios-plugins-contrib-9.20140106/check_haproxy/haproxy.cfg0000644000000000000000000000025712262515026020412 0ustar # 'check_haproxy' command definition define command{ command_name check_haproxy command_line /usr/lib/nagios/plugins/check_haproxy -u '$ARG1$' } nagios-plugins-contrib-9.20140106/check_haproxy/copyright0000644000000000000000000000033612262515026020170 0ustar 2010 Stéphane Urbanovski License: GPL v2 On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". nagios-plugins-contrib-9.20140106/check_haproxy/Makefile0000644000000000000000000000005112262515026017667 0ustar #/usr/bin/make -f include ../common.mk nagios-plugins-contrib-9.20140106/check_webinject/0000755000000000000000000000000012262515026016513 5ustar nagios-plugins-contrib-9.20140106/check_webinject/control0000644000000000000000000000105212262515026020114 0ustar Homepage: http://labs.consol.de/lang/en/nagios/check_webinject/ Watch: http://labs.consol.de/lang/en/nagios/check_webinject/ check_webinject-([0-9.]+)\.tar\.gz Uploaders: Bernd Zeimetz Recommends: libwebinject-perl Description: plugin for testing web services It uses the WebInject Perl module for automated testing of web applications and web services. It can be used to check individual system components that have HTTP interfaces (JSP, ASP, CGI, PHP, AJAX, Servlets, HTML Forms, XML/SOAP Web Services, REST, etc). Version: 1.80 nagios-plugins-contrib-9.20140106/check_webinject/check_webinject0000755000000000000000000022214412262515026021555 0ustar #!/usr/bin/perl # nagios: +epn package Webinject; # Copyright 2010-2012 Sven Nierlein (nierlein@cpan.org) # Copyright 2004-2006 Corey Goldberg (corey@goldb.org) # # This file is part of WebInject. # # WebInject 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. # # WebInject 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. use 5.006; use strict; use warnings; use Carp; use LWP; use HTTP::Request::Common; use HTTP::Cookies; use XML::Simple; use Time::HiRes 'time', 'sleep'; use Getopt::Long; use Crypt::SSLeay; # for SSL/HTTPS (you may comment this out if you don't need it) use XML::Parser; # for web services verification (you may comment this out if aren't doing XML verifications for web services) use Error qw(:try); # for web services verification (you may comment this out if aren't doing XML verifications for web services) use Data::Dumper; # dump hashes for debugging use File::Temp qw/ tempfile /; # create temp files our $VERSION = '1.80'; =head1 NAME Webinject - Perl Module for testing web services =head1 SYNOPSIS use Webinject; my $webinject = Webinject->new(reporttype => "nagios", timeout => 30, break_on_errors => 1); $webinject->engine(); =head1 DESCRIPTION WebInject is a free tool for automated testing of web applications and web services. It can be used to test individual system components that have HTTP interfaces (JSP, ASP, CGI, PHP, AJAX, Servlets, HTML Forms, XML/SOAP Web Services, REST, etc), and can be used as a test harness to create a suite of [HTTP level] automated functional, acceptance, and regression tests. A test harness allows you to run many test cases and collect/report your results. WebInject offers real-time results display and may also be used for monitoring system response times. =head1 CONSTRUCTOR =head2 new ( [ARGS] ) Creates an C object. =over 4 =item reporttype possible values are 'standard', 'nagios', 'nagios2', 'mrtg' or 'external:' =item nooutput suppress all output to STDOUT, create only logilfes =item break_on_errors stop after the first testcase fails, otherwise Webinject would go on and execute all tests regardless of the previous case. =item timeout Default timeout is 180seconds. Timeout starts again for every testcase. =item useragent Set the useragent used in HTTP requests. Default is 'Webinject'. =item max_redirect Set maximum number of HTTP redirects. Default is 0. =item proxy Sets a proxy which is then used for http and https requests. =item output_dir Output directory where all logfiles will go to. Defaults to current directory. =item globalhttplog Can be 'yes' or 'onfail'. Will log the http request and response to a http.log file. =item httpauth Provides credentials for webserver authentications. The format is: ['servername', 'portnumber', 'realm-name', 'username', 'password'] =item baseurl the value can be used as {BASEURL} in the test cases =item baseurl1 the value can be used as {BASEURL1} in the test cases =item baseurl2 the value can be used as {BASEURL2} in the test cases =item standaloneplot can be "on" or "off". Default is off. Create gnuplot graphs when enabled. =item graphtype Defaults to 'lines' =item gnuplot Defines the path to your gnuplot binary. =back =cut sub new { my $class = shift; my (%options) = @_; $| = 1; # don't buffer output to STDOUT my $self = {}; bless $self, $class; # set default config options $self->_set_defaults(); for my $opt_key ( keys %options ) { if( exists $self->{'config'}->{$opt_key} ) { if($opt_key eq 'httpauth') { $self->_set_http_auth($options{$opt_key}); } else { $self->{'config'}->{$opt_key} = $options{$opt_key}; } } else { $self->_usage("ERROR: unknown option: ".$opt_key); } } # get command line options $self->_getoptions(); return $self; } ######################################## =head1 METHODS =head2 engine start the engine of webinject =cut sub engine { #wrap the whole engine in a subroutine so it can be integrated with the gui my $self = shift; if($self->{'gui'}) { $self->_gui_initial(); } else { # delete files leftover from previous run (do this here so they are whacked each run) $self->_whackoldfiles(); } $self->_processcasefile(); my $useragent = $self->_get_useragent(); # write opening tags for STDOUT. $self->_writeinitialstdout(); # create the gnuplot config file $self->_plotcfg(); # timer for entire test run my $startruntimer = time(); # process test case files named in config for my $currentcasefile ( @{ $self->{'casefilelist'} } ) { #print "\n$currentcasefile\n\n"; my $resultfile = { 'name' => $currentcasefile, 'cases' => [], }; if($self->{'gui'}) { $self->_gui_processing_msg($currentcasefile); } my $tempfile = $self->_convtestcases($currentcasefile); my $xmltestcases; eval { $xmltestcases = XMLin( $tempfile, varattr => 'varname', variables => $self->{'config'} ); # slurp test case file to parse (and specify variables tag) }; if($@) { my $error = $@; $error =~ s/^\s*//mx; $self->_usage("ERROR: reading xml test case ".$currentcasefile." failed: ".$error); } unless( defined $xmltestcases->{case} ) { $self->_usage("ERROR: no test cases defined!"); } # fix case if there is only one case if( defined $xmltestcases->{'case'}->{'id'} ) { my $tmpcase = $xmltestcases->{'case'}; $xmltestcases->{'case'} = { $tmpcase->{'id'} => $tmpcase }; } #delete the temp file as soon as we are done reading it if ( -e $tempfile ) { unlink $tempfile; } my $repeat = 1; if(defined $xmltestcases->{repeat} and $xmltestcases->{repeat} > 0) { $repeat = $xmltestcases->{repeat}; } my $useragent = $self->_get_useragent(); for my $run_nr (1 .. $repeat) { # process cases in sorted order for my $testnum ( sort { $a <=> $b } keys %{ $xmltestcases->{case} } ) { # if an XPath Node is defined, only process the single Node if( $self->{'xnode'} ) { $testnum = $self->{'xnode'}; } # create testcase my $case = { 'id' => $testnum }; # populate variables with values from testcase file, do substitutions, and revert converted values back for my $key (keys %{$xmltestcases->{'case'}->{$testnum}}) { $case->{$key} = $xmltestcases->{'case'}->{$testnum}->{$key}; } my $label = ''; if(defined $case->{'label'}) { $label = $case->{'label'}." - "; } $self->_out(qq|Test: $label$currentcasefile - $testnum \n|); $case = $self->_run_test_case($case, $useragent); push @{$resultfile->{'cases'}}, $case; # break from sub if user presses stop button in gui if( $self->{'switches'}->{'stop'} eq 'yes' ) { my $rc = $self->_finaltasks(); $self->{'switches'}->{'stop'} = 'no'; return $rc; # break from sub } # break here if the last result was an error if($self->{'config'}->{'break_on_errors'} and $self->{'result'}->{'iscritical'}) { last; } # if an XPath Node is defined, only process the single Node if( $self->{'xnode'} ) { last; } } } push @{$self->{'result'}->{'files'}}, $resultfile; } my $endruntimer = time(); $self->{'result'}->{'totalruntime'} = ( int( 1000 * ( $endruntimer - $startruntimer ) ) / 1000 ); #elapsed time rounded to thousandths # do return/cleanup tasks return $self->_finaltasks(); } ################################################################################ # runs a single test case sub _run_test_case { my($self,$case,$useragent) =@_; confess("no testcase!") unless defined $case; # set some defaults $case->{'id'} = 1 unless defined $case->{'id'}; $case->{'passedcount'} = 0; $case->{'failedcount'} = 0; $case->{'iswarning'} = 0; $case->{'iscritical'} = 0; $case->{'messages'} = []; $useragent = $self->_get_useragent() unless defined $useragent; # don't do this if monitor is disabled in gui if($self->{'gui'} and $self->{'monitorenabledchkbx'} ne 'monitor_off') { my $curgraphtype = $self->{'config'}->{'graphtype'}; } # used to replace parsed {timestamp} with real timestamp value my $timestamp = time(); for my $key (keys %{$case}) { $case->{$key} = $self->_convertbackxml($case->{$key}, $timestamp); next if $key eq 'errormessage'; $case->{$key} = $self->_convertbackxmlresult($case->{$key}); } if( $self->{'gui'} ) { $self->_gui_tc_descript($case); } push @{$case->{'messages'}}, { 'html' => "" }; # HTML: open table column for(qw/description1 description2/) { next unless defined $case->{$_}; $self->_out(qq|Desc: $case->{$_}\n|); push @{$case->{'messages'}}, {'key' => $_, 'value' => $case->{$_}, 'html' => "$case->{$_}
" }; } my $method; if (defined $case->{method}) { $method = uc($case->{method}); } else { $method = "GET"; } push @{$case->{'messages'}}, { 'html' => qq|$method $case->{url}
\n| }; push @{$case->{'messages'}}, { 'html' => "" }; # HTML: next column my($latency,$request,$response); alarm($self->{'config'}->{'timeout'}+1); # timeout should be handled by LWP, but just in case... eval { local $SIG{ALRM} = sub { die("alarm") }; if($case->{method}){ if(lc $case->{method} eq "get") { ($latency,$request,$response) = $self->_httpget($useragent, $case); } elsif(lc $case->{method} eq "post") { ($latency,$request,$response) = $self->_httppost($useragent, $case); } else { $self->_usage('ERROR: bad HTTP Request Method Type, you must use "get" or "post"'); } } else { ($latency,$request,$response) = $self->_httpget($useragent, $case); # use "get" if no method is specified } }; alarm(0); if($@) { $case->{'iscritical'} = 1; } else { $case->{'latency'} = $latency; $case->{'request'} = $request->as_string(); $case->{'response'} = $response->as_string(); # verify result from http response $self->_verify($response, $case); if($case->{verifypositivenext}) { $self->{'verifylater'} = $case->{'verifypositivenext'}; $self->_out("Verify On Next Case: '".$case->{verifypositivenext}."' \n"); push @{$case->{'messages'}}, {'key' => 'verifypositivenext', 'value' => $case->{verifypositivenext}, 'html' => "Verify On Next Case: ".$case->{verifypositivenext}."
" }; } if($case->{verifynegativenext}) { $self->{'verifylaterneg'} = $case->{'verifynegativenext'}; $self->_out("Verify Negative On Next Case: '".$case->{verifynegativenext}."' \n"); push @{$case->{'messages'}}, {'key' => 'verifynegativenext', 'value' => $case->{verifynegativenext}, 'html' => "Verify Negative On Next Case: ".$case->{verifynegativenext}."
" }; } # write to http.log file $self->_httplog($request, $response, $case); # send perf data to log file for plotting $self->_plotlog($latency); # call the external plotter to create a graph $self->_plotit(); if( $self->{'gui'} ) { $self->_gui_updatemontab(); # update monitor with the newly rendered plot graph } $self->_parseresponse($response, $case); # grab string from response to send later # make parsed results available in the errormessage for my $key (keys %{$case}) { next unless $key eq 'errormessage'; $case->{$key} = $self->_convertbackxmlresult($case->{$key}); } } push @{$case->{'messages'}}, { 'html' => "\n" }; # HTML: next column # if any verification fails, test case is considered a failure if($case->{'iscritical'}) { # end result will be also critical $self->{'result'}->{'iscritical'} = 1; push @{$case->{'messages'}}, {'key' => 'success', 'value' => 'false' }; if( $self->{'result'}->{'returnmessage'} ) { # Add returnmessage to the output my $prefix = "case #".$case->{'id'}.": "; if(defined $case->{'label'}) { $prefix = $case->{'label'}." (case #".$case->{'id'}."): "; } $self->{'result'}->{'returnmessage'} = $prefix.$self->{'result'}->{'returnmessage'}; my $message = $self->{'result'}->{'returnmessage'}; $message = $message.' - '.$case->{errormessage} if defined $case->{errormessage}; push @{$case->{'messages'}}, { 'key' => 'result-message', 'value' => $message, 'html' => "FAILED : ".$message."" }; $self->_out("TEST CASE FAILED : ".$message."\n"); } # print regular error output elsif ( $case->{errormessage} ) { # Add defined error message to the output push @{$case->{'messages'}}, { 'key' => 'result-message', 'value' => $case->{errormessage}, 'html' => "FAILED : ".$case->{errormessage}."" }; $self->_out(qq|TEST CASE FAILED : $case->{errormessage}\n|); } else { push @{$case->{'messages'}}, { 'key' => 'result-message', 'value' => 'TEST CASE FAILED', 'html' => "FAILED" }; $self->_out(qq|TEST CASE FAILED\n|); } unless( $self->{'result'}->{'returnmessage'} ) { #(used for plugin compatibility) if it's the first error message, set it to variable if( $case->{errormessage} ) { $self->{'result'}->{'returnmessage'} = $case->{errormessage}; } else { $self->{'result'}->{'returnmessage'} = "Test case number ".$case->{'id'}." failed"; if(defined $case->{'label'}) { $self->{'result'}->{'returnmessage'} = "Test case ".$case->{'label'}." (#".$case->{'id'}.") failed"; } } } if( $self->{'gui'} ) { $self->_gui_status_failed(); } } elsif($case->{'iswarning'}) { # end result will be also warning $self->{'result'}->{'iswarning'} = 1; push @{$case->{'messages'}}, {'key' => 'success', 'value' => 'false' }; if( $case->{errormessage} ) { # Add defined error message to the output push @{$case->{'messages'}}, {'key' => 'result-message', 'value' => $case->{errormessage}, 'html' => "WARNED : ".$case->{errormessage}."" }; $self->_out(qq|TEST CASE WARNED : $case->{errormessage}\n|); } # print regular error output else { # we suppress most logging when running in a plugin mode push @{$case->{'messages'}}, {'key' => 'result-message', 'value' => 'TEST CASE WARNED', 'html' => "WARNED" }; $self->_out(qq|TEST CASE WARNED\n|); } unless( $self->{'result'}->{'returnmessage'} ) { #(used for plugin compatibility) if it's the first error message, set it to variable if( $case->{errormessage} ) { $self->{'result'}->{'returnmessage'} = $case->{errormessage}; } else { $self->{'result'}->{'returnmessage'} = "Test case number ".$case->{'id'}." warned"; if(defined $case->{'label'}) { $self->{'result'}->{'returnmessage'} = "Test case ".$case->{'label'}." (#".$case->{'id'}.") warned"; } } } if( $self->{'gui'} ) { $self->_gui_status_failed(); } } else { $self->_out(qq|TEST CASE PASSED\n|); push @{$case->{'messages'}}, {'key' => 'success', 'value' => 'true' }; push @{$case->{'messages'}}, { 'key' => 'result-message', 'value' => 'TEST CASE PASSED', 'html' => "PASSED" }; if( $self->{'gui'} ) { $self->_gui_status_passed(); } } if( $self->{'gui'} ) { $self->_gui_timer_output($latency); } $self->_out(qq|Response Time = $latency sec \n|); $self->_out(qq|------------------------------------------------------- \n|); push @{$case->{'messages'}}, { 'key' => 'responsetime', 'value' => $latency, 'html' => "
".$latency." sec \n" }; $self->{'result'}->{'runcount'}++; $self->{'result'}->{'totalruncount'}++; if( $self->{'gui'} ) { # update the statusbar $self->_gui_statusbar(); } if( $latency > $self->{'result'}->{'maxresponse'} ) { # set max response time $self->{'result'}->{'maxresponse'} = $latency; } if(!defined $self->{'result'}->{'minresponse'} or $latency < $self->{'result'}->{'minresponse'} ) { # set min response time $self->{'result'}->{'minresponse'} = $latency; } # keep total of response times for calculating avg $self->{'result'}->{'totalresponse'} = ( $self->{'result'}->{'totalresponse'} + $latency ); # avg response rounded to thousands $self->{'result'}->{'avgresponse'} = ( int( 1000 * ( $self->{'result'}->{'totalresponse'} / $self->{'result'}->{'totalruncount'} ) ) / 1000 ); if( $self->{'gui'} ) { # update timers and counts in monitor tab $self->_gui_updatemonstats(); } # if a sleep value is set in the test case, sleep that amount if( $case->{sleep} ) { sleep( $case->{sleep} ); } $self->{'result'}->{'totalpassedcount'} += $case->{'passedcount'}; $self->{'result'}->{'totalfailedcount'} += $case->{'failedcount'}; if($case->{'iscritical'} or $case->{'iswarning'}) { $self->{'result'}->{'totalcasesfailedcount'}++; } else { $self->{'result'}->{'totalcasespassedcount'}++; } return $case; } ################################################################################ sub _get_useragent { my $self = shift; # construct LWP object my $useragent = LWP::UserAgent->new(keep_alive=>1); # store cookies in our LWP object my $fh; our $cookietempfilename; ($fh, $cookietempfilename) = tempfile(undef, UNLINK => 1); unlink ($cookietempfilename); $useragent->cookie_jar(HTTP::Cookies->new( file => $cookietempfilename, autosave => 1, )); # http useragent that will show up in webserver logs unless(defined $self->{'config'}->{'useragent'}) { $useragent->agent('WebInject'); } else { $useragent->agent($self->{'config'}->{'useragent'}); } # add proxy support if it is set in config.xml if( $self->{'config'}->{'proxy'} ) { my $proxy = $self->{'config'}->{'proxy'}; $proxy =~ s/^http:\/\///mx; $useragent->proxy([qw( http )], "http://".$proxy); $ENV{'HTTPS_PROXY'} = "http://".$proxy; } # don't follow redirects unless set by config push @{$useragent->requests_redirectable}, 'POST'; $useragent->max_redirect($self->{'config'}->{'max_redirect'}); # add http basic authentication support # corresponds to: # $useragent->credentials('servername:portnumber', 'realm-name', 'username' => 'password'); if(scalar @{$self->{'config'}->{'httpauth'}}) { # add the credentials to the user agent here. The foreach gives the reference to the tuple ($elem), and we # deref $elem to get the array elements. for my $elem ( @{ $self->{'config'}->{'httpauth'} } ) { #print "adding credential: $elem->[0]:$elem->[1], $elem->[2], $elem->[3] => $elem->[4]\n"; $useragent->credentials( $elem->[0].":".$elem->[1], $elem->[2], $elem->[3] => $elem->[4] ); } } # change response delay timeout in seconds if it is set in config.xml if($self->{'config'}->{'timeout'}) { $useragent->timeout($self->{'config'}->{'timeout'}); # default LWP timeout is 180 secs. } return $useragent; } ################################################################################ # set defaults sub _set_defaults { my $self = shift; $self->{'config'} = { 'currentdatetime' => scalar localtime time, #get current date and time for results report 'standaloneplot' => 'off', 'graphtype' => 'lines', 'httpauth' => [], 'reporttype' => 'standard', 'output_dir' => './', 'nooutput' => undef, 'baseurl' => '', 'baseurl1' => '', 'baseurl2' => '', 'break_on_errors' => 0, 'max_redirect' => 0, 'globalhttplog' => 'no', 'proxy' => '', 'timeout' => 180, }; $self->{'exit_codes'} = { 'UNKNOWN' => 3, 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, }; $self->{'switches'} = { 'stop' => 'no', 'plotclear' => 'no', }; $self->{'out'} = ''; $self->_reset_result(); return; } ################################################################################ # reset result sub _reset_result { my $self = shift; $self->{'result'} = { 'cases' => [], 'returnmessage' => undef, 'totalcasesfailedcount' => 0, 'totalcasespassedcount' => 0, 'totalfailedcount' => 0, 'totalpassedcount' => 0, 'totalresponse' => 0, 'totalruncount' => 0, 'totalruntime' => 0, 'casecount' => 0, 'avgresponse' => 0, 'iscritical' => 0, 'iswarning' => 0, 'maxresponse' => 0, 'minresponse' => undef, 'runcount' => 0, }; return; } ################################################################################ # write initial text for STDOUT sub _writeinitialstdout { my $self = shift; if($self->{'config'}->{'reporttype'} !~ /^nagios/mx) { $self->_out(qq| Starting WebInject Engine (v$Webinject::VERSION)... |); } $self->_out("-------------------------------------------------------\n"); return; } ################################################################################ # write summary and closing tags for results file sub _write_result_html { my $self = shift; my $file = $self->{'config'}->{'output_dir'}."results.html"; open( my $resultshtml, ">", $file ) or $self->_usage("ERROR: Failed to write ".$file.": ".$!); print $resultshtml qq| WebInject Test Results |; for my $file (@{$self->{'result'}->{'files'}}) { for my $case (@{$file->{'cases'}}) { print $resultshtml qq|\n|; for my $message (@{$case->{'messages'}}) { next unless defined $message->{'html'}; print $resultshtml $message->{'html'} . "\n"; } print $resultshtml "\n"; } } print $resultshtml qq|
Test Description
Request URL
Results Summary
Response Time
$file->{'name'}
$case->{'id'}
Start Time: $self->{'config'}->{'currentdatetime'}
Total Run Time: $self->{'result'}->{'totalruntime'} seconds

Test Cases Run: $self->{'result'}->{'totalruncount'}
Test Cases Passed: $self->{'result'}->{'totalcasespassedcount'}
Test Cases Failed: $self->{'result'}->{'totalcasesfailedcount'}
Verifications Passed: $self->{'result'}->{'totalpassedcount'}
Verifications Failed: $self->{'result'}->{'totalfailedcount'}

Average Response Time: $self->{'result'}->{'avgresponse'} seconds
Max Response Time: $self->{'result'}->{'maxresponse'} seconds
Min Response Time: $self->{'result'}->{'minresponse'} seconds

|; close($resultshtml); return; } ################################################################################ # write summary and closing tags for XML results file sub _write_result_xml { my $self = shift; my $file = $self->{'config'}->{'output_dir'}."results.xml"; open( my $resultsxml, ">", $file ) or $self->_usage("ERROR: Failed to write ".$file.": ".$!); print $resultsxml "\n\n"; for my $file (@{$self->{'result'}->{'files'}}) { print $resultsxml " {'name'}."\">\n\n"; for my $case (@{$file->{'cases'}}) { print $resultsxml " {'id'}."\">\n"; for my $message (@{$case->{'messages'}}) { next unless defined $message->{'key'}; print $resultsxml " <".$message->{'key'}.">".$message->{'value'}."{'key'}.">\n"; } print $resultsxml " \n\n"; } print $resultsxml " \n"; } print $resultsxml qq| $self->{'config'}->{'currentdatetime'} $self->{'result'}->{'totalruntime'} $self->{'result'}->{'totalruncount'} $self->{'result'}->{'totalcasespassedcount'} $self->{'result'}->{'totalcasesfailedcount'} $self->{'result'}->{'totalpassedcount'} $self->{'result'}->{'totalfailedcount'} $self->{'result'}->{'avgresponse'} $self->{'result'}->{'maxresponse'} $self->{'result'}->{'minresponse'} |; close($resultsxml); return; } ################################################################################ # write summary and closing text for STDOUT sub _writefinalstdout { my $self = shift; if($self->{'config'}->{'reporttype'} !~ /^nagios/mx) { $self->_out(qq| Start Time: $self->{'config'}->{'currentdatetime'} Total Run Time: $self->{'result'}->{'totalruntime'} seconds |); } $self->_out(qq| Test Cases Run: $self->{'result'}->{'totalruncount'} Test Cases Passed: $self->{'result'}->{'totalcasespassedcount'} Test Cases Failed: $self->{'result'}->{'totalcasesfailedcount'} Verifications Passed: $self->{'result'}->{'totalpassedcount'} Verifications Failed: $self->{'result'}->{'totalfailedcount'} |); return; } ################################################################################ sub _http_defaults { my $self = shift; my $request = shift; my $useragent = shift; my $case = shift; # add an additional HTTP Header if specified if($case->{'addheader'}) { # can add multiple headers with a pipe delimiter for my $addheader (split /\|/mx, $case->{'addheader'}) { $addheader =~ m~(.*):\ (.*)~mx; $request->header( $1 => $2 ); # using HTTP::Headers Class } } # print $self->{'request'}->as_string; print "\n\n"; my $starttimer = time(); my $response = $useragent->request($request); my $endtimer = time(); my $latency = ( int( 1000 * ( $endtimer - $starttimer ) ) / 1000 ); # elapsed time rounded to thousandths # print $response->as_string; print "\n\n"; return($latency,$request,$response); } ################################################################################ # send http request and read response sub _httpget { my $self = shift; my $useragent = shift; my $case = shift; $self->_out("GET Request: ".$case->{url}."\n"); my $request = new HTTP::Request( 'GET', $case->{url} ); return $self->_http_defaults($request, $useragent, $case); } ################################################################################ # post request based on specified encoding sub _httppost { my $self = shift; my $useragent = shift; my $case = shift; if($case->{posttype} ) { if($case->{posttype} =~ m~application/x\-www\-form\-urlencoded~mx) { return $self->_httppost_form_urlencoded($useragent, $case); } elsif($case->{posttype} =~ m~multipart/form\-data~mx) { return $self->_httppost_form_data($useragent, $case); } elsif( ($case->{posttype} =~ m~text/xml~mx) or ($case->{posttype} =~ m~application/soap\+xml~mx) ) { return $self->_httppost_xml($useragent, $case); } else { $self->_usage('ERROR: Bad Form Encoding Type, I only accept "application/x-www-form-urlencoded", "multipart/form-data", "text/xml", "application/soap+xml"'); } } else { # use "x-www-form-urlencoded" if no encoding is specified $case->{posttype} = 'application/x-www-form-urlencoded'; return $self->_httppost_form_urlencoded($useragent, $case); } return; } ################################################################################ # send application/x-www-form-urlencoded HTTP request and read response sub _httppost_form_urlencoded { my $self = shift; my $useragent = shift; my $case = shift; $self->_out("POST Request: ".$case->{url}."\n"); my $request = new HTTP::Request('POST', $case->{url} ); $request->content_type($case->{posttype}); $request->content($case->{postbody}); return $self->_http_defaults($request,$useragent, $case); } ################################################################################ # send text/xml HTTP request and read response sub _httppost_xml { my $self = shift; my $useragent = shift; my $case = shift; my($latency,$request,$response); # read the xml file specified in the testcase $case->{postbody} =~ m~file=>(.*)~imx; open( my $xmlbody, "<", $1 ) or $self->_usage("ERROR: Failed to open text/xml file ".$1.": ".$!); # open file handle my @xmlbody = <$xmlbody>; # read the file into an array close($xmlbody); # Get the XML input file to use PARSEDRESULT and substitute the contents my $content = $self->_convertbackxmlresult(join( " ", @xmlbody )); $self->_out("POST Request: ".$case->{url}."\n"); $request = new HTTP::Request( 'POST', $case->{url} ); $request->content_type($case->{posttype}); $request->content( $content ); # load the contents of the file into the request body ($latency,$request,$response) = $self->_http_defaults($request, $useragent, $case); my $xmlparser = new XML::Parser; # see if the XML parses properly try { $xmlparser->parse($response->decoded_content); # print "good xml\n"; push @{$case->{'messages'}}, {'key' => 'verifyxml-success', 'value' => 'true', 'html' => 'Passed XML Parser (content is well-formed)' }; $self->_out("Passed XML Parser (content is well-formed) \n"); $case->{'passedcount'}++; # exit try block return; } catch Error with { # get the exception object my $ex = shift; # print "bad xml\n"; # we suppress most logging when running in a plugin mode if($self->{'config'}->{'reporttype'} eq 'standard') { push @{$case->{'messages'}}, {'key' => 'verifyxml-success', 'value' => 'false', 'html' => "Failed XML parser on response: ".$ex }; } $self->_out("Failed XML parser on response: $ex \n"); $case->{'failedcount'}++; $case->{'iscritical'} = 1; }; # <-- remember the semicolon return($latency,$request,$response); } ################################################################################ # send multipart/form-data HTTP request and read response sub _httppost_form_data { my $self = shift; my $useragent = shift; my $case = shift; my %myContent_; ## no critic eval "\%myContent_ = $case->{postbody}"; ## use critic $self->_out("POST Request: ".$case->{url}."\n"); my $request = POST($case->{url}, Content_Type => $case->{posttype}, Content => \%myContent_); return $self->_http_defaults($request, $useragent, $case); } ################################################################################ # do verification of http response and print status to HTML/XML/STDOUT/UI sub _verify { my $self = shift; my $response = shift; my $case = shift; confess("no response") unless defined $response; confess("no case") unless defined $case; if( $case->{verifyresponsecode} ) { $self->_out(qq|Verify Response Code: "$case->{verifyresponsecode}" \n|); push @{$case->{'messages'}}, {'key' => 'verifyresponsecode', 'value' => $case->{verifyresponsecode} }; # verify returned HTTP response code matches verifyresponsecode set in test case if ( $case->{verifyresponsecode} == $response->code() ) { push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-success', 'value' => 'true', 'html' => 'Passed HTTP Response Code: '.$case->{verifyresponsecode} }; push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-messages', 'value' => 'Passed HTTP Response Code Verification' }; $self->_out(qq|Passed HTTP Response Code Verification \n|); $case->{'passedcount'}++; } else { push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-success', 'value' => 'false', 'html' => 'Failed HTTP Response Code: received '.$response->code().', expecting '.$case->{verifyresponsecode} }; push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-messages', 'value' => 'Failed HTTP Response Code Verification (received '.$response->code().', expecting '.$case->{verifyresponsecode}.')' }; $self->_out(qq|Failed HTTP Response Code Verification (received |.$response->code().qq|, expecting $case->{verifyresponsecode}) \n|); $case->{'failedcount'}++; $case->{'iscritical'} = 1; if($self->{'config'}->{'break_on_errors'}) { $self->{'result'}->{'returnmessage'} = 'Failed HTTP Response Code Verification (received '.$response->code().', expecting '.$case->{verifyresponsecode}.')'; return; } } } else { # verify http response code is in the 100-399 range if($response->as_string() =~ /HTTP\/1.(0|1)\ (1|2|3)/imx ) { # verify existance of string in response push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-success', 'value' => 'true', 'html' => 'Passed HTTP Response Code Verification (not in error range)' }; push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-messages', 'value' => 'Passed HTTP Response Code Verification (not in error range)' }; $self->_out(qq|Passed HTTP Response Code Verification (not in error range) \n|); # succesful response codes: 100-399 $case->{'passedcount'}++; } else { $response->as_string() =~ /(HTTP\/1.)(.*)/mxi; if($1) { #this is true if an HTTP response returned push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-success', 'value' => 'false', 'html' => 'Failed HTTP Response Code Verification ('.$1.$2.')' }; push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-messages', 'value' => 'Failed HTTP Response Code Verification ('.$1.$2.')' }; $self->_out("Failed HTTP Response Code Verification ($1$2) \n"); #($1$2) is HTTP response code $case->{'failedcount'}++; $case->{'iscritical'} = 1; if($self->{'config'}->{'break_on_errors'}) { $self->{'result'}->{'returnmessage'} = 'Failed HTTP Response Code Verification ('.$1.$2.')'; return; } } #no HTTP response returned.. could be error in connection, bad hostname/address, or can not connect to web server else { push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-success', 'value' => 'false', 'html' => 'Failed - No Response' }; push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-messages', 'value' => 'Failed - No Response' }; $self->_out("Failed - No valid HTTP response:\n".$response->as_string()); $case->{'failedcount'}++; $case->{'iscritical'} = 1; if($self->{'config'}->{'break_on_errors'}) { $self->{'result'}->{'returnmessage'} = 'Failed - No valid HTTP response: '.$response->as_string(); return; } } } } push @{$case->{'messages'}}, { 'html' => '
' }; for my $nr ('', 1..1000) { my $key = "verifypositive".$nr; if( $case->{$key} ) { $self->_out("Verify: '".$case->{$key}."' \n"); push @{$case->{'messages'}}, {'key' => $key, 'value' => $case->{$key} }; my $regex = $self->_fix_regex($case->{$key}); # verify existence of string in response if( $response->as_string() =~ m~$regex~simx ) { push @{$case->{'messages'}}, {'key' => $key.'-success', 'value' => 'true', 'html' => "Passed: ".$case->{$key} }; $self->_out("Passed Positive Verification \n"); $case->{'passedcount'}++; } else { push @{$case->{'messages'}}, {'key' => $key.'-success', 'value' => 'false', 'html' => "Failed: ".$case->{$key} }; $self->_out("Failed Positive Verification \n"); $case->{'failedcount'}++; $case->{'iscritical'} = 1; if($self->{'config'}->{'break_on_errors'}) { $self->{'result'}->{'returnmessage'} = 'Failed Positive Verification, can not find a string matching regex: '.$regex; return; } } push @{$case->{'messages'}}, { 'html' => '
' }; } elsif($nr ne '' and $nr > 5) { last; } } for my $nr ('', 1..1000) { my $key = "verifynegative".$nr; if( $case->{$key} ) { $self->_out("Verify Negative: '".$case->{$key}."' \n"); push @{$case->{'messages'}}, {'key' => $key, 'value' => $case->{$key} }; my $regex = $self->_fix_regex($case->{$key}); # verify existence of string in response if( $response->as_string() =~ m~$regex~simx ) { push @{$case->{'messages'}}, {'key' => $key.'-success', 'value' => 'false', 'html' => 'Failed Negative: '.$case->{$key} }; $self->_out("Failed Negative Verification \n"); $case->{'failedcount'}++; $case->{'iscritical'} = 1; if($self->{'config'}->{'break_on_errors'}) { $self->{'result'}->{'returnmessage'} = 'Failed Negative Verification, found regex matched string: '.$regex; return; } } else { push @{$case->{'messages'}}, {'key' => $key.'-success', 'value' => 'true', 'html' => 'Passed Negative: '.$case->{$key} }; $self->_out("Passed Negative Verification \n"); $case->{'passedcount'}++; } push @{$case->{'messages'}}, { 'html' => '
' }; } elsif($nr ne '' and $nr > 5) { last; } } if($self->{'verifylater'}) { my $regex = $self->_fix_regex($self->{'verifylater'}); # verify existence of string in response if($response->as_string() =~ m~$regex~simx ) { push @{$case->{'messages'}}, {'key' => 'verifypositivenext-success', 'value' => 'true', 'html' => 'Passed Positive Verification (verification set in previous test case)' }; $self->_out("Passed Positive Verification (verification set in previous test case) \n"); $case->{'passedcount'}++; } else { push @{$case->{'messages'}}, {'key' => 'verifypositivenext-success', 'value' => 'false', 'html' => 'Failed Positive Verification (verification set in previous test case)' }; $self->_out("Failed Positive Verification (verification set in previous test case) \n"); $case->{'failedcount'}++; $case->{'iscritical'} = 1; if($self->{'config'}->{'break_on_errors'}) { $self->{'result'}->{'returnmessage'} = 'Failed Positive Verification (verification set in previous test case), can not find a string matching regex: '.$regex; return; } } push @{$case->{'messages'}}, { 'html' => '
' }; # set to null after verification delete $self->{'verifylater'}; } if($self->{'verifylaterneg'}) { my $regex = $self->_fix_regex($self->{'verifylaterneg'}); # verify existence of string in response if($response->as_string() =~ m~$regex~simx) { push @{$case->{'messages'}}, {'key' => 'verifynegativenext-success', 'value' => 'false', 'html' => 'Failed Negative Verification (negative verification set in previous test case)' }; $self->_out("Failed Negative Verification (negative verification set in previous test case) \n"); $case->{'failedcount'}++; $case->{'iscritical'} = 1; if($self->{'config'}->{'break_on_errors'}) { $self->{'result'}->{'returnmessage'} = 'Failed Negative Verification (negative verification set in previous test case), found regex matched string: '.$regex; return; } } else { push @{$case->{'messages'}}, {'key' => 'verifynegativenext-success', 'value' => 'true', 'html' => 'Passed Negative Verification (negative verification set in previous test case)' }; $self->_out("Passed Negative Verification (negative verification set in previous test case) \n"); $case->{'passedcount'}++; } push @{$case->{'messages'}}, { 'html' => '
' }; # set to null after verification delete $self->{'verifylaterneg'}; } if($case->{'warning'}) { $self->_out("Verify Warning Threshold: ".$case->{'warning'}."\n"); push @{$case->{'messages'}}, {'key' => "Warning Threshold", 'value' => $case->{''} }; if($case->{'latency'} > $case->{'warning'}) { push @{$case->{'messages'}}, {'key' => 'warning-success', 'value' => 'false', 'html' => "Failed Warning Threshold: ".$case->{'warning'} }; $self->_out("Failed Warning Threshold \n"); $case->{'failedcount'}++; $case->{'iswarning'} = 1; } else { $self->_out("Passed Warning Threshold \n"); push @{$case->{'messages'}}, {'key' => 'warning-success', 'value' => 'true', 'html' => "Passed Warning Threshold: ".$case->{'warning'} }; $case->{'passedcount'}++; } push @{$case->{'messages'}}, { 'html' => '
' }; } if($case->{'critical'}) { $self->_out("Verify Critical Threshold: ".$case->{'critical'}."\n"); push @{$case->{'messages'}}, {'key' => "Critical Threshold", 'value' => $case->{''} }; if($case->{'latency'} > $case->{'critical'}) { push @{$case->{'messages'}}, {'key' => 'critical-success', 'value' => 'false', 'html' => "Failed Critical Threshold: ".$case->{'critical'} }; $self->_out("Failed Critical Threshold \n"); $case->{'failedcount'}++; $case->{'iscritical'} = 1; } else { $self->_out("Passed Critical Threshold \n"); push @{$case->{'messages'}}, {'key' => 'critical-success', 'value' => 'true', 'html' => "Passed Critical Threshold: ".$case->{'critical'} }; $case->{'passedcount'}++; } } return; } ################################################################################ # parse values from responses for use in future request (for session id's, dynamic URL rewriting, etc) sub _parseresponse { my $self = shift; my $response = shift; my $case = shift; my ( $resptoparse, @parseargs ); my ( $leftboundary, $rightboundary, $escape ); for my $type ( qw/parseresponse parseresponse1 parseresponse2 parseresponse3 parseresponse4 parseresponse5/ ) { next unless $case->{$type}; @parseargs = split( /\|/mx, $case->{$type} ); $leftboundary = $parseargs[0]; $rightboundary = $parseargs[1]; $escape = $parseargs[2]; $resptoparse = $response->as_string; ## no critic if ( $resptoparse =~ m~$leftboundary(.*?)$rightboundary~s ) { $self->{'parsedresult'}->{$type} = $1; } ## use critic elsif(!defined $case->{'parsewarning'} or $case->{'parsewarning'}) { push @{$case->{'messages'}}, {'key' => $type.'-success', 'value' => 'false', 'html' => "Failed Parseresult, cannot find $leftboundary(.*?)$rightboundary" }; $self->_out("Failed Parseresult, cannot find $leftboundary(*)$rightboundary\n"); $case->{'iswarning'} = 1; } if ($escape) { if ( $escape eq 'escape' ) { $self->{'parsedresult'}->{$type} = $self->_url_escape( $self->{'parsedresult'}->{$type} ); } } #print "\n\nParsed String: $self->{'parsedresult'}->{$type}\n\n"; } return; } ################################################################################ # read config.xml sub _read_config_xml { my $self = shift; my $config_file = shift; my($config, $comment_mode,@configlines); # process the config file # if -c option was set on command line, use specified config file if(defined $config_file) { open( $config, '<', $config_file ) or $self->_usage("ERROR: Failed to open ".$config_file." file: ".$!); $self->{'config'}->{'exists'} = 1; # flag we are going to use a config file } # if config.xml exists, read it elsif( -e "config.xml" ) { open( $config, '<', "config.xml" ) or $self->_usage("ERROR: Failed to open config.xml file: ".$!); $self->{'config'}->{'exists'} = 1; # flag we are going to use a config file } if( $self->{'config'}->{'exists'} ) { #if we have a config file, use it my @precomment = <$config>; #read the config file into an array #remove any commented blocks from config file foreach (@precomment) { unless (m~.*~mx) { # single line comment # multi-line comments if (//mx) { $comment_mode = 1; } elsif (m~~mx) { $comment_mode = 0; } elsif ( !$comment_mode ) { push( @configlines, $_ ); } } } close($config); } #grab values for constants in config file: foreach (@configlines) { for my $key ( qw/baseurl baseurl1 baseurl2 gnuplot proxy timeout output_dir globaltimeout globalhttplog standaloneplot max_redirect break_on_errors useragent/ ) { if (/<$key>/mx) { $_ =~ m~<$key>(.*)~mx; $self->{'config'}->{$key} = $1; #print "\n$_ : $self->{'config'}->{$_} \n\n"; } } if (//mx) { $_ =~ m~(.*)~mx; if ( $1 ne "standard" ) { $self->{'config'}->{'reporttype'} = $1; $self->{'config'}->{'nooutput'} = "set"; } #print "\nreporttype : $self->{'config'}->{'reporttype'} \n\n"; } if (//mx) { $_ =~ m~(.*)~mx; $self->_set_http_auth($1); #print "\nhttpauth : @{$self->{'config'}->{'httpauth'}} \n\n"; } if(//mx) { my $firstparse = $'; #print "$' \n\n"; $firstparse =~ m~~mx; my $filename = $`; #string between tags will be in $filename #print "\n$filename \n\n"; push @{ $self->{'casefilelist'} }, $filename; #add next filename we grab to end of array } } return; } ################################################################################ # parse and set http auth config sub _set_http_auth { my $self = shift; my $confstring = shift; #each time we see an , we set @authentry to be the #array of values, then we use [] to get a reference to that array #and push that reference onto @httpauth. my @authentry = split( /:/mx, $confstring ); if( scalar @authentry != 5 ) { $self->_usage("ERROR: httpauth should have 5 fields delimited by colons, got: ".$confstring); } else { push( @{ $self->{'config'}->{'httpauth'} }, [@authentry] ); } # basic authentication only works with redirects enabled if($self->{'config'}->{'max_redirect'} == 0) { $self->{'config'}->{'max_redirect'}++; } return; } ################################################################################ # get test case files to run (from command line or config file) and evaluate constants sub _processcasefile { # parse config file and grab values it sets my $self = shift; if( ( $#ARGV + 1 ) < 1 ) { #no command line args were passed unless( $self->{'casefilelist'}->[0] ) { if ( -e "testcases.xml" ) { # if no files are specified in config.xml, default to testcases.xml push @{ $self->{'casefilelist'} }, "testcases.xml"; } else { $self->_usage("ERROR: I can't find any test case files to run.\nYou must either use a config file or pass a filename " . "on the command line if you are not using the default testcase file (testcases.xml)."); } } } elsif( ( $#ARGV + 1 ) == 1 ) { # one command line arg was passed # use testcase filename passed on command line (config.xml is only used for other options) push @{ $self->{'casefilelist'} }, $ARGV[0]; # first commandline argument is the test case file, put this on the array for processing } elsif( ( $#ARGV + 1 ) == 2 ) { # two command line args were passed my $xpath = $ARGV[1]; if ( $xpath =~ /\/(.*)\[/mx ) { # if the argument contains a "/" and "[", it is really an XPath $xpath =~ /(.*)\/(.*)\[(.*?)\]/mx; #if it contains XPath info, just grab the file name $self->{'xnode'} = $3; # grab the XPath Node value.. (from inside the "[]") # print "\nXPath Node is: $self->{'xnode'} \n"; } else { $self->_usage("ERROR: Sorry, $xpath is not in the XPath format I was expecting, I'm ignoring it..."); } # use testcase filename passed on command line (config.xml is only used for other options) push @{ $self->{'casefilelist'} }, $ARGV[0]; # first command line argument is the test case file, put this on the array for processing } elsif ( ( $#ARGV + 1 ) > 2 ) { #too many command line args were passed $self->_usage("ERROR: Too many arguments."); } #print "\ntestcase file list: @{$self->{'casefilelist'}}\n\n"; return; } ################################################################################ # here we do some pre-processing of the test case file and write it out to a temp file. # we convert certain chars so xml parser doesn't puke. sub _convtestcases { my $self = shift; my $currentcasefile = shift; my @xmltoconvert; my ( $fh, $tempfilename ) = tempfile(); my $filename = $currentcasefile; open( my $xmltoconvert, '<', $filename ) or $self->_usage("ERROR: Failed to read test case file: ".$filename.": ".$!); # read the file into an array @xmltoconvert = <$xmltoconvert>; my $ids = {}; for my $line (@xmltoconvert) { # convert escaped chars and certain reserved chars to temporary values that the parser can handle # these are converted back later in processing $line =~ s/&/{AMPERSAND}/gmx; $line =~ s/\\{'result'}->{'casecount'}++; } # verify id is only use once per file if ( $line =~ /^\s*id\s*=\s*\"*(\d+)\"*/mx ) { if(defined $ids->{$1}) { $self->{'result'}->{'iswarning'} = 1; $self->_out("Warning: case id $1 is used more than once!\n"); } $ids->{$1} = 1; } } close($xmltoconvert); # open file handle to temp file open( $xmltoconvert, '>', $tempfilename ) or $self->_usage("ERROR: Failed to write ".$tempfilename.": ".$!); print $xmltoconvert @xmltoconvert; # overwrite file with converted array close($xmltoconvert); return $tempfilename; } ################################################################################ # converts replaced xml with substitutions sub _convertbackxml { my ( $self, $string, $timestamp ) = @_; return unless defined $string; $string =~ s~{AMPERSAND}~&~gmx; $string =~ s~{LESSTHAN}~<~gmx; $string =~ s~{TIMESTAMP}~$timestamp~gmx; $string =~ s~{BASEURL}~$self->{'config'}->{baseurl}~gmx; $string =~ s~{BASEURL1}~$self->{'config'}->{baseurl1}~gmx; $string =~ s~{BASEURL2}~$self->{'config'}->{baseurl2}~gmx; return $string; } ################################################################################ # converts replaced xml with parsed result sub _convertbackxmlresult { my ( $self, $string) = @_; return unless defined $string; $string =~ s~\{PARSEDRESULT\}~$self->{'parsedresult'}->{'parseresponse'}~gmx if defined $self->{'parsedresult'}->{'parseresponse'}; for my $x (1..5) { $string =~ s~\{PARSEDRESULT$x\}~$self->{'parsedresult'}->{"parseresponse$x"}~gmx if defined $self->{'parsedresult'}->{"parseresponse$x"}; } return $string; } ################################################################################ # escapes difficult characters with %hexvalue sub _url_escape { my ( $self, @values ) = @_; # LWP handles url encoding already, but use this to escape valid chars that LWP won't convert (like +) my @return; for my $val (@values) { $val =~ s/[^-\w.,!~'()\/\ ]/uc sprintf "%%%02x", ord $&/egmx; push @return, $val; } return wantarray ? @return : $return[0]; } ################################################################################ # write requests and responses to http.log file sub _httplog { my $self = shift; my $request = shift; my $response = shift; my $case = shift; my $output = ''; # http request - log setting per test case if($case->{'logrequest'} && $case->{'logrequest'} =~ /yes/mxi ) { $output .= $request->as_string."\n\n"; } # http response - log setting per test case if($case->{'logresponse'} && $case->{'logresponse'} =~ /yes/mxi ) { $output .= $response->as_string."\n\n"; } # global http log setting if($self->{'config'}->{'globalhttplog'} && $self->{'config'}->{'globalhttplog'} =~ /yes/mxi ) { $output .= $request->as_string."\n\n"; $output .= $response->as_string."\n\n"; } # global http log setting - onfail mode if($self->{'config'}->{'globalhttplog'} && $self->{'config'}->{'globalhttplog'} =~ /onfail/mxi && $case->{'iscritical'}) { $output .= $request->as_string."\n\n"; $output .= $response->as_string."\n\n"; } if($output ne '') { my $file = $self->{'config'}->{'output_dir'}."http.log"; open( my $httplogfile, ">>", $file ) or $self->_usage("ERROR: Failed to write ".$file.": ".$!); print $httplogfile $output; print $httplogfile "\n************************* LOG SEPARATOR *************************\n\n\n"; close($httplogfile); } return; } ################################################################################ # write performance results to plot.log in the format gnuplot can use sub _plotlog { my ( $self, $value ) = @_; my ( %months, $date, $time, $mon, $mday, $hours, $min, $sec, $year ); # do this unless: monitor is disabled in gui, or running standalone mode without config setting to turn on plotting if( ( $self->{'gui'} and $self->{'monitorenabledchkbx'} ne 'monitor_off') or (!$self->{'gui'} and $self->{'config'}->{'standaloneplot'} eq 'on') ) { %months = ( "Jan" => 1, "Feb" => 2, "Mar" => 3, "Apr" => 4, "May" => 5, "Jun" => 6, "Jul" => 7, "Aug" => 8, "Sep" => 9, "Oct" => 10, "Nov" => 11, "Dec" => 12 ); $date = scalar localtime; ($mon, $mday, $hours, $min, $sec, $year) = $date =~ /\w+\ (\w+)\ +(\d+)\ (\d\d):(\d\d):(\d\d)\ (\d\d\d\d)/mx; $time = "$months{$mon} $mday $hours $min $sec $year"; my $plotlog; # used to clear the graph when requested if( $self->{'switches'}->{'plotclear'} eq 'yes' ) { # open in clobber mode so log gets truncated my $file = $self->{'config'}->{'output_dir'}."plot.log"; open( $plotlog, '>', $file ) or $self->_usage("ERROR: Failed to write ".$file.": ".$!); $self->{'switches'}->{'plotclear'} = 'no'; # reset the value } else { my $file = $self->{'config'}->{'output_dir'}."plot.log"; open( $plotlog, '>>', $file ) or $self->_usage("ERROR: Failed to write ".$file.": ".$!); #open in append mode } printf $plotlog "%s %2.4f\n", $time, $value; close($plotlog); } return; } ################################################################################ # create gnuplot config file sub _plotcfg { my $self = shift; # do this unless: monitor is disabled in gui, or running standalone mode without config setting to turn on plotting if( ( $self->{'gui'} and $self->{'monitorenabledchkbx'} ne 'monitor_off') or (!$self->{'gui'} and $self->{'config'}->{'standaloneplot'} eq 'on') ) { my $file = $self->{'config'}->{'output_dir'}."plot.plt"; open( my $gnuplotplt, ">", $file ) or _usage("ERROR: Could not open ".$file.": ".$!); print $gnuplotplt qq| set term png set output \"$self->{'config'}->{'output_dir'}plot.png\" set size 1.1,0.5 set pointsize .5 set xdata time set ylabel \"Response Time (seconds)\" set yrange [0:] set bmargin 2 set tmargin 2 set timefmt \"%m %d %H %M %S %Y\" plot \"$self->{'config'}->{'output_dir'}plot.log\" using 1:7 title \"Response Times" w $self->{'config'}->{'graphtype'} |; close($gnuplotplt); } return; } ################################################################################ # do ending tasks sub _finaltasks { my $self = shift; if ( $self->{'gui'} ) { $self->_gui_stop(); } # we suppress most logging when running in a plugin mode if($self->{'config'}->{'reporttype'} eq 'standard') { # write summary and closing tags for results file $self->_write_result_html(); #write summary and closing tags for XML results file $self->_write_result_xml(); } # write summary and closing tags for STDOUT $self->_writefinalstdout(); #plugin modes if($self->{'config'}->{'reporttype'} ne 'standard') { # return value is set which corresponds to a monitoring program # Nagios plugin compatibility if($self->{'config'}->{'reporttype'} =~ /^nagios/mx) { # nagios perf data has following format # 'label'=value[UOM];[warn];[crit];[min];[max] my $crit = 0; if(defined $self->{'config'}->{globaltimeout}) { $crit = $self->{'config'}->{globaltimeout}; } my $lastid = 0; my $perfdata = '|time='.$self->{'result'}->{'totalruntime'}.'s;0;'.$crit.';0;0'; for my $file (@{$self->{'result'}->{'files'}}) { for my $case (@{$file->{'cases'}}) { my $warn = $case->{'warning'} || 0; my $crit = $case->{'critical'} || 0; my $label = $case->{'label'} || 'case'.$case->{'id'}; $perfdata .= ' '.$label.'='.$case->{'latency'}.'s;'.$warn.';'.$crit.';0;0'; $lastid = $case->{'id'}; } } # report performance data for missed cases too for my $nr (1..($self->{'result'}->{'casecount'} - $self->{'result'}->{'totalruncount'})) { $lastid++; my $label = 'case'.$lastid; $perfdata .= ' '.$label.'=0s;0;0;0;0'; } my($rc,$message); if($self->{'result'}->{'iscritical'}) { $message = "WebInject CRITICAL - ".$self->{'result'}->{'returnmessage'}; $rc = $self->{'exit_codes'}->{'CRITICAL'}; } elsif($self->{'result'}->{'iswarning'}) { $message = "WebInject WARNING - ".$self->{'result'}->{'returnmessage'}; $rc = $self->{'exit_codes'}->{'WARNING'}; } elsif( $self->{'config'}->{globaltimeout} && $self->{'result'}->{'totalruntime'} > $self->{'config'}->{globaltimeout} ) { $message = "WebInject WARNING - All tests passed successfully but global timeout (".$self->{'config'}->{globaltimeout}." seconds) has been reached"; $rc = $self->{'exit_codes'}->{'WARNING'}; } else { $message = "WebInject OK - All tests passed successfully in ".$self->{'result'}->{'totalruntime'}." seconds"; $rc = $self->{'exit_codes'}->{'OK'}; } if($self->{'result'}->{'iscritical'} or $self->{'result'}->{'iswarning'}) { $message .= "\n".$self->{'out'}; $message =~ s/^\-+$//mx; } if($self->{'config'}->{'reporttype'} eq 'nagios2') { $message =~ s/\n/
/mxg; } print $message.$perfdata."\n"; $self->{'result'}->{'perfdata'} = $perfdata; return $rc; } #MRTG plugin compatibility elsif( $self->{'config'}->{'reporttype'} eq 'mrtg' ) { #report results in MRTG format if( $self->{'result'}->{'totalcasesfailedcount'} > 0 ) { print "$self->{'result'}->{'totalruntime'}\n$self->{'result'}->{'totalruntime'}\n\nWebInject CRITICAL - $self->{'result'}->{'returnmessage'} \n"; } else { print "$self->{'result'}->{'totalruntime'}\n$self->{'result'}->{'totalruntime'}\n\nWebInject OK - All tests passed successfully in $self->{'result'}->{'totalruntime'} seconds \n"; } } #External plugin. To use it, add something like that in the config file: # external:/home/webinject/Plugin.pm elsif ( $self->{'config'}->{'reporttype'} =~ /^external:(.*)/mx ) { our $webinject = $self; # set scope of $self to global, so it can be access in the external module unless( my $return = do $1 ) { croak "couldn't parse $1: $@\n" if $@; croak "couldn't do $1: $!\n" unless defined $return; croak "couldn't run $1\n" unless $return; } } else { $self->_usage("ERROR: only 'nagios', 'nagios2', 'mrtg', 'external', or 'standard' are supported reporttype values"); } } return 1 if $self->{'result'}->{'totalcasesfailedcount'} > 0; return 0; } ################################################################################ # delete any files leftover from previous run if they exist sub _whackoldfiles { my $self = shift; for my $file (qw/plot.log plot.plt plot.png/) { unlink $self->{'config'}->{'output_dir'}.$file if -e $self->{'config'}->{'output_dir'}.$file; } # verify files are deleted, if not give the filesystem time to delete them before continuing while (-e $self->{'config'}->{'output_dir'}."plot.log" or -e $self->{'config'}->{'output_dir'}."plot.plt" or -e $self->{'config'}->{'output_dir'}."plot.png" ) { sleep .5; } return; } ################################################################################ # call the external plotter to create a graph (if we are in the appropriate mode) sub _plotit { my $self = shift; # do this unless: monitor is disabled in gui, or running standalone mode without config setting to turn on plotting if( ( $self->{'gui'} and $self->{'monitorenabledchkbx'} ne 'monitor_off') or (!$self->{'gui'} and $self->{'config'}->{'standaloneplot'} eq 'on') ) { # do this unless its being called from the gui with No Graph set unless ( $self->{'config'}->{'graphtype'} eq 'nograph' ) { my $gnuplot; if(defined $self->{'config'}->{gnuplot}) { $gnuplot = $self->{'config'}->{gnuplot} } elsif($^O eq 'MSWin32') { $gnuplot = "./wgnupl32.exe"; } else { $gnuplot = "/usr/bin/gnuplot"; } # if gnuplot exists if( -e $gnuplot ) { system $gnuplot, $self->{'config'}->{output_dir}."plot.plt"; # plot it } elsif( $self->{'gui'} ) { # if gnuplot not specified, notify on gui $self->_gui_no_plotter_found(); } } } return; } ################################################################################ # fix a user supplied regex to make it compliant with mx options sub _fix_regex { my $self = shift; my $regex = shift; $regex =~ s/\\\ / /mx; $regex =~ s/\ /\\ /gmx; return $regex; } ################################################################################ # command line options sub _getoptions { my $self = shift; my( @sets, $opt_version, $opt_help, $opt_configfile ); Getopt::Long::Configure('bundling'); my $opt_rc = GetOptions( 'h|help' => \$opt_help, 'v|V|version' => \$opt_version, 'c|config=s' => \$opt_configfile, 'o|output=s' => \$self->{'config'}->{'output_dir'}, 'n|no-output' => \$self->{'config'}->{'nooutput'}, 'r|report-type=s' => \$self->{'config'}->{'reporttype'}, 't|timeout=i' => \$self->{'config'}->{'timeout'}, 's=s' => \@sets, ); if(!$opt_rc or $opt_help) { $self->_usage(); } if($opt_version) { print "WebInject version $Webinject::VERSION\nFor more info: http://www.webinject.org\n"; exit 3; } $self->_read_config_xml($opt_configfile); for my $set (@sets) { my ( $key, $val ) = split /=/mx, $set, 2; if($key eq 'httpauth') { $self->_set_http_auth($val); } else { $self->{'config'}->{ lc $key } = $val; } } return; } ################################################################################ # _out - print text to STDOUT and save it for later retrieval sub _out { my $self = shift; my $text = shift; if($self->{'config'}->{'reporttype'} !~ /^nagios/mx and !$self->{'config'}->{'nooutput'}) { print $text; } $self->{'out'} .= $text; return; } ################################################################################ # print usage sub _usage { my $self = shift; my $text = shift; print $text."\n\n" if defined $text; print < detailed description about the syntax of testcases can be found on the Webinject homepage. =head1 SEE ALSO For more information about webinject visit http://www.webinject.org =head1 AUTHOR Corey Goldberg, Ecorey@goldb.orgE Sven Nierlein, Enierlein@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright (C) 2010 by Sven Nierlein Copyright (C) 2004-2006 by Corey Goldberg This library is free software; you can redistribute it under the GPL2 license. =cut 1; #!/usr/bin/env perl # Copyright 2010 Sven Nierlein (nierlein@cpan.org) # Copyright 2004-2006 Corey Goldberg (corey@goldb.org) # # This file is part of WebInject. # # WebInject 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. # # WebInject 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. use warnings; use strict; my $webinject = Webinject->new(reporttype => "nagios", timeout => 30, break_on_errors => 1); my $rc = $webinject->engine(); exit $rc; nagios-plugins-contrib-9.20140106/check_webinject/webinject.cfg0000644000000000000000000000054412262515026021151 0ustar # 'check_webinject' command definition define command{ command_name check_webinject command_line /usr/lib/nagios/plugins/check_webinject '$ARG1$' } # 'check_webinject' command definition define command{ command_name check_webinject_baseurl command_line /usr/lib/nagios/plugins/check_webinject -s 'baseurl=$ARG1$' '$ARG2$' } nagios-plugins-contrib-9.20140106/check_webinject/copyright0000644000000000000000000000113612262515026020447 0ustar Copyright 2010 Sven Nierlein (nierlein@cpan.org) Copyright 2004-2006 Corey Goldberg (corey@goldb.org) This file is part of WebInject. WebInject 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. WebInject 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. nagios-plugins-contrib-9.20140106/check_webinject/Makefile0000644000000000000000000000035712262515026020160 0ustar PLUGIN := tmp/check_webinject include ../common.mk tmp/check_webinject: mkdir -p tmp sed -e '/^package Web/,/^#!\/usr\/bin\/env perl/d' \ -e '/^my.*Webinject->/ iuse Webinject;\n' \ check_webinject > $@ clean:: rm -rf tmp nagios-plugins-contrib-9.20140106/check_cups/0000755000000000000000000000000012262515026015513 5ustar nagios-plugins-contrib-9.20140106/check_cups/cups.cfg0000644000000000000000000000030212262515026017141 0ustar # 'check_cups_queue' command definition define command{ command_name check_cups_queue command_line /usr/lib/nagios/plugins/check_cups -H '$HOSTADDRESS$' '$ARG1$' } nagios-plugins-contrib-9.20140106/check_cups/control0000644000000000000000000000070412262515026017117 0ustar Homepage: https://www.monitoringexchange.org/inventory/Check-Plugins/Hardware/Devices/Printer/check_cups Uploaders: Jan Wagner Description: plugin to check queues on a remote CUPS server This plugin is monitoring of queues on a remote CUPS server, which means that it doesn't need to be installed on the print server and run via NRPE. Recommends: libdate-manip-perl, libnagios-plugin-perl (>= 0.31), libnet-cups-perl Version: 0.2 nagios-plugins-contrib-9.20140106/check_cups/check_cups0000644000000000000000000004510212262515026017547 0ustar #!/usr/bin/perl =head1 NAME check_cups - monitor CUPS queues =head1 AUTHOR Steve Huff =head1 SYNOPSIS Polls a CUPS server to discover queues, then reports on queue status. =head1 REQUIRES Perl5.004, strict, warnings, Data::Dumper, Nagios::Plugin, Net::CUPS, Date::Manip, POSIX =head1 EXPORTS Nothing =head1 DESCRIPTION C polls the specified CUPS server and discovers print queues. It tests against a queue length threshold and an age of the oldest job in the queue threshold. Performance data (queue length and maximum queue age) is provided. Future development plans include the option to specify the number of expected print queues. =cut # these need to be outside the BEGIN use strict; use warnings; # see this page for an explanation regarding the levels of warnings: # http://search.cpan.org/~rgarcia/perl-5.6.2/pod/perllexwarn.pod no warnings qw( redefine prototype ); BEGIN { # use Opsview libs use lib '/usr/local/nagios/perl/lib'; use lib '/usr/local/nagios/lib'; use Nagios::Plugin; use Data::Dumper; use Date::Manip; use POSIX qw( strftime ); use Net::CUPS; # reregister interrupt $SIG{INT} = \&DoInterrupt; } ## end BEGIN ######################################################################## # IMPORTANT VARIABLES # # default values my( $timeout, $verbose ); my $WARNINGJOBS = 6; my $CRITICALJOBS = 10; my $WARNINGAGE = '20 minutes'; my $CRITICALAGE = '1 hour'; # ######################################################################## # # MAIN # # instantiate the Nagios::Plugin object my( $usagemsg ) = < [-w ] [-c ] [-W ] [-C ] [-t timeout] [-v|d] [-h] USAGE my( $blurb ) = <). LICENSE my( $plugin ) = Nagios::Plugin->new( shortname => 'check_cups', usage => $usagemsg, version => '0.2', blurb => $blurb, license => $license, ); =head2 Plugin Metadata Metadata is documented in L and L. Other available options of interest include C, C, and C. =cut # add the additional options $plugin->add_arg( spec => 'hostname|H=s', help => [ "Hostname to query", "IP address to query", ], label => [ 'HOSTNAME', 'IP' ], required => 1, ); # queued jobs $plugin->add_arg( spec => 'warning|w=i', help => "Warning threshold in number of queued jobs (default $WARNINGJOBS)", default => $WARNINGJOBS, label => [ 'QUEUED JOBS' ], required => 0, ); $plugin->add_arg( spec => 'critical|c=i', help => "Critical threshold in number of queued jobs (default $CRITICALJOBS)", default => $CRITICALJOBS, label => [ 'QUEUED JOBS' ], required => 0, ); # job age $plugin->add_arg( spec => 'warningage|W=s', help => "Warning threshold of job age (default '$WARNINGAGE')", default => $WARNINGAGE, label => [ 'TIME SPECIFICATION' ], required => 0, ); $plugin->add_arg( spec => 'criticalage|C=s', help => "Critical threshold of job age (default '$CRITICALAGE')", default => $CRITICALAGE, label => [ 'TIME SPECIFICATION' ], required => 0, ); =head2 Plugin Options Refer to L for option specifications - they differ slightly from pure L-style option specifications. A number of standard options (C<--help>, C<--version>, C<--usage>, C<--timeout>, and C<--verbose>) are implemented by default, thanks to the arguments passed to Cnew()>, and do not need to be specified. Moreover, if you attempt to override them, you will simply create two such options, which produces confusing C<--help> output and unexpected behavior. =cut # parse options $plugin->getopts; my( $opts ) = $plugin->opts; # declare variables my( $server, $queues, $warningjobs, $criticaljobs, $warningage, $criticalage ); # every variable must have a value $server = $opts->get( 'hostname' ); $timeout = $opts->get( 'timeout' ); # See above: option provided by default $verbose = $opts->get( 'verbose' ); # See above: option provided by default $warningjobs = $opts->get( 'warning' ); $criticaljobs = $opts->get( 'critical' ); $warningage = $opts->get( 'warningage' ); $criticalage = $opts->get( 'criticalage' ); # sanity check defined( $server ) or $plugin->nagios_die( "No value provided for --hostname!" ); # parse time differentials my( $nowdate ) = ParseDate( 'now' ); my( $warningdelta ) = ParseDateDelta( $warningage ); unless( defined( $warningdelta ) ) { $plugin->nagios_die( "'$warningage' is not a valid time specification!" ); } my( $criticaldelta ) = ParseDateDelta( $criticalage ); unless( defined( $criticaldelta ) ) { $plugin->nagios_die( "'$criticalage' is not a valid time specification!" ); } my( $warningminutes ) = sprintf( '%d', Delta_Format( $warningdelta, 'approx', 0, '%mt' ) ); my( $criticalminutes ) = sprintf( '%d', Delta_Format( $criticaldelta, 'approx', 0, '%mt' ) ); # critical thresholds must be greater than warning thresholds if ( $warningjobs >= $criticaljobs ) { $plugin->nagios_die( "Job number warning threshold ($warningjobs) must be less than critical threshold ($criticaljobs)." ); } if ( $warningminutes >= $criticalminutes ) { $plugin->nagios_die( "Job age warning threshold ($warningage) must be less than critical threshold ($criticalage)." ); } =head2 Testing and Exit Status The basic methodology of a Nagios plugin is as follows: =over =item 1. Run some sort of test. =item 2. Validate the result against provided (or default) thresholds. =item 3. Exit with the appropriate error code, optionally outputting text. =back Running the test is up to you. The function to use for validating the result is C (see L and L for details and specifications), which returns a value appropriate for use as an exit code. The functions to use for exiting are C and C. C is the general-purpose exit function, while C should be used for any unexpected exits and indicates that something went wrong with the plugin's operation. =head3 Return String The plugin return string performs two functions: =over =item 1. It communicates in human-readable format more details about what exactly has gone wrong (e.g. "Disk usage on '/var' is at 92% (threshold 90%)"). =item 2. It (optionally) communicates in machine-readable format performance data which can be aggregated by tools such as Nagiosgraph (e.g. '| time=0.042745s;5.000000;10.000000;0.000000 size=2162B;;;0'). See L for details and specifications; the function to use is C. =back The plugin string will automatically be populated with the plugin name and the exit status (e.g. "check_snmp_disk OK - "); everything after the "- " is what you provide with the message arguments to C or C. C takes care of appending the "|" and properly formatting performance data. =cut # begin tracking status and message my( $status, $message ) = ( OK, '' ); # do some test, with a timeout alarm $timeout; # the heavy lifting is done in Nagios::Plugin::Getopt my( $result ) = doTest( $server ); alarm 0; # validate the result, queue by queue my( %ok, %warning, %critical, %unknown ); debug( "Analyzing results..." ); foreach my $queuename ( keys( %{$result} ) ) { # FIXME - allow per-queue overrides my( $queue ) = $result->{$queuename}; my( $age, $jobs ) = ( $queue->{delta}, $queue->{numjobs} ); # sanitize values defined( $age ) or $age = 0; defined( $jobs ) or $jobs = 0; my( $agestatus ) = $plugin->check_threshold( check => $age, warning => $warningminutes, critical => $criticalminutes, ); my( $jobsstatus ) = $plugin->check_threshold( check => $jobs, warning => $warningjobs, critical => $criticaljobs, ); # sort the queue appropriately if ( $agestatus == CRITICAL or $jobsstatus == CRITICAL ) { $critical{$queuename} = { age => $age, jobs => $jobs }; } elsif ( $agestatus == WARNING or $jobsstatus == WARNING ) { $warning{$queuename} = { age => $age, jobs => $jobs }; } elsif ( $agestatus == UNKNOWN or $jobsstatus == UNKNOWN ) { $unknown{$queuename} = { age => $age, jobs => $jobs }; } else { $ok{$queuename} = { age => $age, jobs => $jobs }; } # add performance data $plugin->add_perfdata( label => $queuename . "_jobs", value => $jobs, uom => undef, warning => $warningjobs, critical => $criticaljobs, ); # add performance data $plugin->add_perfdata( label => $queuename . "_age", value => $age, uom => undef, warning => $warningminutes, critical => $criticalminutes, ); } # figure out our status if ( scalar( keys( %critical ) ) ) { debug( Data::Dumper->Dump( [\%critical], [qw(*critical)] ), 3 ); $status = CRITICAL; foreach my $queue ( sort( keys( %critical ) ) ) { $message .= "$queue ( "; my( $age, $jobs ) = ( $critical{$queue}->{age}, $critical{$queue}->{jobs} ); my( $prettyage ) = prettyDelta( ParseDateDelta( "$age minutes" ) ); my( @messages ); if ( $age > $criticalminutes ) { push( @messages, "job $prettyage old" ); } if ( $jobs > $criticaljobs ) { push( @messages, "$jobs queued jobs" ); } $message .= join( ',', @messages ); $message .= ' ) '; } } elsif ( scalar( keys( %warning ) ) ) { debug( Data::Dumper->Dump( [\%warning], [qw(*warning)] ), 3 ); $status = WARNING; foreach my $queue ( sort( keys( %warning ) ) ) { $message .= "$queue ( "; my( $age, $jobs ) = ( $warning{$queue}->{age}, $warning{$queue}->{jobs} ); my( $prettyage ) = prettyDelta( parseDateDelta( "$age minutes" ) ); my( @messages ); if ( $age > $warningminutes ) { push( @messages, "job $prettyage old" ); } if ( $jobs > $warningjobs ) { push( @messages, "$jobs queued jobs" ); } $message .= join( ',', @messages ); $message .= ' ) '; } } elsif ( scalar( keys( %unknown ) ) ) { debug( Data::Dumper->Dump( [\%unknown], [qw(*unknown)] ), 3 ); $status = UNKNOWN; $message .= 'Unable to determine status: '; $message .= join( ',', sort( keys( %unknown ) ) ); } else { debug( Data::Dumper->Dump( [\%ok], [qw(*ok)] ), 3 ); $message .= 'All queues within parameters.'; } # exit with appropriate return values $plugin->nagios_exit( $status, $message ); ################################################################################ # # # doTest - poll server for printers # # ################################################################################ sub doTest( $ ) { my( $host ) = @_; my( %queues ); debug( "Creating Net::CUPS object...", 2 ); my( $cups ) = Net::CUPS->new(); unless ( defined( $cups ) ) { debug( "Unable to create Net::CUPS object: $!" ); return( undef ); } debug( "Setting server to '$host'...", 2 ); $cups->setServer( $host ); debug( "Polling for queues...", 1 ); foreach my $queue ( $cups->getDestinations() ) { my( $name ) = $queue->getName(); if ( defined( $name ) ) { $queues{$name} = { destination => $queue }; debug( "Found queue '$name'.", 3 ); } else { debug( "Unable to determine queue name!" ); } } debug( "Parsing queues...", 1 ); my( $now ) = strftime( '%s', localtime() ); foreach my $queue ( keys( %queues ) ) { my( $destination ) = $queues{$queue}->{destination}; my( @jobs ) = $destination->getJobs( 0, 0 ); ( @jobs ) or ( @jobs ) = (); foreach my $jobid ( @jobs ) { my( $job ) = \%{$destination->getJob( $jobid )}; $queues{$queue}->{jobs}->{$jobid} = $job; my( $delta ) = deltaMinutes( $job->{creation_time}, $now ); # track the largest delta in the queue if ( ( ! exists( $queues{$queue}->{delta} ) ) || ( $delta > $queues{$queue}->{delta} ) ) { $queues{$queue}->{delta} = $delta; } } $queues{$queue}->{numjobs} = keys( %{$queues{$queue}->{jobs}} ); } debug( Data::Dumper->Dump( [\%queues], [qw(*queues)] ), 3 ); return( \%queues ); } ################################################################################ # # # deltaMinutes - determine the delta in days between two datestamps # # ################################################################################ sub deltaMinutes( $$ ) { my( $lesser, $greater ) = sort( @_ ); debug( "Received '$lesser', '$greater'.", 3 ); my( $lesserdate ) = ParseDateString( "epoch $lesser" ); my( $greaterdate ) = ParseDateString( "epoch $greater" ); my( $delta ) = DateCalc( $lesserdate, $greaterdate ); my( $deltaminutes ) = sprintf( '%d', Delta_Format( $delta, 'approx', 0, '%mt' ) ); defined( $deltaminutes ) or $deltaminutes = 0; debug( "Delta: $deltaminutes minutes.", 3 ); return( $deltaminutes ); } ################################################################################ # # # prettyDelta - display time delta in sensible format # # ################################################################################ sub prettyDelta( $ ) { my( $delta ) = @_; debug( "Delta: '$delta'", 3 ); # parse the delta my( $days, $hours, $minutes ) = Delta_Format( $delta, 'approx', 0, ( qw( %dh %hv %mv ) ) ); debug( "\$days: $days\n\$hours: $hours\n\$minutes: $minutes", 3 ); # assemble the string my( $pretty ); # a day or more? if ( $days ) { $pretty .= "$days day"; if ( $days > 1 ) { $pretty .= "s"; } } # hours? if ( $hours ) { if ( $days ) { if ( $minutes ) { $pretty .= ", "; } else { $pretty .= " and "; } } $pretty .= "$hours hour"; if ( $hours > 1 ) { $pretty .= "s"; } } # minutes? if ( $minutes ) { if ( $days && $hours ) { $pretty .= ","; } if ( $days || $hours ) { $pretty .= " and "; } $pretty .= "$minutes minute"; if ( $minutes > 1 ) { $pretty .= "s"; } } debug( "\$pretty: '$pretty'", 3 ); return( $pretty ); } ################################################################################ # # # debug - print debug info # # ################################################################################ sub debug( $;$ ) { my( $message, $level ) = @_; defined( $level ) or $level = 1; if ( $verbose >= $level ) { chomp $message; print "$message\n"; } } ################################################################################ # # # DoInterrupt - handle SIGINT and clean up # # ################################################################################ sub DoInterrupt { $plugin->nagios_die( "Interrupt received" ); } nagios-plugins-contrib-9.20140106/check_cups/copyright0000644000000000000000000000042712262515026017451 0ustar Copyright (C) Steve Huff This Nagios plugin is free software, and comes with ABSOLUTELY NO WARRANTY. It may be used, redistributed and/or modified under the terms of the GNU General Public Licence (see http://www.fsf.org/licensing/licenses/gpl.txt). nagios-plugins-contrib-9.20140106/check_cups/Makefile0000644000000000000000000000005012262515026017146 0ustar #/usr/bin/make -f include ../common.mk nagios-plugins-contrib-9.20140106/check_graphite/0000755000000000000000000000000012262515026016344 5ustar nagios-plugins-contrib-9.20140106/check_graphite/control0000644000000000000000000000024112262515026017744 0ustar Uploaders: Bernd Zeimetz Description: Plugin to monitor graphite metrics Homepage: https://github.com/disqus/nagios-plugins Recommends: python nagios-plugins-contrib-9.20140106/check_graphite/check_graphite.py0000755000000000000000000002760012262515026021666 0ustar #!/usr/bin/env python """ check_graphite.py ~~~~~~~ :copyright: (c) 2012 DISQUS. :license: Apache License 2.0, see LICENSE for more details. """ import json import optparse import urllib import urllib2 import sys from numbers import Real NAGIOS_STATUSES = { 'OK': 0, 'WARNING': 1, 'CRITICAL': 2, 'UNKNOWN': 3 } class Graphite(object): def __init__(self, url, targets, _from, _until): self.url = url.rstrip('/') self.targets = targets self._from = _from self._until = _until params = [('target', t) for t in self.targets] +\ [('from', self._from)] +\ [('until', self._until)] +\ [('format', 'json')] self.full_url = self.url + '/render?' +\ urllib.urlencode(params) def check_datapoints(self, datapoints, check_func, **kwargs): """Find alerting datapoints Args: datapoints (list): The list of datapoints to check Kwargs: check_func (function): The function to find out of bounds datapoints bounds (list): Compare against `datapoints` to find out of bounds list compare (list): Used for comparison if `datapoints` is out of bounds threshold (float): `check_func` is called for each datapoint against `threshold` beyond (float): Return datapoint if `beyond` value in bounds list (percentage). Returns: The list of out of bounds datapoints """ if 'threshold' in kwargs: return [x for x in datapoints if isinstance(x, Real) and check_func(x, kwargs['threshold'])] elif 'bounds' in kwargs: if 'compare' in kwargs: return [datapoints[x] for x in xrange(len(datapoints)) if all([datapoints[x], kwargs['bounds'][x], kwargs['compare'][x]]) and check_func(datapoints[x] / kwargs['bounds'][x], kwargs['beyond']) and check_func(datapoints[x], kwargs['compare'][x])] else: return [datapoints[x] for x in xrange(len(datapoints)) if all([datapoints[x], kwargs['bounds'][x]]) and check_func(datapoints[x], kwargs['bounds'][x])] def fetch_metrics(self): try: response = urllib2.urlopen(self.full_url) if response.code != 200: return None else: return json.loads(response.read()) except urllib2.URLError, TypeError: return None def generate_output(self, datapoints, *args, **kwargs): """Generate check output Args: datapoints (list): The list of datapoints to check warn_oob (list): Optional list of datapoints considered in warning state crit_oob (list): Mandatory list of datapoints considered in warning state Kwargs: count (int): Number of metrics that would generate an alert warning (float): The check's warning threshold critical (float): The check's critical threshold target (str): The target for `datapoints` Returns: A dictionary of datapoints grouped by their status ('CRITICAL', 'WARNING', 'OK') """ check_output = dict(OK=[], WARNING=[], CRITICAL=[]) count = kwargs['count'] warning = kwargs.get('warning', 0) critical = kwargs.get('critical', 0) target = kwargs.get('target', 'timeseries') if len(args) > 1: (warn_oob, crit_oob) = args else: crit_oob = [x for x in args[0] if isinstance(x, Real)] warn_oob = [] if self.has_numbers(crit_oob) and len(crit_oob) >= count: check_output['CRITICAL'].append('%s [crit=%f|datapoints=%s]' %\ (target, critical, ','.join(['%s' % str(x) for x in crit_oob]))) elif self.has_numbers(warn_oob) and len(warn_oob) >= count: check_output['WARNING'].append('%s [warn=%f|datapoints=%s]' %\ (target, warning, ','.join(['%s' % str(x) for x in warn_oob]))) else: check_output['OK'].append('%s [warn=%0.3f|crit=%f|datapoints=%s]' %\ (target, warning, critical, ','.join(['%s' % str(x) for x in datapoints]))) return check_output def has_numbers(self, lst): try: return any([isinstance(x, Real) for x in lst]) except TypeError: return False if __name__ == '__main__': parser = optparse.OptionParser() parser.add_option('-U', '--graphite-url', dest='graphite_url', default='http://localhost/', metavar='URL', help='Graphite URL [%default]') parser.add_option('-t', '--target', dest='target', action='append', help='Target to check') parser.add_option('--compare', dest='compare', metavar='SERIES', help='Compare TARGET against SERIES') parser.add_option('--from', dest='_from', help='From timestamp/date') parser.add_option('--until', dest='_until', default='now', help='Until timestamp/date [%default]') parser.add_option('-c', '--count', dest='count', default=0, type='int', help='Alert on at least COUNT metrics [%default]') parser.add_option('--beyond', dest='beyond', default=0.7, type='float', help='Alert if metric is PERCENTAGE beyond comparison value [%default]') parser.add_option('--percentile', dest='percentile', default=0, type='int', metavar='PERCENT', help='Use nPercentile Graphite function on the target (returns one datapoint)') parser.add_option('--empty-ok', dest='empty_ok', default=False, action='store_true', help='Empty data from Graphite is OK') parser.add_option('--confidence', dest='confidence_bands', default=False, action='store_true', help='Use holtWintersConfidenceBands Graphite function on the target') parser.add_option('--over', dest='over', default=True, action='store_true', help='Over specified WARNING or CRITICAL threshold [%default]') parser.add_option('--under', dest='under', default=False, action='store_true', help='Under specified WARNING or CRITICAL threshold [%default]') parser.add_option('-W', dest='warning', type='float', metavar='VALUE', help='Warning if datapoints beyond VALUE') parser.add_option('-C', dest='critical', type='float', metavar='VALUE', help='Critical if datapoints beyond VALUE') (options, args) = parser.parse_args() if not all([getattr(options, option) for option in ('_from', 'target')]): parser.print_help() sys.exit(NAGIOS_STATUSES['UNKNOWN']) real_from = options._from if options.under: check_func = lambda x, y: x < y options.over = False else: check_func = lambda x, y: x > y if options.confidence_bands: targets = [options.target[0], 'holtWintersConfidenceBands(%s)' % options.target[0]] check_threshold = None from_slice = int(options._from) * -1 real_from = '-2w' if options.compare: targets.append(options.compare) else: if not all([getattr(options, option) for option in ('critical', 'warning')]): parser.print_help() sys.exit(NAGIOS_STATUSES['UNKNOWN']) if options.percentile: targets = ['nPercentile(%s, %d)' % (options.target[0], options.percentile)] else: targets = options.target try: warn = float(options.warning) crit = float(options.critical) except ValueError: print 'ERROR: WARNING or CRITICAL threshold is not a number\n' parser.print_help() sys.exit(NAGIOS_STATUSES['UNKNOWN']) check_output = {} graphite = Graphite(options.graphite_url, targets, real_from, options._until) metric_data = graphite.fetch_metrics() if metric_data: if options.confidence_bands: actual = [x[0] for x in metric_data[0].get('datapoints', [])][from_slice:] target_name = metric_data[0]['target'] kwargs = {} kwargs['beyond'] = options.beyond if options.over: kwargs['bounds'] = [x[0] for x in metric_data[1].get('datapoints', [])][from_slice:] elif options.under: kwargs['bounds'] = [x[0] for x in metric_data[2].get('datapoints', [])][from_slice:] if options.compare: kwargs['compare'] = [x[0] for x in metric_data[3].get('datapoints', [])][from_slice:] if not graphite.has_numbers(kwargs['compare']): print 'CRITICAL: No compare target output from Graphite!' sys.exit(NAGIOS_STATUSES['CRITICAL']) if graphite.has_numbers(actual) and graphite.has_numbers(kwargs['bounds']): points_oob = graphite.check_datapoints(actual, check_func, **kwargs) check_output[target_name] = graphite.generate_output(actual, points_oob, count=options.count, target=target_name) else: print 'CRITICAL: No output from Graphite for target(s): %s' % ', '.join(targets) sys.exit(NAGIOS_STATUSES['CRITICAL']) else: for target in metric_data: datapoints = [x[0] for x in target.get('datapoints', []) if isinstance(x[0], Real)] if not graphite.has_numbers(datapoints) and not options.empty_ok: print 'CRITICAL: No output from Graphite for target(s): %s' % ', '.join(targets) sys.exit(NAGIOS_STATUSES['CRITICAL']) crit_oob = graphite.check_datapoints(datapoints, check_func, threshold=crit) warn_oob = graphite.check_datapoints(datapoints, check_func, threshold=warn) check_output[target['target']] = graphite.generate_output(datapoints, warn_oob, crit_oob, count=options.count, target=target['target'], warning=warn, critical=crit) else: if options.empty_ok and isinstance(metric_data, list): print 'OK: No output from Graphite for target(s): %s' % ', '.join(targets) sys.exit(NAGIOS_STATUSES['OK']) print 'CRITICAL: No output from Graphite for target(s): %s' % ', '.join(targets) sys.exit(NAGIOS_STATUSES['CRITICAL']) for target, messages in check_output.iteritems(): if messages['CRITICAL']: exit_code = NAGIOS_STATUSES['CRITICAL'] elif messages['WARNING']: exit_code = NAGIOS_STATUSES['WARNING'] else: exit_code = NAGIOS_STATUSES['OK'] for status_code in ['CRITICAL', 'WARNING', 'OK']: if messages[status_code]: print '\n'.join(['%s: %s' % (status_code, status) for status in messages[status_code]]) sys.exit(exit_code) nagios-plugins-contrib-9.20140106/check_graphite/copyright0000644000000000000000000000024312262515026020276 0ustar Copyright: (c) 2012 DISQUS. License: Apache License 2.0 On Debian systems, a copy of the Apache License 2.0 can be found in /usr/share/common-licenses/Apache-2.0 nagios-plugins-contrib-9.20140106/check_graphite/README.md0000644000000000000000000000244012262515026017623 0ustar # Disqus Nagios plugins This is a collection of Nagios plugins written at Disqus. ## Scripts * check_graphite.py ## check_graphite.py % ./check_graphite.py -h Usage: check_graphite.py [options] Options: -h, --help show this help message and exit -U URL, --graphite-url=URL Graphite URL [http://localhost/] -t TARGET, --target=TARGET Target to check --compare=SERIES Compare TARGET against SERIES --from=_FROM From timestamp/date --until=_UNTIL Until timestamp/date [now] -c COUNT, --count=COUNT Alert on at least COUNT metrics [0] --percentile=PERCENT Use nPercentile Graphite function on the target (returns one datapoint) --confidence Use holtWintersConfidenceBands Graphite function on the target --over Over specified WARNING or CRITICAL threshold [True] --under Under specified WARNING or CRITICAL threshold [False] -W VALUE Warning if datapoints beyond VALUE -C VALUE Critical if datapoints beyond VALUE Mandatory arguments: -U, [-t|--target], --from nagios-plugins-contrib-9.20140106/check_graphite/Makefile0000644000000000000000000000021712262515026020004 0ustar PLUGIN := check_graphite CLEANFILES := check_graphite DOCFILES := README.md include ../common.mk check_graphite: cp $@.py $@ chmod 755 $@ nagios-plugins-contrib-9.20140106/README0000777000000000000000000000000012262515026017662 2debian/README.sourceustar nagios-plugins-contrib-9.20140106/check_memcached/0000755000000000000000000000000012262515026016447 5ustar nagios-plugins-contrib-9.20140106/check_memcached/check_memcached.l0000644000000000000000000005012112262515026021666 0ustar /* This file is the for the Flex code-generator: http://flex.sourceforge.net/ It also requires libmemcached: http://libmemcached.org/libMemcached.html For yum based distributions, eg Red Hat/Fedora/SuSE/Mageia yum install gcc flex glibc-devel libmemcached-devel For apt based distributions, eg Debian/Ubuntu apt-get install gcc make flex libc6-dev libmemcached-dev Build it using: make LDFLAGS=-lmemcached check_memcached or make LDFLAGS="-lmemcached -lpthread" check_memcached (depending on your Linux distro) This program was initially developed by Lonely Planet for internal use and has kindly been made available to the Open Source community for redistribution and further development under the terms of the GNU General Public License v3: http://www.gnu.org/licenses/gpl.html This program is supplied 'as-is', in the hope that it will be useful, but neither Lonely Planet nor the authors make any warranties or guarantees as to its correct operation, including its intended function. Or in other words: Test it yourself, and make sure it works for YOU. Author: George Hansper e-mail: george@hansper.id.au */ %{ /* --------------------------- #include ------------------------------ */ #include #include #include /* For getopt() */ #include extern int optind, opterr, optopt; #include #include #define print_v(args...) if ( verbose ) fprintf(stderr,args ); #define DEBUG 0 #if DEBUG == 1 #define print_debug(args...) fprintf(stderr,args ); #else #define print_debug(args...) #endif YY_BUFFER_STATE yy_memcache_buffer; #define YY_USER_ACTION buffer_position+=yyleng; /* --------------------------- static/global variables ------------------------------ */ static int default_port = 11211; static int max_n_stats = 30; static int min_stats_interval = 30; /* Compare stats at least 30 minutes old, at least */ static int verbose=0; static int perfstats_for_rrdtool=0; static double min_hit_miss = 2.0; static uint64_t max_evictions = 10; static double timeout=1.0; static char *hostname; static int port; static char *argv0; static char *memcached_key = "check_memcached"; /* The key we will store our data under */ /* The expiry time on the stats object, in seconds. Two hours between checks is pretty generous */ static int memcache_stats_object_expiry_time = 60*60*2; static char *memory_error_message = "CRITICAL: Could not allocate memory"; static int buffer_position; static memcached_stat_st stats; static uint64_t obj_time_last = 0; static uint64_t obj_time_oldest = 0; static uint64_t obj_time = 0; static int obj_n_prune = 0; static int obj_n_stats; static uint64_t obj_get_hits; static uint64_t obj_get_misses; static uint64_t obj_evictions; static uint64_t obj_cmd_get; static uint64_t obj_cmd_set; static uint64_t *save_to; /* --------------------------- functions() ------------------------------ */ void usage(); int check_memcached(); char * get_current_stats(memcached_st*); char * update_stats_obj(char *, size_t , char *); /* ===================================================================================== */ %} %option yylineno %s FIND_OFFSET FIND_STATS DUMMY %% .|\n ECHO; time= { save_to = &obj_time_last; obj_n_stats++; } get_hits= { save_to = &obj_get_hits; } get_misses= { save_to = &obj_get_misses; } evictions= { save_to = &obj_evictions; } cmd_get= { save_to = &obj_cmd_get; } cmd_set= { save_to = &obj_cmd_set; } [0-9]+ { if ( save_to != NULL ) { if ( save_to == &obj_time_last ) { /* New time-stamp */ (*save_to) = (uint64_t) strtoll(yytext, NULL, 10); save_to = NULL; if ( obj_time_last <= stats.time - 60*min_stats_interval && obj_time_last > obj_time ) { obj_time = obj_time_last; /* Remove any stale data */ obj_get_hits = 0; obj_get_misses = 0; obj_evictions = 0; obj_cmd_get = 0; obj_cmd_set = 0; } if( obj_time_oldest == 0 || obj_time_last < obj_time_oldest ) { obj_time_oldest = obj_time_last; } } else if( obj_time == obj_time_last ) { /* New cadidate data - save it */ (*save_to) = (uint64_t) strtoll(yytext, NULL, 10); save_to = NULL; } } } [0-9]+ ; /* Don't convert or save integers, just find the offset of the 1st item to keep */ \n { if ( obj_n_stats >= obj_n_prune ) { return(buffer_position); } } <> { return(buffer_position); } "\t"|" " ; . { save_to = NULL; } \n { save_to = NULL; } %% /* ==================================================================================================== */ yywrap() { return 1; } /* ==================================================================================================== */ int main(int argc, char **argv) { char opt_c; int arg_int; char *trail_c; int n; int i; int result; int arg_error = 0; argv0 = argv[0]; while ( ( opt_c = getopt(argc, argv, "hvrH:p:w:c:t:T:n:E:k:K:") ) != -1 ) { switch( opt_c ) { case 'H': /* Hostname or IP address - support for comma-separated list */ hostname = malloc(sizeof(char) * (strlen(optarg)+1)); result = sscanf(optarg, "%[-.0-9a-zA-Z_]%n:%d%n",hostname,&n,&port,&n); print_debug("%d+%d # >>> %s <<< === %d === %s\n",result,n,hostname, port, optarg); switch(result) { case 1: /* Port not specified - use default_port */ port = 0; break; case 2: /* OK hostname:port specified */ break; default: arg_error = 1; break; } break; case 'p': arg_int = strtol(optarg,&trail_c,10); if ( *trail_c != '\0' ) { fprintf(stderr,"option \"-p port\": port must be a number, not \"%s\"\n",optarg); arg_error = 1; } else { default_port = arg_int; } break; case 'n': arg_int = strtol(optarg,&trail_c,10); if ( *trail_c != '\0' ) { fprintf(stderr,"option \"-n max_stats\": max_stats must be a number, not \"%s\"\n",optarg); arg_error = 1; } else { max_n_stats = arg_int; } break; case 'T': min_stats_interval = strtol(optarg,NULL,10); break; case 'v': verbose=1; break; case 'w': min_hit_miss = strtod(optarg,NULL); break; case 'E': max_evictions = strtoll(optarg,NULL,10); break; case 't': timeout = strtod(optarg,NULL); break; case 'r': perfstats_for_rrdtool=1; break; case 'c': /* Ignored - for now */ break; case 'k': if ( optarg != NULL && strlen(optarg) > 1 ) { memcached_key = optarg; } break; case 'K': memcache_stats_object_expiry_time = strtol(optarg,NULL,10); break; case 'h': default: arg_error = 1; break; } } if ( port == 0 ) { port = default_port; } if ( arg_error || hostname == NULL ) { usage(); exit(1); } return (check_memcached()); } /* ==================================================================================================== */ int check_memcached() { memcached_st *my_memcached; memcached_return error; memcached_result_st *result; uint32_t flags; char *object; char *new_object; size_t object_size; char new_stats; int n; char *current_stats_str; double hit_miss; char *nagios_service_tmp; char *nagios_service_output; /* error/warning message */ char *nagios_perfdata; /* Performance data */ size_t str_bytes = 0; int nagios_result; /* ----------------------------------------------------------------------------------------- */ /* Connect to the memcached server */ my_memcached = memcached_create(NULL); if ( my_memcached == NULL ) { puts("CRITICAL: Could not create memcached_st using memcached_create()\n"); exit(2); } error = memcached_server_add(my_memcached, hostname, port); if ( error ) { printf("CRITICAL: %s\n",memcached_strerror(my_memcached, error)); exit(2); } memcached_behavior_set(my_memcached, MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT, (uint64_t) (timeout * 1000)); memcached_behavior_set(my_memcached, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, (uint64_t) (timeout * 1000)); memcached_behavior_set(my_memcached, MEMCACHED_BEHAVIOR_NO_BLOCK, 0); print_debug("default timeout = %lu %lu %lu %lu... %1.1f\n",my_memcached->connect_timeout, my_memcached->poll_timeout, my_memcached->snd_timeout, my_memcached->rcv_timeout, timeout); /* ----------------------------------------------------------------------------------------- */ /* Get the stats from this server */ current_stats_str = get_current_stats(my_memcached); /* ----------------------------------------------------------------------------------------- */ /* Get our data (if it's there) */ /* memcached_behavior_set(my_memcached, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 0); */ flags = 0; object = memcached_get(my_memcached, memcached_key, strlen(memcached_key), &object_size, &flags, &error); print_debug("Object = %p, Length = %lu, Error = %d (%s)\n",object,object_size,error,memcached_strerror(my_memcached, error)); if ( error ) { print_v("No stats history object found (key=%s)\n",memcached_key); } print_debug("uint64_t = %d, long = %d, long long = %d\n",sizeof(uint64_t), sizeof(long int), sizeof(long long int)); print_debug("Here it is...%d bytes\n%s\n\n",object_size,object); obj_n_stats=0; BEGIN(FIND_STATS); yy_memcache_buffer = yy_scan_bytes ( object, object_size ); yylex(); print_debug("Found %d items in stats history\n",obj_n_stats); print_debug("Best stats:\ntime=%llu cmd_get=%llu cmd_set=%llu get_hits=%llu get_misses=%llu evictions=%llu\n", obj_time,obj_cmd_get,obj_cmd_set,obj_get_hits,obj_get_misses,obj_evictions); print_debug("New stats\n%s\n",current_stats_str); new_object = update_stats_obj(object, object_size, current_stats_str); /* ----------------------------------------------------------------------------------------- */ /* Store new data if it's at least 1 minute newer */ nagios_result=0; nagios_service_output = NULL; if( new_object != NULL ) { error = memcached_set(my_memcached, memcached_key, strlen(memcached_key), new_object, strlen(new_object), /* trailing \0 is not stored with the object(!) */ (time_t) memcache_stats_object_expiry_time, /* Expire after (default) 2 hours */ 0 ); if ( error ) { str_bytes = asprintf(&nagios_service_output,"Could not store updated stats object - %s; ", memcached_strerror(my_memcached, error)); nagios_result|=2; } } if ( nagios_service_output == NULL ) { str_bytes = asprintf(&nagios_service_output,""); } /* ----------------------------------------------------------------------------------------- */ /* ---- Analyze the stats, return 0,1,2 as required ---------------------------------------- */ if ( obj_time == 0 ) { nagios_service_tmp = nagios_service_output; str_bytes = asprintf(&nagios_service_output, "%sno stats available yet. Come back in %d minutes; ", nagios_service_tmp, min_stats_interval - (stats.time - obj_time_oldest ) / 60 ); free ( nagios_service_tmp ); } else { /* ---- Evictions ---- */ if ( max_evictions > 0 && ( stats.evictions - obj_evictions) >= max_evictions ) { nagios_result|=1; nagios_service_tmp = nagios_service_output; str_bytes = asprintf(&nagios_service_output, "%sToo many evictions: %d; ", nagios_service_tmp, stats.evictions - obj_evictions ); free ( nagios_service_tmp ); } /* ---- Hit/Miss ratio ---- */ nagios_service_tmp = nagios_service_output; if ( ( stats.get_misses - obj_get_misses ) > 0 ) { hit_miss = ( stats.get_hits - obj_get_hits ) * 1.0 / ( stats.get_misses - obj_get_misses ); if ( hit_miss < min_hit_miss ) { nagios_result|=1; str_bytes = asprintf(&nagios_service_output, "%sLow hit/miss rate: %1.1f; ", nagios_service_tmp, hit_miss ); free ( nagios_service_tmp ); } else { str_bytes = asprintf(&nagios_service_output, "%shit/miss=%1.1f; ", nagios_service_tmp, hit_miss ); } } else { hit_miss = 0; str_bytes = asprintf(&nagios_service_output,"%shit/miss=%llu/0; ", nagios_service_tmp, stats.get_hits - obj_get_hits ); free ( nagios_service_tmp ); } nagios_service_tmp = nagios_service_output; str_bytes = asprintf(&nagios_service_output, "%shits=%llu misses=%llu evictions=%llu interval=%lu mins", nagios_service_tmp, stats.get_hits - obj_get_hits, stats.get_misses - obj_get_misses, stats.evictions - obj_evictions, (uint32_t) (stats.time - obj_time ) / 60 ); free ( nagios_service_tmp ); } /* Add the performance data */ /* Remove trailing newline from current_stats_str */ n = strlen(current_stats_str); if ( n > 1 && *(current_stats_str+n-1) == '\n' ) { *(current_stats_str+n-1) = '\0'; } if ( str_bytes == -1 ) { puts(memory_error_message); exit(2); } /* Delta times may not apply if no suitable object found. Also, if NO object exists yet, there is nothing to calculate */ if ( perfstats_for_rrdtool == 1 ) { if ( obj_time == 0 ) { /* No performance stats available (yet) */ nagios_perfdata = ""; } else { /* str_bytes = asprintf(&nagios_perfdata, "%s delta_time_s=%lu gets_per_min=%llu sets_per_min=%llu hits_per_min=%llu misses_per_min=%llu evictions_per_min=%llu", current_stats_str, (uint32_t) ( stats.time - obj_time ), 60 * ( stats.cmd_get - obj_cmd_get) / ( stats.time - obj_time ), 60 * ( stats.cmd_set - obj_cmd_set )/ ( stats.time - obj_time ), 60 * ( stats.get_hits - obj_get_hits ) / ( stats.time - obj_time ), 60 * ( stats.get_misses - obj_get_misses ) / ( stats.time - obj_time ), 60 * ( stats.evictions - obj_evictions ) / ( stats.time - obj_time ) ); */ str_bytes = asprintf(&nagios_perfdata, "gets_per_min=%.2f sets_per_min=%.2f hits_per_min=%.2f misses_per_min=%.2f evictions_per_min=%.2f hit_miss_ratio=%.2f", 60.0 * ( stats.cmd_get - obj_cmd_get) / ( stats.time - obj_time ), 60.0 * ( stats.cmd_set - obj_cmd_set )/ ( stats.time - obj_time ), 60.0 * ( stats.get_hits - obj_get_hits ) / ( stats.time - obj_time ), 60.0 * ( stats.get_misses - obj_get_misses ) / ( stats.time - obj_time ), 60.0 * ( stats.evictions - obj_evictions ) / ( stats.time - obj_time ), /* Hit/Miss ratio */ 0. + hit_miss ); } } else if ( obj_time == 0 ) { nagios_perfdata = ""; } else { str_bytes = asprintf(&nagios_perfdata, "%s delta_time=%lu delta_cmd_get=%llu delta_cmd_set=%llu delta_get_hits=%llu delta_get_misses=%llu delta_evictions=%llu", current_stats_str, (uint32_t) ( stats.time - obj_time ), stats.cmd_get - obj_cmd_get, stats.cmd_set - obj_cmd_set, stats.get_hits - obj_get_hits, stats.get_misses - obj_get_misses, stats.evictions - obj_evictions ); } switch(nagios_result) { case 0: printf("OK: %s|%s\n",nagios_service_output,nagios_perfdata); break; case 1: printf("WARNING: %s|%s\n",nagios_service_output,nagios_perfdata); break; default: printf("CRITICAL: %s|%s\n",nagios_service_output,nagios_perfdata); nagios_result = 2; break; } if ( ( stats.get_misses - obj_get_misses ) > 0 ) { print_v("\nHit/Miss = %llu / %llu = %1.1f\n", stats.get_hits - obj_get_hits, stats.get_misses - obj_get_misses, hit_miss); } else { print_v("\nNo misses - very good\n"); } print_v("\nHistory object '%s':\n%s\nNew stats:\n%s (%sstored)\n",memcached_key,object,current_stats_str, new_object== NULL? "not ":""); memcached_free(my_memcached); return(nagios_result); } /* ==================================================================================================== */ char *get_current_stats(memcached_st *my_memcached) { memcached_return error; int str_bytes; char * current_stats_str_format; char * current_stats_str; memcached_stat_st *stats_array; /* error = memcached_stat_servername(&stats, NULL, hostname, port); - cannot set timeout, but gives better error responses :-( */ stats_array = memcached_stat(my_memcached, NULL, &error); if ( error ) { printf("CRITICAL: Could not connect to server %s:%d - %s (%d)\n",hostname, port, memcached_strerror(my_memcached, error), error ); exit(2); } stats = stats_array[0]; free(stats_array); current_stats_str_format = "time=%lu cmd_get=%llu cmd_set=%llu get_hits=%llu get_misses=%llu evictions=%llu\n"; str_bytes = asprintf(¤t_stats_str,current_stats_str_format, stats.time,stats.cmd_get,stats.cmd_set,stats.get_hits,stats.get_misses,stats.evictions); obj_time_oldest = stats.time; if ( str_bytes == -1 ) { puts(memory_error_message); exit(2); } return(current_stats_str); } /* ==================================================================================================== */ char * update_stats_obj(char *object, size_t object_size, char *current_stats_str) { int obj_offset; char *new_object; size_t new_object_size; size_t graft_offset; int graft_size; char *s; if ( stats.time < obj_time_last + 30 ) { /* Only store new stats if at least 1 minute has passed since the last stats were stored */ print_v("New stats are less than 30s newer than last entry - not stored\n"); return(NULL); } /* Prune stats from the start of the object */ obj_n_prune = 1 + obj_n_stats - max_n_stats; if ( obj_n_prune > 0 ) { buffer_position=0; obj_n_stats = 0; BEGIN(FIND_OFFSET); yy_memcache_buffer = yy_scan_bytes ( object, object_size ); obj_offset = yylex(); } else { obj_offset = 0; } /* while( yylex() ) { } print_debug("Prune %d items / %d chars from start of object\nNew:\n%s\n",obj_n_prune,obj_offset,object+obj_offset); */ /* Add extra 2 chars for trailing \n\0 */ new_object_size = object_size - obj_offset + (size_t) ( (strlen(current_stats_str)+ 2) * sizeof(char)); new_object = malloc(new_object_size * sizeof(char) ); if (new_object == NULL ) { puts(memory_error_message); exit(2); } graft_size = object_size - obj_offset; if ( graft_size > 0 ) { memcpy(new_object,object+obj_offset,graft_size); } else { graft_size = 0; } /* Ensure there is a \0 on the end of the object */ *(new_object+graft_size)='\0'; /* Make sure there is a newline between each item in the list */ s = new_object + graft_size; if ( graft_size > 0 ) { while ( ( *s == '\0' || *s == '\n' ) && s > new_object ) { /* Trailing \0 and trailing \n - rewind a char or more */ s--; } /* Add \n\0 to end of buffer */ strcpy(++s,"\n"); } strcat(s,current_stats_str); return(new_object); print_debug("New Object is:\n%s\nNew size: %d\nReal size: %d\n",new_object, new_object_size, (strlen(new_object)+1)); return(new_object); } /* ==================================================================================================== */ void usage() { puts("Usage:"); printf("\t%s -H hostname[:port] [-v] [-p port] [-t time_out] [-w min_hit_miss] [-n max_stats] [-T min_stats_interval] [-E max_evictions] [-k key] [-K key_expiry_time] [-r]\n", argv0); printf("\t-H ... Hostname or IP address (required)\n\t optional \":port\" overrides -p\n"); printf("\t-p ... Port number (default: %u)\n",default_port); printf("\t-v ... verbose messages\n"); printf("\t-n ... Keep up to this many items in the history object in memcached (default: %u)\n",max_n_stats); printf("\t-T ... Minimum time interval (in minutes) to use to analyse stats. (default: %u)\n",min_stats_interval); printf("\t-w ... Generate warning if quotient of hits/misses falls below this value (default: %1.1f)\n",min_hit_miss); printf("\t-E ... Generate warning if number of evictions exceeds this threshold. 0=disable. (default: %llu)\n",max_evictions); printf("\t-t ... timeout in seconds (default: %1.1f)\n",timeout); printf("\t-k ... key name for history object (default: %s)\n",memcached_key); printf("\t-K ... expiry time in seconds for history object (default: %u)\n",memcache_stats_object_expiry_time); printf("\t-r ... output performance statistics as rate-per-minute figures (better suited to pnp4nagios)\n"); printf("\nExample:\n"); printf("\t%s -H 192.168.1.1 -p 11212 -w 10 -E 5 -t 0.3 -T 10 -n 10\n",argv0); printf("\nNote: the history object \"%s\" will not be updated if the new stats are less than 30 seconds old\n",memcached_key); printf( " compared to the most recent stats in the \"%s\" object\n",memcached_key); } nagios-plugins-contrib-9.20140106/check_memcached/control0000644000000000000000000000136312262515026020055 0ustar Build-Depends: flex, libmemcached-dev Homepage: http://exchange.nagios.org/directory/Plugins/Websites,-Forms-and-Transactions/check_memcached-IV/details Version: 1.3 Uploaders: Bernd Zeimetz Description: plugin to check memcached instances It will give a critical message if a partiular memcached host is inaccessible and generate a warning if the hit/miss ratio falls below a given threshold or the number of evictions exceeds a given limit. Hit/miss and evictions are measured over a 30 minute interval, using a memcached object to store the earlier statistics. Watch: http://exchange.nagios.org/directory/Plugins/Websites,-Forms-and-Transactions/check_memcached-IV/details Current Version
([0-9.]+)
nagios-plugins-contrib-9.20140106/check_memcached/copyright0000644000000000000000000000136412262515026020406 0ustar This program was initially developed by Lonely Planet for internal use and has kindly been made available to the Open Source community for redistribution and further development under the terms of the GNU General Public License v3: http://www.gnu.org/licenses/gpl.html This program is supplied 'as-is', in the hope that it will be useful, but neither Lonely Planet nor the authors make any warranties or guarantees as to its correct operation, including its intended function. Or in other words: Test it yourself, and make sure it works for YOU. Author: George Hansper e-mail: George.Hansper@lonelyplanet.com.au On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". nagios-plugins-contrib-9.20140106/check_memcached/memcached.cfg0000644000000000000000000000025412262515026021037 0ustar # 'check_memcached' command definition define command{ command_name check_memcached command_line /usr/lib/nagios/plugins/check_memcached -H '$HOSTADDRESS$' } nagios-plugins-contrib-9.20140106/check_memcached/Makefile0000644000000000000000000000026312262515026020110 0ustar #/usr/bin/make -f CLEANFILES = check_memcached check_memcached.c LIBS += -lmemcached include ../common.mk check_memcached: check_memcached.o $(CC) $(LDFLAGS) -o $@ $< $(LIBS) nagios-plugins-contrib-9.20140106/extras/0000755000000000000000000000000012262515026014712 5ustar nagios-plugins-contrib-9.20140106/extras/check_apt.cmd0000644000000000000000000000202512262515026017317 0ustar # check_multi command file implementing a # check_apt replacement # # example nrpe.cfg config: # command[check_apt]=/usr/lib/nagios/plugins/check_multi -f /etc/check_multi/check_apt.cmd # # requirements: # - moreutils # - the following sudo permissions: # nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/check_libs # nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/check_running_kernel # - a cronjob running update-apt-status: # @hourly root [ -x /usr/lib/nagios/cronjobs/update-apt-status ] && /usr/lib/nagios/cronjobs/update-apt-status 2>&1 | logger -t update-apt-status command[ packages ] = mispipe "/usr/lib/nagios/plugins/check_statusfile /var/cache/nagios_status/apt" "sed -n '1p;\$p' | paste -s -d ''" command[ libs ] = mispipe "sudo /usr/lib/nagios/plugins/check_libs" "sed 's, ([0-9, ]*),,g'" command[ running_kernel ] = sudo /usr/lib/nagios/plugins/check_running_kernel state [ CRITICAL ] = COUNT(CRITICAL) > 0 state [ WARNING ] = COUNT(WARNING) > 0 state [ UNKNOWN ] = COUNT(UNKNOWN) > 0 nagios-plugins-contrib-9.20140106/extras/send_nsca_host_or_service_check_result0000755000000000000000000000457212262515026024615 0ustar #!/bin/bash # Enhanced version of the send_nsca wrappers to handle service and host checks. # Allows to specify the nsca host and send_nsca config file in the command definition. #define command{ # command_name obsessive_host_handler # command_line /usr/share/icinga/plugins/eventhandlers/distributed-monitoring/send_nsca_host_or_service_check_result '$_HOSTOCHP_HOST$' '$_HOSTOCHP_CONFIG$' '$HOSTNAME$' '$HOSTSTATE$' '$HOSTOUTPUT$\\n$LONGHOSTOUTPUT$|$HOSTPERFDATA$' #} #define command{ # command_name obsessive_service_handler # command_line /usr/share/icinga/plugins/eventhandlers/distributed-monitoring/send_nsca_host_or_service_check_result '$_SERVICEOCSP_HOST$' '$_SERVICEOCSP_CONFIG$' '$HOSTNAME$' '$SERVICEDESC$' '$SERVICESTATE$' '$SERVICEOUTPUT$\\n$LONGSERVICEOUTPUT$|$SERVICEPERFDATA$' #} NSCA_HOST="$1" shift SEND_NSCA_CFG="$1" shift # Service check # Arguments: # $1 = host_name (Short name of host that the service is # associated with) # $2 = svc_description (Description of the service) # $3 = state_string (A string representing the status of # the given service - "OK", "WARNING", "CRITICAL" # or "UNKNOWN") # $4 = plugin_output (A text string that should be used # as the plugin output for the service checks) # # Host check # Arguments: # $1 = host_name (Short name of host that the service is # associated with) # $2 = state_string (A string representing the status of # the given service - "OK", "WARNING", "CRITICAL" # or "UNKNOWN") # $3 = plugin_output (A text string that should be used # as the plugin output for the service checks) # HOSTNAME="$1" shift if [ $# -eq 3 ]; then # we have a service check # append service name to target. SERVICE="${1}" shift fi # Convert the state string to the corresponding return code RETURN_CODE=-1 case "$1" in OK|UP) RETURN_CODE=0 ;; WARNING) RETURN_CODE=1 ;; CRITICAL|DOWN) RETURN_CODE=2 ;; UNKNOWN|UNREACHABLE) RETURN_CODE=3 ;; esac shift # pipe the service check info into the send_nsca program, which # in turn transmits the data to the nsca daemon on the central # monitoring server if [ -n "${SERVICE}" ]; then /usr/bin/printf "%s\t%s\t%s\t%s\n" "${HOSTNAME}" "${SERVICE}" "$RETURN_CODE" "$1" else /usr/bin/printf "%s\t%s\t%s\n" "${HOSTNAME}" "$RETURN_CODE" "$1" fi | /usr/sbin/send_nsca -H ${NSCA_HOST} -c ${SEND_NSCA_CFG} nagios-plugins-contrib-9.20140106/extras/control0000644000000000000000000000040412262515026016313 0ustar Suggests: nsca-client Version: 1 Uploaders: Bernd Zeimetz Suggests: nagios-plugin-check-multi, moreutils Description: various scripts and extras Not a plugin, but a collection of various useful event/obsession handlers and similar scripts. nagios-plugins-contrib-9.20140106/extras/copyright0000644000000000000000000000134512262515026016650 0ustar send_nsca_host_or_service_check_result: Based on the example in the icinga documentation. Enhanced to handle service and host checks by Bernd Zeimetz . Copyright (c) 1999-2009 Ethan Galstad (nagios@nagios.org) Copyright (c) 2009-2010 Icinga Development Team (info@icinga.org) Copyright (c) 2012 Bernd Zeimetz License: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License, version 2, can be found in /usr/share/common-licenses/GPL-2. nagios-plugins-contrib-9.20140106/extras/Makefile0000644000000000000000000000057312262515026016357 0ustar #!/usr/bin/make -f DM_DIR=/usr/share/icinga/plugins/eventhandlers/distributed-monitoring/ MULTI_DIR=/etc/check_multi all: #nothing to do. install: install -d $(DESTDIR)$(MULTI_DIR) install -m 644 -o root -g root check_apt.cmd $(DESTDIR)$(MULTI_DIR) install -d $(DESTDIR)$(DM_DIR) install -m 755 -o root -g root send_nsca_host_or_service_check_result $(DESTDIR)$(DM_DIR) nagios-plugins-contrib-9.20140106/check_libs/0000755000000000000000000000000012262515026015472 5ustar nagios-plugins-contrib-9.20140106/check_libs/control0000644000000000000000000000071612262515026017101 0ustar Homepage: http://svn.noreply.org/cgi-bin/viewvc.cgi/weaselutils/trunk/?logsort=cvs&diff_format=s&sortby=file#dirlist Watch: http://svn.noreply.org/cgi-bin/viewvc.cgi/weaselutils/trunk/nagios-check-libs?logsort=cvs&diff_format=s&sortby=file&view=log Uploaders: Bernd Zeimetz Description: plugin to report the usage of no longer existing libraries by running processes Recommends: lsof, libyaml-syck-perl Version: 520 nagios-plugins-contrib-9.20140106/check_libs/update_files.sh0000755000000000000000000000034512262515026020477 0ustar #!/bin/bash for i in nagios-check-libs nagios-check-libs.conf; do tmp=`mktemp` if wget -O ${tmp} "http://svn.noreply.org/svn/weaselutils/trunk/${i}"; then mv ${tmp} ${i} else rm -f ${tmp} fi done nagios-plugins-contrib-9.20140106/check_libs/copyright0000644000000000000000000000220112262515026017420 0ustar Copyright (C) 2005, 2006, 2007, 2008, 2012 Peter Palfrader 2012 Uli Martens 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. nagios-plugins-contrib-9.20140106/check_libs/nagios-check-libs0000644000000000000000000001332312262515026020701 0ustar #!/usr/bin/perl -w # Copyright (C) 2005, 2006, 2007, 2008, 2012 Peter Palfrader # 2012 Uli Martens # # 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. use strict; use English; use Getopt::Long; $ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/sbin'; delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; my $LSOF = '/usr/bin/lsof -F0'; my $VERSION = '0.2012042101'; # nagios exit codes my $OK = 0; my $WARNING = 1; my $CRITICAL = 2; my $UNKNOWN = 3; my $params; my $config; Getopt::Long::config('bundling'); sub dief { print STDERR @_; exit $UNKNOWN; } if (!GetOptions ( '--help' => \$params->{'help'}, '--version' => \$params->{'version'}, '--quiet' => \$params->{'quiet'}, '--verbose' => \$params->{'verbose'}, '--config=s' => \$params->{'config'}, )) { dief ("$PROGRAM_NAME: Usage: $PROGRAM_NAME [--help|--version] [--verbose] [--quiet] [--config=]\n"); }; if ($params->{'help'}) { print "$PROGRAM_NAME: Usage: $PROGRAM_NAME [--help|--version] [--verbose] [--quiet] [--config=]\n"; print "Reports processes that are linked against libraries that no longer exist.\n"; print "The optional config file can specify ignore rules - see the sample config file.\n"; exit (0); }; if ($params->{'version'}) { print "nagios-check-libs $VERSION\n"; print "nagios check for availability of debian (security) updates\n"; print "Copyright (c) 2005, 2006, 2007, 2008, 2012 Peter Palfrader \n"; exit (0); }; if (! defined $params->{'config'}) { $params->{'config'} = '/etc/nagios-plugins/check-libs.conf'; } elsif (! -e $params->{'config'}) { dief("Config file $params->{'config'} does not exist.\n"); } if (-e $params->{'config'}) { eval "use YAML::Syck; 1" or dief "you need YAML::Syck (libyaml-syck-perl) to load a config file"; open(my $fh, '<', $params->{'config'}) or dief "Cannot open config file $params->{'config'}: $!"; $config = LoadFile($fh); close($fh); if (!(ref($config) eq "HASH")) { dief("Loaded config is not a hash!\n"); } } else { $config = { 'ignorelist' => [ '$path =~ m#^/proc/#', '$path =~ m#^/var/tmp/#', '$path =~ m#^/SYS#', '$path =~ m#^/drm$# # xserver stuff', '$path =~ m#^/dev/zero#', '$path =~ m#^/dev/shm/#', ] }; } if (! exists $config->{'ignorelist'}) { $config->{'ignorelist'} = []; } elsif (! (ref($config->{'ignorelist'}) eq 'ARRAY')) { dief("Config->ignorelist is not an array!\n"); } my %processes; sub getPIDs($$) { my ($user, $process) = @_; return join(', ', sort keys %{ $processes{$user}->{$process} }); }; sub getProcs($) { my ($user) = @_; return join(', ', map { $_.' ('.getPIDs($user, $_).')' } (sort {$a cmp $b} keys %{ $processes{$user} })); }; sub getUsers() { return join('; ', (map { $_.': '.getProcs($_) } (sort {$a cmp $b} keys %processes))); }; sub inVserver() { my ($f, $key); if (-e "/proc/self/vinfo" ) { $f = "/proc/self/vinfo"; $key = "XID"; } else { $f = "/proc/self/status"; $key = "s_context"; }; open(F, "< $f") or return 0; while () { my ($k, $v) = split(/: */, $_, 2); if ($k eq $key) { close F; return ($v > 0); }; }; close F; return 0; } my $INVSERVER = inVserver(); print STDERR "Running $LSOF -n\n" if $params->{'verbose'}; open (LSOF, "$LSOF -n|") or dief ("Cannot run $LSOF -n: $!\n"); my @lsof=; close LSOF; if ($CHILD_ERROR) { # program failed dief("$LSOF -n returned with non-zero exit code: ".($CHILD_ERROR / 256)."\n"); }; my ($process, $pid, $user); LINE: for my $line (@lsof) { if ( $line =~ /^p/ ) { my %fields = map { m/^(.)(.*)$/ ; $1 => $2 } grep { defined $_ and length $_ >1} split /\0/, $line; $process = $fields{c}; $pid = $fields{p}; $user = $fields{L}; next; } unless ( $line =~ /^f/ ) { dief("UNKNOWN strange line read from lsof\n"); # don't print it because it contains NULL characters... } my %fields = map { m/^(.)(.*)$/ ; $1 => $2 } grep { defined $_ and length $_ >1} split /\0/, $line; my $fd = $fields{f}; my $inode = $fields{i}; my $path = $fields{n}; if ($path =~ m/\.dpkg-/ || $path =~ m/\(deleted\)/ || $path =~ /path inode=/ || $fd eq 'DEL') { for my $i (@{$config->{'ignorelist'}}) { my $ignore = eval($i); next LINE if $ignore; } next if ($INVSERVER && ($process eq 'init') && ($pid == 1) && ($user eq 'root')); if ( $params->{'verbose'} ) { print STDERR "adding $process($pid) because of [$path]:\n"; print STDERR $line; } $processes{$user}->{$process}->{$pid} = 1; }; }; my $message=''; my $exit = $OK; if (keys %processes) { $exit = $WARNING; $message = 'The following processes have libs linked that were upgraded: '. getUsers()."\n"; } else { $message = "No upgraded libs linked in running processes\n" unless $params->{'quiet'}; }; print $message; exit $exit; nagios-plugins-contrib-9.20140106/check_libs/nagios-check-libs.conf0000644000000000000000000000100012262515026021612 0ustar --- ignorelist: - '$path =~ m#^/proc/#' - '$path =~ m#^/var/tmp/#' - '$path =~ m#^/tmp/#' - '$path =~ m#^/var/run/#' - '$path =~ m#^/run/#' - '$path =~ m#^/dev/pts/#' - '$path =~ m#^/SYS#' - '$path =~ m#^/sys/#' - '$path =~ m#^/drm$# # xserver stuff' - '$path =~ m#^/dev/zero#' - '$path =~ m#^/dev/shm/#' - '$path =~ m#^/var/lib/postgresql/#' - '$path =~ m#^/var/log/#' - '$path =~ m#^/var/spool/#' - '$path =~ m#^/var/lib/ganeti/#' # vim:syn=yaml nagios-plugins-contrib-9.20140106/check_libs/Makefile0000644000000000000000000000034112262515026017130 0ustar #!/usr/bin/make -f INIFILES = check-libs.conf PLUGIN = check_libs CLEANFILES = $(INIFILES) $(PLUGIN) include ../common.mk check_libs: cp nagios-check-libs $@ chmod 755 $@ check-libs.conf: cp nagios-check-libs.conf $@ nagios-plugins-contrib-9.20140106/check_ajp/0000755000000000000000000000000012262515026015313 5ustar nagios-plugins-contrib-9.20140106/check_ajp/ajp.cfg0000644000000000000000000000025612262515026016551 0ustar # 'check_ajp' command definition define command{ command_name check_ajp command_line /usr/lib/nagios/plugins/check_ajp --app '$HOSTADDRESS$' } nagios-plugins-contrib-9.20140106/check_ajp/control0000644000000000000000000000053612262515026016722 0ustar Version: 1 Uploaders: Bernd Zeimetz Description: plugin to monitor the AJP ping response time Should work with all application servers (Tomcat, JBoss,....) which provide an AJPv13 connector. Homepage: http://blog.devnu11.net/projects/ Watch: http://blog.devnu11.net/projects/

v([0-9]*) – md5: Recommends: libsocket-perl nagios-plugins-contrib-9.20140106/check_ajp/copyright0000644000000000000000000000142412262515026017247 0ustar Comment: Please send bug fixes and enhancements to check_ajp - nagios plugin for jboss monitoring Copyright (C) 2010 Michel Rode 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . nagios-plugins-contrib-9.20140106/check_ajp/check_ajp0000644000000000000000000000627012262515026017152 0ustar #!/usr/bin/perl -w # # History: # 2010-11-05 First release (v1) # # Comment: Please send bug fixes and enhancements to # # check_ajp - nagios plugin for jboss monitoring # Copyright (C) 2010 Michel Rode # # 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 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # # Usage: ./check_ajp --app ip.of.the.app [--port 8009 --warn 1 --crit 2 --timeout 5] # use warnings; use strict; use Getopt::Long; use Socket; use Time::HiRes 'time'; my $app = ''; my $port = '8009'; my $warntime = '1.5'; my $crittime = '3'; my $timeout = '10'; my ($iaddr, $paddr, $proto, $sock, $time1, $time2); my $pong = 'null'; sub xdie{ my $msg = shift; printf STDERR "Usage: check_ajp --app ip.of.the.app [--port 8009 --warn 1 --crit 2 --timeout 5]\n\n"; printf STDERR "ERROR: $msg\n"; exit 3; } GetOptions("app=s" => \$app, "port=s" => \$port, "warn=f" => \$warntime, "crit=f" => \$crittime, "timeout=f" => \$timeout); my $ping = pack 'C5' # Format template. , 0x12, 0x34 # Magic number for server->container packets. , 0x00, 0x01 # 2 byte int length of payload. , 0x0A # Type of packet. 10 = CPing. ; my $expected = pack 'C5' # Format template. , 0x41, 0x42 # Magic number for container->server packets. , 0x00, 0x01 # 2 byte int length of payload. , 0x09 # Type of packet. 9 = CPong reply. ; $iaddr = inet_aton($app) || xdie("No host given !"); $paddr = sockaddr_in($port, $iaddr) || xdie("Wrong port !"); $proto = getprotobyname 'tcp'; $time1 = time(); eval { local $SIG{ALRM} = sub { die "alarm\n" }; alarm($timeout); socket $sock, PF_INET, SOCK_STREAM, $proto || xdie("socket !"); connect $sock, $paddr || xdie("connect !"); syswrite $sock, $ping || xdie("syswrite !"); sysread $sock, $pong, 5 || xdie("sysread !"); alarm(0); }; if ($@) { die unless $@ eq "alarm\n"; $time2 = (time() - $time1); printf "CRITICAL - AJP - Timeout after %1.0fs\n",$time2; exit 2; } else { $time2 = (time() - $time1); if ($pong eq $expected) { if ($time2 >= $crittime) { printf "CRITICAL - AJP - %3.5f seconds response time|time=%3.6fs;;;0.000000;%2.6f\n",$time2,$time2,$timeout; exit 2; } elsif ($time2 >= $warntime) { printf "WARNING - AJP - %3.5f seconds response time|time=%3.6fs;;;0.000000;%2.6f\n",$time2,$time2,$timeout; exit 1; } else { printf "OK - AJP - %3.5f seconds response time|time=%3.6fs;;;0.000000;%2.6f\n",$time2,$time2,$timeout; exit 0; } } else { printf "UNKNOWN - AJP - %3.5f seconds response time|time=%3.6fs;;;0.000000;%2.6f\n",$time2,$time2,$timeout; exit 3; } } nagios-plugins-contrib-9.20140106/check_ajp/Makefile0000644000000000000000000000005412262515026016752 0ustar PLUGIN := check_ajp include ../common.mk nagios-plugins-contrib-9.20140106/check_mysql_health/0000755000000000000000000000000012262515026017233 5ustar nagios-plugins-contrib-9.20140106/check_mysql_health/control0000644000000000000000000000054312262515026020640 0ustar Homepage: http://labs.consol.de/lang/en/nagios/check_mysql_health/ Watch: http://labs.consol.de/lang/en/nagios/check_mysql_health/ check_mysql_health-([0-9.]+)\.tar\.gz Uploaders: Jan Wagner Recommends: libdbd-mysql-perl Description: plugin to check various parameters of a MySQL database Build-Depends: autotools-dev Version: 2.1.8.2 nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/0000755000000000000000000000000012262515026023666 5ustar nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/install-sh0000755000000000000000000002017412262515026025676 0ustar #!/bin/sh # install - install a program, script, or datafile scriptversion=2003-09-24.23 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # 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 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename= transform_arg= instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= usage="Usage: $0 [OPTION]... SRCFILE DSTFILE or: $0 -d DIR1 DIR2... In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. In the second, create the directory path DIR. Options: -b=TRANSFORMBASENAME -c copy source (using $cpprog) instead of moving (using $mvprog). -d create directories instead of installing files. -g GROUP $chgrp installed files to GROUP. -m MODE $chmod installed files to MODE. -o USER $chown installed files to USER. -s strip installed files (using $stripprog). -t=TRANSFORM --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; -c) instcmd=$cpprog shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit 0;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; --version) echo "$0 $scriptversion"; exit 0;; *) if test -z "$src"; then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if test -z "$src"; then echo "$0: no input file specified." >&2 exit 1 fi # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then instcmd=: chmodcmd= else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst"; then echo "$0: no destination specified." >&2 exit 1 fi # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift test -d "$pathcomp" || $mkdirprog "$pathcomp" pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $instcmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else # If we're going to rename the final executable, determine the name now. if test -z "$transformarg"; then dstfile=`basename "$dst"` else dstfile=`basename "$dst" $transformbasename \ | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename. test -z "$dstfile" && dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 # Move or copy the file name to the temp name $doit $instcmd "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now remove or move aside any old file at destination location. We # try this two ways since rm can't unlink itself on some systems and # the destination file might be busy for other reasons. In this case, # the final cleanup might fail but the new file should still install # successfully. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" fi && # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/config.guess0000755000000000000000000012366112262515026026217 0ustar #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-10-20' # 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., 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. # 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 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 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # 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 ;' # 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 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pegasos:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mipseb-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # 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 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/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha*:OpenVMS:*:*) echo alpha-hp-vms exit 0 ;; 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 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; *:OS400:*:*) echo powerpc-ibm-os400 exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; 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 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit 0 ;; DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; 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 0 ;; 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 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; 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 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # 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 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; 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 \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; 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 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????: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 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; 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 0 ;; *: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 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 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 0 ;; *: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 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 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 # avoid double evaluation of $set_cc_for_build test -n "$CC_FOR_BUILD" || eval $set_cc_for_build if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 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 && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; 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 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; 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 0 ;; 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 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) # Determine whether the default compiler uses glibc. eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #if __GLIBC__ >= 2 LIBC=gnu #else LIBC= #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` # GNU/KFreeBSD systems have a "k" prefix to indicate we are using # FreeBSD's kernel, but not the complete OS. case ${LIBC} in gnu) kernel_only='k' ;; esac echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit 0 ;; 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 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *: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 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; 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 0 ;; 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 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; 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 0 ;; 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 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; 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 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # 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 0 ;; 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 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; 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 0 ;; 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 0 ;; 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 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; 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 0 ;; i*86:*:5:[78]*) 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 0 ;; 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 0 ;; 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 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; 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 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 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) 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 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *: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 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; 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 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) case `uname -p` in *86) UNAME_PROCESSOR=i686 ;; powerpc) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *: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 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *: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 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; *:DRAGONFLY:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly${UNAME_RELEASE} exit 0 ;; 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"); 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 && $dummy && exit 0 # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # 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 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; 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: nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/INSTALL0000644000000000000000000002212012262515026024714 0ustar Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2008 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. Joerg ===== Na, hast du alles brav durchgelesen? nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/configure0000755000000000000000000030554512262515026025611 0ustar #! /bin/sh # From configure.in . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for check_mysql_health 2.1.8.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='check_mysql_health' PACKAGE_TARNAME='check_mysql_health' PACKAGE_VERSION='2.1.8.2' PACKAGE_STRING='check_mysql_health 2.1.8.2' PACKAGE_BUGREPORT='' ac_default_prefix=/usr/local/nagios ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os RELEASE INSTALL WARRANTY SUPPORT with_nagios_user with_nagios_group INSTALL_OPTS STATEFILES_DIR MYMODULES_DIR MYMODULES_DYN_DIR SH PERL GZIP GREP ECHO SED CAT LIBOBJS 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 # # 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 check_mysql_health 2.1.8.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 check_mysql_health 2.1.8.2:";; esac cat <<\_ACEOF Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-nagios-user=USER set user name to run nagios --with-nagios-group=GROUP set group name to run nagios --with-statefiles-dir=PATH sets directory for the state files (default=/var/tmp/check_mysql_health) --with-mymodules-dir=PATH sets directory for own extensions which will be included during the build process (default=/usr/local/nagios/libexec) --with-mymodules-dyn-dir=PATH sets directory for own extensions which will be included at runtime (default=/usr/local/nagios/libexec) --with-perl=PATH sets path to perl executable _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 # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$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 check_mysql_health configure 2.1.8.2 generated by GNU Autoconf 2.59 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 check_mysql_health $as_me 2.1.8.2, which was generated by GNU Autoconf 2.59. 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.9" 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 -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -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 ./-p ./--version; 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)' else mkdir_p='$(install_sh) -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='check_mysql_health' VERSION='2.1.8.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"} 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. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} echo "$as_me:$LINENO: checking how to create a pax tar archive" >&5 echo $ECHO_N "checking how to create a pax tar archive... $ECHO_C" >&6 # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' _am_tools=${am_cv_prog_tar_pax-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=posix -chf - "'"$$tardir"' am__tar_="$_am_tar --format=posix -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x pax -w "$$tardir"' am__tar_='pax -L -x pax -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H pax -L' am__tar_='find "$tardir" -print | cpio -o -H pax -L' am__untar='cpio -i -H pax -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_pax}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if test "${am_cv_prog_tar_pax+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_prog_tar_pax=$_am_tool fi echo "$as_me:$LINENO: result: $am_cv_prog_tar_pax" >&5 echo "${ECHO_T}$am_cv_prog_tar_pax" >&6 # 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' 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 WARRANTY="This plugin comes with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of the plugin 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 gerhard.lausser@consol.de if you have questions\nregarding use of this software.\nPlease include version information with all correspondence (when possible,\nuse output from the --version option of the plugin itself).\n" # 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-statefiles_dir or --without-statefiles_dir was given. if test "${with_statefiles_dir+set}" = set; then withval="$with_statefiles_dir" with_statefiles_dir=$withval else with_statefiles_dir=/var/tmp/check_mysql_health fi; STATEFILES_DIR=$with_statefiles_dir echo variable with_statefiles_dir is $with_statefiles_dir # Check whether --with-mymodules_dir or --without-mymodules_dir was given. if test "${with_mymodules_dir+set}" = set; then withval="$with_mymodules_dir" with_mymodules_dir=$withval else with_mymodules_dir=/usr/local/nagios/libexec fi; MYMODULES_DIR=$with_mymodules_dir echo variable with_mymodules_dir is $with_mymodules_dir # Check whether --with-mymodules_dyn_dir or --without-mymodules_dyn_dir was given. if test "${with_mymodules_dyn_dir+set}" = set; then withval="$with_mymodules_dyn_dir" with_mymodules_dyn_dir=$withval else with_mymodules_dyn_dir=/usr/local/nagios/libexec fi; MYMODULES_DYN_DIR=$with_mymodules_dyn_dir echo variable with_mymodules_dyn_dir is $with_mymodules_dyn_dir EXTRAS= # 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 # Extract the first word of "gzip", so it can be a program name with args. set dummy gzip; 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_GZIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GZIP in [\\/]* | ?:[\\/]*) ac_cv_path_GZIP="$GZIP" # 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_GZIP="$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 GZIP=$ac_cv_path_GZIP if test -n "$GZIP"; then echo "$as_me:$LINENO: result: $GZIP" >&5 echo "${ECHO_T}$GZIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi for ac_prog in gawk nawk /usr/xpg4/bin/awk 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_path_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $AWK in [\\/]* | ?:[\\/]*) ac_cv_path_AWK="$AWK" # 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_AWK="$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 AWK=$ac_cv_path_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 # Extract the first word of "grep", so it can be a program name with args. set dummy grep; 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_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GREP in [\\/]* | ?:[\\/]*) ac_cv_path_GREP="$GREP" # 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_GREP="$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 GREP=$ac_cv_path_GREP if test -n "$GREP"; then echo "$as_me:$LINENO: result: $GREP" >&5 echo "${ECHO_T}$GREP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "echo", so it can be a program name with args. set dummy echo; 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_ECHO+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ECHO in [\\/]* | ?:[\\/]*) ac_cv_path_ECHO="$ECHO" # 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_ECHO="$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 ECHO=$ac_cv_path_ECHO if test -n "$ECHO"; then echo "$as_me:$LINENO: result: $ECHO" >&5 echo "${ECHO_T}$ECHO" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "sed", so it can be a program name with args. set dummy sed; 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_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $SED in [\\/]* | ?:[\\/]*) ac_cv_path_SED="$SED" # 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_SED="$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 SED=$ac_cv_path_SED if test -n "$SED"; then echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "cat", so it can be a program name with args. set dummy cat; 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_CAT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CAT in [\\/]* | ?:[\\/]*) ac_cv_path_CAT="$CAT" # 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_CAT="$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 CAT=$ac_cv_path_CAT if test -n "$CAT"; then echo "$as_me:$LINENO: result: $CAT" >&5 echo "${ECHO_T}$CAT" >&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 ac_config_files="$ac_config_files Makefile plugins-scripts/Makefile plugins-scripts/subst t/Makefile" 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 # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. cat >confdef2opt.sed <<\_ACEOF t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote d : quote s,[ `~#$^&*(){}\\|;'"<>?],\\&,g s,\[,\\&,g s,\],\\&,g s,\$,$$,g p _ACEOF # We use echo to avoid assuming a particular line-breaking character. # The extra dot is to prevent the shell from consuming trailing # line-breaks from the sub-command output. A line-break within # single-quotes doesn't work because, if this script is created in a # platform that uses two characters for line-breaks (e.g., DOS), tr # would break. ac_LF_and_DOT=`echo; echo .` DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` rm -f confdef2opt.sed 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 : ${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 check_mysql_health $as_me 2.1.8.2, which was generated by GNU Autoconf 2.59. 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 Configuration files: $config_files Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ check_mysql_health config.status 2.1.8.2 configured by $0, generated by GNU Autoconf 2.59, 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 for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "plugins-scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES plugins-scripts/Makefile" ;; "plugins-scripts/subst" ) CONFIG_FILES="$CONFIG_FILES plugins-scripts/subst" ;; "t/Makefile" ) CONFIG_FILES="$CONFIG_FILES t/Makefile" ;; *) { { 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 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,@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,@AMTAR@,$AMTAR,;t t s,@am__tar@,$am__tar,;t t s,@am__untar@,$am__untar,;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,@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,@STATEFILES_DIR@,$STATEFILES_DIR,;t t s,@MYMODULES_DIR@,$MYMODULES_DIR,;t t s,@MYMODULES_DYN_DIR@,$MYMODULES_DYN_DIR,;t t s,@SH@,$SH,;t t s,@PERL@,$PERL,;t t s,@GZIP@,$GZIP,;t t s,@GREP@,$GREP,;t t s,@ECHO@,$ECHO,;t t s,@SED@,$SED,;t t s,@CAT@,$CAT,;t t s,@LIBOBJS@,$LIBOBJS,;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 # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$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 { (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-statefiles-dir: $with_statefiles_dir" echo " --with-nagios-user: $with_nagios_user" echo " --with-nagios-group: $with_nagios_group" echo " --with-mymodules-dir: $with_mymodules_dir" echo " --with-mymodules-dyn-dir: $with_mymodules_dyn_dir" nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/aclocal.m40000644000000000000000000005003512262515026025531 0ustar # generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is 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. # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # 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.9"]) # 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.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$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` ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # 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_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([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 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]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. 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)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [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])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [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 ]) # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -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 ./-p ./--version; 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)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _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])]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # 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)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # 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])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([acinclude.m4]) nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/Makefile.am0000644000000000000000000000054112262515026025722 0ustar ## Process this file with automake to produce Makefile.in # find . \( -type d -and -name .svn -and -prune \) -or -type f -exec fromdos -v {} \; SUBDIRS = plugins-scripts t EXTRA_DIST = contrib dist-hook: rm -f t/var/tmp/* rm -f t/var/adm/* find $(distdir) -depth -name .svn -exec rm -rf {} \; find $(distdir) -type f -exec fromdos -v {} \; make nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/contrib/0000755000000000000000000000000012262515026025326 5ustar ././@LongLink0000644000000000000000000000016012262515411011636 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/contrib/CheckMySQLHealthExt1.pmnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/contrib/CheckMySQLHe0000644000000000000000000000515512262515026027437 0ustar package MyQueue; our @ISA = qw(DBD::MySQL::Server); sub init { my $self = shift; my %params = @_; $self->{running} = 0; $self->{waiting} = 0; $self->{held} = 20; $self->{cancelled} = 0; $self->{length} = 100; if ($params{mode} =~ /my::queue::status/) { ($self->{running}, $self->{waiting}, $self->{held}, $self->{cancelled}) = $self->{handle}->fetchrow_array(q{ SELECT COUNT(*) FROM queues WHERE status IN ('running', 'waiting', 'held', 'cancelled') GROUP BY status }); } elsif ($params{mode} =~ /my::queue::length/) { $self->{length} = $self->{handle}->fetchrow_array(q{ SELECT COUNT(*) FROM queues }); } elsif ($params{mode} =~ /my::queue::througput/) { $self->{processed_items} = $self->{handle}->fetchrow_array(q{ SELECT processed FROM queue_status }); $self->valdiff(\%params, qw(processed_items)); # this automatically creates # $self->{delta_timestamp} # the time in seconds since the last run of check_mysql_health # $self->{delta_processed_items} # the difference between processed_items now and # processed_items when check_mysql_health was run last time $self->{throughput} = $self->{delta_processed_items} / $self->{delta_timestamp}; } else { } } sub nagios { my $self = shift; my %params = @_; if ($params{mode} =~ /my::queue::status/) { if ($self->{held} > 10 || $self->{cancelled} > 10) { $self->add_nagios_critical("more than 10 queues are held or cancelled"); } elsif ($self->{waiting} > 20 && $self->{running} < 3) { $self->add_nagios_warning("more than 20 queues are waiting and less than 3 queues are running"); } else { $self->add_nagios_ok("queues are running normal"); } $self->add_perfdata(sprintf "held=%d cancelled=%d waiting=%d running=%d", $self->{running}, $self->{waiting}, $self->{held}, $self->{cancelled}); } elsif ($params{mode} =~ /my::queue::length/) { $self->add_nagios( $self->check_thresholds($self->{length}, 100, 500), sprintf "queue length is %d", $self->{length}); $self->add_perfdata(sprintf "queuelen=%d;%d;%d", $self->{length}, $self->{warningrange}, $self->{criticalrange}); } elsif ($params{mode} =~ /my::queue::througput/) { $self->add_nagios( $self->check_thresholds($self->{throughput}, "50:", "10:"), sprintf "queue throughput is %d", $self->{throughput}); $self->add_perfdata(sprintf "throughput=%.2f;%d;%d", $self->{throughput}, $self->{warningrange}, $self->{criticalrange}); } else { $self->add_nagios_unknown("unknown mode"); } } ././@LongLink0000644000000000000000000000015712262515411011644 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/contrib/check_mysql_health.phpnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/contrib/check_mysql_0000644000000000000000000004730612262515026027724 0ustar 60s) on $hostname\" "; $def[$defcnt] = ""; $def[$defcnt] .= "DEF:longrun=$RRDFILE[$i]:$DS[$i]:AVERAGE:reduce=LAST " ; $def[$defcnt] .= "AREA:longrun#111111 "; $def[$defcnt] .= "VDEF:vlongrun=longrun,LAST " ; $def[$defcnt] .= "GPRINT:vlongrun:\"%.0lf long running processes \" " ; $defcnt++; } if(preg_match('/^keycache_hitrate_now$/', $NAME[$i])) { $ds_name[$defcnt] = "MyISAM key cache hitrate"; $opt[$defcnt] = "--vertical-label \"Percent\" --title \"MyISAM key cache hitrate on $hostname\" --upper-limit 100 --lower-limit 0 "; $def[$defcnt] = ""; foreach ($DS as $ii) { if(preg_match('/^keycache_hitrate$/', $NAME[$ii])) { $def[$defcnt] .= "DEF:hitrate=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ; $def[$defcnt] .= "CDEF:ar=hitrate,$CRIT_MIN[$ii],LE,hitrate,0,GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF "; $def[$defcnt] .= "CDEF:ay=hitrate,$WARN_MIN[$ii],LE,hitrate,$CRIT_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF "; $def[$defcnt] .= "CDEF:ag=hitrate,100,LE,hitrate,$WARN_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF "; $def[$defcnt] .= "AREA:ag#$green: " ; $def[$defcnt] .= "AREA:ay#$yellow: " ; $def[$defcnt] .= "AREA:ar#$red: " ; $def[$defcnt] .= "LINE1.5:hitrate#111111:\" \" "; $def[$defcnt] .= "VDEF:vhitrate=hitrate,LAST " ; $def[$defcnt] .= "GPRINT:vhitrate:\"Hitratio (since epoch) is %3.2lf percent \\n\" "; } if(preg_match('/^keycache_hitrate_now$/', $NAME[$ii])) { $def[$defcnt] .= "DEF:hitratenow=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ; $def[$defcnt] .= "LINE1.5:hitratenow#$now:\" \" "; $def[$defcnt] .= "VDEF:vhitratenow=hitratenow,LAST " ; $def[$defcnt] .= "GPRINT:vhitratenow:\"Hitratio (current) is %3.2lf percent \\n\" "; } } $defcnt++; } if(preg_match('/^qcache_hitrate_now$/', $NAME[$i])) { $ds_name[$defcnt] = "Query cache hitrate"; $opt[$defcnt] = "--vertical-label \"Percent\" --title \"Query cache hitrate on $hostname\" --upper-limit 100 --lower-limit 0 "; $def[$defcnt] = ""; foreach ($DS as $ii) { if(preg_match('/^qcache_hitrate$/', $NAME[$ii])) { $def[$defcnt] .= "DEF:hitrate=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ; $def[$defcnt] .= "CDEF:ar=hitrate,$CRIT_MIN[$ii],LE,hitrate,0,GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF "; $def[$defcnt] .= "CDEF:ay=hitrate,$WARN_MIN[$ii],LE,hitrate,$CRIT_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF "; $def[$defcnt] .= "CDEF:ag=hitrate,100,LE,hitrate,$WARN_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF "; $def[$defcnt] .= "AREA:ag#$green: " ; $def[$defcnt] .= "AREA:ay#$yellow: " ; $def[$defcnt] .= "AREA:ar#$red: " ; $def[$defcnt] .= "LINE1.5:hitrate#111111:\" \" "; $def[$defcnt] .= "VDEF:vhitrate=hitrate,LAST " ; $def[$defcnt] .= "GPRINT:vhitrate:\"Hitratio (since epoch) is %3.2lf percent \\n\" "; } if(preg_match('/^qcache_hitrate_now$/', $NAME[$ii])) { $def[$defcnt] .= "DEF:hitratenow=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ; $def[$defcnt] .= "LINE1.5:hitratenow#$now:\" \" "; $def[$defcnt] .= "VDEF:vhitratenow=hitratenow,LAST " ; $def[$defcnt] .= "GPRINT:vhitratenow:\"Hitratio (current) is %3.2lf percent \\n\" "; } } $defcnt++; $ds_name[$defcnt] = "Selects per second"; $opt[$defcnt] = "--vertical-label \"Selects / sec\" --title \"Selects per second on $hostname\" "; $def[$defcnt] = ""; foreach ($DS as $ii) { if(preg_match('/^selects_per_sec$/', $NAME[$ii])) { $def[$defcnt] .= "DEF:sps=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ; $def[$defcnt] .= "AREA:sps#$now:\" \" "; $def[$defcnt] .= "VDEF:vsps=sps,LAST " ; $def[$defcnt] .= "GPRINT:vsps:\"%3.2lf Selects per second \\n\" "; } } $defcnt++; } if(preg_match('/^qcache_lowmem_prunes_rate$/', $NAME[$i])) { $ds_name[$defcnt] = "Query cache low memory prunes"; $opt[$defcnt] = "--vertical-label \"Prunes / sec\" --title \"Query cache low mem prunes on $hostname\" "; $def[$defcnt] = ""; $def[$defcnt] .= "DEF:prunes=$RRDFILE[$i]:$DS[$i]:AVERAGE:reduce=LAST " ; $def[$defcnt] .= "AREA:prunes#111111 "; $def[$defcnt] .= "VDEF:vprunes=prunes,LAST " ; $def[$defcnt] .= "GPRINT:vprunes:\"Rate is %3.2lf Prunes / Second \" " ; $defcnt++; } if(preg_match('/^slow_queries_rate$/', $NAME[$i])) { $ds_name[$defcnt] = "Slow query rate"; $opt[$defcnt] = "--vertical-label \"Slow queries / sec\" --title \"Slow queries on $hostname\" "; $def[$defcnt] = ""; $def[$defcnt] .= "DEF:prunes=$RRDFILE[$i]:$DS[$i]:AVERAGE:reduce=LAST " ; $def[$defcnt] .= "AREA:prunes#111111 "; $def[$defcnt] .= "VDEF:vprunes=prunes,LAST " ; $def[$defcnt] .= "GPRINT:vprunes:\"%3.2lf Slow queries / Second \" " ; $defcnt++; } if(preg_match('/^tablelock_contention_now$/', $NAME[$i])) { $ds_name[$defcnt] = "Table lock contention"; # set upper limit to 10, because 3 means an already dead database $opt[$defcnt] = "--vertical-label \"Percent\" --title \"Table lock contention on $hostname\" --upper-limit 10 --lower-limit 0 "; $def[$defcnt] = ""; foreach ($DS as $ii) { if(preg_match('/^tablelock_contention$/', $NAME[$ii])) { $def[$defcnt] .= "DEF:tbllckcont=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ; $def[$defcnt] .= "CDEF:ag=tbllckcont,$WARN[$ii],LE,tbllckcont,0,GT,INF,UNKN,IF,UNKN,IF,ISINF,tbllckcont,0,IF "; $def[$defcnt] .= "CDEF:ay=tbllckcont,$CRIT[$ii],LE,tbllckcont,$WARN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,tbllckcont,0,IF "; $def[$defcnt] .= "CDEF:ar=tbllckcont,100,LE,tbllckcont,$CRIT[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,tbllckcont,0,IF "; $def[$defcnt] .= "AREA:ag#$green: " ; $def[$defcnt] .= "AREA:ay#$yellow: " ; $def[$defcnt] .= "AREA:ar#$red: " ; $def[$defcnt] .= "LINE:tbllckcont#111111:\" \" "; $def[$defcnt] .= "VDEF:vtbllckcont=tbllckcont,LAST " ; $def[$defcnt] .= "GPRINT:vtbllckcont:\"Lock contention (since epoch) is %3.2lf%%\\n\" " ; } if(preg_match('/^tablelock_contention_now$/', $NAME[$ii])) { $def[$defcnt] .= "DEF:tbllckcontnow=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ; $def[$defcnt] .= "LINE1.5:tbllckcontnow#$now:\" \" "; $def[$defcnt] .= "VDEF:vtbllckcontnow=tbllckcontnow,LAST " ; $def[$defcnt] .= "GPRINT:vtbllckcontnow:\"Lock contention (current) is %3.2lf%%\" "; } } $defcnt++; } if(preg_match('/^tablecache_fillrate$/', $NAME[$i])) { $ds_name[$defcnt] = "Table cache hitrate"; $opt[$defcnt] = "--vertical-label \"Percent\" --title \"Table cache hitrate on $hostname\" --upper-limit 100 --lower-limit 0 "; $def[$defcnt] = ""; foreach ($DS as $ii) { if(preg_match('/^tablecache_hitrate$/', $NAME[$ii])) { $def[$defcnt] .= "DEF:hitrate=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ; $def[$defcnt] .= "CDEF:ar=hitrate,$CRIT_MIN[$ii],LE,hitrate,0,GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF "; $def[$defcnt] .= "CDEF:ay=hitrate,$WARN_MIN[$ii],LE,hitrate,$CRIT_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF "; $def[$defcnt] .= "CDEF:ag=hitrate,100,LE,hitrate,$WARN_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF "; $def[$defcnt] .= "AREA:ag#$green: " ; $def[$defcnt] .= "AREA:ay#$yellow: " ; $def[$defcnt] .= "AREA:ar#$red: " ; $def[$defcnt] .= "LINE:hitrate#111111:\" \" "; $def[$defcnt] .= "VDEF:vhitrate=hitrate,LAST " ; $def[$defcnt] .= "GPRINT:vhitrate:\"Hitratio is %3.2lf percent \\n\" "; } if(preg_match('/^tablecache_fillrate$/', $NAME[$ii])) { $def[$defcnt] .= "DEF:hitratenow=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ; $def[$defcnt] .= "LINE1.5:hitratenow#$now:\" \" "; $def[$defcnt] .= "VDEF:vhitratenow=hitratenow,LAST " ; $def[$defcnt] .= "GPRINT:vhitratenow:\"%3.2lf%% of the cache is filled \\n\" "; } } $defcnt++; } if(preg_match('/^pct_tmp_table_on_disk_now$/', $NAME[$i])) { $ds_name[$defcnt] = "Temporary tables created on disk "; $opt[$defcnt] = "--vertical-label \"Percent\" --title \"Temporary tables created on disk on $hostname\" --upper-limit 10 --lower-limit 0 "; $def[$defcnt] = ""; foreach ($DS as $ii) { if(preg_match('/^pct_tmp_table_on_disk$/', $NAME[$ii])) { $def[$defcnt] .= "DEF:tmptbldsk=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ; $def[$defcnt] .= "CDEF:ag=tmptbldsk,$WARN[$ii],LE,tmptbldsk,0,GT,INF,UNKN,IF,UNKN,IF,ISINF,tmptbldsk,0,IF "; $def[$defcnt] .= "CDEF:ay=tmptbldsk,$CRIT[$ii],LE,tmptbldsk,$WARN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,tmptbldsk,0,IF "; $def[$defcnt] .= "CDEF:ar=tmptbldsk,100,LE,tmptbldsk,$CRIT[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,tmptbldsk,0,IF "; $def[$defcnt] .= "AREA:ag#$green: " ; $def[$defcnt] .= "AREA:ay#$yellow: " ; $def[$defcnt] .= "AREA:ar#$red: " ; $def[$defcnt] .= "LINE:tmptbldsk#111111:\" \" "; $def[$defcnt] .= "VDEF:vtmptbldsk=tmptbldsk,LAST " ; $def[$defcnt] .= "GPRINT:vtmptbldsk:\"%3.2lf percent of temp tables were created on disk (since epoch)\\n\" " ; } if(preg_match('/^pct_tmp_table_on_disk_now$/', $NAME[$ii])) { $def[$defcnt] .= "DEF:tmptbldsknow=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ; $def[$defcnt] .= "LINE1.5:tmptbldsknow#$now:\" \" "; $def[$defcnt] .= "VDEF:vtmptbldsknow=tmptbldsknow,LAST " ; $def[$defcnt] .= "GPRINT:vtmptbldsknow:\"%3.2lf percent of temp tables were created on disk (recently)\\n\" " ; } } $defcnt++; } if(preg_match('/^thread_cache_hitrate_now$/', $NAME[$i])) { $ds_name[$defcnt] = "Thread cache hitrate"; $opt[$defcnt] = "--vertical-label \"Percent\" --title \"Thread cache hitrate on $hostname\" --upper-limit 100 --lower-limit 0 "; $def[$defcnt] = ""; foreach ($DS as $ii) { if(preg_match('/^thread_cache_hitrate$/', $NAME[$ii])) { $def[$defcnt] .= "DEF:hitrate=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ; $def[$defcnt] .= "CDEF:ar=hitrate,$CRIT_MIN[$ii],LE,hitrate,0,GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF "; $def[$defcnt] .= "CDEF:ay=hitrate,$WARN_MIN[$ii],LE,hitrate,$CRIT_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF "; $def[$defcnt] .= "CDEF:ag=hitrate,100,LE,hitrate,$WARN_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF "; $def[$defcnt] .= "AREA:ag#$green: " ; $def[$defcnt] .= "AREA:ay#$yellow: " ; $def[$defcnt] .= "AREA:ar#$red: " ; $def[$defcnt] .= "LINE:hitrate#111111:\" \" "; $def[$defcnt] .= "VDEF:vhitrate=hitrate,LAST " ; $def[$defcnt] .= "GPRINT:vhitrate:\"Hitratio (since epoch) is %3.2lf percent \\n\" "; } if(preg_match('/^thread_cache_hitrate_now$/', $NAME[$ii])) { $def[$defcnt] .= "DEF:hitratenow=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ; $def[$defcnt] .= "LINE1.5:hitratenow#$now:\" \" "; $def[$defcnt] .= "VDEF:vhitratenow=hitratenow,LAST " ; $def[$defcnt] .= "GPRINT:vhitratenow:\"Hitratio (current) is %3.2lf percent \\n\" "; } } $defcnt++; $ds_name[$defcnt] = "Connects per second"; $opt[$defcnt] = "--vertical-label \"Conects / sec\" --title \"Connects per second on $hostname\" "; $def[$defcnt] = ""; foreach ($DS as $ii) { if(preg_match('/^connections_per_sec$/', $NAME[$ii])) { $def[$defcnt] .= "DEF:sps=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ; $def[$defcnt] .= "AREA:sps#$now:\" \" "; $def[$defcnt] .= "VDEF:vsps=sps,LAST " ; $def[$defcnt] .= "GPRINT:vsps:\"%3.2lf Connects per second \\n\" "; } } $defcnt++; } if(preg_match('/^threads_connected$/', $NAME[$i])) { $ds_name[$defcnt] = "Connection threads"; $opt[$defcnt] = "--vertical-label \"Threads\" --title \"Connection threads on $hostname\" "; $def[$defcnt] = ""; $def[$defcnt] .= "DEF:threads=$RRDFILE[$i]:$DS[$i]:AVERAGE:reduce=LAST " ; $def[$defcnt] .= "AREA:threads#111111 "; $def[$defcnt] .= "VDEF:vthreads=threads,LAST " ; $def[$defcnt] .= "GPRINT:vthreads:\"%.0lf Connection threads \" " ; $defcnt++; } } ?> ././@LongLink0000644000000000000000000000015512262515411011642 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/contrib/README.my-extensionsnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/contrib/README.my-ex0000644000000000000000000001242712262515026027252 0ustar # you will find instructions how to write extensions here Self-written code is addressed by using a mode which starts with my- --mode=my-thing-does ? check_mysql_health will then look for a package named MyThing. So you first have to write a Module which describes MyThing. Such a thing iinherits from DBD::MySQL::Server and needs two methods: init and nagios. Start with a file called CheckMySQLHealthExt1.pm and skeleton code: ################################################### package MyThing; our @ISA = qw(DBD::MySQL::Server); sub init { my $self = shift; my %params = @_; } sub nagios { my $self = shift; my %params = @_; } ################################################### When you call check_mysql_health with --mode=my-thing-does, it will - create a DBD::MySQL::Server object $obj = DBD::MySQL::Server->new() - connect to the database $obj->connect() - re-bless the object bless $obj, "MyThing" - call $obj->init() - if that was ok, call $obj->nagios() So you need to write code which - initializes the parameters you want to check - calculates the nagios result from these parameters For your convenience there are some predefined methods and variables: Variable $self $self is a hash-based object of type My::Thing You can pass metrics from the init() method to the nagios() method by adding attributes to the hash. One important predefined attribute is $self->{handle} which points to a database Connection object. You surely will use this. Variable %params $params{mode} contains the string you passed to the --mode command line parameter, only with the "-" replaced by "::". In the above example it will be "my::thing::does". Because you can have only one init() method for your MyThing object but more than one related modes (my-thing-does, my-thing-length, my-thing-rate) you use $params{mode} for branching in your code. (see the example file) Method add_nagios $self->add_nagios(1, "i warn you"); This method can be called several times. The messages will be concatenated. The first parameter is one of 0..3 and sets the nagios level. The worst level among several calls to add_nagios will determine the plugin's exit code. Method add_nagios_[ok|warning|critical|unknown] $self->add_nagios_critical("i warned you!!! now it's too late"); $self->add_nagios_ok("everything is ok. i am the exit message"); These methods are wrappers for add_nagios which make your code more readable. Method add_perfdata $self->add_perfdata("metric1=0 metric2=100"); $self->add_perfdata("metric3=0); $self->add_perfdata(sprintf "metric_xy=%d", $self->{xy}); You can call add_perfdata as often as you like. The strings will be concatenated. Method valdiff $self->valdiff(\%params, qw(metric1 metric2)); Use this if you want to know how a metric has changed since the last run of check_mysql_health. Provided you have attributes metric1 and metric2 this method will create new attributes for your $self object. $self->{delta_metric1} which is the difference between the value of $self->{metric1} during the current run and $self->{metric1} during the last run. $self->{delta_timestamp} which is the number of seconds which passed since the last run of check_mysql_health. If you have ever-growing values, you can simply calculate the rate: $self->{metric1_per_second} = $self->{delta_metric1} / $self->{delta_timestamp} The valdiff method will automatically save the current value to a state file and read the past value from this file. If you used the --name parameter which appears as $params{name} in your code then you probably need to separate the saved values from each other. Otherwise name1 would read the same saved value as name2. They would overwrite the saved values. Use $params{differentiator} to use different state files. $params{differenciator} = lc $self->{name}; $self->valdiff(\%params, qw(gets misses)); Method fetchrow_array my($column1, $column2) = $self->{handle}->fetchrow_array(q{ SELECT col1, col2 FROM table1 where col1 = 'val1' }); $self->{connected_users} = $self->{handle}->fetchrow_array(q{ SELECT COUNT(*) FROM v$session WHERE type = 'USER' }); This method is used like the Perl DBI method fetchrow_array. Method fetchall_array my @results = $self->{handle}->fetchall_array(q{ SELECT col1, col2, col3 FROM table1 }); foreach (@results) { my($column1, $column2, $column3) = @{$_}; ... } This method is used like the Perl DBI method fetchall_array. Now you have written your first extension to check_mysql_health. Maybe you just modified the example file contrib/CheckMySQLHealthExt1.pm There are two methods how to import your own code into check_mysql_health: - the static method with ./configure --with-mymodules-dir=

parameter you build a plugin which contains both my code and your code in a single file. When you call "make" every file in which matches CheckMySQLHealthExt*.pm is appended to the final plugin check_mysql_health. - the dynamic method with ./configure --with-mymodules-dyn-dir= you build a plugin which will search at runtime the for files matching CheckMySQLHealthExt*.pm and import them. This way you can have different extensions on different hosts. You also can modify your extension without having to rebuild the plugin. On the other hand you have to distribute your extensions along with the plugin. nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/AUTHORS0000644000000000000000000000005412262515026024735 0ustar Gerhard Lausser nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/acinclude.m40000644000000000000000000000454712262515026026071 0ustar 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)"]) nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/README0000644000000000000000000001145212262515026024551 0ustar check_mysql_health Nagios Plugin README --------------------- This plugin is used to monitor a variety of mysql database metrics. * For instructions on installing this plugin 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, read the Changelog file. * This plugin is self documenting. All plugins that comply with the basic guidelines for development will provide detailed help when invoked with the '-h' or '--help' options. You can check for the latest plugin at: http://www.consol.com/opensource/nagios/check-mysql-health The documentation in this README covers only the most common features. To view the full documentation and examples, go to http://www.consol.com/opensource/nagios/check-mysql-health or http://www.consol.de/opensource/nagios/check-mysql-health Send mail to gerhard.lausser@consol.de for assistance. Please include the OS type/version and the Perl DBI/DBD 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. For patch submissions and bug reports, please send me a mail. You can also find me at http://www.nagios-portal.de How to "compile" the check_mysql_health script. -------------------------------------------------------- 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-perl=PATH_TO_PERL --with-statefiles-dir=STATE_PATH 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 PATH_TO_PERL with the path where a perl binary can be found. Besides the system wide perl you might have installed a private perl just for the nagios plugins (default is the perl in your path). e) Replace STATE_PATH with the directory where you want the script to write state files which transport information from one run to the next. (default is /tmp) Simply running ./configure will be sufficient to create a check_mysql_health script which you can customize later. 2) "Compile" the plugin with the following command: make This will produce a "check_mysql_health" script. You will also find a "check_mysql_health.pl" which you better ignore. It is the base for the compilation filled with placeholders. These will be replaced during the make process. 3) Install the compiled plugin script with the following command: make install The installation procedure will attempt to place the plugin in a 'libexec/' subdirectory in the base directory you specified with the --prefix argument to the configure script. 4) Verify that your configuration files for Nagios contains the correct paths to the new plugin. Command line parameters ----------------------- --hostname= This is what you would also use with tnsping and sqlplus. --username= This is the user which reads the system tables. --password= This is the user's password. --mode= This parameter tells the plugin what it should check. The list of known modes may grow frequently. Please look at http://www.consol.com/opensource/nagios/check-mysql-health for a list of features. --warning= If the metric is out of this range, the plugin returns a warning. --critical= If the metric is out of this range, the plugin returns a critical. How to prepare the database for monitoring -------------------------------------- GRANT USAGE ON *.* TO 'nagios'@'nagiosserver' IDENTIFIED BY 'nagiospassword'; -------------------------------------- That's it. If you have any problems or questions, feel free to send mail to gerhard.lausser@consol.de Please do not send me a mail like this: +-------------------------------------------------+ | I need monitor of database urgent. Please help. | | Suresh | +-------------------------------------------------+ I will answer you: +-------------------------------------------------+ | A drumm Schelln konnst hom | | Gerhard | +-------------------------------------------------+ nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/config.sub0000755000000000000000000007417512262515026025667 0ustar #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-11-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (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. # Please send patches to . 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 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 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # 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 0;; * ) 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) 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 \ | 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 | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ | z8k) 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-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | 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-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | msp430-* \ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ | xtensa-* \ | ymp-* \ | z8k-*) ;; # 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 ;; 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 ;; 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 ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; 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 ;; 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 ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; 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 ;; nv1) basic_machine=nv1-cray os=-unicosmp ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; 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 ;; 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 ;; 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 ;; sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | 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* | -netbsd* | -openbsd* | -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*) # 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* \ | -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 ;; -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 ;; *-ibm) os=-aix ;; *-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 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/TODO0000644000000000000000000000010112262515026024346 0ustar a lot http://blog.it4sport.de/2010/10/10/optimize-table-fallig/ nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/0000755000000000000000000000000012262515026027034 5ustar ././@LongLink0000644000000000000000000000015412262515411011641 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Makefile.amnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Make0000644000000000000000000000304312262515026027634 0ustar ## Process this file with automake to produce Makefile.in SUFFIXES = .pl .pm .sh VPATH=$(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t libexec_SCRIPTS=check_mysql_health MY_MODULES= EXTRA_MODULES=\ Nagios/DBD/MySQL/Server/Instance/Innodb.pm \ Nagios/DBD/MySQL/Server/Instance/Myisam.pm \ Nagios/DBD/MySQL/Server/Instance/Replication.pm \ Nagios/DBD/MySQL/Server/Instance.pm \ Nagios/DBD/MySQL/Server.pm \ Nagios/DBD/MySQL/Cluster.pm \ Nagios/Extraopts.pm EXTRA_DIST=check_mysql_health.pl $(EXTRA_MODULES) CLEANFILES=$(libexec_SCRIPTS) AM_INSTALL_PROGRAM_FLAGS=@INSTALL_OPTS@ .pm : $(AWK) -f ./subst $< > $@ chmod +x $@ .pl : $(AWK) -f ./subst $< > $@ chmod +x $@ .sh : $(AWK) -f ./subst $< > $@ chmod +x $@ $(libexec_SCRIPTS) : $(EXTRA_DIST) $(ECHO) "#! #PERL# -w" | $(AWK) -f ./subst > $@ $(ECHO) "# nagios: -epn" >> $@ $(ECHO) >> $@ $(ECHO) "my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 );" >> $@ $(ECHO) "my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' );" >> $@ for m in ${EXTRA_MODULES}; do \ $(SED) -e 's/^1;//g' < $$m | $(AWK) -f ./subst | $(GREP) -v "my %ERROR" >> $@; \ done if [ -d "${MYMODULES_DIR}" ]; then \ for m in ${MYMODULES_DIR}/CheckMySQLHealthExt*.pm; do \ if [ -f $$m ]; then \ $(ECHO) found $$m; \ $(SED) -e 's/^1;//g' < $$m | $(AWK) -f ./subst | $(GREP) -v "my %ERROR" >> $@; \ fi \ done \ fi $(CAT) check_mysql_health.pl | $(GREP) -v "^use Nagios" | $(GREP) -v "^my %ERROR" | $(AWK) -f ./subst >> $@ chmod +x $@ ././@LongLink0000644000000000000000000000016612262515411011644 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/check_mysql_health.plnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/chec0000644000000000000000000004542612262515026027674 0ustar package main; use strict; use Getopt::Long qw(:config no_ignore_case); use File::Basename; use lib dirname($0); use Nagios::DBD::MySQL::Server; use Nagios::DBD::MySQL::Cluster; my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 ); my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' ); use vars qw ($PROGNAME $REVISION $CONTACT $TIMEOUT $STATEFILESDIR $needs_restart %commandline); $PROGNAME = "check_mysql_health"; $REVISION = '$Revision: #PACKAGE_VERSION# $'; $CONTACT = 'gerhard.lausser@consol.de'; $TIMEOUT = 60; $STATEFILESDIR = '#STATEFILES_DIR#'; $needs_restart = 0; my @modes = ( ['server::connectiontime', 'connection-time', undef, 'Time to connect to the server' ], ['server::uptime', 'uptime', undef, 'Time the server is running' ], ['server::instance::connectedthreads', 'threads-connected', undef, 'Number of currently open connections' ], ['server::instance::threadcachehitrate', 'threadcache-hitrate', undef, 'Hit rate of the thread-cache' ], ['server::instance::createdthreads', 'threads-created', undef, 'Number of threads created per sec' ], ['server::instance::runningthreads', 'threads-running', undef, 'Number of currently running threads' ], ['server::instance::cachedthreads', 'threads-cached', undef, 'Number of currently cached threads' ], ['server::instance::abortedconnects', 'connects-aborted', undef, 'Number of aborted connections per sec' ], ['server::instance::abortedclients', 'clients-aborted', undef, 'Number of aborted connections (because the client died) per sec' ], ['server::instance::replication::slavelag', 'slave-lag', ['replication-slave-lag'], 'Seconds behind master' ], ['server::instance::replication::slaveiorunning', 'slave-io-running', ['replication-slave-io-running'], 'Slave io running: Yes' ], ['server::instance::replication::slavesqlrunning', 'slave-sql-running', ['replication-slave-sql-running'], 'Slave sql running: Yes' ], ['server::instance::querycachehitrate', 'qcache-hitrate', ['querycache-hitrate'], 'Query cache hitrate' ], ['server::instance::querycachelowmemprunes', 'qcache-lowmem-prunes', ['querycache-lowmem-prunes'], 'Query cache entries pruned because of low memory' ], ['server::instance::myisam::keycache::hitrate', 'keycache-hitrate', ['myisam-keycache-hitrate'], 'MyISAM key cache hitrate' ], ['server::instance::innodb::bufferpool::hitrate', 'bufferpool-hitrate', ['innodb-bufferpool-hitrate'], 'InnoDB buffer pool hitrate' ], ['server::instance::innodb::bufferpool::waitfree', 'bufferpool-wait-free', ['innodb-bufferpool-wait-free'], 'InnoDB buffer pool waits for clean page available' ], ['server::instance::innodb::logwaits', 'log-waits', ['innodb-log-waits'], 'InnoDB log waits because of a too small log buffer' ], ['server::instance::tablecachehitrate', 'tablecache-hitrate', undef, 'Table cache hitrate' ], ['server::instance::tablelockcontention', 'table-lock-contention', undef, 'Table lock contention' ], ['server::instance::tableindexusage', 'index-usage', undef, 'Usage of indices' ], ['server::instance::tabletmpondisk', 'tmp-disk-tables', undef, 'Percent of temp tables created on disk' ], ['server::instance::needoptimize', 'table-fragmentation', undef, 'Show tables which should be optimized' ], ['server::instance::openfiles', 'open-files', undef, 'Percent of opened files' ], ['server::instance::slowqueries', 'slow-queries', undef, 'Slow queries' ], ['server::instance::longprocs', 'long-running-procs', undef, 'long running processes' ], ['cluster::ndbdrunning', 'cluster-ndbd-running', undef, 'ndnd nodes are up and running' ], ['server::sql', 'sql', undef, 'any sql command returning a single number' ], ); # rrd data store names are limited to 19 characters my %labels = ( bufferpool_hitrate => { groundwork => 'bp_hitrate', }, bufferpool_hitrate_now => { groundwork => 'bp_hitrate_now', }, bufferpool_free_waits_rate => { groundwork => 'bp_freewaits', }, innodb_log_waits_rate => { groundwork => 'inno_log_waits', }, keycache_hitrate => { groundwork => 'kc_hitrate', }, keycache_hitrate_now => { groundwork => 'kc_hitrate_now', }, threads_created_per_sec => { groundwork => 'thrds_creat_per_s', }, connects_aborted_per_sec => { groundwork => 'conn_abrt_per_s', }, clients_aborted_per_sec => { groundwork => 'clnt_abrt_per_s', }, thread_cache_hitrate => { groundwork => 'tc_hitrate', }, thread_cache_hitrate_now => { groundwork => 'tc_hitrate_now', }, qcache_lowmem_prunes_rate => { groundwork => 'qc_lowm_prnsrate', }, slow_queries_rate => { groundwork => 'slow_q_rate', }, tablecache_hitrate => { groundwork => 'tac_hitrate', }, tablecache_fillrate => { groundwork => 'tac_fillrate', }, tablelock_contention => { groundwork => 'tl_contention', }, tablelock_contention_now => { groundwork => 'tl_contention_now', }, pct_tmp_table_on_disk => { groundwork => 'tmptab_on_disk', }, pct_tmp_table_on_disk_now => { groundwork => 'tmptab_on_disk_now', }, ); sub print_usage () { print <] [[--hostname ] [--port | --socket ] --username --password ] --mode [--method mysql] $PROGNAME [-h | --help] $PROGNAME [-V | --version] Options: --hostname the database server's hostname --port the database's port. (default: 3306) --socket the database's unix socket. --username the mysql db user --password the mysql db user's password --database the database's name. (default: information_schema) --warning the warning range --critical the critical range --mode the mode of the plugin. select one of the following keywords: EOUS my $longest = length ((reverse sort {length $a <=> length $b} map { $_->[1] } @modes)[0]); my $format = " %-". (length ((reverse sort {length $a <=> length $b} map { $_->[1] } @modes)[0])). "s\t(%s)\n"; foreach (@modes) { printf $format, $_->[1], $_->[3]; } printf "\n"; print <new(file => $commandline{'extra-opts'}, commandline => \%commandline); if (! $extras->is_valid()) { printf "extra-opts are not valid: %s\n", $extras->{errors}; exit $ERRORS{UNKNOWN}; } else { $extras->overwrite(); } } if (exists $commandline{version}) { print_revision($PROGNAME, $REVISION); exit $ERRORS{OK}; } if (exists $commandline{help}) { print_help(); exit $ERRORS{OK}; } elsif (! exists $commandline{mode}) { printf "Please select a mode\n"; print_help(); exit $ERRORS{OK}; } if ($commandline{mode} eq "encode") { my $input = <>; chomp $input; $input =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg; printf "%s\n", $input; exit $ERRORS{OK}; } if (exists $commandline{3}) { $ENV{NRPE_MULTILINESUPPORT} = 1; } if (exists $commandline{timeout}) { $TIMEOUT = $commandline{timeout}; } if (exists $commandline{verbose}) { $DBD::MySQL::Server::verbose = exists $commandline{verbose}; } if (exists $commandline{scream}) { # $DBD::MySQL::Server::hysterical = exists $commandline{scream}; } if (exists $commandline{method}) { # snmp or mysql cmdline } else { $commandline{method} = "dbi"; } if (exists $commandline{report}) { # short, long, html } else { $commandline{report} = "long"; } if (exists $commandline{labelformat}) { # groundwork } else { $commandline{labelformat} = "pnp4nagios"; } if (exists $commandline{'with-mymodules-dyn-dir'}) { $DBD::MySQL::Server::my_modules_dyn_dir = $commandline{'with-mymodules-dyn-dir'}; } else { $DBD::MySQL::Server::my_modules_dyn_dir = '#MYMODULES_DYN_DIR#'; } if (exists $commandline{environment}) { # if the desired environment variable values are different from # the environment of this running script, then a restart is necessary. # because setting $ENV does _not_ change the environment of the running script. foreach (keys %{$commandline{environment}}) { if ((! $ENV{$_}) || ($ENV{$_} ne $commandline{environment}->{$_})) { $needs_restart = 1; $ENV{$_} = $commandline{environment}->{$_}; printf STDERR "new %s=%s forces restart\n", $_, $ENV{$_} if $DBD::MySQL::Server::verbose; } } # e.g. called with --runas dbnagio. shlib_path environment variable is stripped # during the sudo. # so the perl interpreter starts without a shlib_path. but --runas cares for # a --environment shlib_path=... # so setting the environment variable in the code above and restarting the # perl interpreter will help it find shared libs } if (exists $commandline{runas}) { # remove the runas parameter # exec sudo $0 ... the remaining parameters $needs_restart = 1; # if the calling script has a path for shared libs and there is no --environment # parameter then the called script surely needs the variable too. foreach my $important_env (qw(LD_LIBRARY_PATH SHLIB_PATH ORACLE_HOME TNS_ADMIN ORA_NLS ORA_NLS33 ORA_NLS10)) { if ($ENV{$important_env} && ! scalar(grep { /^$important_env=/ } keys %{$commandline{environment}})) { $commandline{environment}->{$important_env} = $ENV{$important_env}; printf STDERR "add important --environment %s=%s\n", $important_env, $ENV{$important_env} if $DBD::MySQL::Server::verbose; } } } if ($needs_restart) { my @newargv = (); my $runas = undef; if (exists $commandline{runas}) { $runas = $commandline{runas}; delete $commandline{runas}; } foreach my $option (keys %commandline) { if (grep { /^$option/ && /=/ } @params) { if (ref ($commandline{$option}) eq "HASH") { foreach (keys %{$commandline{$option}}) { push(@newargv, sprintf "--%s", $option); push(@newargv, sprintf "%s=%s", $_, $commandline{$option}->{$_}); } } else { push(@newargv, sprintf "--%s", $option); push(@newargv, sprintf "%s", $commandline{$option}); } } else { push(@newargv, sprintf "--%s", $option); } } if ($runas) { exec "sudo", "-S", "-u", $runas, $0, @newargv; } else { exec $0, @newargv; # this makes sure that even a SHLIB or LD_LIBRARY_PATH are set correctly # when the perl interpreter starts. Setting them during runtime does not # help loading e.g. libclntsh.so } exit; } if (exists $commandline{shell}) { # forget what you see here. system("/bin/sh"); } if (! exists $commandline{statefilesdir}) { if (exists $ENV{OMD_ROOT}) { $commandline{statefilesdir} = $ENV{OMD_ROOT}."/var/tmp/check_mysql_health"; } else { $commandline{statefilesdir} = $STATEFILESDIR; } } if (exists $commandline{name}) { if ($^O =~ /MSWin/ && $commandline{name} =~ /^'(.*)'$/) { # putting arguments in single ticks under Windows CMD leaves the ' intact # we remove them $commandline{name} = $1; } # objects can be encoded like an url # with s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg; if (($commandline{mode} ne "sql") || (($commandline{mode} eq "sql") && ($commandline{name} =~ /select%20/i))) { # protect ... like '%cac%' ... from decoding $commandline{name} =~ s/\%([A-Fa-f0-9]{2})/pack('C', hex($1))/seg; } if ($commandline{name} =~ /^0$/) { # without this, $params{selectname} would be treated like undef $commandline{name} = "00"; } } $SIG{'ALRM'} = sub { printf "UNKNOWN - %s timed out after %d seconds\n", $PROGNAME, $TIMEOUT; exit $ERRORS{UNKNOWN}; }; alarm($TIMEOUT); my $nagios_level = $ERRORS{UNKNOWN}; my $nagios_message = ""; my $perfdata = ""; if ($commandline{mode} =~ /^my-([^\-.]+)/) { my $param = $commandline{mode}; $param =~ s/\-/::/g; push(@modes, [$param, $commandline{mode}, undef, 'my extension']); } elsif ((! grep { $commandline{mode} eq $_ } map { $_->[1] } @modes) && (! grep { $commandline{mode} eq $_ } map { defined $_->[2] ? @{$_->[2]} : () } @modes)) { printf "UNKNOWN - mode %s\n", $commandline{mode}; print_usage(); exit 3; } my %params = ( timeout => $TIMEOUT, mode => ( map { $_->[0] } grep { ($commandline{mode} eq $_->[1]) || ( defined $_->[2] && grep { $commandline{mode} eq $_ } @{$_->[2]}) } @modes )[0], cmdlinemode => $commandline{mode}, method => $commandline{method} || $ENV{NAGIOS__SERVICEMYSQL_METH} || $ENV{NAGIOS__HOSTMYSQL_METH} || 'dbi', hostname => $commandline{hostname} || $ENV{NAGIOS__SERVICEMYSQL_HOST} || $ENV{NAGIOS__HOSTMYSQL_HOST} || 'localhost', database => $commandline{database} || $ENV{NAGIOS__SERVICEMYSQL_DATABASE} || $ENV{NAGIOS__HOSTMYSQL_DATABASE} || 'information_schema', port => $commandline{port} || (($commandline{mode} =~ /^cluster/) ? ($ENV{NAGIOS__SERVICENDBMGM_PORT} || $ENV{NAGIOS__HOSTNDBMGM_PORT} || 1186) : ($ENV{NAGIOS__SERVICEMYSQL_PORT} || $ENV{NAGIOS__HOSTMYSQL_PORT} || 3306)), socket => $commandline{socket} || $ENV{NAGIOS__SERVICEMYSQL_SOCKET} || $ENV{NAGIOS__HOSTMYSQL_SOCKET}, username => $commandline{username} || $ENV{NAGIOS__SERVICEMYSQL_USER} || $ENV{NAGIOS__HOSTMYSQL_USER}, password => $commandline{password} || $ENV{NAGIOS__SERVICEMYSQL_PASS} || $ENV{NAGIOS__HOSTMYSQL_PASS}, mycnf => $commandline{mycnf} || $ENV{NAGIOS__SERVICEMYSQL_MYCNF} || $ENV{NAGIOS__HOSTMYSQL_MYCNF}, mycnfgroup => $commandline{mycnfgroup} || $ENV{NAGIOS__SERVICEMYSQL_MYCNFGROUP} || $ENV{NAGIOS__HOSTMYSQL_MYCNFGROUP}, warningrange => $commandline{warning}, criticalrange => $commandline{critical}, dbthresholds => $commandline{dbthresholds}, absolute => $commandline{absolute}, lookback => $commandline{lookback}, selectname => $commandline{name} || $commandline{tablespace} || $commandline{datafile}, regexp => $commandline{regexp}, name => $commandline{name}, name2 => $commandline{name2} || $commandline{name}, units => $commandline{units}, lookback => $commandline{lookback} || 0, eyecandy => $commandline{eyecandy}, statefilesdir => $commandline{statefilesdir}, verbose => $commandline{verbose}, report => $commandline{report}, labelformat => $commandline{labelformat}, ); my $server = undef; my $cluster = undef; if ($params{mode} =~ /^(server|my)/) { $server = DBD::MySQL::Server->new(%params); $server->nagios(%params); $server->calculate_result(\%labels); $nagios_message = $server->{nagios_message}; $nagios_level = $server->{nagios_level}; $perfdata = $server->{perfdata}; } elsif ($params{mode} =~ /^cluster/) { $cluster = DBD::MySQL::Cluster->new(%params); $cluster->nagios(%params); $cluster->calculate_result(\%labels); $nagios_message = $cluster->{nagios_message}; $nagios_level = $cluster->{nagios_level}; $perfdata = $cluster->{perfdata}; } printf "%s - %s", $ERRORCODES{$nagios_level}, $nagios_message; printf " | %s", $perfdata if $perfdata; printf "\n"; exit $nagios_level; __END__ ././@LongLink0000644000000000000000000000015012262515411011635 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagios/nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagi0000755000000000000000000000000012262515026027633 5ustar ././@LongLink0000644000000000000000000000015412262515411011641 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagios/DBD/nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagi0000755000000000000000000000000012262515026027633 5ustar ././@LongLink0000644000000000000000000000016212262515411011640 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagios/DBD/MySQL/nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagi0000755000000000000000000000000012262515026027633 5ustar ././@LongLink0000644000000000000000000000017112262515411011640 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagios/DBD/MySQL/Server/nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagi0000755000000000000000000000000012262515026027633 5ustar ././@LongLink0000644000000000000000000000020412262515411011635 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance.pmnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagi0000644000000000000000000005653612262515026027654 0ustar package DBD::MySQL::Server::Instance; use strict; our @ISA = qw(DBD::MySQL::Server); my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 ); my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' ); sub new { my $class = shift; my %params = @_; my $self = { handle => $params{handle}, uptime => $params{uptime}, warningrange => $params{warningrange}, criticalrange => $params{criticalrange}, threads_connected => undef, threads_created => undef, connections => undef, threadcache_hitrate => undef, querycache_hitrate => undef, lowmem_prunes_per_sec => undef, slow_queries_per_sec => undef, longrunners => undef, tablecache_hitrate => undef, index_usage => undef, engine_innodb => undef, engine_myisam => undef, replication => undef, }; bless $self, $class; $self->init(%params); return $self; } sub init { my $self = shift; my %params = @_; my $dummy; $self->init_nagios(); if ($params{mode} =~ /server::instance::connectedthreads/) { ($dummy, $self->{threads_connected}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Threads_connected' }); } elsif ($params{mode} =~ /server::instance::createdthreads/) { ($dummy, $self->{threads_created}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Threads_created' }); $self->valdiff(\%params, qw(threads_created)); $self->{threads_created_per_sec} = $self->{delta_threads_created} / $self->{delta_timestamp}; } elsif ($params{mode} =~ /server::instance::runningthreads/) { ($dummy, $self->{threads_running}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Threads_running' }); } elsif ($params{mode} =~ /server::instance::cachedthreads/) { ($dummy, $self->{threads_cached}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Threads_cached' }); } elsif ($params{mode} =~ /server::instance::abortedconnects/) { ($dummy, $self->{connects_aborted}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Aborted_connects' }); $self->valdiff(\%params, qw(connects_aborted)); $self->{connects_aborted_per_sec} = $self->{delta_connects_aborted} / $self->{delta_timestamp}; } elsif ($params{mode} =~ /server::instance::abortedclients/) { ($dummy, $self->{clients_aborted}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Aborted_clients' }); $self->valdiff(\%params, qw(clients_aborted)); $self->{clients_aborted_per_sec} = $self->{delta_clients_aborted} / $self->{delta_timestamp}; } elsif ($params{mode} =~ /server::instance::threadcachehitrate/) { ($dummy, $self->{threads_created}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Threads_created' }); ($dummy, $self->{connections}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Connections' }); $self->valdiff(\%params, qw(threads_created connections)); if ($self->{delta_connections} > 0) { $self->{threadcache_hitrate_now} = 100 - ($self->{delta_threads_created} * 100.0 / $self->{delta_connections}); } else { $self->{threadcache_hitrate_now} = 100; } $self->{threadcache_hitrate} = 100 - ($self->{threads_created} * 100.0 / $self->{connections}); $self->{connections_per_sec} = $self->{delta_connections} / $self->{delta_timestamp}; } elsif ($params{mode} =~ /server::instance::querycachehitrate/) { ($dummy, $self->{com_select}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Com_select' }); ($dummy, $self->{qcache_hits}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Qcache_hits' }); # SHOW VARIABLES WHERE Variable_name = 'have_query_cache' for 5.x, but LIKE is compatible ($dummy, $self->{have_query_cache}) = $self->{handle}->fetchrow_array(q{ SHOW VARIABLES LIKE 'have_query_cache' }); # SHOW VARIABLES WHERE Variable_name = 'query_cache_size' ($dummy, $self->{query_cache_size}) = $self->{handle}->fetchrow_array(q{ SHOW VARIABLES LIKE 'query_cache_size' }); $self->valdiff(\%params, qw(com_select qcache_hits)); $self->{querycache_hitrate_now} = ($self->{delta_com_select} + $self->{delta_qcache_hits}) > 0 ? 100 * $self->{delta_qcache_hits} / ($self->{delta_com_select} + $self->{delta_qcache_hits}) : 0; $self->{querycache_hitrate} = ($self->{com_select} + $self->{qcache_hits}) > 0 ? 100 * $self->{qcache_hits} / ($self->{com_select} + $self->{qcache_hits}) : 0; $self->{selects_per_sec} = $self->{delta_com_select} / $self->{delta_timestamp}; } elsif ($params{mode} =~ /server::instance::querycachelowmemprunes/) { ($dummy, $self->{lowmem_prunes}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Qcache_lowmem_prunes' }); $self->valdiff(\%params, qw(lowmem_prunes)); $self->{lowmem_prunes_per_sec} = $self->{delta_lowmem_prunes} / $self->{delta_timestamp}; } elsif ($params{mode} =~ /server::instance::slowqueries/) { ($dummy, $self->{slow_queries}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Slow_queries' }); $self->valdiff(\%params, qw(slow_queries)); $self->{slow_queries_per_sec} = $self->{delta_slow_queries} / $self->{delta_timestamp}; } elsif ($params{mode} =~ /server::instance::longprocs/) { if (DBD::MySQL::Server::return_first_server()->version_is_minimum("5.1")) { ($self->{longrunners}) = $self->{handle}->fetchrow_array(q{ SELECT COUNT(*) FROM information_schema.processlist WHERE user <> 'replication' AND id <> CONNECTION_ID() AND time > 60 AND command <> 'Sleep' }); } else { $self->{longrunners} = 0 if ! defined $self->{longrunners}; foreach ($self->{handle}->fetchall_array(q{ SHOW PROCESSLIST })) { my($id, $user, $host, $db, $command, $tme, $state, $info) = @{$_}; if (($user ne 'replication') && ($tme > 60) && ($command ne 'Sleep')) { $self->{longrunners}++; } } } } elsif ($params{mode} =~ /server::instance::tablecachehitrate/) { ($dummy, $self->{open_tables}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Open_tables' }); ($dummy, $self->{opened_tables}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Opened_tables' }); if (DBD::MySQL::Server::return_first_server()->version_is_minimum("5.1.3")) { # SHOW VARIABLES WHERE Variable_name = 'table_open_cache' ($dummy, $self->{table_cache}) = $self->{handle}->fetchrow_array(q{ SHOW VARIABLES LIKE 'table_open_cache' }); } else { # SHOW VARIABLES WHERE Variable_name = 'table_cache' ($dummy, $self->{table_cache}) = $self->{handle}->fetchrow_array(q{ SHOW VARIABLES LIKE 'table_cache' }); } $self->{table_cache} ||= 0; #$self->valdiff(\%params, qw(open_tables opened_tables table_cache)); # _now ist hier sinnlos, da opened_tables waechst, aber open_tables wieder # schrumpfen kann weil tabellen geschlossen werden. if ($self->{opened_tables} != 0 && $self->{table_cache} != 0) { $self->{tablecache_hitrate} = 100 * $self->{open_tables} / $self->{opened_tables}; $self->{tablecache_fillrate} = 100 * $self->{open_tables} / $self->{table_cache}; } elsif ($self->{opened_tables} == 0 && $self->{table_cache} != 0) { $self->{tablecache_hitrate} = 100; $self->{tablecache_fillrate} = 100 * $self->{open_tables} / $self->{table_cache}; } else { $self->{tablecache_hitrate} = 0; $self->{tablecache_fillrate} = 0; $self->add_nagios_critical("no table cache"); } } elsif ($params{mode} =~ /server::instance::tablelockcontention/) { ($dummy, $self->{table_locks_waited}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Table_locks_waited' }); ($dummy, $self->{table_locks_immediate}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Table_locks_immediate' }); $self->valdiff(\%params, qw(table_locks_waited table_locks_immediate)); $self->{table_lock_contention} = ($self->{table_locks_waited} + $self->{table_locks_immediate}) > 0 ? 100 * $self->{table_locks_waited} / ($self->{table_locks_waited} + $self->{table_locks_immediate}) : 100; $self->{table_lock_contention_now} = ($self->{delta_table_locks_waited} + $self->{delta_table_locks_immediate}) > 0 ? 100 * $self->{delta_table_locks_waited} / ($self->{delta_table_locks_waited} + $self->{delta_table_locks_immediate}) : 100; } elsif ($params{mode} =~ /server::instance::tableindexusage/) { # http://johnjacobm.wordpress.com/2007/06/ # formula for calculating the percentage of full table scans ($dummy, $self->{handler_read_first}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Handler_read_first' }); ($dummy, $self->{handler_read_key}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Handler_read_key' }); ($dummy, $self->{handler_read_next}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Handler_read_next' }); ($dummy, $self->{handler_read_prev}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Handler_read_prev' }); ($dummy, $self->{handler_read_rnd}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Handler_read_rnd' }); ($dummy, $self->{handler_read_rnd_next}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Handler_read_rnd_next' }); $self->valdiff(\%params, qw(handler_read_first handler_read_key handler_read_next handler_read_prev handler_read_rnd handler_read_rnd_next)); my $delta_reads = $self->{delta_handler_read_first} + $self->{delta_handler_read_key} + $self->{delta_handler_read_next} + $self->{delta_handler_read_prev} + $self->{delta_handler_read_rnd} + $self->{delta_handler_read_rnd_next}; my $reads = $self->{handler_read_first} + $self->{handler_read_key} + $self->{handler_read_next} + $self->{handler_read_prev} + $self->{handler_read_rnd} + $self->{handler_read_rnd_next}; $self->{index_usage_now} = ($delta_reads == 0) ? 0 : 100 - (100.0 * ($self->{delta_handler_read_rnd} + $self->{delta_handler_read_rnd_next}) / $delta_reads); $self->{index_usage} = ($reads == 0) ? 0 : 100 - (100.0 * ($self->{handler_read_rnd} + $self->{handler_read_rnd_next}) / $reads); } elsif ($params{mode} =~ /server::instance::tabletmpondisk/) { ($dummy, $self->{created_tmp_tables}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Created_tmp_tables' }); ($dummy, $self->{created_tmp_disk_tables}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Created_tmp_disk_tables' }); $self->valdiff(\%params, qw(created_tmp_tables created_tmp_disk_tables)); $self->{pct_tmp_on_disk} = $self->{created_tmp_tables} > 0 ? 100 * $self->{created_tmp_disk_tables} / $self->{created_tmp_tables} : 100; $self->{pct_tmp_on_disk_now} = $self->{delta_created_tmp_tables} > 0 ? 100 * $self->{delta_created_tmp_disk_tables} / $self->{delta_created_tmp_tables} : 100; } elsif ($params{mode} =~ /server::instance::openfiles/) { ($dummy, $self->{open_files_limit}) = $self->{handle}->fetchrow_array(q{ SHOW VARIABLES LIKE 'open_files_limit' }); ($dummy, $self->{open_files}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Open_files' }); $self->{pct_open_files} = 100 * $self->{open_files} / $self->{open_files_limit}; } elsif ($params{mode} =~ /server::instance::needoptimize/) { $self->{fragmented} = []; #http://www.electrictoolbox.com/optimize-tables-mysql-php/ my @result = $self->{handle}->fetchall_array(q{ SHOW TABLE STATUS }); foreach (@result) { my ($name, $engine, $data_length, $data_free) = ($_->[0], $_->[1], $_->[6 ], $_->[9]); next if ($params{name} && $params{name} ne $name); my $fragmentation = $data_length ? $data_free * 100 / $data_length : 0; push(@{$self->{fragmented}}, [$name, $fragmentation, $data_length, $data_free]); } } elsif ($params{mode} =~ /server::instance::myisam/) { $self->{engine_myisam} = DBD::MySQL::Server::Instance::MyISAM->new( %params ); } elsif ($params{mode} =~ /server::instance::innodb/) { $self->{engine_innodb} = DBD::MySQL::Server::Instance::Innodb->new( %params ); } elsif ($params{mode} =~ /server::instance::replication/) { $self->{replication} = DBD::MySQL::Server::Instance::Replication->new( %params ); } } sub nagios { my $self = shift; my %params = @_; if (! $self->{nagios_level}) { if ($params{mode} =~ /server::instance::connectedthreads/) { $self->add_nagios( $self->check_thresholds($self->{threads_connected}, 10, 20), sprintf "%d client connection threads", $self->{threads_connected}); $self->add_perfdata(sprintf "threads_connected=%d;%d;%d", $self->{threads_connected}, $self->{warningrange}, $self->{criticalrange}); } elsif ($params{mode} =~ /server::instance::createdthreads/) { $self->add_nagios( $self->check_thresholds($self->{threads_created_per_sec}, 10, 20), sprintf "%.2f threads created/sec", $self->{threads_created_per_sec}); $self->add_perfdata(sprintf "threads_created_per_sec=%.2f;%.2f;%.2f", $self->{threads_created_per_sec}, $self->{warningrange}, $self->{criticalrange}); } elsif ($params{mode} =~ /server::instance::runningthreads/) { $self->add_nagios( $self->check_thresholds($self->{threads_running}, 10, 20), sprintf "%d running threads", $self->{threads_running}); $self->add_perfdata(sprintf "threads_running=%d;%d;%d", $self->{threads_running}, $self->{warningrange}, $self->{criticalrange}); } elsif ($params{mode} =~ /server::instance::cachedthreads/) { $self->add_nagios( $self->check_thresholds($self->{threads_cached}, 10, 20), sprintf "%d cached threads", $self->{threads_cached}); $self->add_perfdata(sprintf "threads_cached=%d;%d;%d", $self->{threads_cached}, $self->{warningrange}, $self->{criticalrange}); } elsif ($params{mode} =~ /server::instance::abortedconnects/) { $self->add_nagios( $self->check_thresholds($self->{connects_aborted_per_sec}, 1, 5), sprintf "%.2f aborted connections/sec", $self->{connects_aborted_per_sec}); $self->add_perfdata(sprintf "connects_aborted_per_sec=%.2f;%.2f;%.2f", $self->{connects_aborted_per_sec}, $self->{warningrange}, $self->{criticalrange}); } elsif ($params{mode} =~ /server::instance::abortedclients/) { $self->add_nagios( $self->check_thresholds($self->{clients_aborted_per_sec}, 1, 5), sprintf "%.2f aborted (client died) connections/sec", $self->{clients_aborted_per_sec}); $self->add_perfdata(sprintf "clients_aborted_per_sec=%.2f;%.2f;%.2f", $self->{clients_aborted_per_sec}, $self->{warningrange}, $self->{criticalrange}); } elsif ($params{mode} =~ /server::instance::threadcachehitrate/) { my $refkey = 'threadcache_hitrate'.($params{lookback} ? '_now' : ''); $self->add_nagios( $self->check_thresholds($self->{$refkey}, "90:", "80:"), sprintf "thread cache hitrate %.2f%%", $self->{$refkey}); $self->add_perfdata(sprintf "thread_cache_hitrate=%.2f%%;%s;%s", $self->{threadcache_hitrate}, $self->{warningrange}, $self->{criticalrange}); $self->add_perfdata(sprintf "thread_cache_hitrate_now=%.2f%%", $self->{threadcache_hitrate_now}); $self->add_perfdata(sprintf "connections_per_sec=%.2f", $self->{connections_per_sec}); } elsif ($params{mode} =~ /server::instance::querycachehitrate/) { my $refkey = 'querycache_hitrate'.($params{lookback} ? '_now' : ''); if ((lc $self->{have_query_cache} eq 'yes') && ($self->{query_cache_size})) { $self->add_nagios( $self->check_thresholds($self->{$refkey}, "90:", "80:"), sprintf "query cache hitrate %.2f%%", $self->{$refkey}); } else { $self->check_thresholds($self->{$refkey}, "90:", "80:"); $self->add_nagios_ok( sprintf "query cache hitrate %.2f%% (because it's turned off)", $self->{querycache_hitrate}); } $self->add_perfdata(sprintf "qcache_hitrate=%.2f%%;%s;%s", $self->{querycache_hitrate}, $self->{warningrange}, $self->{criticalrange}); $self->add_perfdata(sprintf "qcache_hitrate_now=%.2f%%", $self->{querycache_hitrate_now}); $self->add_perfdata(sprintf "selects_per_sec=%.2f", $self->{selects_per_sec}); } elsif ($params{mode} =~ /server::instance::querycachelowmemprunes/) { $self->add_nagios( $self->check_thresholds($self->{lowmem_prunes_per_sec}, "1", "10"), sprintf "%d query cache lowmem prunes in %d seconds (%.2f/sec)", $self->{delta_lowmem_prunes}, $self->{delta_timestamp}, $self->{lowmem_prunes_per_sec}); $self->add_perfdata(sprintf "qcache_lowmem_prunes_rate=%.2f;%s;%s", $self->{lowmem_prunes_per_sec}, $self->{warningrange}, $self->{criticalrange}); } elsif ($params{mode} =~ /server::instance::slowqueries/) { $self->add_nagios( $self->check_thresholds($self->{slow_queries_per_sec}, "0.1", "1"), sprintf "%d slow queries in %d seconds (%.2f/sec)", $self->{delta_slow_queries}, $self->{delta_timestamp}, $self->{slow_queries_per_sec}); $self->add_perfdata(sprintf "slow_queries_rate=%.2f%%;%s;%s", $self->{slow_queries_per_sec}, $self->{warningrange}, $self->{criticalrange}); } elsif ($params{mode} =~ /server::instance::longprocs/) { $self->add_nagios( $self->check_thresholds($self->{longrunners}, 10, 20), sprintf "%d long running processes", $self->{longrunners}); $self->add_perfdata(sprintf "long_running_procs=%d;%d;%d", $self->{longrunners}, $self->{warningrange}, $self->{criticalrange}); } elsif ($params{mode} =~ /server::instance::tablecachehitrate/) { if ($self->{tablecache_fillrate} < 95) { $self->add_nagios_ok( sprintf "table cache hitrate %.2f%%, %.2f%% filled", $self->{tablecache_hitrate}, $self->{tablecache_fillrate}); $self->check_thresholds($self->{tablecache_hitrate}, "99:", "95:"); } else { $self->add_nagios( $self->check_thresholds($self->{tablecache_hitrate}, "99:", "95:"), sprintf "table cache hitrate %.2f%%", $self->{tablecache_hitrate}); } $self->add_perfdata(sprintf "tablecache_hitrate=%.2f%%;%s;%s", $self->{tablecache_hitrate}, $self->{warningrange}, $self->{criticalrange}); $self->add_perfdata(sprintf "tablecache_fillrate=%.2f%%", $self->{tablecache_fillrate}); } elsif ($params{mode} =~ /server::instance::tablelockcontention/) { my $refkey = 'table_lock_contention'.($params{lookback} ? '_now' : ''); if ($self->{uptime} > 10800) { # MySQL Bug #30599 $self->add_nagios( $self->check_thresholds($self->{$refkey}, "1", "2"), sprintf "table lock contention %.2f%%", $self->{$refkey}); } else { $self->check_thresholds($self->{$refkey}, "1", "2"); $self->add_nagios_ok( sprintf "table lock contention %.2f%% (uptime < 10800)", $self->{$refkey}); } $self->add_perfdata(sprintf "tablelock_contention=%.2f%%;%s;%s", $self->{table_lock_contention}, $self->{warningrange}, $self->{criticalrange}); $self->add_perfdata(sprintf "tablelock_contention_now=%.2f%%", $self->{table_lock_contention_now}); } elsif ($params{mode} =~ /server::instance::tableindexusage/) { my $refkey = 'index_usage'.($params{lookback} ? '_now' : ''); $self->add_nagios( $self->check_thresholds($self->{$refkey}, "90:", "80:"), sprintf "index usage %.2f%%", $self->{$refkey}); $self->add_perfdata(sprintf "index_usage=%.2f%%;%s;%s", $self->{index_usage}, $self->{warningrange}, $self->{criticalrange}); $self->add_perfdata(sprintf "index_usage_now=%.2f%%", $self->{index_usage_now}); } elsif ($params{mode} =~ /server::instance::tabletmpondisk/) { my $refkey = 'pct_tmp_on_disk'.($params{lookback} ? '_now' : ''); $self->add_nagios( $self->check_thresholds($self->{$refkey}, "25", "50"), sprintf "%.2f%% of %d tables were created on disk", $self->{$refkey}, $self->{delta_created_tmp_tables}); $self->add_perfdata(sprintf "pct_tmp_table_on_disk=%.2f%%;%s;%s", $self->{pct_tmp_on_disk}, $self->{warningrange}, $self->{criticalrange}); $self->add_perfdata(sprintf "pct_tmp_table_on_disk_now=%.2f%%", $self->{pct_tmp_on_disk_now}); } elsif ($params{mode} =~ /server::instance::openfiles/) { $self->add_nagios( $self->check_thresholds($self->{pct_open_files}, 80, 95), sprintf "%.2f%% of the open files limit reached (%d of max. %d)", $self->{pct_open_files}, $self->{open_files}, $self->{open_files_limit}); $self->add_perfdata(sprintf "pct_open_files=%.3f%%;%.3f;%.3f", $self->{pct_open_files}, $self->{warningrange}, $self->{criticalrange}); $self->add_perfdata(sprintf "open_files=%d;%d;%d", $self->{open_files}, $self->{open_files_limit} * $self->{warningrange} / 100, $self->{open_files_limit} * $self->{criticalrange} / 100); } elsif ($params{mode} =~ /server::instance::needoptimize/) { foreach (@{$self->{fragmented}}) { $self->add_nagios( $self->check_thresholds($_->[1], 10, 25), sprintf "table %s is %.2f%% fragmented", $_->[0], $_->[1]); if ($params{name}) { $self->add_perfdata(sprintf "'%s_frag'=%.2f%%;%d;%d", $_->[0], $_->[1], $self->{warningrange}, $self->{criticalrange}); } } } elsif ($params{mode} =~ /server::instance::myisam/) { $self->{engine_myisam}->nagios(%params); $self->merge_nagios($self->{engine_myisam}); } elsif ($params{mode} =~ /server::instance::innodb/) { $self->{engine_innodb}->nagios(%params); $self->merge_nagios($self->{engine_innodb}); } elsif ($params{mode} =~ /server::instance::replication/) { $self->{replication}->nagios(%params); $self->merge_nagios($self->{replication}); } } } 1; ././@LongLink0000644000000000000000000000020212262515411011633 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance/nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagi0000755000000000000000000000000012262515026027633 5ustar ././@LongLink0000644000000000000000000000021312262515411011635 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance/Innodb.pmnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagi0000644000000000000000000001446112262515026027643 0ustar package DBD::MySQL::Server::Instance::Innodb; use strict; our @ISA = qw(DBD::MySQL::Server::Instance); my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 ); my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' ); sub new { my $class = shift; my %params = @_; my $self = { handle => $params{handle}, internals => undef, warningrange => $params{warningrange}, criticalrange => $params{criticalrange}, }; bless $self, $class; $self->init(%params); return $self; } sub init { my $self = shift; my %params = @_; $self->init_nagios(); if ($params{mode} =~ /server::instance::innodb/) { $self->{internals} = DBD::MySQL::Server::Instance::Innodb::Internals->new(%params); } } sub nagios { my $self = shift; my %params = @_; if ($params{mode} =~ /server::instance::innodb/) { $self->{internals}->nagios(%params); $self->merge_nagios($self->{internals}); } } package DBD::MySQL::Server::Instance::Innodb::Internals; use strict; our @ISA = qw(DBD::MySQL::Server::Instance::Innodb); our $internals; # singleton, nur ein einziges mal instantiierbar sub new { my $class = shift; my %params = @_; unless ($internals) { $internals = { handle => $params{handle}, bufferpool_hitrate => undef, wait_free => undef, log_waits => undef, have_innodb => undef, warningrange => $params{warningrange}, criticalrange => $params{criticalrange}, }; bless($internals, $class); $internals->init(%params); } return($internals); } sub init { my $self = shift; my %params = @_; my $dummy; $self->debug("enter init"); $self->init_nagios(); ($dummy, $self->{have_innodb}) = $self->{handle}->fetchrow_array(q{ SHOW VARIABLES LIKE 'have_innodb' }); if ($self->{have_innodb} eq "NO") { $self->add_nagios_critical("the innodb engine has a problem (have_innodb=no)"); } elsif ($self->{have_innodb} eq "DISABLED") { # add_nagios_ok later } elsif ($params{mode} =~ /server::instance::innodb::bufferpool::hitrate/) { ($dummy, $self->{bufferpool_reads}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Innodb_buffer_pool_reads' }); ($dummy, $self->{bufferpool_read_requests}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Innodb_buffer_pool_read_requests' }); if (! defined $self->{bufferpool_reads}) { $self->add_nagios_critical("no innodb buffer pool info available"); } else { $self->valdiff(\%params, qw(bufferpool_reads bufferpool_read_requests)); $self->{bufferpool_hitrate_now} = $self->{delta_bufferpool_read_requests} > 0 ? 100 - (100 * $self->{delta_bufferpool_reads} / $self->{delta_bufferpool_read_requests}) : 100; $self->{bufferpool_hitrate} = $self->{bufferpool_read_requests} > 0 ? 100 - (100 * $self->{bufferpool_reads} / $self->{bufferpool_read_requests}) : 100; } } elsif ($params{mode} =~ /server::instance::innodb::bufferpool::waitfree/) { ($dummy, $self->{bufferpool_wait_free}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Innodb_buffer_pool_wait_free' }); if (! defined $self->{bufferpool_wait_free}) { $self->add_nagios_critical("no innodb buffer pool info available"); } else { $self->valdiff(\%params, qw(bufferpool_wait_free)); $self->{bufferpool_wait_free_rate} = $self->{delta_bufferpool_wait_free} / $self->{delta_timestamp}; } } elsif ($params{mode} =~ /server::instance::innodb::logwaits/) { ($dummy, $self->{log_waits}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Innodb_log_waits' }); if (! defined $self->{log_waits}) { $self->add_nagios_critical("no innodb log info available"); } else { $self->valdiff(\%params, qw(log_waits)); $self->{log_waits_rate} = $self->{delta_log_waits} / $self->{delta_timestamp}; } } elsif ($params{mode} =~ /server::instance::innodb::needoptimize/) { #fragmentation=$(($datafree * 100 / $datalength)) #http://www.electrictoolbox.com/optimize-tables-mysql-php/ my @result = $self->{handle}->fetchall_array(q{ SHOW TABLE STATUS WHERE Data_free / Data_length > 0.1 AND Data_free > 102400 }); printf "%s\n", Data::Dumper::Dumper(\@result); } } sub nagios { my $self = shift; my %params = @_; my $now = $params{lookback} ? '_now' : ''; if ($self->{have_innodb} eq "DISABLED") { $self->add_nagios_ok("the innodb engine has been disabled"); } elsif (! $self->{nagios_level}) { if ($params{mode} =~ /server::instance::innodb::bufferpool::hitrate/) { my $refkey = 'bufferpool_hitrate'.($params{lookback} ? '_now' : ''); $self->add_nagios( $self->check_thresholds($self->{$refkey}, "99:", "95:"), sprintf "innodb buffer pool hitrate at %.2f%%", $self->{$refkey}); $self->add_perfdata(sprintf "bufferpool_hitrate=%.2f%%;%s;%s;0;100", $self->{bufferpool_hitrate}, $self->{warningrange}, $self->{criticalrange}); $self->add_perfdata(sprintf "bufferpool_hitrate_now=%.2f%%", $self->{bufferpool_hitrate_now}); } elsif ($params{mode} =~ /server::instance::innodb::bufferpool::waitfree/) { $self->add_nagios( $self->check_thresholds($self->{bufferpool_wait_free_rate}, "1", "10"), sprintf "%ld innodb buffer pool waits in %ld seconds (%.4f/sec)", $self->{delta_bufferpool_wait_free}, $self->{delta_timestamp}, $self->{bufferpool_wait_free_rate}); $self->add_perfdata(sprintf "bufferpool_free_waits_rate=%.4f;%s;%s;0;100", $self->{bufferpool_wait_free_rate}, $self->{warningrange}, $self->{criticalrange}); } elsif ($params{mode} =~ /server::instance::innodb::logwaits/) { $self->add_nagios( $self->check_thresholds($self->{log_waits_rate}, "1", "10"), sprintf "%ld innodb log waits in %ld seconds (%.4f/sec)", $self->{delta_log_waits}, $self->{delta_timestamp}, $self->{log_waits_rate}); $self->add_perfdata(sprintf "innodb_log_waits_rate=%.4f;%s;%s;0;100", $self->{log_waits_rate}, $self->{warningrange}, $self->{criticalrange}); } } } 1; ././@LongLink0000644000000000000000000000021312262515411011635 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance/Myisam.pmnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagi0000644000000000000000000000647012262515026027644 0ustar package DBD::MySQL::Server::Instance::MyISAM; use strict; our @ISA = qw(DBD::MySQL::Server::Instance); my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 ); my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' ); sub new { my $class = shift; my %params = @_; my $self = { handle => $params{handle}, internals => undef, warningrange => $params{warningrange}, criticalrange => $params{criticalrange}, }; bless $self, $class; $self->init(%params); return $self; } sub init { my $self = shift; my %params = @_; $self->init_nagios(); if ($params{mode} =~ /server::instance::myisam/) { $self->{internals} = DBD::MySQL::Server::Instance::MyISAM::Internals->new(%params); } } sub nagios { my $self = shift; my %params = @_; if ($params{mode} =~ /server::instance::myisam/) { $self->{internals}->nagios(%params); $self->merge_nagios($self->{internals}); } } package DBD::MySQL::Server::Instance::MyISAM::Internals; use strict; our @ISA = qw(DBD::MySQL::Server::Instance::MyISAM); our $internals; # singleton, nur ein einziges mal instantiierbar sub new { my $class = shift; my %params = @_; unless ($internals) { $internals = { handle => $params{handle}, keycache_hitrate => undef, warningrange => $params{warningrange}, criticalrange => $params{criticalrange}, }; bless($internals, $class); $internals->init(%params); } return($internals); } sub init { my $self = shift; my %params = @_; my $dummy; $self->debug("enter init"); $self->init_nagios(); if ($params{mode} =~ /server::instance::myisam::keycache::hitrate/) { ($dummy, $self->{key_reads}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Key_reads' }); ($dummy, $self->{key_read_requests}) = $self->{handle}->fetchrow_array(q{ SHOW /*!50000 global */ STATUS LIKE 'Key_read_requests' }); if (! defined $self->{key_read_requests}) { $self->add_nagios_critical("no myisam keycache info available"); } else { $self->valdiff(\%params, qw(key_reads key_read_requests)); $self->{keycache_hitrate} = $self->{key_read_requests} > 0 ? 100 - (100 * $self->{key_reads} / $self->{key_read_requests}) : 100; $self->{keycache_hitrate_now} = $self->{delta_key_read_requests} > 0 ? 100 - (100 * $self->{delta_key_reads} / $self->{delta_key_read_requests}) : 100; } } elsif ($params{mode} =~ /server::instance::myisam::sonstnochwas/) { } } sub nagios { my $self = shift; my %params = @_; if (! $self->{nagios_level}) { if ($params{mode} =~ /server::instance::myisam::keycache::hitrate/) { my $refkey = 'keycache_hitrate'.($params{lookback} ? '_now' : ''); $self->add_nagios( $self->check_thresholds($self->{$refkey}, "99:", "95:"), sprintf "myisam keycache hitrate at %.2f%%", $self->{$refkey}); $self->add_perfdata(sprintf "keycache_hitrate=%.2f%%;%s;%s", $self->{keycache_hitrate}, $self->{warningrange}, $self->{criticalrange}); $self->add_perfdata(sprintf "keycache_hitrate_now=%.2f%%;%s;%s", $self->{keycache_hitrate_now}, $self->{warningrange}, $self->{criticalrange}); } } } 1; ././@LongLink0000644000000000000000000000022012262515411011633 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance/Replication.pmnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagi0000644000000000000000000001072012262515026027635 0ustar package DBD::MySQL::Server::Instance::Replication; use strict; our @ISA = qw(DBD::MySQL::Server::Instance); my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 ); my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' ); sub new { my $class = shift; my %params = @_; my $self = { handle => $params{handle}, internals => undef, warningrange => $params{warningrange}, criticalrange => $params{criticalrange}, }; bless $self, $class; $self->init(%params); return $self; } sub init { my $self = shift; my %params = @_; $self->init_nagios(); if ($params{mode} =~ /server::instance::replication/) { $self->{internals} = DBD::MySQL::Server::Instance::Replication::Internals->new(%params); } } sub nagios { my $self = shift; my %params = @_; if ($params{mode} =~ /server::instance::replication/) { $self->{internals}->nagios(%params); $self->merge_nagios($self->{internals}); } } package DBD::MySQL::Server::Instance::Replication::Internals; use strict; our @ISA = qw(DBD::MySQL::Server::Instance::Replication); our $internals; # singleton, nur ein einziges mal instantiierbar sub new { my $class = shift; my %params = @_; unless ($internals) { $internals = { handle => $params{handle}, seconds_behind_master => undef, slave_io_running => undef, slave_sql_running => undef, warningrange => $params{warningrange}, criticalrange => $params{criticalrange}, }; bless($internals, $class); $internals->init(%params); } return($internals); } sub init { my $self = shift; my %params = @_; $self->debug("enter init"); $self->init_nagios(); if ($params{mode} =~ /server::instance::replication::slavelag/) { # "show slave status", "Seconds_Behind_Master" my $slavehash = $self->{handle}->selectrow_hashref(q{ SHOW SLAVE STATUS }); if ((! defined $slavehash->{Seconds_Behind_Master}) && (lc $slavehash->{Slave_IO_Running} eq 'no')) { $self->add_nagios_critical( "unable to get slave lag, because io thread is not running"); } elsif (! defined $slavehash->{Seconds_Behind_Master}) { $self->add_nagios_critical(sprintf "unable to get replication info%s", $self->{handle}->{errstr} ? $self->{handle}->{errstr} : ""); } else { $self->{seconds_behind_master} = $slavehash->{Seconds_Behind_Master}; } } elsif ($params{mode} =~ /server::instance::replication::slaveiorunning/) { # "show slave status", "Slave_IO_Running" my $slavehash = $self->{handle}->selectrow_hashref(q{ SHOW SLAVE STATUS }); if (! defined $slavehash->{Slave_IO_Running}) { $self->add_nagios_critical(sprintf "unable to get replication info%s", $self->{handle}->{errstr} ? $self->{handle}->{errstr} : ""); } else { $self->{slave_io_running} = $slavehash->{Slave_IO_Running}; } } elsif ($params{mode} =~ /server::instance::replication::slavesqlrunning/) { # "show slave status", "Slave_SQL_Running" my $slavehash = $self->{handle}->selectrow_hashref(q{ SHOW SLAVE STATUS }); if (! defined $slavehash->{Slave_SQL_Running}) { $self->add_nagios_critical(sprintf "unable to get replication info%s", $self->{handle}->{errstr} ? $self->{handle}->{errstr} : ""); } else { $self->{slave_sql_running} = $slavehash->{Slave_SQL_Running}; } } } sub nagios { my $self = shift; my %params = @_; if (! $self->{nagios_level}) { if ($params{mode} =~ /server::instance::replication::slavelag/) { $self->add_nagios( $self->check_thresholds($self->{seconds_behind_master}, "10", "20"), sprintf "Slave is %d seconds behind master", $self->{seconds_behind_master}); $self->add_perfdata(sprintf "slave_lag=%d;%s;%s", $self->{seconds_behind_master}, $self->{warningrange}, $self->{criticalrange}); } elsif ($params{mode} =~ /server::instance::replication::slaveiorunning/) { if (lc $self->{slave_io_running} eq "yes") { $self->add_nagios_ok("Slave io is running"); } else { $self->add_nagios_critical("Slave io is not running"); } } elsif ($params{mode} =~ /server::instance::replication::slavesqlrunning/) { if (lc $self->{slave_sql_running} eq "yes") { $self->add_nagios_ok("Slave sql is running"); } else { $self->add_nagios_critical("Slave sql is not running"); } } } } 1; ././@LongLink0000644000000000000000000000017412262515411011643 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagios/DBD/MySQL/Cluster.pmnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagi0000644000000000000000000004110412262515026027635 0ustar package DBD::MySQL::Cluster; use strict; use Time::HiRes; use IO::File; use Data::Dumper; my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 ); my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' ); { our $verbose = 0; our $scream = 0; # scream if something is not implemented our $access = "dbi"; # how do we access the database. our $my_modules_dyn_dir = ""; # where we look for self-written extensions my @clusters = (); my $initerrors = undef; sub add_cluster { push(@clusters, shift); } sub return_clusters { return @clusters; } sub return_first_cluster() { return $clusters[0]; } } sub new { my $class = shift; my %params = @_; my $self = { hostname => $params{hostname}, port => $params{port}, username => $params{username}, password => $params{password}, timeout => $params{timeout}, warningrange => $params{warningrange}, criticalrange => $params{criticalrange}, version => 'unknown', nodes => [], ndbd_nodes => 0, ndb_mgmd_nodes => 0, mysqld_nodes => 0, }; bless $self, $class; $self->init_nagios(); if ($self->connect(%params)) { DBD::MySQL::Cluster::add_cluster($self); $self->init(%params); } return $self; } sub init { my $self = shift; my %params = @_; if ($self->{show}) { my $type = undef; foreach (split /\n/, $self->{show}) { if (/\[(\w+)\((\w+)\)\]\s+(\d+) node/) { $type = uc $2; } elsif (/id=(\d+)(.*)/) { push(@{$self->{nodes}}, DBD::MySQL::Cluster::Node->new( type => $type, id => $1, status => $2, )); } } } else { } if ($params{mode} =~ /^cluster::ndbdrunning/) { foreach my $node (@{$self->{nodes}}) { $node->{type} eq "NDB" && $node->{status} eq "running" && $self->{ndbd_nodes}++; $node->{type} eq "MGM" && $node->{status} eq "running" && $self->{ndb_mgmd_nodes}++; $node->{type} eq "API" && $node->{status} eq "running" && $self->{mysqld_nodes}++; } } else { printf "broken mode %s\n", $params{mode}; } } sub dump { my $self = shift; my $message = shift || ""; printf "%s %s\n", $message, Data::Dumper::Dumper($self); } sub nagios { my $self = shift; my %params = @_; my $dead_ndb = 0; my $dead_api = 0; if (! $self->{nagios_level}) { if ($params{mode} =~ /^cluster::ndbdrunning/) { foreach my $node (grep { $_->{type} eq "NDB"} @{$self->{nodes}}) { next if $params{selectname} && $params{selectname} ne $_->{id}; if (! $node->{connected}) { $self->add_nagios_critical( sprintf "ndb node %d is not connected", $node->{id}); $dead_ndb++; } } foreach my $node (grep { $_->{type} eq "API"} @{$self->{nodes}}) { next if $params{selectname} && $params{selectname} ne $_->{id}; if (! $node->{connected}) { $self->add_nagios_critical( sprintf "api node %d is not connected", $node->{id}); $dead_api++; } } if (! $dead_ndb) { $self->add_nagios_ok("all ndb nodes are connected"); } if (! $dead_api) { $self->add_nagios_ok("all api nodes are connected"); } } } $self->add_perfdata(sprintf "ndbd_nodes=%d ndb_mgmd_nodes=%d mysqld_nodes=%d", $self->{ndbd_nodes}, $self->{ndb_mgmd_nodes}, $self->{mysqld_nodes}); } sub init_nagios { my $self = shift; no strict 'refs'; if (! ref($self)) { my $nagiosvar = $self."::nagios"; my $nagioslevelvar = $self."::nagios_level"; $$nagiosvar = { messages => { 0 => [], 1 => [], 2 => [], 3 => [], }, perfdata => [], }; $$nagioslevelvar = $ERRORS{OK}, } else { $self->{nagios} = { messages => { 0 => [], 1 => [], 2 => [], 3 => [], }, perfdata => [], }; $self->{nagios_level} = $ERRORS{OK}, } } sub check_thresholds { my $self = shift; my $value = shift; my $defaultwarningrange = shift; my $defaultcriticalrange = shift; my $level = $ERRORS{OK}; $self->{warningrange} = $self->{warningrange} ? $self->{warningrange} : $defaultwarningrange; $self->{criticalrange} = $self->{criticalrange} ? $self->{criticalrange} : $defaultcriticalrange; if ($self->{warningrange} !~ /:/ && $self->{criticalrange} !~ /:/) { # warning = 10, critical = 20, warn if > 10, crit if > 20 $level = $ERRORS{WARNING} if $value > $self->{warningrange}; $level = $ERRORS{CRITICAL} if $value > $self->{criticalrange}; } elsif ($self->{warningrange} =~ /([\d\.]+):/ && $self->{criticalrange} =~ /([\d\.]+):/) { # warning = 98:, critical = 95:, warn if < 98, crit if < 95 $self->{warningrange} =~ /([\d\.]+):/; $level = $ERRORS{WARNING} if $value < $1; $self->{criticalrange} =~ /([\d\.]+):/; $level = $ERRORS{CRITICAL} if $value < $1; } return $level; # # syntax error must be reported with returncode -1 # } sub add_nagios { my $self = shift; my $level = shift; my $message = shift; push(@{$self->{nagios}->{messages}->{$level}}, $message); # recalc current level foreach my $llevel (qw(CRITICAL WARNING UNKNOWN OK)) { if (scalar(@{$self->{nagios}->{messages}->{$ERRORS{$llevel}}})) { $self->{nagios_level} = $ERRORS{$llevel}; } } } sub add_nagios_ok { my $self = shift; my $message = shift; $self->add_nagios($ERRORS{OK}, $message); } sub add_nagios_warning { my $self = shift; my $message = shift; $self->add_nagios($ERRORS{WARNING}, $message); } sub add_nagios_critical { my $self = shift; my $message = shift; $self->add_nagios($ERRORS{CRITICAL}, $message); } sub add_nagios_unknown { my $self = shift; my $message = shift; $self->add_nagios($ERRORS{UNKNOWN}, $message); } sub add_perfdata { my $self = shift; my $data = shift; push(@{$self->{nagios}->{perfdata}}, $data); } sub merge_nagios { my $self = shift; my $child = shift; foreach my $level (0..3) { foreach (@{$child->{nagios}->{messages}->{$level}}) { $self->add_nagios($level, $_); } #push(@{$self->{nagios}->{messages}->{$level}}, # @{$child->{nagios}->{messages}->{$level}}); } push(@{$self->{nagios}->{perfdata}}, @{$child->{nagios}->{perfdata}}); } sub calculate_result { my $self = shift; if ($ENV{NRPE_MULTILINESUPPORT} && length join(" ", @{$self->{nagios}->{perfdata}}) > 200) { foreach my $level ("CRITICAL", "WARNING", "UNKNOWN", "OK") { # first the bad news if (scalar(@{$self->{nagios}->{messages}->{$ERRORS{$level}}})) { $self->{nagios_message} .= "\n".join("\n", @{$self->{nagios}->{messages}->{$ERRORS{$level}}}); } } $self->{nagios_message} =~ s/^\n//g; $self->{perfdata} = join("\n", @{$self->{nagios}->{perfdata}}); } else { foreach my $level ("CRITICAL", "WARNING", "UNKNOWN", "OK") { # first the bad news if (scalar(@{$self->{nagios}->{messages}->{$ERRORS{$level}}})) { $self->{nagios_message} .= join(", ", @{$self->{nagios}->{messages}->{$ERRORS{$level}}}).", "; } } $self->{nagios_message} =~ s/, $//g; $self->{perfdata} = join(" ", @{$self->{nagios}->{perfdata}}); } foreach my $level ("OK", "UNKNOWN", "WARNING", "CRITICAL") { if (scalar(@{$self->{nagios}->{messages}->{$ERRORS{$level}}})) { $self->{nagios_level} = $ERRORS{$level}; } } } sub debug { my $self = shift; my $msg = shift; if ($DBD::MySQL::Cluster::verbose) { printf "%s %s\n", $msg, ref($self); } } sub connect { my $self = shift; my %params = @_; my $retval = undef; $self->{tic} = Time::HiRes::time(); eval { use POSIX ':signal_h'; local $SIG{'ALRM'} = sub { die "alarm\n"; }; my $mask = POSIX::SigSet->new( SIGALRM ); my $action = POSIX::SigAction->new( sub { die "connection timeout\n" ; }, $mask); my $oldaction = POSIX::SigAction->new(); sigaction(SIGALRM ,$action ,$oldaction ); alarm($self->{timeout} - 1); # 1 second before the global unknown timeout my $ndb_mgm = "ndb_mgm"; $params{hostname} = "127.0.0.1" if ! $params{hostname}; $ndb_mgm .= sprintf " --ndb-connectstring=%s", $params{hostname} if $params{hostname}; $ndb_mgm .= sprintf ":%d", $params{port} if $params{port}; $self->{show} = `$ndb_mgm -e show 2>&1`; if ($? == -1) { $self->add_nagios_critical("ndb_mgm failed to execute $!"); } elsif ($? & 127) { $self->add_nagios_critical("ndb_mgm failed to execute $!"); } elsif ($? >> 8 != 0) { $self->add_nagios_critical("ndb_mgm unable to connect"); } else { if ($self->{show} !~ /Cluster Configuration/) { $self->add_nagios_critical("got no cluster configuration"); } else { $retval = 1; } } }; if ($@) { $self->{errstr} = $@; $self->{errstr} =~ s/at $0 .*//g; chomp $self->{errstr}; $self->add_nagios_critical($self->{errstr}); $retval = undef; } $self->{tac} = Time::HiRes::time(); return $retval; } sub trace { my $self = shift; my $format = shift; $self->{trace} = -f "/tmp/check_mysql_health.trace" ? 1 : 0; if ($self->{verbose}) { printf("%s: ", scalar localtime); printf($format, @_); } if ($self->{trace}) { my $logfh = new IO::File; $logfh->autoflush(1); if ($logfh->open("/tmp/check_mysql_health.trace", "a")) { $logfh->printf("%s: ", scalar localtime); $logfh->printf($format, @_); $logfh->printf("\n"); $logfh->close(); } } } sub DESTROY { my $self = shift; my $handle1 = "null"; my $handle2 = "null"; if (defined $self->{handle}) { $handle1 = ref($self->{handle}); if (defined $self->{handle}->{handle}) { $handle2 = ref($self->{handle}->{handle}); } } $self->trace(sprintf "DESTROY %s with handle %s %s", ref($self), $handle1, $handle2); if (ref($self) eq "DBD::MySQL::Cluster") { } $self->trace(sprintf "DESTROY %s exit with handle %s %s", ref($self), $handle1, $handle2); if (ref($self) eq "DBD::MySQL::Cluster") { #printf "humpftata\n"; } } sub save_state { my $self = shift; my %params = @_; my $extension = ""; mkdir $params{statefilesdir} unless -d $params{statefilesdir}; my $statefile = sprintf "%s/%s_%s", $params{statefilesdir}, $params{hostname}, $params{mode}; $extension .= $params{differenciator} ? "_".$params{differenciator} : ""; $extension .= $params{socket} ? "_".$params{socket} : ""; $extension .= $params{port} ? "_".$params{port} : ""; $extension .= $params{database} ? "_".$params{database} : ""; $extension .= $params{tablespace} ? "_".$params{tablespace} : ""; $extension .= $params{datafile} ? "_".$params{datafile} : ""; $extension .= $params{name} ? "_".$params{name} : ""; $extension =~ s/\//_/g; $extension =~ s/\(/_/g; $extension =~ s/\)/_/g; $extension =~ s/\*/_/g; $extension =~ s/\s/_/g; $statefile .= $extension; $statefile = lc $statefile; open(STATE, ">$statefile"); if ((ref($params{save}) eq "HASH") && exists $params{save}->{timestamp}) { $params{save}->{localtime} = scalar localtime $params{save}->{timestamp}; } printf STATE Data::Dumper::Dumper($params{save}); close STATE; $self->debug(sprintf "saved %s to %s", Data::Dumper::Dumper($params{save}), $statefile); } sub load_state { my $self = shift; my %params = @_; my $extension = ""; my $statefile = sprintf "%s/%s_%s", $params{statefilesdir}, $params{hostname}, $params{mode}; $extension .= $params{differenciator} ? "_".$params{differenciator} : ""; $extension .= $params{socket} ? "_".$params{socket} : ""; $extension .= $params{port} ? "_".$params{port} : ""; $extension .= $params{database} ? "_".$params{database} : ""; $extension .= $params{tablespace} ? "_".$params{tablespace} : ""; $extension .= $params{datafile} ? "_".$params{datafile} : ""; $extension .= $params{name} ? "_".$params{name} : ""; $extension =~ s/\//_/g; $extension =~ s/\(/_/g; $extension =~ s/\)/_/g; $extension =~ s/\*/_/g; $extension =~ s/\s/_/g; $statefile .= $extension; $statefile = lc $statefile; if ( -f $statefile) { our $VAR1; eval { require $statefile; }; if($@) { printf "rumms\n"; } $self->debug(sprintf "load %s", Data::Dumper::Dumper($VAR1)); return $VAR1; } else { return undef; } } sub valdiff { my $self = shift; my $pparams = shift; my %params = %{$pparams}; my @keys = @_; my $last_values = $self->load_state(%params) || eval { my $empty_events = {}; foreach (@keys) { $empty_events->{$_} = 0; } $empty_events->{timestamp} = 0; $empty_events; }; foreach (@keys) { $self->{'delta_'.$_} = $self->{$_} - $last_values->{$_}; $self->debug(sprintf "delta_%s %f", $_, $self->{'delta_'.$_}); } $self->{'delta_timestamp'} = time - $last_values->{timestamp}; $params{save} = eval { my $empty_events = {}; foreach (@keys) { $empty_events->{$_} = $self->{$_}; } $empty_events->{timestamp} = time; $empty_events; }; $self->save_state(%params); } sub requires_version { my $self = shift; my $version = shift; my @instances = DBD::MySQL::Cluster::return_clusters(); my $instversion = $instances[0]->{version}; if (! $self->version_is_minimum($version)) { $self->add_nagios($ERRORS{UNKNOWN}, sprintf "not implemented/possible for MySQL release %s", $instversion); } } sub version_is_minimum { # the current version is newer or equal my $self = shift; my $version = shift; my $newer = 1; my @instances = DBD::MySQL::Cluster::return_clusters(); my @v1 = map { $_ eq "x" ? 0 : $_ } split(/\./, $version); my @v2 = split(/\./, $instances[0]->{version}); if (scalar(@v1) > scalar(@v2)) { push(@v2, (0) x (scalar(@v1) - scalar(@v2))); } elsif (scalar(@v2) > scalar(@v1)) { push(@v1, (0) x (scalar(@v2) - scalar(@v1))); } foreach my $pos (0..$#v1) { if ($v2[$pos] > $v1[$pos]) { $newer = 1; last; } elsif ($v2[$pos] < $v1[$pos]) { $newer = 0; last; } } #printf STDERR "check if %s os minimum %s\n", join(".", @v2), join(".", @v1); return $newer; } sub instance_rac { my $self = shift; my @instances = DBD::MySQL::Cluster::return_clusters(); return (lc $instances[0]->{parallel} eq "yes") ? 1 : 0; } sub instance_thread { my $self = shift; my @instances = DBD::MySQL::Cluster::return_clusters(); return $instances[0]->{thread}; } sub windows_cluster { my $self = shift; my @instances = DBD::MySQL::Cluster::return_clusters(); if ($instances[0]->{os} =~ /Win/i) { return 1; } else { return 0; } } sub system_vartmpdir { my $self = shift; if ($^O =~ /MSWin/) { return $self->system_tmpdir(); } else { return "/var/tmp/check_mysql_health"; } } sub system_oldvartmpdir { my $self = shift; return "/tmp"; } sub system_tmpdir { my $self = shift; if ($^O =~ /MSWin/) { return $ENV{TEMP} if defined $ENV{TEMP}; return $ENV{TMP} if defined $ENV{TMP}; return File::Spec->catfile($ENV{windir}, 'Temp') if defined $ENV{windir}; return 'C:\Temp'; } else { return "/tmp"; } } package DBD::MySQL::Cluster::Node; use strict; our @ISA = qw(DBD::MySQL::Cluster); my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 ); my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' ); sub new { my $class = shift; my %params = @_; my $self = { mode => $params{mode}, timeout => $params{timeout}, type => $params{type}, id => $params{id}, status => $params{status}, }; bless $self, $class; $self->init(%params); if ($params{type} eq "NDB") { bless $self, "DBD::MySQL::Cluster::Node::NDB"; $self->init(%params); } return $self; } sub init { my $self = shift; my %params = @_; if ($self->{status} =~ /@(\d+\.\d+\.\d+\.\d+)\s/) { $self->{addr} = $1; $self->{connected} = 1; } elsif ($self->{status} =~ /accepting connect from (\d+\.\d+\.\d+\.\d+)/) { $self->{addr} = $1; $self->{connected} = 0; } if ($self->{status} =~ /starting,/) { $self->{status} = "starting"; } elsif ($self->{status} =~ /shutting,/) { $self->{status} = "shutting"; } else { $self->{status} = $self->{connected} ? "running" : "dead"; } } package DBD::MySQL::Cluster::Node::NDB; use strict; our @ISA = qw(DBD::MySQL::Cluster::Node); my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 ); my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' ); sub init { my $self = shift; my %params = @_; if ($self->{status} =~ /Nodegroup:\s*(\d+)/) { $self->{nodegroup} = $1; } $self->{master} = ($self->{status} =~ /Master\)/) ? 1 : 0; } ././@LongLink0000644000000000000000000000017312262515411011642 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagios/DBD/MySQL/Server.pmnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagi0000644000000000000000000013261112262515026027641 0ustar package DBD::MySQL::Server; use strict; use Time::HiRes; use IO::File; use File::Copy 'cp'; use Data::Dumper; my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 ); my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' ); { our $verbose = 0; our $scream = 0; # scream if something is not implemented our $access = "dbi"; # how do we access the database. our $my_modules_dyn_dir = ""; # where we look for self-written extensions my @servers = (); my $initerrors = undef; sub add_server { push(@servers, shift); } sub return_servers { return @servers; } sub return_first_server() { return $servers[0]; } } sub new { my $class = shift; my %params = @_; my $self = { access => $params{method} || 'dbi', hostname => $params{hostname}, database => $params{database} || 'information_schema', port => $params{port}, socket => $params{socket}, username => $params{username}, password => $params{password}, mycnf => $params{mycnf}, mycnfgroup => $params{mycnfgroup}, timeout => $params{timeout}, warningrange => $params{warningrange}, criticalrange => $params{criticalrange}, verbose => $params{verbose}, report => $params{report}, labelformat => $params{labelformat}, version => 'unknown', instance => undef, handle => undef, }; bless $self, $class; $self->init_nagios(); if ($self->dbconnect(%params)) { ($self->{dummy}, $self->{version}) = $self->{handle}->fetchrow_array( #q{ SHOW VARIABLES WHERE Variable_name = 'version' } q{ SHOW VARIABLES LIKE 'version' } ); $self->{version} = (split "-", $self->{version})[0]; ($self->{dummy}, $self->{uptime}) = $self->{handle}->fetchrow_array( q{ SHOW STATUS LIKE 'Uptime' } ); DBD::MySQL::Server::add_server($self); $self->init(%params); } return $self; } sub init { my $self = shift; my %params = @_; $params{handle} = $self->{handle}; $params{uptime} = $self->{uptime}; $self->set_global_db_thresholds(\%params); if ($params{mode} =~ /^server::instance/) { $self->{instance} = DBD::MySQL::Server::Instance->new(%params); } elsif ($params{mode} =~ /^server::sql/) { $self->set_local_db_thresholds(%params); if ($params{regexp}) { # sql output is treated as text if ($params{name2} eq $params{name}) { $self->add_nagios_unknown(sprintf "where's the regexp????"); } else { $self->{genericsql} = $self->{handle}->fetchrow_array($params{selectname}); if (! defined $self->{genericsql}) { $self->add_nagios_unknown(sprintf "got no valid response for %s", $params{selectname}); } } } else { # sql output must be a number (or array of numbers) @{$self->{genericsql}} = $self->{handle}->fetchrow_array($params{selectname}); if (! (defined $self->{genericsql} && (scalar(grep { /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)$/ } @{$self->{genericsql}})) == scalar(@{$self->{genericsql}}))) { $self->add_nagios_unknown(sprintf "got no valid response for %s", $params{selectname}); } else { # name2 in array # units in array } } } elsif ($params{mode} =~ /^server::uptime/) { # already set with the connection. but use minutes here } elsif ($params{mode} =~ /^server::connectiontime/) { $self->{connection_time} = $self->{tac} - $self->{tic}; } elsif ($params{mode} =~ /^my::([^:.]+)/) { my $class = $1; my $loaderror = undef; substr($class, 0, 1) = uc substr($class, 0, 1); foreach my $libpath (split(":", $DBD::MySQL::Server::my_modules_dyn_dir)) { foreach my $extmod (glob $libpath."/CheckMySQLHealth*.pm") { eval { $self->trace(sprintf "loading module %s", $extmod); require $extmod; }; if ($@) { $loaderror = $extmod; $self->trace(sprintf "failed loading module %s: %s", $extmod, $@); } } } my $obj = { handle => $params{handle}, warningrange => $params{warningrange}, criticalrange => $params{criticalrange}, }; bless $obj, "My$class"; $self->{my} = $obj; if ($self->{my}->isa("DBD::MySQL::Server")) { my $dos_init = $self->can("init"); my $dos_nagios = $self->can("nagios"); my $my_init = $self->{my}->can("init"); my $my_nagios = $self->{my}->can("nagios"); if ($my_init == $dos_init) { $self->add_nagios_unknown( sprintf "Class %s needs an init() method", ref($self->{my})); } elsif ($my_nagios == $dos_nagios) { $self->add_nagios_unknown( sprintf "Class %s needs a nagios() method", ref($self->{my})); } else { $self->{my}->init_nagios(%params); $self->{my}->init(%params); } } else { $self->add_nagios_unknown( sprintf "Class %s is not a subclass of DBD::MySQL::Server%s", ref($self->{my}), $loaderror ? sprintf " (syntax error in %s?)", $loaderror : "" ); } } else { printf "broken mode %s\n", $params{mode}; } } sub dump { my $self = shift; my $message = shift || ""; printf "%s %s\n", $message, Data::Dumper::Dumper($self); } sub nagios { my $self = shift; my %params = @_; if (! $self->{nagios_level}) { if ($params{mode} =~ /^server::instance/) { $self->{instance}->nagios(%params); $self->merge_nagios($self->{instance}); } elsif ($params{mode} =~ /^server::database/) { $self->{database}->nagios(%params); $self->merge_nagios($self->{database}); } elsif ($params{mode} =~ /^server::uptime/) { $self->add_nagios( $self->check_thresholds($self->{uptime} / 60, "10:", "5:"), sprintf "database is up since %d minutes", $self->{uptime} / 60); $self->add_perfdata(sprintf "uptime=%ds", $self->{uptime}); } elsif ($params{mode} =~ /^server::connectiontime/) { $self->add_nagios( $self->check_thresholds($self->{connection_time}, 1, 5), sprintf "%.2f seconds to connect as %s", $self->{connection_time}, ($self->{username} || getpwuid($<))); $self->add_perfdata(sprintf "connection_time=%.4fs;%d;%d", $self->{connection_time}, $self->{warningrange}, $self->{criticalrange}); } elsif ($params{mode} =~ /^server::sql/) { if ($params{regexp}) { if (substr($params{name2}, 0, 1) eq '!') { $params{name2} =~ s/^!//; if ($self->{genericsql} !~ /$params{name2}/) { $self->add_nagios_ok( sprintf "output %s does not match pattern %s", $self->{genericsql}, $params{name2}); } else { $self->add_nagios_critical( sprintf "output %s matches pattern %s", $self->{genericsql}, $params{name2}); } } else { if ($self->{genericsql} =~ /$params{name2}/) { $self->add_nagios_ok( sprintf "output %s matches pattern %s", $self->{genericsql}, $params{name2}); } else { $self->add_nagios_critical( sprintf "output %s does not match pattern %s", $self->{genericsql}, $params{name2}); } } } else { $self->add_nagios( # the first item in the list will trigger the threshold values $self->check_thresholds($self->{genericsql}[0], 1, 5), sprintf "%s: %s%s", $params{name2} ? lc $params{name2} : lc $params{selectname}, # float as float, integers as integers join(" ", map { (sprintf("%d", $_) eq $_) ? $_ : sprintf("%f", $_) } @{$self->{genericsql}}), $params{units} ? $params{units} : ""); my $i = 0; # workaround... getting the column names from the database would be nicer my @names2_arr = split(/\s+/, $params{name2}); foreach my $t (@{$self->{genericsql}}) { $self->add_perfdata(sprintf "\'%s\'=%s%s;%s;%s", $names2_arr[$i] ? lc $names2_arr[$i] : lc $params{selectname}, # float as float, integers as integers (sprintf("%d", $t) eq $t) ? $t : sprintf("%f", $t), $params{units} ? $params{units} : "", ($i == 0) ? $self->{warningrange} : "", ($i == 0) ? $self->{criticalrange} : "" ); $i++; } } } elsif ($params{mode} =~ /^my::([^:.]+)/) { $self->{my}->nagios(%params); $self->merge_nagios($self->{my}); } } } sub init_nagios { my $self = shift; no strict 'refs'; if (! ref($self)) { my $nagiosvar = $self."::nagios"; my $nagioslevelvar = $self."::nagios_level"; $$nagiosvar = { messages => { 0 => [], 1 => [], 2 => [], 3 => [], }, perfdata => [], }; $$nagioslevelvar = $ERRORS{OK}, } else { $self->{nagios} = { messages => { 0 => [], 1 => [], 2 => [], 3 => [], }, perfdata => [], }; $self->{nagios_level} = $ERRORS{OK}, } } sub check_thresholds { my $self = shift; my $value = shift; my $defaultwarningrange = shift; my $defaultcriticalrange = shift; my $level = $ERRORS{OK}; $self->{warningrange} = defined $self->{warningrange} ? $self->{warningrange} : $defaultwarningrange; $self->{criticalrange} = defined $self->{criticalrange} ? $self->{criticalrange} : $defaultcriticalrange; if ($self->{warningrange} !~ /:/ && $self->{criticalrange} !~ /:/) { # warning = 10, critical = 20, warn if > 10, crit if > 20 $level = $ERRORS{WARNING} if $value > $self->{warningrange}; $level = $ERRORS{CRITICAL} if $value > $self->{criticalrange}; } elsif ($self->{warningrange} =~ /([\d\.]+):/ && $self->{criticalrange} =~ /([\d\.]+):/) { # warning = 98:, critical = 95:, warn if < 98, crit if < 95 $self->{warningrange} =~ /([\d\.]+):/; $level = $ERRORS{WARNING} if $value < $1; $self->{criticalrange} =~ /([\d\.]+):/; $level = $ERRORS{CRITICAL} if $value < $1; } return $level; # # syntax error must be reported with returncode -1 # } sub add_nagios { my $self = shift; my $level = shift; my $message = shift; push(@{$self->{nagios}->{messages}->{$level}}, $message); # recalc current level foreach my $llevel (qw(CRITICAL WARNING UNKNOWN OK)) { if (scalar(@{$self->{nagios}->{messages}->{$ERRORS{$llevel}}})) { $self->{nagios_level} = $ERRORS{$llevel}; } } } sub add_nagios_ok { my $self = shift; my $message = shift; $self->add_nagios($ERRORS{OK}, $message); } sub add_nagios_warning { my $self = shift; my $message = shift; $self->add_nagios($ERRORS{WARNING}, $message); } sub add_nagios_critical { my $self = shift; my $message = shift; $self->add_nagios($ERRORS{CRITICAL}, $message); } sub add_nagios_unknown { my $self = shift; my $message = shift; $self->add_nagios($ERRORS{UNKNOWN}, $message); } sub add_perfdata { my $self = shift; my $data = shift; push(@{$self->{nagios}->{perfdata}}, $data); } sub merge_nagios { my $self = shift; my $child = shift; foreach my $level (0..3) { foreach (@{$child->{nagios}->{messages}->{$level}}) { $self->add_nagios($level, $_); } #push(@{$self->{nagios}->{messages}->{$level}}, # @{$child->{nagios}->{messages}->{$level}}); } push(@{$self->{nagios}->{perfdata}}, @{$child->{nagios}->{perfdata}}); } sub calculate_result { my $self = shift; my $labels = shift || {}; my $multiline = 0; map { $self->{nagios_level} = $ERRORS{$_} if (scalar(@{$self->{nagios}->{messages}->{$ERRORS{$_}}})); } ("OK", "UNKNOWN", "WARNING", "CRITICAL"); if ($ENV{NRPE_MULTILINESUPPORT} && length join(" ", @{$self->{nagios}->{perfdata}}) > 200) { $multiline = 1; } my $all_messages = join(($multiline ? "\n" : ", "), map { join(($multiline ? "\n" : ", "), @{$self->{nagios}->{messages}->{$ERRORS{$_}}}) } grep { scalar(@{$self->{nagios}->{messages}->{$ERRORS{$_}}}) } ("CRITICAL", "WARNING", "UNKNOWN", "OK")); my $bad_messages = join(($multiline ? "\n" : ", "), map { join(($multiline ? "\n" : ", "), @{$self->{nagios}->{messages}->{$ERRORS{$_}}}) } grep { scalar(@{$self->{nagios}->{messages}->{$ERRORS{$_}}}) } ("CRITICAL", "WARNING", "UNKNOWN")); my $all_messages_short = $bad_messages ? $bad_messages : 'no problems'; my $all_messages_html = "". join("", map { my $level = $_; join("", map { sprintf "", $level, $_; } @{$self->{nagios}->{messages}->{$ERRORS{$_}}}); } grep { scalar(@{$self->{nagios}->{messages}->{$ERRORS{$_}}}) } ("CRITICAL", "WARNING", "UNKNOWN", "OK")). "
%s
"; if (exists $self->{identstring}) { $self->{nagios_message} .= $self->{identstring}; } if ($self->{report} eq "long") { $self->{nagios_message} .= $all_messages; } elsif ($self->{report} eq "short") { $self->{nagios_message} .= $all_messages_short; } elsif ($self->{report} eq "html") { $self->{nagios_message} .= $all_messages_short."\n".$all_messages_html; } if ($self->{labelformat} eq "pnp4nagios") { $self->{perfdata} = join(" ", @{$self->{nagios}->{perfdata}}); } else { $self->{perfdata} = join(" ", map { my $perfdata = $_; if ($perfdata =~ /^(.*?)=(.*)/) { my $label = $1; my $data = $2; if (exists $labels->{$label} && exists $labels->{$label}->{$self->{labelformat}}) { $labels->{$label}->{$self->{labelformat}}."=".$data; } else { $perfdata; } } else { $perfdata; } } @{$self->{nagios}->{perfdata}}); } } sub set_global_db_thresholds { my $self = shift; my $params = shift; my $warning = undef; my $critical = undef; return unless defined $params->{dbthresholds}; $params->{name0} = $params->{dbthresholds}; # :pluginmode :name :warning :critical # mode empty # eval { if ($self->{handle}->fetchrow_array(q{ SELECT table_name FROM information_schema.tables WHERE table_schema = ? AND table_name = 'CHECK_MYSQL_HEALTH_THRESHOLDS'; }, $self->{database})) { # either --database... or information_schema my @dbthresholds = $self->{handle}->fetchall_array(q{ SELECT * FROM check_mysql_health_thresholds }); $params->{dbthresholds} = \@dbthresholds; foreach (@dbthresholds) { if (($_->[0] eq $params->{cmdlinemode}) && (! defined $_->[1] || ! $_->[1])) { ($warning, $critical) = ($_->[2], $_->[3]); } } } }; if (! $@) { if ($warning) { $params->{warningrange} = $warning; $self->trace("read warningthreshold %s from database", $warning); } if ($critical) { $params->{criticalrange} = $critical; $self->trace("read criticalthreshold %s from database", $critical); } } } sub set_local_db_thresholds { my $self = shift; my %params = @_; my $warning = undef; my $critical = undef; # :pluginmode :name :warning :critical # mode name0 # mode name2 # mode name # # first: argument of --dbthresholds, it it exists # second: --name2 # third: --name if (ref($params{dbthresholds}) eq 'ARRAY') { my $marker; foreach (@{$params{dbthresholds}}) { if ($_->[0] eq $params{cmdlinemode}) { if (defined $_->[1] && $params{name0} && $_->[1] eq $params{name0}) { ($warning, $critical) = ($_->[2], $_->[3]); $marker = $params{name0}; last; } elsif (defined $_->[1] && $params{name2} && $_->[1] eq $params{name2}) { ($warning, $critical) = ($_->[2], $_->[3]); $marker = $params{name2}; last; } elsif (defined $_->[1] && $params{name} && $_->[1] eq $params{name}) { ($warning, $critical) = ($_->[2], $_->[3]); $marker = $params{name}; last; } } } if ($warning) { $self->{warningrange} = $warning; $self->trace("read warningthreshold %s for %s from database", $marker, $warning); } if ($critical) { $self->{criticalrange} = $critical; $self->trace("read criticalthreshold %s for %s from database", $marker, $critical); } } } sub debug { my $self = shift; my $msg = shift; if ($DBD::MySQL::Server::verbose) { printf "%s %s\n", $msg, ref($self); } } sub dbconnect { my $self = shift; my %params = @_; my $retval = undef; $self->{tic} = Time::HiRes::time(); $self->{handle} = DBD::MySQL::Server::Connection->new(%params); if ($self->{handle}->{errstr}) { if ($params{mode} =~ /^server::tnsping/ && $self->{handle}->{errstr} =~ /ORA-01017/) { $self->add_nagios($ERRORS{OK}, sprintf "connection established to %s.", $self->{connect}); $retval = undef; } elsif ($self->{handle}->{errstr} eq "alarm\n") { $self->add_nagios($ERRORS{CRITICAL}, sprintf "connection could not be established within %d seconds", $self->{timeout}); } else { $self->add_nagios($ERRORS{CRITICAL}, sprintf "cannot connect to %s. %s", $self->{database}, $self->{handle}->{errstr}); $retval = undef; } } else { $retval = $self->{handle}; } $self->{tac} = Time::HiRes::time(); return $retval; } sub trace { my $self = shift; my $format = shift; $self->{trace} = -f "/tmp/check_mysql_health.trace" ? 1 : 0; if ($self->{verbose}) { printf("%s: ", scalar localtime); printf($format, @_); } if ($self->{trace}) { my $logfh = new IO::File; $logfh->autoflush(1); if ($logfh->open("/tmp/check_mysql_health.trace", "a")) { $logfh->printf("%s: ", scalar localtime); $logfh->printf($format, @_); $logfh->printf("\n"); $logfh->close(); } } } sub DESTROY { my $self = shift; my $handle1 = "null"; my $handle2 = "null"; if (defined $self->{handle}) { $handle1 = ref($self->{handle}); if (defined $self->{handle}->{handle}) { $handle2 = ref($self->{handle}->{handle}); } } $self->trace(sprintf "DESTROY %s with handle %s %s", ref($self), $handle1, $handle2); if (ref($self) eq "DBD::MySQL::Server") { } $self->trace(sprintf "DESTROY %s exit with handle %s %s", ref($self), $handle1, $handle2); if (ref($self) eq "DBD::MySQL::Server") { #printf "humpftata\n"; } } sub save_state { my $self = shift; my %params = @_; my $extension = ""; my $mode = $params{mode}; if ($params{connect} && $params{connect} =~ /(\w+)\/(\w+)@(\w+)/) { $params{connect} = $3; } elsif ($params{connect}) { # just to be sure $params{connect} =~ s/\//_/g; } if ($^O =~ /MSWin/) { $mode =~ s/::/_/g; $params{statefilesdir} = $self->system_vartmpdir(); } if (! -d $params{statefilesdir}) { eval { use File::Path; mkpath $params{statefilesdir}; }; } if ($@ || ! -w $params{statefilesdir}) { $self->add_nagios($ERRORS{CRITICAL}, sprintf "statefilesdir %s does not exist or is not writable\n", $params{statefilesdir}); return; } my $statefile = sprintf "%s_%s", $params{hostname}, $mode; $extension .= $params{differenciator} ? "_".$params{differenciator} : ""; $extension .= $params{socket} ? "_".$params{socket} : ""; $extension .= $params{port} ? "_".$params{port} : ""; $extension .= $params{database} ? "_".$params{database} : ""; $extension .= $params{tablespace} ? "_".$params{tablespace} : ""; $extension .= $params{datafile} ? "_".$params{datafile} : ""; $extension .= $params{name} ? "_".$params{name} : ""; $extension =~ s/\//_/g; $extension =~ s/\(/_/g; $extension =~ s/\)/_/g; $extension =~ s/\*/_/g; $extension =~ s/\s/_/g; $statefile .= $extension; $statefile = lc $statefile; $statefile = sprintf "%s/%s", $params{statefilesdir}, $statefile; if (open(STATE, ">$statefile")) { if ((ref($params{save}) eq "HASH") && exists $params{save}->{timestamp}) { $params{save}->{localtime} = scalar localtime $params{save}->{timestamp}; } printf STATE Data::Dumper::Dumper($params{save}); close STATE; } else { $self->add_nagios($ERRORS{CRITICAL}, sprintf "statefile %s is not writable", $statefile); } $self->debug(sprintf "saved %s to %s", Data::Dumper::Dumper($params{save}), $statefile); } sub load_state { my $self = shift; my %params = @_; my $extension = ""; my $mode = $params{mode}; if ($params{connect} && $params{connect} =~ /(\w+)\/(\w+)@(\w+)/) { $params{connect} = $3; } elsif ($params{connect}) { # just to be sure $params{connect} =~ s/\//_/g; } if ($^O =~ /MSWin/) { $mode =~ s/::/_/g; $params{statefilesdir} = $self->system_vartmpdir(); } my $statefile = sprintf "%s_%s", $params{hostname}, $mode; $extension .= $params{differenciator} ? "_".$params{differenciator} : ""; $extension .= $params{socket} ? "_".$params{socket} : ""; $extension .= $params{port} ? "_".$params{port} : ""; $extension .= $params{database} ? "_".$params{database} : ""; $extension .= $params{tablespace} ? "_".$params{tablespace} : ""; $extension .= $params{datafile} ? "_".$params{datafile} : ""; $extension .= $params{name} ? "_".$params{name} : ""; $extension =~ s/\//_/g; $extension =~ s/\(/_/g; $extension =~ s/\)/_/g; $extension =~ s/\*/_/g; $extension =~ s/\s/_/g; $statefile .= $extension; $statefile = lc $statefile; $statefile = sprintf "%s/%s", $params{statefilesdir}, $statefile; if ( -f $statefile) { our $VAR1; eval { require $statefile; }; if($@) { $self->add_nagios($ERRORS{CRITICAL}, sprintf "statefile %s is corrupt", $statefile); } $self->debug(sprintf "load %s", Data::Dumper::Dumper($VAR1)); return $VAR1; } else { return undef; } } sub valdiff { my $self = shift; my $pparams = shift; my %params = %{$pparams}; my @keys = @_; my $now = time; my $last_values = $self->load_state(%params) || eval { my $empty_events = {}; foreach (@keys) { $empty_events->{$_} = 0; } $empty_events->{timestamp} = 0; if ($params{lookback}) { $empty_events->{lookback_history} = {}; } $empty_events; }; foreach (@keys) { if ($params{lookback}) { # find a last_value in the history which fits lookback best # and overwrite $last_values->{$_} with historic data if (exists $last_values->{lookback_history}->{$_}) { foreach my $date (sort {$a <=> $b} keys %{$last_values->{lookback_history}->{$_}}) { if ($date >= ($now - $params{lookback})) { $last_values->{$_} = $last_values->{lookback_history}->{$_}->{$date}; $last_values->{timestamp} = $date; last; } else { delete $last_values->{lookback_history}->{$_}->{$date}; } } } } $last_values->{$_} = 0 if ! exists $last_values->{$_}; if ($self->{$_} >= $last_values->{$_}) { $self->{'delta_'.$_} = $self->{$_} - $last_values->{$_}; } else { # vermutlich db restart und zaehler alle auf null $self->{'delta_'.$_} = $self->{$_}; } $self->debug(sprintf "delta_%s %f", $_, $self->{'delta_'.$_}); } $self->{'delta_timestamp'} = $now - $last_values->{timestamp}; $params{save} = eval { my $empty_events = {}; foreach (@keys) { $empty_events->{$_} = $self->{$_}; } $empty_events->{timestamp} = $now; if ($params{lookback}) { $empty_events->{lookback_history} = $last_values->{lookback_history}; foreach (@keys) { $empty_events->{lookback_history}->{$_}->{$now} = $self->{$_}; } } $empty_events; }; $self->save_state(%params); } sub requires_version { my $self = shift; my $version = shift; my @instances = DBD::MySQL::Server::return_servers(); my $instversion = $instances[0]->{version}; if (! $self->version_is_minimum($version)) { $self->add_nagios($ERRORS{UNKNOWN}, sprintf "not implemented/possible for MySQL release %s", $instversion); } } sub version_is_minimum { # the current version is newer or equal my $self = shift; my $version = shift; my $newer = 1; my @instances = DBD::MySQL::Server::return_servers(); my @v1 = map { $_ eq "x" ? 0 : $_ } split(/\./, $version); my @v2 = split(/\./, $instances[0]->{version}); if (scalar(@v1) > scalar(@v2)) { push(@v2, (0) x (scalar(@v1) - scalar(@v2))); } elsif (scalar(@v2) > scalar(@v1)) { push(@v1, (0) x (scalar(@v2) - scalar(@v1))); } foreach my $pos (0..$#v1) { if ($v2[$pos] > $v1[$pos]) { $newer = 1; last; } elsif ($v2[$pos] < $v1[$pos]) { $newer = 0; last; } } #printf STDERR "check if %s os minimum %s\n", join(".", @v2), join(".", @v1); return $newer; } sub instance_thread { my $self = shift; my @instances = DBD::MySQL::Server::return_servers(); return $instances[0]->{thread}; } sub windows_server { my $self = shift; my @instances = DBD::MySQL::Server::return_servers(); if ($instances[0]->{os} =~ /Win/i) { return 1; } else { return 0; } } sub system_vartmpdir { my $self = shift; if ($^O =~ /MSWin/) { return $self->system_tmpdir(); } else { return "/var/tmp/check_mysql_health"; } } sub system_oldvartmpdir { my $self = shift; return "/tmp"; } sub system_tmpdir { my $self = shift; if ($^O =~ /MSWin/) { return $ENV{TEMP} if defined $ENV{TEMP}; return $ENV{TMP} if defined $ENV{TMP}; return File::Spec->catfile($ENV{windir}, 'Temp') if defined $ENV{windir}; return 'C:\Temp'; } else { return "/tmp"; } } package DBD::MySQL::Server::Connection; use strict; our @ISA = qw(DBD::MySQL::Server); my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 ); my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' ); sub new { my $class = shift; my %params = @_; my $self = { mode => $params{mode}, timeout => $params{timeout}, access => $params{method} || "dbi", hostname => $params{hostname}, database => $params{database} || "information_schema", port => $params{port}, socket => $params{socket}, username => $params{username}, password => $params{password}, mycnf => $params{mycnf}, mycnfgroup => $params{mycnfgroup}, handle => undef, }; bless $self, $class; if ($params{method} eq "dbi") { bless $self, "DBD::MySQL::Server::Connection::Dbi"; } elsif ($params{method} eq "mysql") { bless $self, "DBD::MySQL::Server::Connection::Mysql"; } elsif ($params{method} eq "sqlrelay") { bless $self, "DBD::MySQL::Server::Connection::Sqlrelay"; } $self->init(%params); return $self; } package DBD::MySQL::Server::Connection::Dbi; use strict; use Net::Ping; our @ISA = qw(DBD::MySQL::Server::Connection); my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 ); my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' ); sub init { my $self = shift; my %params = @_; my $retval = undef; if ($self->{mode} =~ /^server::tnsping/) { if (! $self->{connect}) { $self->{errstr} = "Please specify a database"; } else { $self->{sid} = $self->{connect}; $self->{username} ||= time; # prefer an existing user $self->{password} = time; } } else { if ( ($self->{hostname} ne 'localhost' && (! $self->{username} || ! $self->{password})) && (! $self->{mycnf}) ) { $self->{errstr} = "Please specify hostname, username and password or a .cnf file"; return undef; } $self->{dsn} = "DBI:mysql:"; $self->{dsn} .= sprintf "database=%s", $self->{database}; if ($self->{mycnf}) { $self->{dsn} .= sprintf ";mysql_read_default_file=%s", $self->{mycnf}; if ($self->{mycnfgroup}) { $self->{dsn} .= sprintf ";mysql_read_default_group=%s", $self->{mycnfgroup}; } } else { $self->{dsn} .= sprintf ";host=%s", $self->{hostname}; $self->{dsn} .= sprintf ";port=%s", $self->{port} unless $self->{socket} || $self->{hostname} eq 'localhost'; $self->{dsn} .= sprintf ";mysql_socket=%s", $self->{socket} if $self->{socket}; } } if (! exists $self->{errstr}) { eval { require DBI; use POSIX ':signal_h'; if ($^O =~ /MSWin/) { local $SIG{'ALRM'} = sub { die "alarm\n"; }; } else { my $mask = POSIX::SigSet->new( SIGALRM ); my $action = POSIX::SigAction->new( sub { die "alarm\n" ; }, $mask); my $oldaction = POSIX::SigAction->new(); sigaction(SIGALRM ,$action ,$oldaction ); } alarm($self->{timeout} - 1); # 1 second before the global unknown timeout if ($self->{handle} = DBI->connect( $self->{dsn}, $self->{username}, $self->{password}, { RaiseError => 0, AutoCommit => 0, PrintError => 0 })) { # $self->{handle}->do(q{ # ALTER SESSION SET NLS_NUMERIC_CHARACTERS=".," }); $retval = $self; } else { $self->{errstr} = DBI::errstr(); } }; if ($@) { $self->{errstr} = $@; $retval = undef; } } $self->{tac} = Time::HiRes::time(); return $retval; } sub selectrow_hashref { my $self = shift; my $sql = shift; my @arguments = @_; my $sth = undef; my $hashref = undef; eval { $self->trace(sprintf "SQL:\n%s\nARGS:\n%s\n", $sql, Data::Dumper::Dumper(\@arguments)); # helm auf! jetzt wirds dreckig. if ($sql =~ /^\s*SHOW/) { $hashref = $self->{handle}->selectrow_hashref($sql); } else { $sth = $self->{handle}->prepare($sql); if (scalar(@arguments)) { $sth->execute(@arguments); } else { $sth->execute(); } $hashref = $sth->selectrow_hashref(); } $self->trace(sprintf "RESULT:\n%s\n", Data::Dumper::Dumper($hashref)); }; if ($@) { $self->debug(sprintf "bumm %s", $@); } if (-f "/tmp/check_mysql_health_simulation/".$self->{mode}) { my $simulation = do { local (@ARGV, $/) = "/tmp/check_mysql_health_simulation/".$self->{mode}; <> }; # keine lust auf den scheiss } return $hashref; } sub fetchrow_array { my $self = shift; my $sql = shift; my @arguments = @_; my $sth = undef; my @row = (); eval { $self->trace(sprintf "SQL:\n%s\nARGS:\n%s\n", $sql, Data::Dumper::Dumper(\@arguments)); $sth = $self->{handle}->prepare($sql); if (scalar(@arguments)) { $sth->execute(@arguments); } else { $sth->execute(); } @row = $sth->fetchrow_array(); $self->trace(sprintf "RESULT:\n%s\n", Data::Dumper::Dumper(\@row)); }; if ($@) { $self->debug(sprintf "bumm %s", $@); } if (-f "/tmp/check_mysql_health_simulation/".$self->{mode}) { my $simulation = do { local (@ARGV, $/) = "/tmp/check_mysql_health_simulation/".$self->{mode}; <> }; @row = split(/\s+/, (split(/\n/, $simulation))[0]); } return $row[0] unless wantarray; return @row; } sub fetchall_array { my $self = shift; my $sql = shift; my @arguments = @_; my $sth = undef; my $rows = undef; eval { $self->trace(sprintf "SQL:\n%s\nARGS:\n%s\n", $sql, Data::Dumper::Dumper(\@arguments)); $sth = $self->{handle}->prepare($sql); if (scalar(@arguments)) { $sth->execute(@arguments); } else { $sth->execute(); } $rows = $sth->fetchall_arrayref(); $self->trace(sprintf "RESULT:\n%s\n", Data::Dumper::Dumper($rows)); }; if ($@) { printf STDERR "bumm %s\n", $@; } if (-f "/tmp/check_mysql_health_simulation/".$self->{mode}) { my $simulation = do { local (@ARGV, $/) = "/tmp/check_mysql_health_simulation/".$self->{mode}; <> }; @{$rows} = map { [ split(/\s+/, $_) ] } split(/\n/, $simulation); } return @{$rows}; } sub func { my $self = shift; $self->{handle}->func(@_); } sub execute { my $self = shift; my $sql = shift; eval { my $sth = $self->{handle}->prepare($sql); $sth->execute(); }; if ($@) { printf STDERR "bumm %s\n", $@; } } sub errstr { my $self = shift; return $self->{errstr}; } sub DESTROY { my $self = shift; $self->trace(sprintf "disconnecting DBD %s", $self->{handle} ? "with handle" : "without handle"); $self->{handle}->disconnect() if $self->{handle}; } package DBD::MySQL::Server::Connection::Mysql; use strict; use File::Temp qw/tempfile/; our @ISA = qw(DBD::MySQL::Server::Connection); my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 ); my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' ); sub init { my $self = shift; my %params = @_; my $retval = undef; $self->{loginstring} = "traditional"; ($self->{sql_commandfile_handle}, $self->{sql_commandfile}) = tempfile($self->{mode}."XXXXX", SUFFIX => ".sql", DIR => $self->system_tmpdir() ); close $self->{sql_commandfile_handle}; ($self->{sql_resultfile_handle}, $self->{sql_resultfile}) = tempfile($self->{mode}."XXXXX", SUFFIX => ".out", DIR => $self->system_tmpdir() ); close $self->{sql_resultfile_handle}; if ($self->{mode} =~ /^server::tnsping/) { if (! $self->{connect}) { $self->{errstr} = "Please specify a database"; } else { $self->{sid} = $self->{connect}; $self->{username} ||= time; # prefer an existing user $self->{password} = time; } } else { if (! $self->{username} || ! $self->{password}) { $self->{errstr} = "Please specify database, username and password"; return undef; } elsif (! (($self->{hostname} && $self->{port}) || $self->{socket})) { $self->{errstr} = "Please specify hostname and port or socket"; return undef; } } if (! exists $self->{errstr}) { eval { my $mysql = '/'.'usr'.'/'.'bin'.'/'.'mysql'; if (! -x $mysql) { die "nomysql\n"; } if ($self->{loginstring} eq "traditional") { $self->{sqlplus} = sprintf "%s ", $mysql; $self->{sqlplus} .= sprintf "--batch --raw --skip-column-names "; $self->{sqlplus} .= sprintf "--database=%s ", $self->{database}; $self->{sqlplus} .= sprintf "--host=%s ", $self->{hostname}; $self->{sqlplus} .= sprintf "--port=%s ", $self->{port} unless $self->{socket} || $self->{hostname} eq "localhost"; $self->{sqlplus} .= sprintf "--socket=%s ", $self->{socket} if $self->{socket}; $self->{sqlplus} .= sprintf "--user=%s --password=%s < %s > %s", $self->{username}, $self->{password}, $self->{sql_commandfile}, $self->{sql_resultfile}; } use POSIX ':signal_h'; if ($^O =~ /MSWin/) { local $SIG{'ALRM'} = sub { die "alarm\n"; }; } else { my $mask = POSIX::SigSet->new( SIGALRM ); my $action = POSIX::SigAction->new( sub { die "alarm\n" ; }, $mask); my $oldaction = POSIX::SigAction->new(); sigaction(SIGALRM ,$action ,$oldaction ); } alarm($self->{timeout} - 1); # 1 second before the global unknown timeout my $answer = $self->fetchrow_array( q{ SELECT 42 FROM dual}); die unless defined $answer and $answer == 42; $retval = $self; }; if ($@) { $self->{errstr} = $@; $self->{errstr} =~ s/at $0 .*//g; chomp $self->{errstr}; $retval = undef; } } $self->{tac} = Time::HiRes::time(); return $retval; } sub selectrow_hashref { my $self = shift; my $sql = shift; my @arguments = @_; my $sth = undef; my $hashref = undef; foreach (@arguments) { # replace the ? by the parameters if (/^\d+$/) { $sql =~ s/\?/$_/; } else { $sql =~ s/\?/'$_'/; } } if ($sql =~ /^\s*SHOW/) { $sql .= '\G'; # http://dev.mysql.com/doc/refman/5.1/de/show-slave-status.html } $self->trace(sprintf "SQL (? resolved):\n%s\nARGS:\n%s\n", $sql, Data::Dumper::Dumper(\@arguments)); $self->create_commandfile($sql); my $exit_output = `$self->{sqlplus}`; if ($?) { printf STDERR "fetchrow_array exit bumm \n"; my $output = do { local (@ARGV, $/) = $self->{sql_resultfile}; <> }; my @oerrs = map { /((ERROR \d+).*)/ ? $1 : (); } split(/\n/, $output); $self->{errstr} = join(" ", @oerrs); } else { my $output = do { local (@ARGV, $/) = $self->{sql_resultfile}; <> }; if ($sql =~ /^\s*SHOW/) { map { if (/^\s*([\w_]+):\s*(.*)/) { $hashref->{$1} = $2; } } split(/\n/, $output); } else { # i dont mess around here and you shouldn't either } $self->trace(sprintf "RESULT:\n%s\n", Data::Dumper::Dumper($hashref)); } unlink $self->{sql_commandfile}; unlink $self->{sql_resultfile}; return $hashref; } sub fetchrow_array { my $self = shift; my $sql = shift; my @arguments = @_; my $sth = undef; my @row = (); foreach (@arguments) { # replace the ? by the parameters if (/^\d+$/) { $sql =~ s/\?/$_/; } else { $sql =~ s/\?/'$_'/; } } $self->trace(sprintf "SQL (? resolved):\n%s\nARGS:\n%s\n", $sql, Data::Dumper::Dumper(\@arguments)); $self->create_commandfile($sql); my $exit_output = `$self->{sqlplus}`; if ($?) { printf STDERR "fetchrow_array exit bumm \n"; my $output = do { local (@ARGV, $/) = $self->{sql_resultfile}; <> }; my @oerrs = map { /((ERROR \d+).*)/ ? $1 : (); } split(/\n/, $output); $self->{errstr} = join(" ", @oerrs); } else { my $output = do { local (@ARGV, $/) = $self->{sql_resultfile}; <> }; @row = map { convert($_) } map { s/^\s+([\.\d]+)$/$1/g; $_ } # strip leading space from numbers map { s/\s+$//g; $_ } # strip trailing space split(/\t/, (split(/\n/, $output))[0]); $self->trace(sprintf "RESULT:\n%s\n", Data::Dumper::Dumper(\@row)); } if ($@) { $self->debug(sprintf "bumm %s", $@); } unlink $self->{sql_commandfile}; unlink $self->{sql_resultfile}; return $row[0] unless wantarray; return @row; } sub fetchall_array { my $self = shift; my $sql = shift; my @arguments = @_; my $sth = undef; my $rows = undef; foreach (@arguments) { # replace the ? by the parameters if (/^\d+$/) { $sql =~ s/\?/$_/; } else { $sql =~ s/\?/'$_'/; } } $self->trace(sprintf "SQL (? resolved):\n%s\nARGS:\n%s\n", $sql, Data::Dumper::Dumper(\@arguments)); $self->create_commandfile($sql); my $exit_output = `$self->{sqlplus}`; if ($?) { printf STDERR "fetchrow_array exit bumm %s\n", $exit_output; my $output = do { local (@ARGV, $/) = $self->{sql_resultfile}; <> }; my @oerrs = map { /((ERROR \d+).*)/ ? $1 : (); } split(/\n/, $output); $self->{errstr} = join(" ", @oerrs); } else { my $output = do { local (@ARGV, $/) = $self->{sql_resultfile}; <> }; my @rows = map { [ map { convert($_) } map { s/^\s+([\.\d]+)$/$1/g; $_ } map { s/\s+$//g; $_ } split /\t/ ] } grep { ! /^\d+ rows selected/ } grep { ! /^Elapsed: / } grep { ! /^\s*$/ } split(/\n/, $output); $rows = \@rows; $self->trace(sprintf "RESULT:\n%s\n", Data::Dumper::Dumper($rows)); } if ($@) { $self->debug(sprintf "bumm %s", $@); } unlink $self->{sql_commandfile}; unlink $self->{sql_resultfile}; return @{$rows}; } sub func { my $self = shift; my $function = shift; $self->{handle}->func(@_); } sub convert { my $n = shift; # mostly used to convert numbers in scientific notation if ($n =~ /^\s*\d+\s*$/) { return $n; } elsif ($n =~ /^\s*([-+]?)(\d*[\.,]*\d*)[eE]{1}([-+]?)(\d+)\s*$/) { my ($vor, $num, $sign, $exp) = ($1, $2, $3, $4); $n =~ s/E/e/g; $n =~ s/,/\./g; $num =~ s/,/\./g; my $sig = $sign eq '-' ? "." . ($exp - 1 + length $num) : ''; my $dec = sprintf "%${sig}f", $n; $dec =~ s/\.[0]+$//g; return $dec; } elsif ($n =~ /^\s*([-+]?)(\d+)[\.,]*(\d*)\s*$/) { return $1.$2.".".$3; } elsif ($n =~ /^\s*(.*?)\s*$/) { return $1; } else { return $n; } } sub execute { my $self = shift; my $sql = shift; eval { my $sth = $self->{handle}->prepare($sql); $sth->execute(); }; if ($@) { printf STDERR "bumm %s\n", $@; } } sub errstr { my $self = shift; return $self->{errstr}; } sub DESTROY { my $self = shift; $self->trace("try to clean up command and result files"); unlink $self->{sql_commandfile} if -f $self->{sql_commandfile}; unlink $self->{sql_resultfile} if -f $self->{sql_resultfile}; } sub create_commandfile { my $self = shift; my $sql = shift; open CMDCMD, "> $self->{sql_commandfile}"; printf CMDCMD "%s\n", $sql; close CMDCMD; } package DBD::MySQL::Server::Connection::Sqlrelay; use strict; use Net::Ping; our @ISA = qw(DBD::MySQL::Server::Connection); sub init { my $self = shift; my %params = @_; my $retval = undef; if ($self->{mode} =~ /^server::tnsping/) { if (! $self->{connect}) { $self->{errstr} = "Please specify a database"; } else { if ($self->{connect} =~ /([\.\w]+):(\d+)/) { $self->{host} = $1; $self->{port} = $2; $self->{socket} = ""; } elsif ($self->{connect} =~ /([\.\w]+):([\w\/]+)/) { $self->{host} = $1; $self->{socket} = $2; $self->{port} = ""; } } } else { if (! $self->{hostname} || ! $self->{username} || ! $self->{password}) { if ($self->{hostname} && $self->{hostname} =~ /(\w+)\/(\w+)@([\.\w]+):(\d+)/) { $self->{username} = $1; $self->{password} = $2; $self->{hostname} = $3; $self->{port} = $4; $self->{socket} = ""; } elsif ($self->{hostname} && $self->{hostname} =~ /(\w+)\/(\w+)@([\.\w]+):([\w\/]+)/) { $self->{username} = $1; $self->{password} = $2; $self->{hostname} = $3; $self->{socket} = $4; $self->{port} = ""; } else { $self->{errstr} = "Please specify database, username and password"; return undef; } } else { if ($self->{hostname} =~ /([\.\w]+):(\d+)/) { $self->{hostname} = $1; $self->{port} = $2; $self->{socket} = ""; } elsif ($self->{hostname} =~ /([\.\w]+):([\w\/]+)/) { $self->{hostname} = $1; $self->{socket} = $2; $self->{port} = ""; } else { $self->{errstr} = "Please specify hostname, username, password and port/socket"; return undef; } } } if (! exists $self->{errstr}) { eval { require DBI; use POSIX ':signal_h'; if ($^O =~ /MSWin/) { local $SIG{'ALRM'} = sub { die "alarm\n"; }; } else { my $mask = POSIX::SigSet->new( SIGALRM ); my $action = POSIX::SigAction->new( sub { die "alarm\n" ; }, $mask); my $oldaction = POSIX::SigAction->new(); sigaction(SIGALRM ,$action ,$oldaction ); } alarm($self->{timeout} - 1); # 1 second before the global unknown timeout if ($self->{handle} = DBI->connect( sprintf("DBI:SQLRelay:host=%s;port=%d;socket=%s", $self->{hostname}, $self->{port}, $self->{socket}), $self->{username}, $self->{password}, { RaiseError => 1, AutoCommit => 0, PrintError => 1 })) { $retval = $self; if ($self->{mode} =~ /^server::tnsping/ && $self->{handle}->ping()) { # database connected. fake a "unknown user" $self->{errstr} = "ORA-01017"; } } else { $self->{errstr} = DBI::errstr(); } }; if ($@) { $self->{errstr} = $@; $self->{errstr} =~ s/at [\w\/\.]+ line \d+.*//g; $retval = undef; } } $self->{tac} = Time::HiRes::time(); return $retval; } sub fetchrow_array { my $self = shift; my $sql = shift; my @arguments = @_; my $sth = undef; my @row = (); $self->trace(sprintf "fetchrow_array: %s", $sql); eval { $sth = $self->{handle}->prepare($sql); if (scalar(@arguments)) { $sth->execute(@arguments); } else { $sth->execute(); } @row = $sth->fetchrow_array(); }; if ($@) { $self->debug(sprintf "bumm %s", $@); } if (-f "/tmp/check_mysql_health_simulation/".$self->{mode}) { my $simulation = do { local (@ARGV, $/) = "/tmp/check_mysql_health_simulation/".$self->{mode}; <> }; @row = split(/\s+/, (split(/\n/, $simulation))[0]); } return $row[0] unless wantarray; return @row; } sub fetchall_array { my $self = shift; my $sql = shift; my @arguments = @_; my $sth = undef; my $rows = undef; $self->trace(sprintf "fetchall_array: %s", $sql); eval { $sth = $self->{handle}->prepare($sql); if (scalar(@arguments)) { $sth->execute(@arguments); } else { $sth->execute(); } $rows = $sth->fetchall_arrayref(); }; if ($@) { printf STDERR "bumm %s\n", $@; } if (-f "/tmp/check_mysql_health_simulation/".$self->{mode}) { my $simulation = do { local (@ARGV, $/) = "/tmp/check_mysql_health_simulation/".$self->{mode}; <> }; @{$rows} = map { [ split(/\s+/, $_) ] } split(/\n/, $simulation); } return @{$rows}; } sub func { my $self = shift; $self->{handle}->func(@_); } sub execute { my $self = shift; my $sql = shift; eval { my $sth = $self->{handle}->prepare($sql); $sth->execute(); }; if ($@) { printf STDERR "bumm %s\n", $@; } } sub DESTROY { my $self = shift; #$self->trace(sprintf "disconnecting DBD %s", # $self->{handle} ? "with handle" : "without handle"); #$self->{handle}->disconnect() if $self->{handle}; } 1; ././@LongLink0000644000000000000000000000016412262515411011642 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagios/Extraopts.pmnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Nagi0000644000000000000000000000522412262515026027640 0ustar package Extraopts; use strict; use File::Basename; use Data::Dumper; sub new { my $class = shift; my %params = @_; my $self = { file => $params{file}, commandline => $params{commandline}, config => {}, section => 'default_no_section', }; bless $self, $class; $self->prepare_file_and_section(); $self->init(); return $self; } sub prepare_file_and_section { my $self = shift; if (! defined $self->{file}) { # ./check_stuff --extra-opts $self->{section} = basename($0); $self->{file} = $self->get_default_file(); } elsif ($self->{file} =~ /^[^@]+$/) { # ./check_stuff --extra-opts=special_opts $self->{section} = $self->{file}; $self->{file} = $self->get_default_file(); } elsif ($self->{file} =~ /^@(.*)/) { # ./check_stuff --extra-opts=@/etc/myconfig.ini $self->{section} = basename($0); $self->{file} = $1; } elsif ($self->{file} =~ /^(.*?)@(.*)/) { # ./check_stuff --extra-opts=special_opts@/etc/myconfig.ini $self->{section} = $1; $self->{file} = $2; } } sub get_default_file { my $self = shift; foreach my $default (qw(/etc/nagios/plugins.ini /usr/local/nagios/etc/plugins.ini /usr/local/etc/nagios/plugins.ini /etc/opt/nagios/plugins.ini /etc/nagios-plugins.ini /usr/local/etc/nagios-plugins.ini /etc/opt/nagios-plugins.ini)) { if (-f $default) { return $default; } } return undef; } sub init { my $self = shift; if (! defined $self->{file}) { $self->{errors} = sprintf 'no extra-opts file specified and no default file found'; } elsif (! -f $self->{file}) { $self->{errors} = sprintf 'could not open %s', $self->{file}; } else { my $data = do { local (@ARGV, $/) = $self->{file}; <> }; my $in_section = 'default_no_section'; foreach my $line (split(/\n/, $data)) { if ($line =~ /\[(.*)\]/) { $in_section = $1; } elsif ($line =~ /(.*?)\s*=\s*(.*)/) { $self->{config}->{$in_section}->{$1} = $2; } } } } sub is_valid { my $self = shift; return ! exists $self->{errors}; } sub overwrite { my $self = shift; my %commandline = (); if (scalar(keys %{$self->{config}->{default_no_section}}) > 0) { foreach (keys %{$self->{config}->{default_no_section}}) { $commandline{$_} = $self->{config}->{default_no_section}->{$_}; } } if (exists $self->{config}->{$self->{section}}) { foreach (keys %{$self->{config}->{$self->{section}}}) { $commandline{$_} = $self->{config}->{$self->{section}}->{$_}; } } foreach (keys %commandline) { if (! exists $self->{commandline}->{$_}) { $self->{commandline}->{$_} = $commandline{$_}; } } } ././@LongLink0000644000000000000000000000015112262515411011636 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/subst.innagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/subs0000644000000000000000000000250512262515026027735 0ustar #!/usr/bin/awk function which(c,path) { cmd = "test -x " c; if (system(cmd)==0) { return c; } sub(/\/.*\//,"",c); for (dir in path) { cmd = "test -x " path[dir] "/" c; if (system(cmd)==0) { return path[dir] "/" c; } } return c; } # used to replace "use lib utils.pm" with "use lib @libexecdir" # function led() { led1 = "@libexecdir@"; led2 = "@exec_prefix@"; led3 = "@prefix@"; if ( match(led1, /^\$\{exec_prefix\}/ ) != 0 ) { return "\"" led3 "/libexec\" " ; } return "\"" led1 "\"" ; } BEGIN { split(ENVIRON["PATH"] ":/sbin:/usr/sbin",path,/:/); } # scripting language (first line) /^#! ?\/.*\/python/ {sub(/^#! ?\/.*\/python/,"#! @PYTHON@");} /^#! ?\/.*\/perl/ {sub(/^#! ?\/.*\/perl/,"#! @PERL@");} /^#! ?\/.*\/[a-z]{0,2}awk/ {sub(/^#! ?\/.*\/[a-z]{0,2}awk/,"#! @AWK@");} /^#! ?\/.*\/sh/ {sub(/^#! ?\/.*\/sh/,"#! @SHELL@");} # add to libexecdir to INC for perl utils.pm /^use/ { if (/lib/) { if (/utils.pm|"."/ ) {sub(/utils.pm|"."/,led() )} } } # Replace the placeholders with the values from configure /#PERL#/ {sub(/#PERL#/,"@PERL@");} /#GZIP#/ {sub(/#GZIP#/,"@GZIP@");} /#STATEFILES_DIR#/ {sub(/#STATEFILES_DIR#/,"@STATEFILES_DIR@");} /#PACKAGE_VERSION#/ {sub(/#PACKAGE_VERSION#/,"@PACKAGE_VERSION@");} /#MYMODULES_DYN_DIR#/ {sub(/#MYMODULES_DYN_DIR#/,"@MYMODULES_DYN_DIR@");} { print; } ././@LongLink0000644000000000000000000000015412262515411011641 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Makefile.innagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/plugins-scripts/Make0000644000000000000000000002470312262515026027642 0ustar # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins-scripts DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/subst.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = subst am__installdirs = "$(DESTDIR)$(libexecdir)" libexecSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(libexec_SCRIPTS) SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) VPATH = $(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAT = @CAT@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ GREP = @GREP@ GZIP = @GZIP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_OPTS = @INSTALL_OPTS@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MYMODULES_DIR = @MYMODULES_DIR@ MYMODULES_DYN_DIR = @MYMODULES_DYN_DIR@ 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@ PERL = @PERL@ RELEASE = @RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH = @SH@ SHELL = @SHELL@ STATEFILES_DIR = @STATEFILES_DIR@ STRIP = @STRIP@ SUPPORT = @SUPPORT@ VERSION = @VERSION@ WARRANTY = @WARRANTY@ ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ 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@ SUFFIXES = .pl .pm .sh libexec_SCRIPTS = check_mysql_health MY_MODULES = EXTRA_MODULES = \ Nagios/DBD/MySQL/Server/Instance/Innodb.pm \ Nagios/DBD/MySQL/Server/Instance/Myisam.pm \ Nagios/DBD/MySQL/Server/Instance/Replication.pm \ Nagios/DBD/MySQL/Server/Instance.pm \ Nagios/DBD/MySQL/Server.pm \ Nagios/DBD/MySQL/Cluster.pm \ Nagios/Extraopts.pm EXTRA_DIST = check_mysql_health.pl $(EXTRA_MODULES) CLEANFILES = $(libexec_SCRIPTS) AM_INSTALL_PROGRAM_FLAGS = @INSTALL_OPTS@ all: all-am .SUFFIXES: .SUFFIXES: .pl .pm .sh $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins-scripts/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins-scripts/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh subst: $(top_builddir)/config.status $(srcdir)/subst.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libexecSCRIPTS: $(libexec_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(libexecdir)" || $(mkdir_p) "$(DESTDIR)$(libexecdir)" @list='$(libexec_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(libexecSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \ $(libexecSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(libexecdir)/$$f"; \ else :; fi; \ done uninstall-libexecSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(libexec_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \ rm -f "$(DESTDIR)$(libexecdir)/$$f"; \ done uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) $(mkdir_p) $(distdir)/Nagios $(distdir)/Nagios/DBD/MySQL $(distdir)/Nagios/DBD/MySQL/Server $(distdir)/Nagios/DBD/MySQL/Server/Instance @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(libexecdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libexecSCRIPTS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-libexecSCRIPTS .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ install-libexecSCRIPTS install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \ uninstall-libexecSCRIPTS .pm : $(AWK) -f ./subst $< > $@ chmod +x $@ .pl : $(AWK) -f ./subst $< > $@ chmod +x $@ .sh : $(AWK) -f ./subst $< > $@ chmod +x $@ $(libexec_SCRIPTS) : $(EXTRA_DIST) $(ECHO) "#! #PERL# -w" | $(AWK) -f ./subst > $@ $(ECHO) "# nagios: -epn" >> $@ $(ECHO) >> $@ $(ECHO) "my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 );" >> $@ $(ECHO) "my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' );" >> $@ for m in ${EXTRA_MODULES}; do \ $(SED) -e 's/^1;//g' < $$m | $(AWK) -f ./subst | $(GREP) -v "my %ERROR" >> $@; \ done if [ -d "${MYMODULES_DIR}" ]; then \ for m in ${MYMODULES_DIR}/CheckMySQLHealthExt*.pm; do \ if [ -f $$m ]; then \ $(ECHO) found $$m; \ $(SED) -e 's/^1;//g' < $$m | $(AWK) -f ./subst | $(GREP) -v "my %ERROR" >> $@; \ fi \ done \ fi $(CAT) check_mysql_health.pl | $(GREP) -v "^use Nagios" | $(GREP) -v "^my %ERROR" | $(AWK) -f ./subst >> $@ chmod +x $@ # 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: nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/NEWS0000644000000000000000000000005112262515026024361 0ustar buy a newspaper if you want to read news nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/t/0000755000000000000000000000000012262515026024131 5ustar nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/t/Makefile.am0000644000000000000000000000076512262515026026175 0ustar ## ## Process this file with automake to produce Makefile.in ## AUTOMAKE_OPTIONS = 1.3 no-dependencies #all: tests TEST_VERBOSE=0 TEST_TYPE=test_$(LINKTYPE) TEST_FILE = test.pl TEST_FILES = *.t TESTDB_SW = -d #EXTRA_DIST = *.t bin var etc EXTRA_DIST = *.t tests: $(PERL) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE))" $(TEST_FILES) # PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES) ././@LongLink0000644000000000000000000000014712262515411011643 Lustar rootrootnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/t/check_mysql_health.tnagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/t/check_mysql_health0000644000000000000000000001572212262515026027712 0ustar #! /usr/bin/perl -w -I .. # # MySQL Database Server Tests via check_mysql_healthdb # # # These are the database permissions required for this test: # GRANT SELECT ON $db.* TO $user@$host INDENTIFIED BY '$password'; # GRANT SUPER, REPLICATION CLIENT ON *.* TO $user@$host; # Check with: # mysql -u$user -p$password -h$host $db use strict; use Test::More; use NPTest; use vars qw($tests); plan skip_all => "check_mysql_health not compiled" unless (-x "./check_mysql_health"); plan tests => 51; my $bad_login_output = '/Access denied for user /'; my $mysqlserver = getTestParameter( "NP_MYSQL_SERVER", "A MySQL Server with no slaves setup" ); my $mysql_login_details = getTestParameter( "MYSQL_LOGIN_DETAILS", "Command line parameters to specify login access", "-u user -ppw -d db", ); my $with_slave = getTestParameter( "NP_MYSQL_WITH_SLAVE", "MySQL server with slaves setup" ); my $with_slave_login = getTestParameter( "NP_MYSQL_WITH_SLAVE_LOGIN", "Login details for server with slave", "-uroot -ppw" ); my $result; SKIP: { $result = NPTest->testCmd("./check_mysql_health -V"); cmp_ok( $result->return_code, '==', 0, "expected result"); like( $result->output, "/check_mysql_health \\(\\d+\\.\\d+\\)/", "Expected message"); $result = NPTest->testCmd("./check_mysql_health --help"); cmp_ok( $result->return_code, '==', 0, "expected result"); like( $result->output, "/slave-lag/", "Expected message"); like( $result->output, "/slave-io-running/", "Expected message"); like( $result->output, "/slave-sql-running/", "Expected message"); like( $result->output, "/threads-connected/", "Expected message"); like( $result->output, "/threadcache-hitrate/", "Expected message"); like( $result->output, "/querycache-hitrate/", "Expected message"); like( $result->output, "/keycache-hitrate/", "Expected message"); like( $result->output, "/bufferpool-hitrate/", "Expected message"); like( $result->output, "/tablecache-hitrate/", "Expected message"); like( $result->output, "/table-lock-contention/", "Expected message"); like( $result->output, "/temp-disk-tables/", "Expected message"); like( $result->output, "/connection-time/", "Expected message"); like( $result->output, "/slow-queries/", "Expected message"); like( $result->output, "/qcache-lowmem-prunes/", "Expected message"); like( $result->output, "/bufferpool-wait-free/", "Expected message"); like( $result->output, "/log-waits/", "Expected message"); } SKIP: { $result = NPTest->testCmd("./check_mysql_health -H $mysqlserver -m connection-time -u dummy -pdummy"); cmp_ok( $result->return_code, '==', 2, "Login failure"); like( $result->output, "/CRITICAL - Cannot connect to database: Error: Access denied/", "Expected login failure message"); $result = NPTest->testCmd("./check_mysql_health"); cmp_ok( $result->return_code, "==", 3, "No mode defined" ); like( $result->output, "/Must specify a mode/", "Correct error message"); $result = NPTest->testCmd("./check_mysql_health -m connection-time -w 10 -c 30"); cmp_ok( $result->return_code, "==", 0, "Connected" ); like( $result->output, "/OK - Connection Time ([0-9\.]+) usecs|connection_time=([0-9\.]+);10;30/", "Correct error message"); $result = NPTest->testCmd("./check_mysql_health -m keycache-hitrate -w :10 -c 2"); cmp_ok( $result->return_code, "==", 2, "Connected" ); like( $result->output, "/CRITICAL - Key Cache Hitrate at ([0-9\.]+)%|keycache_hitrate=([0-9\.]+)%;:10;2/", "Correct error message"); $result = NPTest->testCmd("./check_mysql_health -m qcache-hitrate -w :10 -c 2"); cmp_ok( $result->return_code, "==", 2, "Connected" ); like( $result->output, "/CRITICAL - Query Cache Hitrate at ([0-9\.]+)%|qcache_hitrate=([0-9\.]+)%;:10;2/", "Correct error message"); $result = NPTest->testCmd("./check_mysql_health -m qcache-hitrate -w :10 -c 2 -v 2>&1"); cmp_ok( $result->return_code, "==", 2, "Connected" ); like( $result->output, "/NOTICE: we have results/", "Verbose output"); like( $result->output, "/CRITICAL - Query Cache Hitrate at ([0-9\.]+)%|qcache_hitrate=([0-9\.]+)%;:10;2/", "Correct error message"); } SKIP: { my $slow_queries_last = 0; my $slow_queries = 0; my $delta = 0; $result = NPTest->testCmd("./check_mysql_health -m slow-queries -w :10 -c 2"); sleep 1; $result = NPTest->testCmd("./check_mysql_health -m slow-queries -w :10 -c 2 -v 2>&1"); ok( $result->output =~ /Load variable Slow_queries \(([0-9]+)\) /); $slow_queries_last = $1; ok( $result->output =~ /Result column 1 returns value ([0-9]+) /); $slow_queries = $1; $delta = $slow_queries - $slow_queries_last; ok( $result->output =~ /OK - ([0-9]+) slow queries/); cmp_ok($1, "==", $delta); } SKIP: { # performance data $result = NPTest->testCmd("./check_mysql_health -m slow-queries -w :11 -c :22 -v 2>&1"); like( $result->output, "/slow_queries_rate=[0-9\.]+;:11;:22 slow_queries=[0-9]+;:11;:22/", "Correct error message"); $result = NPTest->testCmd("./check_mysql_health -m qcache-lowmem-prunes -w :11 -c :22 -v 2>&1"); like( $result->output, "/lowmem_prunes_rate=[0-9\.]+;:11;:22 lowmem_prunes=[0-9]+;:11;:22/", "Correct error message"); $result = NPTest->testCmd("./check_mysql_health -m bufferpool-wait-free -w :11 -c :22 -v 2>&1"); like( $result->output, "/bufferpool_free_waits_rate=[0-9\.]+;:11;:22 bufferpool_free_waits=[0-9]+;:11;:22/", "Correct error message"); $result = NPTest->testCmd("./check_mysql_health -m log-waits -w :11 -c :22 -v 2>&1"); like( $result->output, "/log_waits_rate=[0-9\.]+;:11;:22 log_waits=[0-9]+;:11;:22/", "Correct error message"); } SKIP: { skip "Has a slave server", 6 if $with_slave; $result = NPTest->testCmd("./check_mysql_health -m slave-lag"); cmp_ok( $result->return_code, "==", 2, "No slave" ); like( $result->output, "/CRITICAL - Slave lag NULL|slave_lag=0;10;20/", "Correct error message"); $result = NPTest->testCmd("./check_mysql_health -m slave-io-running"); cmp_ok( $result->return_code, "==", 2, "No slave" ); like( $result->output, "/CRITICAL - Slave io not running|slave_io_running=0/", "Correct error message"); $result = NPTest->testCmd("./check_mysql_health -m slave-sql-running"); cmp_ok( $result->return_code, "==", 2, "No slave" ); like( $result->output, "/CRITICAL - Slave sql not running|slave_io_running=0/", "Correct error message"); } SKIP: { skip "No mysql server with slaves defined", 5 unless $with_slave; $result = NPTest->testCmd("./check_mysql_health -H $with_slave $with_slave_login"); cmp_ok( $result->return_code, '==', 0, "Login okay"); $result = NPTest->testCmd("./check_mysql_health -S -H $with_slave $with_slave_login"); cmp_ok( $result->return_code, "==", 0, "Slaves okay" ); $result = NPTest->testCmd("./check_mysql_health -S -H $with_slave $with_slave_login -w 60"); cmp_ok( $result->return_code, '==', 0, 'Slaves are not > 60 seconds behind'); $result = NPTest->testCmd("./check_mysql_health -S -H $with_slave $with_slave_login -w 60:"); cmp_ok( $result->return_code, '==', 1, 'Alert warning if < 60 seconds behind'); like( $result->output, "/^SLOW_SLAVE WARNING:/", "Output okay"); } nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/t/Makefile.in0000644000000000000000000002000412262515026026172 0ustar # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = t DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAT = @CAT@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ GREP = @GREP@ GZIP = @GZIP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_OPTS = @INSTALL_OPTS@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MYMODULES_DIR = @MYMODULES_DIR@ MYMODULES_DYN_DIR = @MYMODULES_DYN_DIR@ 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@ PERL = @PERL@ RELEASE = @RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH = @SH@ SHELL = @SHELL@ STATEFILES_DIR = @STATEFILES_DIR@ STRIP = @STRIP@ SUPPORT = @SUPPORT@ VERSION = @VERSION@ WARRANTY = @WARRANTY@ ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ 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@ AUTOMAKE_OPTIONS = 1.3 no-dependencies #all: tests TEST_VERBOSE = 0 TEST_TYPE = test_$(LINKTYPE) TEST_FILE = test.pl TEST_FILES = *.t TESTDB_SW = -d #EXTRA_DIST = *.t bin var etc EXTRA_DIST = *.t all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu t/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu t/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am tests: $(PERL) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE))" $(TEST_FILES) # PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES) # 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: nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/configure.in0000644000000000000000000000652212262515026026204 0ustar dnl Process this file with autoconf to produce a configure script. AC_REVISION ($Revision: 1.150 $) AC_PREREQ(2.58) AC_INIT(check_mysql_health,2.1.8.2) AM_INIT_AUTOMAKE([1.9 tar-pax]) 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 AC_PROG_CC dnl AC_PROG_CPP dnl AC_PROG_GCC_TRADITIONAL dnl AC_PROG_RANLIB AC_PROG_MAKE_SET WARRANTY="This plugin comes with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of the plugin 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 gerhard.lausser@consol.de if you have questions\nregarding use of this software.\nPlease include version information with all correspondence (when possible,\nuse output from the --version option of the plugin itself).\n" AC_SUBST(SUPPORT) 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(statefiles_dir, ACX_HELP_STRING([--with-statefiles-dir=PATH], [sets directory for the state files (default=/var/tmp/check_mysql_health)]), with_statefiles_dir=$withval, with_statefiles_dir=/var/tmp/check_mysql_health) AC_SUBST(STATEFILES_DIR, $with_statefiles_dir) echo variable with_statefiles_dir is $with_statefiles_dir AC_ARG_WITH(mymodules_dir, ACX_HELP_STRING([--with-mymodules-dir=PATH], [sets directory for own extensions which will be included during the build process (default=/usr/local/nagios/libexec)]), with_mymodules_dir=$withval, with_mymodules_dir=/usr/local/nagios/libexec) AC_SUBST(MYMODULES_DIR, $with_mymodules_dir) echo variable with_mymodules_dir is $with_mymodules_dir AC_ARG_WITH(mymodules_dyn_dir, ACX_HELP_STRING([--with-mymodules-dyn-dir=PATH], [sets directory for own extensions which will be included at runtime (default=/usr/local/nagios/libexec)]), with_mymodules_dyn_dir=$withval, with_mymodules_dyn_dir=/usr/local/nagios/libexec) AC_SUBST(MYMODULES_DYN_DIR, $with_mymodules_dyn_dir) echo variable with_mymodules_dyn_dir is $with_mymodules_dyn_dir EXTRAS= dnl PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/local/sbin:$PATH dnl Checks for programs. AC_PATH_PROG(SH,sh) AC_PATH_PROG(PERL,perl) AC_PATH_PROG(GZIP,gzip) AC_PATH_PROGS(AWK,gawk nawk /usr/xpg4/bin/awk awk) AC_PATH_PROG(GREP,grep) AC_PATH_PROG(ECHO,echo) AC_PATH_PROG(SED,sed) AC_PATH_PROG(CAT,cat) 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_OUTPUT( Makefile plugins-scripts/Makefile plugins-scripts/subst t/Makefile ) ACX_FEATURE([with],[perl]) ACX_FEATURE([with],[statefiles-dir]) ACX_FEATURE([with],[nagios-user]) ACX_FEATURE([with],[nagios-group]) ACX_FEATURE([with],[mymodules-dir]) ACX_FEATURE([with],[mymodules-dyn-dir]) nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/ChangeLog0000644000000000000000000000613012262515026025440 0ustar ############################################### # Changelog of the check_mysql_health plugin # ############################################### 2.1.8.2 2012-08-08 - bugfix in querycache-hitrate (div by 0 after db restart). (Thanks Gianluca Varisco) 2.1.8.1 2012-01-21 - bugfix in timeout-alarm handling under windows - fix warnings for newest perl versions 2.1.8 2011-09-29 - new parameters --mycnf and --mycnfgroup - single ticks around the --name argument under Windows CMD will be removed auto matically 2.1.7 2011-08-23 - innodb modes now detect problems with the innodb engine 2.1.6 2011-08-12 - fix a bug with statefilesdir and capital letters - add --labelformat so that groundwork no longer complains (max label length is 19 characters) 2.1.5.2 2011-06-03 - sites in an OMD (http://omdistro.org) environment have now private statefile directories 2.1.5.1 2011-01-03 - bugfix in --mode sql (numeric vs. regexp result) 2.1.5 2010-12-20 - fixed a division by zero bug in index-usage (Thanks Wiltmut Gerdes) - fixed a severe bug when loading dynamic extensions (Thanks Ralph Schneider) - added mode table-fragmentation - fixed a bug in table-lock-contention (thanks mayukmok00) - mode sql can now have a non-numerical output which is compared to a string/regexp - new parameter --dbthresholds - new mode report can be used to output only the bad news (short,long,html) 2.1.4 2010-10-02 - added modes threads-created, threads-running, threads-cached - added connects-aborted, clients-aborted 2.1.3 2010-09-29 - added mode open-files - fix a bug in the pnp template - add extra-opts 2.1.2 2010-06-10 - changed statements for 4.x compatibility (show variables like) (Thanks Florian) 2.1.1 2010-03-30 - added more tracing (touch /tmp/check_mysql_health.trace to watch) - fixed a bug in master-slave modes, so it outputs a more meaningful error message (Thanks Will Oberman) - fixed a typo (Thanks Larsen) 2.1 - parameter --lookback uses custom intervals for _now-values 2.0.5 2009-09-21 - fixed another bug in master-slave modes. (Thanks Thomas Mueller) - fixed a bug in bufferpool-wait-free. (Thanks Matthias Flacke) - fixed a bug in the PNP template. (Thanks Matthias Flacke) - slave-lag now handles failed io threads. (Thanks Greg) - fixed a bug in connections with non-standard sockets (Thanks Stephan Huiser) 2.0.4 - fixed a bug in --mode cluster-ndbd-running where dead api nodes were overseen - fixed a bug in master-slave modes. (Thanks Arkadiusz Miskiewicz) 2.0.3 - fixed a bug with 0 warning/critical - fixed a bug in long-running-procs (affects only mysql 5.0 and below). (Thanks Bodo Schulz) 2.0.2 - $NAGIOS__HOSTMYSQL_HOST etc. is now possible 2.0.1 2009-03-09 - fixed a (harmless) bug which caused uninitialized-messages. (Thanks John Alberts & Thomas Borger) - enabled password-less login to localhost. 2.0 2009-03-06 - This is the first release of the new plugin check_mysql_health It replaces check_mysql_perf which is a nightmare to install It is written in Perl It can use either DBD::mysql, the mysql command or DBD::SQLrelay It can monitor mysql clusters (the ndb stuff) It can execute custom sql statements nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/missing0000755000000000000000000002466612262515026025303 0ustar #! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2003-09-02.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # 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. # 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. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/COPYING0000644000000000000000000004312712262515026024730 0ustar 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. nagios-plugins-contrib-9.20140106/check_mysql_health/check_mysql_health-2.1.8.2/Makefile.in0000644000000000000000000004332312262515026025740 0ustar # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # find . \( -type d -and -name .svn -and -prune \) -or -type f -exec fromdos -v {} \; srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS TODO config.guess config.sub install-sh \ missing subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = 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@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAT = @CAT@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ GREP = @GREP@ GZIP = @GZIP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_OPTS = @INSTALL_OPTS@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MYMODULES_DIR = @MYMODULES_DIR@ MYMODULES_DYN_DIR = @MYMODULES_DYN_DIR@ 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@ PERL = @PERL@ RELEASE = @RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SH = @SH@ SHELL = @SHELL@ STATEFILES_DIR = @STATEFILES_DIR@ STRIP = @STRIP@ SUPPORT = @SUPPORT@ VERSION = @VERSION@ WARRANTY = @WARRANTY@ ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ 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@ SUBDIRS = plugins-scripts t EXTRA_DIST = contrib all: 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) 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): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ 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) \ || eval $$failcom; \ 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: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ 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) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ 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) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/plugins-scripts @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='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (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 -755 -exec chmod a+rwx,go+rx {} \; -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 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | 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 tardir=$(distdir) && $(am__tar) | 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 | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.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" \ $(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 ../.. && umask 077 && mkdir "$$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 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-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-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-hook \ dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic 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: rm -f t/var/tmp/* rm -f t/var/adm/* find $(distdir) -depth -name .svn -exec rm -rf {} \; find $(distdir) -type f -exec fromdos -v {} \; make # 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: nagios-plugins-contrib-9.20140106/check_mysql_health/copyright0000644000000000000000000000133612262515026021171 0ustar AUTHOR: Gerhard Lausser 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. nagios-plugins-contrib-9.20140106/check_mysql_health/src0000777000000000000000000000000012262515026024320 2check_mysql_health-2.1.8.2ustar nagios-plugins-contrib-9.20140106/check_mysql_health/Makefile0000644000000000000000000000147212262515026020677 0ustar PLUGIN := check_mysql_health CLEANFILES := check_mysql_health include ../common.mk check_mysql_health: set -e; for i in guess sub; do if [ ! -e src/config.$$i.bak ]; then cp src/config.$$i src/config.$$i.bak; fi; done cp /usr/share/misc/config.* src cd src && ./configure --prefix=/usr --enable-perfdata --enable-extendedinfo --with-nagios-user=nagios --with-nagios-group=nagios --with-statefiles-dir=/var/cache/nagios/ --with-mymodules-dir=/usr/lib/nagios/plugins/ --with-mymodules-dyn-dir=/usr/lib/nagios/plugins/ make -C src cp src/plugins-scripts/check_mysql_health $@ # sed '2s,^,# nagios: -epn\n,' src/plugins-scripts/check_mysql_health > $@ clean:: [ ! -f src/Makefile ] || make -C src distclean set -e; for i in guess sub; do if [ -e src/config.$$i.bak ]; then mv src/config.$$i.bak src/config.$$i; fi; done nagios-plugins-contrib-9.20140106/check_zone_rrsig_expiration/0000755000000000000000000000000012262515026021164 5ustar nagios-plugins-contrib-9.20140106/check_zone_rrsig_expiration/zone-rrsig.cfg0000644000000000000000000000020212262515026023736 0ustar define command { command_name check_zone_rrsig command_line /usr/lib/nagios/plugins/check_zone_rrsig -Z $HOSTADDRESS$ } nagios-plugins-contrib-9.20140106/check_zone_rrsig_expiration/control0000644000000000000000000000065412262515026022574 0ustar Homepage: http://dns.measurement-factory.com/tools/nagios-plugins/check_zone_rrsig_expiration.html Watch: http://dns.measurement-factory.com/tools/nagios-plugins/src/check_zone_rrsig_expiration Id: check_zone_rrsig_expiration,v ([0-9.]+) Uploaders: Bernd Zeimetz Description: plugin to check for expiration of signatures in dnssec-enabled zones. Recommends: libnet-dns-perl, libnet-dns-sec-perl Version: 1.10 nagios-plugins-contrib-9.20140106/check_zone_rrsig_expiration/copyright0000644000000000000000000000272312262515026023123 0ustar Copyright (c) 2008, The Measurement Factory, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of The Measurement Factory nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. nagios-plugins-contrib-9.20140106/check_zone_rrsig_expiration/check_zone_rrsig_expiration0000644000000000000000000001706312262515026026676 0ustar #!/usr/bin/perl # $Id: check_zone_rrsig_expiration,v 1.10 2011/01/04 22:27:26 wessels Exp $ # # check_zone_rrsig_expiration # # nagios plugin to check expiration times of RRSIG records. Reminds # you if its time to re-sign your zone. # Copyright (c) 2008, The Measurement Factory, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # Neither the name of The Measurement Factory nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # usage # # define command { # command_name check-zone-rrsig # command_line /usr/local/libexec/nagios-local/check_zone_rrsig -Z $HOSTADDRESS$ # } # # define service { # name dns-rrsig-service # check_command check-zone-rrsig # ... # } # # define host { # use dns-zone # host_name zone.example.com # alias ZONE example.com # } # # define service { # use dns-rrsig-service # host_name zone.example.com # } use warnings; use strict; use Getopt::Std; use Net::DNS::Resolver; use Time::HiRes qw ( gettimeofday tv_interval); use Time::Local; use List::Util qw ( shuffle ); # options # -Z zone Zone to test # -t seconds DNS query timeout # -d debug # -C days Critical if expiring in this many days # -W days Warning if expiring in this many days my %opts = (t=>30, C=>2, W=>3); getopts('Z:dt:W:C:', \%opts); usage() unless $opts{Z}; usage() if $opts{h}; my $zone = $opts{Z}; $zone =~ s/^zone\.//; my $data; my $start; my $stop; my @refs = qw ( a.root-servers.net b.root-servers.net c.root-servers.net d.root-servers.net e.root-servers.net f.root-servers.net g.root-servers.net h.root-servers.net i.root-servers.net j.root-servers.net k.root-servers.net l.root-servers.net m.root-servers.net ); $start = [gettimeofday()]; do_recursion(); do_queries(); $stop = [gettimeofday()]; do_analyze(); sub do_recursion { my $done = 0; my $res = Net::DNS::Resolver->new; do { print STDERR "\nRECURSE\n" if $opts{d}; my $pkt; foreach my $ns (shuffle @refs) { print STDERR "sending query for $zone RRSIG to $ns\n" if $opts{d}; $res->nameserver($ns); $res->udp_timeout($opts{t}); $res->udppacketsize(4096); $pkt = $res->send($zone, 'RRSIG'); last if $pkt; } critical("No response to seed query") unless $pkt; critical($pkt->header->rcode . " from " . $pkt->answerfrom) unless ($pkt->header->rcode eq 'NOERROR'); @refs = (); foreach my $rr ($pkt->authority) { print STDERR $rr->string, "\n" if $opts{d}; push (@refs, $rr->nsdname); next unless names_equal($rr->name, $zone); add_nslist_to_data($pkt); $done = 1; } } while (! $done); } sub do_queries { my $n; do { $n = 0; foreach my $ns (keys %$data) { next if $data->{$ns}->{done}; print STDERR "\nQUERY $ns\n" if $opts{d}; my $pkt = send_query($zone, 'RRSIG', $ns); add_nslist_to_data($pkt); $data->{$ns}->{queries}->{RRSIG} = $pkt; print STDERR "done with $ns\n" if $opts{d}; $data->{$ns}->{done} = 1; $n++; } } while ($n); } sub do_analyze { my $nscount = 0; my $NOW = time; my %MAX_EXP_BY_TYPE; foreach my $ns (keys %$data) { print STDERR "\nANALYZE $ns\n" if $opts{d}; my $pkt = $data->{$ns}->{queries}->{RRSIG}; critical("No response from $ns") unless $pkt; print STDERR $pkt->string if $opts{d}; critical($pkt->header->rcode . " from $ns") unless ($pkt->header->rcode eq 'NOERROR'); critical("$ns is lame") unless $pkt->header->ancount; foreach my $rr ($pkt->answer) { next unless $rr->type eq 'RRSIG'; my $exp = sigrr_exp_epoch($rr); my $T = $rr->typecovered; if (!defined($MAX_EXP_BY_TYPE{$T}->{exp}) || $exp > $MAX_EXP_BY_TYPE{$T}->{exp}) { $MAX_EXP_BY_TYPE{$T}->{exp} = $exp; $MAX_EXP_BY_TYPE{$T}->{ns} = $ns; } } $nscount++; } warning("No nameservers found. Is '$zone' a zone?") if ($nscount < 1); warning("No RRSIGs found") unless %MAX_EXP_BY_TYPE; my $min_exp = undef; my $min_ns = undef; my $min_type = undef; foreach my $T (keys %MAX_EXP_BY_TYPE) { printf STDERR ("%s RRSIG expires in %.1f days\n", $T, ($MAX_EXP_BY_TYPE{$T}->{exp}-$NOW)/86400) if $opts{d}; if (!defined($min_exp) || $MAX_EXP_BY_TYPE{$T}->{exp} < $min_exp) { $min_exp = $MAX_EXP_BY_TYPE{$T}->{exp}; $min_ns = $MAX_EXP_BY_TYPE{$T}->{ns}; $min_type = $T; } } critical("$min_ns has expired RRSIGs") if ($min_exp < $NOW); if ($min_exp - $NOW < ($opts{C}*86400)) { my $ND = sprintf "%3.1f days", ($min_exp-$NOW)/86400; critical("$min_type RRSIG expires in $ND at $min_ns") } if ($min_exp - $NOW < ($opts{W}*86400)) { my $ND = sprintf "%3.1f days", ($min_exp-$NOW)/86400; warning("$min_type RRSIG expires in $ND at $min_ns") } success("No RRSIGs expiring in the next $opts{W} days"); } sub sigrr_exp_epoch { my $rr = shift; die unless $rr->type eq 'RRSIG'; my $exp = $rr->sigexpiration; die "bad exp time '$exp'" unless $exp =~ /^(\d\d\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/; my $exp_epoch = timegm($6,$5,$4,$3,$2-1,$1); return $exp_epoch; } sub add_nslist_to_data { my $pkt = shift; foreach my $ns (get_nslist($pkt)) { next if defined $data->{$ns}->{done}; print STDERR "adding NS $ns\n" if $opts{d}; $data->{$ns}->{done} |= 0; } } sub success { output('OK', shift); exit(0); } sub warning { output('WARNING', shift); exit(1); } sub critical { output('CRITICAL', shift); exit(2); } sub output { my $state = shift; my $msg = shift; $stop = [gettimeofday()] unless $stop; my $latency = tv_interval($start, $stop); printf "ZONE %s: %s; (%.2fs) |time=%.6fs;;;0.000000\n", $state, $msg, $latency, $latency; } sub usage { print STDERR "usage: $0 -Z zone\n"; exit 3; } sub send_query { my $qname = shift; my $qtype = shift; my $server = shift; my $res = Net::DNS::Resolver->new; $res->nameserver($server) if $server; $res->udp_timeout($opts{t}); $res->retry(2); $res->udppacketsize(4096); my $pkt = $res->send($qname, $qtype); unless ($pkt) { $res->usevc(1); $res->tcp_timeout($opts{t}); $pkt = $res->send($qname, $qtype); } return $pkt; } sub get_nslist { my $pkt = shift; return () unless $pkt; return () unless $pkt->authority; my @nslist; foreach my $rr ($pkt->authority) { next unless ($rr->type eq 'NS'); next unless names_equal($rr->name, $zone); push(@nslist, lc($rr->nsdname)); } return @nslist; } sub names_equal { my $a = shift; my $b = shift; $a =~ s/\.$//; $b =~ s/\.$//; lc($a) eq lc($b); } nagios-plugins-contrib-9.20140106/check_zone_rrsig_expiration/Makefile0000644000000000000000000000002512262515026022621 0ustar include ../common.mk nagios-plugins-contrib-9.20140106/check_zone_auth/0000755000000000000000000000000012262515026016535 5ustar nagios-plugins-contrib-9.20140106/check_zone_auth/zone_auth.cfg0000644000000000000000000000020212262515026021204 0ustar define command { command_name check_zone_auth command_line /usr/lib/nagios/plugins/check_zone_auth -Z $HOSTADDRESS$ } nagios-plugins-contrib-9.20140106/check_zone_auth/control0000644000000000000000000000060212262515026020136 0ustar Homepage: http://dns.measurement-factory.com/tools/nagios-plugins/check_zone_auth.html Watch: http://dns.measurement-factory.com/tools/nagios-plugins/src/check_zone_auth Id: check_zone_auth,v ([0-9.]+) Uploaders: Bernd Zeimetz Description: plugin to ensure that the authoritative nameservers for a given zone remain in sync. Recommends: libnet-dns-perl Version: 1.13 nagios-plugins-contrib-9.20140106/check_zone_auth/copyright0000644000000000000000000000272312262515026020474 0ustar Copyright (c) 2008, The Measurement Factory, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of The Measurement Factory nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. nagios-plugins-contrib-9.20140106/check_zone_auth/check_zone_auth0000644000000000000000000002107212262515026021613 0ustar #!/usr/bin/perl # $Id: check_zone_auth,v 1.13 2010/07/23 15:54:08 wessels Exp $ # # check_zone_auth # # nagios plugin to check that all authoritative nameservers for a zone # have the same NS RRset and the same serial number. # # Can also check that the NS RRset is equal to specific nameservers # passed on the command line. # Copyright (c) 2008, The Measurement Factory, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # Neither the name of The Measurement Factory nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # USAGE # # define command { # command_name check-zone-auth # command_line /usr/local/libexec/nagios-local/check_zone_auth -Z $HOSTADDRESS$ # } # # define service { # name dns-auth-service # check_command check-zone-auth # ... # } # # define host { # use dns-zone # host_name zone.example.com # alias ZONE example.com # } # # define service { # use dns-auth-service # host_name zone.example.com # } # CONTRIBUTORS: # # Matt Christian use warnings; use strict; use Getopt::Std; use Net::DNS::Resolver; use Net::DNS::Resolver::Recurse; use Time::HiRes qw ( gettimeofday tv_interval); use List::Util qw ( shuffle ); use vars qw( %opts @refs $zone $expected_ns_rrset $data $start $stop ); getopts('Z:N:d', \%opts); usage() unless $opts{Z}; usage() if $opts{h}; $zone = $opts{Z}; $zone =~ s/^zone\.//; $expected_ns_rrset = $opts{N} ? join(',', sort split(',', lc($opts{N}))) : undef; @refs = qw ( a.root-servers.net b.root-servers.net c.root-servers.net d.root-servers.net e.root-servers.net f.root-servers.net g.root-servers.net h.root-servers.net i.root-servers.net j.root-servers.net k.root-servers.net l.root-servers.net m.root-servers.net ); $start = [gettimeofday()]; do_recursion(); do_queries(); $stop = [gettimeofday()]; do_analyze(); sub do_recursion { my $done = 0; my $res = Net::DNS::Resolver->new; do { print STDERR "\nRECURSE\n" if $opts{d}; my $pkt; foreach my $ns (shuffle @refs) { print STDERR "sending query for $zone SOA to $ns\n" if $opts{d}; $res->nameserver($ns); $res->udp_timeout(5); $pkt = $res->send($zone, 'SOA'); last if $pkt; } critical("No response to seed query") unless $pkt; critical($pkt->header->rcode . " from " . $pkt->answerfrom) unless ($pkt->header->rcode eq 'NOERROR'); add_nslist_to_data($pkt); @refs = (); foreach my $rr ($pkt->authority) { next unless ($rr->type eq 'NS'); print STDERR $rr->string, "\n" if $opts{d}; push (@refs, $rr->nsdname); next unless names_equal($rr->name, $zone); $done = 1; } } while (! $done); } sub do_queries { # # Net::DNS::Resolver::Recurse has some less-than-desirable # properties. For one it seems to generate many more queries # than necessary. Also it seems to have a tough time when # IPv6 is involved. For now this is disabled in favor # of a custom, simple recursor # # my $recres = Net::DNS::Resolver::Recurse->new; # $recres->recursion_callback(sub { # my $p = shift; # # # # This debugging below is commented out because it # # generates a 'Variable "%opts" may be unavailable' # # warning when ePN (embedded perl nagios) is in use. # # # #print STDERR $p->string if $opts{d}; # add_nslist_to_data($p); # }); # my $seed = $recres->query_dorecursion($zone, 'SOA'); # critical("No response to seed query") unless $seed; # $recres = undef; # # critical($seed->header->rcode . " from " . $seed->answerfrom) # unless ($seed->header->rcode eq 'NOERROR'); # print STDERR $seed->string if $opts{d}; # add_nslist_to_data($seed); my $n; do { $n = 0; foreach my $ns (keys %$data) { next if $data->{$ns}->{done}; print STDERR "\nQUERY $ns\n" if $opts{d}; my $pkt = send_query($zone, 'SOA', $ns); add_nslist_to_data($pkt); $data->{$ns}->{queries}->{SOA} = $pkt; if ($pkt && $pkt->header->nscount == 0) { my $ns_pkt = send_query($zone, 'NS', $ns); add_nslist_to_data($ns_pkt); $data->{$ns}->{queries}->{NS} = $ns_pkt; } print STDERR "done with $ns\n" if $opts{d}; $data->{$ns}->{done} = 1; $n++; } } while ($n); } sub do_analyze { my $maxserial = 0; my $nscount = 0; foreach my $ns (keys %$data) { print STDERR "\nANALYZE $ns\n" if $opts{d}; my $soa_pkt = $data->{$ns}->{queries}->{SOA}; critical("No response from $ns") unless $soa_pkt; print STDERR $soa_pkt->string if $opts{d}; critical($soa_pkt->header->rcode . " from $ns") unless ($soa_pkt->header->rcode eq 'NOERROR'); critical("$ns is lame") unless $soa_pkt->header->ancount; my $serial = soa_serial($soa_pkt); $maxserial = $serial if ($serial > $maxserial); $nscount++; } warning("No nameservers found. Is '$zone' a zone?") if ($nscount < 1); warning("Only one auth NS") if ($nscount < 2); if ($expected_ns_rrset) { my $got_ns_rrset = join(',', sort keys %$data); critical("Unexpected NS RRset: $got_ns_rrset") unless $expected_ns_rrset eq $got_ns_rrset; } foreach my $ns (keys %$data) { my $soa_pkt = $data->{$ns}->{queries}->{SOA}; my $ns_pkt = $data->{$ns}->{queries}->{NS}; # see if this nameserver lists all nameservers # my %all_ns; foreach my $data_ns (keys %$data) { $all_ns{$data_ns} = 1; } foreach my $soa_ns (get_nslist($soa_pkt)) { delete $all_ns{$soa_ns}; } foreach my $ns_ns (get_nslist($ns_pkt)) { delete $all_ns{$ns_ns}; } if (keys %all_ns) { warning("$ns does not include " . join(',', keys %all_ns) . " in NS RRset"); } warning("$ns claims is it not authoritative") unless $soa_pkt->header->aa; my $serial = soa_serial($soa_pkt); warning("$ns serial ($serial) is less than the maximum ($maxserial)") if ($serial < $maxserial); } success("$nscount nameservers, serial $maxserial"); } sub add_nslist_to_data { my $pkt = shift; foreach my $ns (get_nslist($pkt)) { print STDERR "adding NS $ns\n" if $opts{d}; $data->{$ns}->{done} |= 0; } } sub soa_serial { my $pkt = shift; foreach my $rr ($pkt->answer) { next unless ($rr->type eq 'SOA'); next unless ($rr->name eq $zone); return $rr->serial; } return 0; } sub success { output('OK', shift); exit(0); } sub warning { output('WARNING', shift); exit(1); } sub critical { output('CRITICAL', shift); exit(2); } sub output { my $state = shift; my $msg = shift; $stop = [gettimeofday()] unless $stop; my $latency = tv_interval($start, $stop); printf "ZONE %s: %s; (%.2fs) |time=%.6fs;;;0.000000\n", $state, $msg, $latency, $latency; } sub usage { print STDERR "usage: $0 -Z zone [-N ns1,ns2,ns3]\n"; print STDERR "\t-Z specifies the zone to test\n"; print STDERR "\t-N optionally specifies the expected NS RRset\n"; exit 3; } sub send_query { my $qname = shift; my $qtype = shift; my $server = shift; my $res = Net::DNS::Resolver->new; $res->nameserver($server) if $server; return $res->send($qname, $qtype); } sub get_nslist { my $pkt = shift; return () unless $pkt; my @nslist = (); foreach my $rr ($pkt->authority) { next unless ($rr->type eq 'NS'); next unless names_equal($rr->name, $zone); push(@nslist, lc($rr->nsdname)); } return @nslist if @nslist; # # look for NS records in answer section too # foreach my $rr ($pkt->answer) { next unless ($rr->type eq 'NS'); next unless names_equal($rr->name, $zone); push(@nslist, lc($rr->nsdname)); } return @nslist; } sub names_equal { my $a = shift; my $b = shift; $a =~ s/\.$//; $b =~ s/\.$//; lc($a) eq lc($b); } nagios-plugins-contrib-9.20140106/check_zone_auth/Makefile0000644000000000000000000000002512262515026020172 0ustar include ../common.mk nagios-plugins-contrib-9.20140106/check_backuppc/0000755000000000000000000000000012262515026016331 5ustar nagios-plugins-contrib-9.20140106/check_backuppc/check_backuppc-1.1.0/0000755000000000000000000000000012262515026021711 5ustar nagios-plugins-contrib-9.20140106/check_backuppc/check_backuppc-1.1.0/INSTALL0000644000000000000000000000133012262515026022737 0ustar Automated Install Steps: ------------------------ 1) Set NAGIOS_LIB to the directory containing Nagios's util.pm 2) Set BACKUPPC_LIB to the directory containing BackupPC's Perl libraries 3) Set PREFIX to the desired installation location 4) make install Manual Install Steps: --------------------- 1) Edit check_backuppc and adjust the two "use lib" lines to refer to the correct location for Nagios's utils.pm and BackupPC's Perl libraries. 2) Copy check_backuppc into where you want this plugin. Configuration: -------------- 1) Add a sudoers entry to allow Nagios to run this plugin as the BackupPC user. 2) Configure Nagios to run this plugin through sudo as the BackupPC user. 3) Test 4) Add to Nagios service checks nagios-plugins-contrib-9.20140106/check_backuppc/check_backuppc-1.1.0/changelog0000644000000000000000000000150312262515026023562 0ustar Mar. 18 2007 - 1.1.0 - Added --status-only option - Fixed logic of --warning option - Adjusted default warning age to 0 and critical age to 7 days Sep. 16 2006 - 1.0 - Added manpage - Adjusted spacing in debug messages - Adjusted behaviour of when an initial backup fails - Code cleanup Aug. 31 2006 - 0.9.0 - Added Makefile - Increased verbosity level - Added host exclusion option - Added --archive-only and --backup-only options Aug. 23 2006 - 0.8.0 - Added hostname option - Added warning threshold - Added severity reduction count - Code cleanup Aug. 22 2006 - 0.2.0 - First public release - Code cleanup - Added command-line arguments Aug. 16 2006 - 0.1.1 - Change error detection to checking for 'error' in hashes Aug. 15 2006 - 0.1.0 - First technically working version of plugin, still needs options nagios-plugins-contrib-9.20140106/check_backuppc/check_backuppc-1.1.0/README0000644000000000000000000000120512262515026022567 0ustar This plugin must be run as the same user that BackupPC runs under. For a host to be considered an archive host by the --backup-only and --archive-only options at least one archive must be run by the host. Sample configuration for NRPE with Ubuntu hosts: 1) Add the following line to /etc/sudoers on the backup host nagios ALL = (backuppc) NOPASSWD: /usr/local/lib/nagios/plugins/check_backuppc 2) Add the following line to /etc/nagios/nrpe.cfg command[check_backuppc]=/usr/bin/sudo -u backuppc \ /usr/local/lib/nagios/plugins/check_backuppc 3) Add the appropriate stanza to your Nagios configuration to use this check with NRPE. nagios-plugins-contrib-9.20140106/check_backuppc/check_backuppc-1.1.0/check_backuppc.80000644000000000000000000000360512262515026024733 0ustar .TH check_backuppc 8 .SH NAME check_backuppc \- A Nagios plugin to monitor BackupPC .SH SYNOPSIS .B check_backuppc .I [options] .SH DESCRIPTION .B check_backuppc is a nagios plugin that reports on the status of BackupPC. By default, it monitors both archive and backup hosts for errors. .SH OPTIONS .TP .B \-a, \-\-archive\-only Only check the status of archive hosts. .TP .B \-b, \-\-backup\-only Only check the status of non-archive hosts. .TP .B \-s, \-\-status\-only Only check the status of the backups, omit connection failures that are less than $Conf{FullPeriod} old. .TP .B \-H, \-\-hostname hostname Only check the specified host. Uses hostnames that BackupPC is configured to use, can be specified multiple times. .TP .B \-x, \-\-exclude hostname Do not check the specified host. Uses hostnames that BackupPC is configured to use, can be specified multiple times. .TP .B \-w, \-\-warning age The days old at which a failure is considered a warning, default 1. .TP .B \-c, \-\-critical age The days old at which a failure is considered critical, default 8. .TP .B \-r, \-\-reduce count The maximum number of failed hosts for which to reduce reported severity, default 0. .TP .B \-h, \-\-help Show summary of options. .SH NOTES This plugin must be run on the same host and as the same user as BackupPC. An archive host only takes on a reported type of archive after its first archive run. .SH EXAMPLES .TP .EX /usr/local/lib/nagios/plugins/check_backuppc -r1 -w3 -c8 -b -x otter .EE Check the status of all backup hosts except "otter". Warn if a failed backup is older than three days old, return critical if a failure is older than eight days old unless there is only a single failure. In that case, warn if the single failed backup is older than eight days. .SH AUTHOR Seneca Cunningham .SH "SEE ALSO" .\" Always quote multiple words for .SH .BR sudo (8). .BR backuppc (8). nagios-plugins-contrib-9.20140106/check_backuppc/check_backuppc-1.1.0/TODO0000644000000000000000000000002212262515026022373 0ustar Test with Nagios2 nagios-plugins-contrib-9.20140106/check_backuppc/check_backuppc-1.1.0/check_backuppc0000755000000000000000000001610612262515026024570 0ustar #!/usr/bin/perl # # check_backuppc: a Nagios plugin to check the status of BackupPC # # Tested against BackupPC 2.1.2 and Nagios 1.3 # # # # AUTHORS # Seneca Cunningham # # COPYRIGHT # Copyright (C) 2006,2007 Seneca Cunningham # # 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 # use strict; no utf8; # Nagios use lib "NAGIOS_LIB"; use utils qw(%ERRORS $TIMEOUT); use POSIX qw(strftime difftime); use Getopt::Long; Getopt::Long::Configure('bundling'); # BackupPC use lib "BACKUPPC_LIB"; use BackupPC::Lib; my $version = '1.1.0'; my $warnLevel = 0; my $daysOld = 7; my $verbose = 0; my $opt_V = 0; my $opt_h = 0; my $goodOpt = 0; my $reduce = 0; my $backupOnly = 0; my $archiveOnly = 0; my $statusOnly = 0; my @hostsDesired; my @hostsExcluded; # Process options $goodOpt = GetOptions( 'v+' => \$verbose, 'verbose+' => \$verbose, 'c=f' => \$daysOld, 'critical=f' => \$daysOld, 'w=f' => \$warnLevel, 'warning=f' => \$warnLevel, 'V' => \$opt_V, 'version' => \$opt_V, 'h' => \$opt_h, 'help' => \$opt_h, 'r=i' => \$reduce, 'reduce' => \$reduce, 'b' => \$backupOnly, 'backup-only' => \$backupOnly, 'a' => \$archiveOnly, 'archive-only' => \$archiveOnly, 's' => \$statusOnly, 'status-only' => \$statusOnly, 'H=s' => \@hostsDesired, 'hostname=s' => \@hostsDesired, 'x=s' => \@hostsExcluded, 'exclude=s' => \@hostsExcluded); @hostsDesired = () if $#hostsDesired < 0; @hostsExcluded = () if $#hostsExcluded < 0; if ($opt_V) { print "check_backuppc - " . $version . "\n"; exit $ERRORS{'OK'}; } if ($backupOnly and $archiveOnly) { $goodOpt = 0; print "Cannot apply both --backup-only and --archive-only, contradictory\n\n"; } if ($opt_h or not $goodOpt) { print "check_backuppc - " . $version . "\n"; print "A Nagios plugin to check on BackupPC backup status.\n\n"; print "Options:\n"; print " --hostname,-H only check the specified host\n"; print " --exclude,-x do not check the specified host\n"; print " --archive-only,-a only check the archive hosts\n"; print " --backup-only,-b only check the backup hosts\n"; print " --status-only,-s only check backup status, omit connection failures that are\n"; print " less than \$Conf{FullPeriod} old\n"; print " --warning,-w days old an errored host must be to cause a warning\n"; print " --critical,-c number of days old an errored backup must be to be critical\n"; print " --reduce,-r maximum number of failed hosts for severity reduction\n"; print " --verbose,-v increase verbosity\n"; print " --version,-V display plugin version\n"; print " --help,-h display this message\n\n"; exit $ERRORS{'OK'} if $goodOpt; exit $ERRORS{'UNKNOWN'}; } if ($warnLevel > $daysOld) { print("BACKUPPC UNKNOWN - Warning threshold must be <= critical\n"); exit $ERRORS{'UNKNOWN'}; } # Connect to BackupPC my $server; if (!($server = BackupPC::Lib->new)) { print "BACKUPPC CRITICAL - Couldn't connect to BackupPC\n"; exit $ERRORS{'CRITICAL'}; } my %Conf = $server->Conf(); $server->ChildInit(); my $err = $server->ServerConnect($Conf{ServerHost}, $Conf{ServerPort}); if ($err) { print("BACKUPPC UNKNOWN - Can't connect to server ($err)\n"); exit $ERRORS{'UNKNOWN'}; } # hashes that BackupPC uses for varios status info my %Status; my %Jobs; my %Info; # query the BackupPC server for host, job, and server info my $info_raw = $server->ServerMesg('status info'); my $jobs_raw = $server->ServerMesg('status jobs'); my $status_raw = $server->ServerMesg('status hosts'); # undump the output... BackupPC uses Data::Dumper eval $info_raw; eval $jobs_raw; eval $status_raw; # check the dumped output my $hostCount = 0; my @goodHost; my @badHost; my @tooOld; my @notTooOld; foreach my $host (@hostsDesired, @hostsExcluded) { if (not grep {/$host/} keys(%Status)) { print("BACKUPPC UNKNOWN - Unknown host ($host)\n"); exit $ERRORS{'UNKNOWN'}; } } # host status checks foreach my $host (sort(keys(%Status))) { next if $host =~ /^ /; next if (@hostsDesired and not grep {/$host/} @hostsDesired); next if (@hostsExcluded and grep {/$host/} @hostsExcluded); next if ($backupOnly and $Status{$host}{'type'} eq 'archive'); next if ($archiveOnly and $Status{$host}{'type'} ne 'archive'); $hostCount++; # Debug if ($verbose == 3) { print "Host $host state " . $Status{$host}{'state'}; print " with error: " . $Status{$host}{'error'} . "\n"; } if ($Status{$host}{'error'}) { # Check connectivity errors with greater care if ($statusOnly && ( $Status{$host}{'error'} eq 'ping too slow' || $Status{$host}{'error'} eq 'no ping response' || $Status{$host}{'error'} eq 'host not found')) { if ($Status{$host}{'lastGoodBackupTime'} - $Status{$host}{'startTime'} <= $Conf{FullPeriod} * 3600 * 24) { push @goodHost, $host; next; } } push @badHost, $host; # Check bad host ages $Status{$host}{'lastGoodBackupTime'} = $Status{$host}{'startTime'} if (not $Status{$host}{'lastGoodBackupTime'}); if (difftime(time(), $Status{$host}{'lastGoodBackupTime'}) > ($daysOld * 3600 * 24)) { push @tooOld, $host; } elsif (difftime(time(), $Status{$host}{'lastGoodBackupTime'}) > ($warnLevel * 3600 * 24)) { push @notTooOld, $host; } else { push @goodHost, $host; pop @badHost; } # Debug if ($verbose == 2) { print "Host $host state " . $Status{$host}{'state'}; print " with error: " . $Status{$host}{'error'} . "\n"; } } else { push @goodHost, $host; } } if ($hostCount == @goodHost or $#badHost < $reduce and not @tooOld) { print "BACKUPPC OK - (" . @badHost . "/" . $hostCount . ") failures\n"; exit $ERRORS{'OK'}; } # Only failures reach this far # WARNING if ($#tooOld < 0 or $#badHost < $reduce) { print "BACKUPPC WARNING - ("; if ($verbose) { foreach my $host (@badHost) { print $host . " (" . $Status{$host}{'error'} . "), "; } print ")\n"; } else { print $#badHost + 1 . "/" . $hostCount . ") failures\n"; } exit $ERRORS{'WARNING'}; } # CRITICAL print "BACKUPPC CRITICAL - ("; if ($#notTooOld >= 0 and $verbose) { foreach my $host (@notTooOld) { print $host . " (" . $Status{$host}{'error'} . "), "; } print "), ("; } if ($verbose) { foreach my $host (@tooOld) { print $host . " (" . $Status{$host}{'error'} . "), " if $verbose; } print ") critical\n"; } else { print $#badHost + 1 . "/" . $hostCount . ") failures, "; print $#tooOld + 1 . " critical\n"; } exit $ERRORS{'CRITICAL'}; nagios-plugins-contrib-9.20140106/check_backuppc/check_backuppc-1.1.0/COPYING0000644000000000000000000004310512262515026022747 0ustar GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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) 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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) year 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. nagios-plugins-contrib-9.20140106/check_backuppc/check_backuppc-1.1.0/Makefile0000644000000000000000000000124312262515026023351 0ustar ifndef PREFIX PREFIX=/usr/local endif ifndef NAGIOS_LIB NAGIOS_LIB=/usr/lib/nagios/plugins endif ifndef BACKUPPC_LIB BACKUPPC_LIB=/usr/share/backuppc/lib endif install: sed -e "s|NAGIOS_LIB|$(NAGIOS_LIB)|g" -e \ "s|BACKUPPC_LIB|${BACKUPPC_LIB}|g" check_backuppc \ > check_backuppc.processed install -d ${PREFIX}/lib/nagios/plugins install -m 755 check_backuppc.processed ${PREFIX}/lib/nagios/plugins mv ${PREFIX}/lib/nagios/plugins/check_backuppc.processed \ ${PREFIX}/lib/nagios/plugins/check_backuppc install -m 644 check_backuppc.8 ${PREFIX}/man/man8 uninstall: rm -f ${PREFIX}/lib/nagios/plugins/check_backuppc rm -f ${PREFIX}/man/man8/check_backuppc.8 nagios-plugins-contrib-9.20140106/check_backuppc/control0000644000000000000000000000047112262515026017736 0ustar Uploaders: Jan Wagner Recommends: libnagios-plugin-perl Suggests: backuppc Version: 1.1.0 Homepage: http://n-backuppc.sourceforge.net/ Watch: http://sourceforge.net/projects/n-backuppc/files/ check_backuppc-([0-9.]+)\.tar\.gz Description: plugin for checking on the status of BackupPC backups nagios-plugins-contrib-9.20140106/check_backuppc/copyright0000644000000000000000000000031312262515026020261 0ustar Copyright (C) 2006,2007 Seneca Cunningham License: GPL v2 On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". nagios-plugins-contrib-9.20140106/check_backuppc/src0000777000000000000000000000000012262515026022343 2check_backuppc-1.1.0ustar nagios-plugins-contrib-9.20140106/check_backuppc/Makefile0000644000000000000000000000052012262515026017766 0ustar #/usr/bin/make -f PLUGIN = check_backuppc MANPAGES = src/check_backuppc.8 DOCFILES = src/README NAGIOS_LIB = /usr/lib/nagios/plugins BACKUPPC_LIB = /usr/share/backuppc/lib CLEANFILES = $(PLUGIN) include ../common.mk $(PLUGIN): sed -e "s|NAGIOS_LIB|$(NAGIOS_LIB)|g" -e \ "s|BACKUPPC_LIB|${BACKUPPC_LIB}|g" src/check_backuppc > $@ nagios-plugins-contrib-9.20140106/check_drbd/0000755000000000000000000000000012262515026015454 5ustar nagios-plugins-contrib-9.20140106/check_drbd/control0000644000000000000000000000067512262515026017067 0ustar Homepage: https://www.monitoringexchange.org/inventory/Check-Plugins/Operating-Systems/Linux/check_drbd Watch: https://www.monitoringexchange.org/inventory/Check-Plugins/Operating-Systems/Linux/check_drbd >check_drbd v([0-9.]+) Uploaders: Jan Wagner Description: plugin to check DRBD device states This plugin is for checking DRBD device states. It parses the /proc/drbd device and analyses the output. Version: 0.5.3 nagios-plugins-contrib-9.20140106/check_drbd/copyright0000644000000000000000000000051612262515026017411 0ustar Copyright (C) Brandon Lee Poyner The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute copies of the plugins under the terms of the GNU General Public License. On Debian systems, the complete text of the GNU General Public License version 1 can be found in "/usr/share/common-licenses/GPL-1". nagios-plugins-contrib-9.20140106/check_drbd/check_drbd0000644000000000000000000003405112262515026017452 0ustar #!/usr/bin/perl -w #################################################### # check_drbd v0.5.3 # # by Brandon Lee Poyner bpoyner / CCAC.edu # #################################################### use strict; use File::Basename; use Getopt::Long; my $drbd_proc='/proc/drbd'; my $drbd_devices=0; my ($drbd_expect, $drbd_role, $drbd_version, $debug_mode); my (%options, %cs, %st, %ld, %ds, %check, %warning, %critical); my $prog_name=basename($0); my $prog_revision='0.5.3'; my %errorcodes = ( 'OK' => { 'retvalue' => 0 }, 'WARNING' => { 'retvalue' => 1 }, 'CRITICAL' => { 'retvalue' => 2 }, 'UNKNOWN' => { 'retvalue' => 3 } ); # # Define various states and default alarm values # my %state = ( 'Primary' => { 'value' => 'OK', 'type' => 'st' }, 'Secondary' => { 'value' => 'OK', 'type' => 'st' }, 'Unknown' => { 'value' => 'CRITICAL', 'type' => 'st' }, 'StandAlone' => { 'value' => 'WARNING', 'type' => 'cs' }, 'Unconnected' => { 'value' => 'CRITICAL', 'type' => 'cs' }, 'Timeout' => { 'value' => 'CRITICAL', 'type' => 'cs' }, 'BrokenPipe' => { 'value' => 'CRITICAL', 'type' => 'cs' }, 'WFConnection' => { 'value' => 'CRITICAL', 'type' => 'cs' }, 'WFReportParams' => { 'value' => 'CRITICAL', 'type' => 'cs' }, 'Connected' => { 'value' => 'OK', 'type' => 'cs' }, 'Unconfigured' => { 'value' => 'CRITICAL', 'type' => 'cs' }, # DRBD 0.6 'SyncingAll' => { 'value' => 'WARNING', 'type' => 'cs' }, 'SyncingQuick' => { 'value' => 'WARNING', 'type' => 'cs' }, 'SyncPaused' => { 'value' => 'CRITICAL', 'type' => 'cs' }, # DRBD 0.7 'WFBitMapS' => { 'value' => 'CRITICAL', 'type' => 'cs' }, 'WFBitMapT' => { 'value' => 'CRITICAL', 'type' => 'cs' }, 'SyncSource' => { 'value' => 'WARNING', 'type' => 'cs' }, 'SyncTarget' => { 'value' => 'WARNING', 'type' => 'cs' }, 'PausedSyncS' => { 'value' => 'CRITICAL', 'type' => 'cs' }, 'PausedSyncT' => { 'value' => 'CRITICAL', 'type' => 'cs' }, 'NetworkFailure' => { 'value' => 'CRITICAL', 'type' => 'cs' }, 'SkippedSyncS' => { 'value' => 'CRITICAL', 'type' => 'cs' }, 'SkippedSyncT' => { 'value' => 'CRITICAL', 'type' => 'cs' }, 'Consistent' => { 'value' => 'OK', 'type' => 'ld' }, 'Inconsistent' => { 'value' => 'CRITICAL', 'type' => 'ld' }, # DRBD 8.0 'UpToDate' => { 'value' => 'OK', 'type' => 'ds' }, 'Consistent' => { 'value' => 'OK', 'type' => 'ds' }, 'Negotiating' => { 'value' => 'WARNING', 'type' => 'ds' }, 'Attaching' => { 'value' => 'WARNING', 'type' => 'ds' }, 'Diskless' => { 'value' => 'CRITICAL', 'type' => 'ds' }, 'Failed' => { 'value' => 'CRITICAL', 'type' => 'ds' }, 'Outdated' => { 'value' => 'CRITICAL', 'type' => 'ds' }, 'Inconsistent' => { 'value' => 'CRITICAL', 'type' => 'ds' }, 'DUnknown' => { 'value' => 'CRITICAL', 'type' => 'ds' }, # DRBD 8.2 'VerifyS' => { 'value' => 'WARNING', 'type' => 'cs' }, 'VerifyT' => { 'value' => 'WARNING', 'type' => 'cs' }, # DRBD 8.3 'Disconnecting' => { 'value' => 'WARNING', 'type' => 'cs' }, 'ProtocolError' => { 'value' => 'CRITICAL', 'type' => 'cs' }, 'TearDown' => { 'value' => 'WARNING', 'type' => 'cs' }, 'StartingSyncS' => { 'value' => 'WARNING', 'type' => 'cs' }, 'StartingSyncT' => { 'value' => 'WARNING', 'type' => 'cs' }, 'WFSyncUUID' => { 'value' => 'WARNING', 'type' => 'cs' } ); &parse_options; &parse_proc; &parse_drbd_devices; &check_drbd_state; &report_status; &myexit('UNKNOWN',"$prog_name should never reach here"); sub print_usage { print <] [-e expect] [-p proc] [-r role] [-o states] [-w states] [-c states] [--debug] Options: -d STRING [default: $drbd_devices. Example: 0,1,2 ] -p STRING [default: $drbd_proc. Use '-' for stdin] -e STRING [Must be this connected state. Example: Connected] -r STRING [Must be this node state. Example: Primary] -o STRING [Change value to OK. Example: StandAlone] -w STRING [Change value to WARNING. Example: SyncingAll] -c STRING [Change value to CRITICAL. Example: Inconsistent,WFConnection] EOF } sub print_revision { print <{'retvalue'}; } sub parse_options { my ($help, $version, $debug, $ok_string, $warning_string, $critical_string); # # Get command line options # GetOptions("h|help" => \$help, "V|version" => \$version, "d|device|devices=s" => \$drbd_devices, "e|expect=s" => \$drbd_expect, "p|proc=s" => \$drbd_proc, "r|role=s" => \$drbd_role, "o|ok=s" => \$ok_string, "w|warning=s" => \$warning_string, "c|critical=s" => \$critical_string, "debug" => \$debug); if (defined($help) && ($help ne "")) { &print_help; exit $errorcodes{'UNKNOWN'}->{'retvalue'}; } if (defined($version) && ($version ne "")) { &print_revision; exit $errorcodes{'UNKNOWN'}->{'retvalue'}; } if (defined($drbd_expect) && ($drbd_expect ne "")) { # User requested the connected state to be very specific &change_values($drbd_expect,'cs','expect','connected state'); } if (defined($drbd_role) && ($drbd_role ne "")) { # User requested the node state to be very specific &change_values($drbd_role,'st','role','node state'); } if (defined($ok_string) && ($ok_string ne "")) { # User requested certain values to be OK &set_values($ok_string,'OK'); } if (defined($warning_string) && ($warning_string ne "")) { # User requested certain values to be WARNING &set_values($warning_string,'WARNING'); } if (defined($critical_string) && ($critical_string ne "")) { # User requested certain values to be CRITICAL &set_values($critical_string,'CRITICAL'); } if (defined($debug) && ($debug ne "")) { # # Debugging information # $debug_mode=1; print STDERR "<$prog_name settings>\n"; print STDERR "DRBD Devices: $drbd_devices\n"; printf STDERR "DRBD Proc: %s\n", defined($drbd_proc)?$drbd_proc:""; printf STDERR "DRBD Expect: %s\n", defined($drbd_expect)?$drbd_expect:""; printf STDERR "DRBD Role: %s\n", defined($drbd_role)?$drbd_role:""; my (@ok, @critical, @warning); for my $key ( keys %state ) { if ($state{$key}->{'value'} eq 'OK') { push(@ok,$key); } if ($state{$key}->{'value'} eq 'WARNING') { push(@warning,$key); } if ($state{$key}->{'value'} eq 'CRITICAL') { push(@critical,$key); } } printf STDERR "DRBD OK: %s\n", join(" ",sort(@ok)); printf STDERR "DRBD WARNING: %s\n", join(" ",sort(@warning)); printf STDERR "DRBD CRITICAL: %s\n", join(" ",sort(@critical)); print STDERR "\n"; } } sub parse_proc { # # Read in contents of proc file, feed results into hashes # my $input; if ( $drbd_proc ne "-" ) { $input = "DRBD"; if ( ! -e $drbd_proc ) { &myexit('UNKNOWN',"No such file $drbd_proc"); } open(DRBD, "$drbd_proc") || &myexit('UNKNOWN',"Could not open $drbd_proc"); } else { $input = "STDIN"; } while(<$input>) { if (/^version: (\d+).(\d+)/) { $drbd_version = "$1.$2"; } if (/^\s?(\d+):.* cs:(\w+)/) { $cs{$1} = $2; } if (/^\s?(\d+):.* st:(\w+)\//) { $st{$1} = $2; } if (/^\s?(\d+):.* ld:(\w+)/) { $ld{$1} = $2; } if (/^\s?(\d+):.* ds:(\w+)/) { $ds{$1} = $2; } } if ( $drbd_proc ne "-" ) { close(DRBD); } if (defined($debug_mode) && ($debug_mode == 1)) { # # Debugging information # print STDERR "<$prog_name devices found>\n"; for my $key ( sort keys %cs ) { printf STDERR "Found Device $key $cs{$key}%s%s%s\n", defined($st{$key})?" $st{$key}":"", defined($ld{$key})?" $ld{$key}":"", defined($ds{$key})?" $ds{$key}":""; } print STDERR "\n"; } } sub parse_drbd_devices { # # Determine which DRBD devices to monitor # my @devices; if ($drbd_devices =~ /^all$/i) { for my $device ( keys %cs ) { push(@devices,$device); } } elsif ($drbd_devices =~ /^configured$/i) { for my $device ( keys %cs ) { next if ($cs{$device} eq "Unconfigured"); push(@devices,$device); } } else { @devices = split(/,/,$drbd_devices); } foreach my $device (@devices) { if (!(defined($cs{$device}))) { &myexit('UNKNOWN',"Could not find device $device"); } $check{$device} = 1; } if (int(keys %check) == 0) { &myexit('UNKNOWN',"No configured devices found"); } if (defined($debug_mode) && ($debug_mode == 1)) { # # Debugging information # print STDERR "<$prog_name devices to check>\n"; for my $key ( sort keys %check ) { printf STDERR "Checking enabled for device $key\n"; } print STDERR "\n"; } } sub check_drbd_state { for my $drbd_device ( sort keys %check ) { if ((defined($drbd_version)) && ($drbd_version >= '8.0')) { # # We're dealing with version 8.0 or greater # Set data state # if ((defined($ds{$drbd_device})) && (defined($state{$ds{$drbd_device}}))) { $state{$ds{$drbd_device}}->{$drbd_device}->{'level'} = 1; } elsif (defined($ds{$drbd_device})) { &myexit('CRITICAL',"Data state unknown value '$ds{$drbd_device}' for device $drbd_device"); } } if ((defined($drbd_version)) && ($drbd_version == '0.7')) { # # We're dealing with version 0.7 # Set local data consistency # if ((defined($ld{$drbd_device})) && (defined($state{$ld{$drbd_device}}))) { $state{$ld{$drbd_device}}->{$drbd_device}->{'level'} = 1; } elsif (defined($ld{$drbd_device})) { &myexit('CRITICAL',"Local data consistency unknown value '$ld{$drbd_device}' for device $drbd_device"); } } # # Check for a state value (Primary, Secondary, etc) # if ((defined($st{$drbd_device})) && (defined($state{$st{$drbd_device}}))) { $state{$st{$drbd_device}}->{$drbd_device}->{'level'} = 1; } elsif (defined($st{$drbd_device})) { &myexit('CRITICAL',"Node state unknown value '$st{$drbd_device}' for device $drbd_device"); } # # Check for a connected state value (Connected, StandAlone, etc) # if (defined($state{$cs{$drbd_device}})) { $state{$cs{$drbd_device}}->{$drbd_device}->{'level'} = 1; } else { &myexit('CRITICAL',"Connection state unknown value '$cs{$drbd_device}' for device $drbd_device"); } # # Debugging information # if (defined($debug_mode) && ($debug_mode == 1)) { print STDERR "<$prog_name device $drbd_device status>\n"; for my $key ( keys %state ) { if (defined($state{$key}->{$drbd_device}->{'level'})) { print STDERR "$key $state{$key}->{'value'}\n"; } } print STDERR "\n"; } # # Determine if any values are CRITICAL or WARNING # for my $key ( keys %state ) { if (defined($state{$key}->{$drbd_device}->{'level'})) { if ($state{$key}->{'value'} eq "CRITICAL") { $critical{$drbd_device} = 1; } if ($state{$key}->{'value'} eq "WARNING") { $warning{$drbd_device} = 1; } } } } } sub report_status { my $message; my $critical_count=int(keys %critical); my $warning_count=int(keys %warning); if ($critical_count > 0) { # # We found a CRITICAL situation # my $i = 0; for my $device (sort keys %critical) { $message.=sprintf("Device %d%s $cs{$device}%s%s", $device,defined($st{$device})?" $st{$device}":"",defined($ld{$device})?" $ld{$device}":"",defined($ds{$device})?" $ds{$device}":""); $i++; if ($i != $critical_count) { $message.=", "; } } &myexit('CRITICAL',$message); } elsif ($warning_count > 0) { # # We found a WARNING situation # my $i = 0; for my $device (sort keys %warning) { $message.=sprintf("Device %d%s $cs{$device}%s%s", $device,defined($st{$device})?" $st{$device}":"",defined($ld{$device})?" $ld{$device}":"",defined($ds{$device})?" $ds{$device}":""); $i++; if ($i != $warning_count) { $message.=", "; } } &myexit('WARNING',$message); } else { # # Everything checks out OK # my $device_count=int(keys %check); if ($device_count == 1) { for my $device ( sort keys %check ) { $message=sprintf("Device %d%s $cs{$device}%s%s", $device,defined($st{$device})?" $st{$device}":"",defined($ld{$device})?" $ld{$device}":"",defined($ds{$device})?" $ds{$device}":""); } } else { my $i = 0; for my $device ( sort keys %check ) { $message.=sprintf("Dev %d %0.3s%0.3s%0.3s%0.3s", $device,defined($st{$device})?"$st{$device}":"",$cs{$device},defined($ld{$device})?"$ld{$device}":"",defined($ds{$device})?"$ds{$device}":""); $i++; if ($i != $device_count) { $message.=", "; } } } &myexit('OK',$message); } } sub set_values { # # Set item to value requested # my ($items,$value) = @_; my @items = split(/,/,$items); foreach my $item (@items) { if (defined($state{$item})) { $state{$item}->{'value'} = "$value"; } else { print STDERR "State '$item' not found\n"; } } } sub change_values { # # Look for all values of a given type, set requested value to OK # and all other values to CRITICAL # my ($argument,$type,$error1,$error2) = @_; if ((defined($state{$argument})) && ($state{$argument}->{'type'} eq "$type")) { for my $key ( keys %state ) { if ($state{$key}->{'type'} eq "$type") { if ($key eq $argument) { &set_values($argument,'OK'); } else { &set_values($key,'CRITICAL'); } } } } else { &myexit('UNKNOWN',"$error1 option only works for $error2"); } } sub myexit { # # Print error message and exit # my ($error, $message) = @_; if (!(defined($errorcodes{$error}))) { printf STDERR "Error code $error not known\n"; print "DRBD UNKNOWN: $message\n"; exit $errorcodes{'UNKNOWN'}->{'retvalue'}; } print "DRBD $error: $message\n"; exit $errorcodes{$error}->{'retvalue'}; } nagios-plugins-contrib-9.20140106/check_drbd/Makefile0000644000000000000000000000005012262515026017107 0ustar #/usr/bin/make -f include ../common.mk nagios-plugins-contrib-9.20140106/check_mongodb/0000755000000000000000000000000012262515026016166 5ustar nagios-plugins-contrib-9.20140106/check_mongodb/control0000644000000000000000000000045312262515026017573 0ustar Uploaders: Jan Wagner Recommends: python-pymongo Version: b14ad3ef17 Homepage: https://github.com/mzupan/nagios-plugin-mongodb Watch: https://github.com/mzupan/nagios-plugin-mongodb ([0-9a-f]+) Description: Plugin script to monitor your MongoDB server(s) nagios-plugins-contrib-9.20140106/check_mongodb/copyright0000644000000000000000000000023612262515026020122 0ustar Copyright: (c) 2012, Mike Zupan License: BSD On Debian systems, a copy of the BSD License can be found in /usr/share/common-licenses/BSD nagios-plugins-contrib-9.20140106/check_mongodb/README.md0000644000000000000000000003026212262515026017450 0ustar # Nagios-MongoDB ## Overview This is a simple Nagios check script to monitor your MongoDB server(s). ## Authors ### Main Author Mike Zupan mike -(at)- zcentric.com ### Contributers - Frank Brandewiede - Sam Perman - Shlomo Priymak - @jhoff909 on github - Dag Stockstad ## Installation In your Nagios plugins directory run
git clone git://github.com/mzupan/nagios-plugin-mongodb.git
## Usage ### Install in Nagios Edit your commands.cfg and add the following

define command {
    command_name    check_mongodb
    command_line    $USER1$/nagios-plugin-mongodb/check_mongodb.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$
}

define command {
    command_name    check_mongodb_database
    command_line    $USER1$/nagios-plugin-mongodb/check_mongodb.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ -d $ARG5$
}

define command {
    command_name    check_mongodb_collection
    command_line    $USER1$/nagios-plugin-mongodb/check_mongodb.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ -d $ARG5$ -c $ARG6$
}

define command {
    command_name    check_mongodb_replicaset
    command_line    $USER1$/nagios-plugin-mongodb/check_mongodb.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ -r $ARG5$
}

define command {
    command_name    check_mongodb_query
    command_line    $USER1$/nagios-plugin-mongodb/check_mongodb.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ -q $ARG5$
}
(add -D to the command if you want to add perfdata to the output) Then you can reference it like the following. This is is my services.cfg #### Check Connection This will check each host that is listed in the Mongo Servers group. It will issue a warning if the connection to the server takes 2 seconds and a critical error if it takes over 4 seconds

define service {
    use                 generic-service
    hostgroup_name          Mongo Servers
    service_description     Mongo Connect Check
    check_command           check_mongodb!connect!27017!2!4
}
#### Check Percentage of Open Connections This is a test that will check the percentage of free connections left on the Mongo server. In the following example it will send out an warning if the connection pool is 70% used and a critical error if it is 80% used.

define service {
    use                 generic-service
    hostgroup_name          Mongo Servers
    service_description     Mongo Free Connections
    check_command           check_mongodb!connections!27017!70!80
}
#### Check Replication Lag This is a test that will test the replication lag of Mongo servers. It will send out a warning if the lag is over 15 seconds and a critical error if its over 30 seconds. Please note that this check uses 'optime' from rs.status() which will be behind realtime as heartbeat requests between servers only occur every few seconds. Thus this check may show an apparent lag of < 10 seconds when there really isn't any. Use larger values for reliable monitoring.

define service {
    use                 generic-service
    hostgroup_name          Mongo Servers
    service_description     Mongo Replication Lag
    check_command           check_mongodb!replication_lag!27017!15!30
}
#### Check Replication Lag Percentage This is a test that will test the replication lag percentage of Mongo servers. It will send out a warning if the lag is over 50 percents and a critical error if its over 75 percents. Please note that this check gets oplog timeDiff from primary and compares it to replication lag. When this check reaches 100 percent full resync is needed.

define service {
    use                 generic-service
    hostgroup_name          Mongo Servers
    service_description     Mongo Replication Lag Percentage
    check_command           check_mongodb!replication_lag_percent!27017!50!75
}
#### Check Memory Usage This is a test that will test the memory usage of Mongo server. In my example my Mongo servers have 32 gigs of memory so I'll trigger a warning if Mongo uses over 20 gigs of ram and a error if Mongo uses over 28 gigs of memory.

define service {
    use                 generic-service
    hostgroup_name          Mongo Servers
    service_description     Mongo Memory Usage
    check_command           check_mongodb!memory!27017!20!28
}
#### Check Mapped Memory Usage This is a test that will check the mapped memory usage of Mongo server.

define service {
    use                 generic-service
    hostgroup_name          Mongo Servers
    service_description     Mongo Mapped Memory Usage
    check_command           check_mongodb!memory_mapped!27017!20!28
}
#### Check Lock Time Percentage This is a test that will test the lock time percentage of Mongo server. In my example my Mongo I want to be warned if the lock time is above 5% and get an error if it's above 10%. When you start to have lock time it generally means your db is now overloaded.

define service {
    use                 generic-service
    hostgroup_name          Mongo Servers
    service_description     Mongo Lock Percentage
    check_command           check_mongodb!lock!27017!5!10
}
#### Check Average Flush Time This is a test that will check the average flush time of Mongo server. In my example my Mongo I want to be warned if the average flush time is above 100ms and get an error if it's above 200ms. When you start to get a high average flush time it means your database is write bound.

define service {
    use                 generic-service
    hostgroup_name          Mongo Servers
    service_description     Mongo Flush Average
    check_command           check_mongodb!flushing!27017!100!200
}
#### Check Last Flush Time This is a test that will check the last flush time of Mongo server. In my example my Mongo I want to be warned if the last flush time is above 200ms and get an error if it's above 400ms. When you start to get a high flush time it means your server might be needing faster disk or its time to shard.

define service {
    use                 generic-service
    hostgroup_name          Mongo Servers
    service_description     Mongo Last Flush Time
    check_command           check_mongodb!last_flush_time!27017!200!400
}
#### Check status of mongodb replicaset This is a test that will check the status of nodes within a replicaset. Depending which status it is it sends a waring during status 0, 3 and 5, critical if the status is 4, 6 or 8 and a ok with status 1, 2 and 7. Note the trailing 2 0's keep those 0's as the check doesn't compare to anything.. So those values need to be there for the check to work.

define service {
      use                     generic-service
      hostgroup_name          Mongo Servers
      service_description     MongoDB state
      check_command           check_mongodb!replset_state!27017!0!0
}
#### Check status of index miss ratio This is a test that will check the ratio of index hits to misses. If the ratio is high, you should consider adding indexes. I want to get a warning if the ratio is above .005 and get an error if it's above .01

define service {
      use                     generic-service
      hostgroup_name          Mongo Servers
      service_description     MongoDB Index Miss Ratio
      check_command           check_mongodb!index_miss_ratio!27017!.005!.01
}
#### Check number of databases and number of collections These tests will count the number of databases and the number of collections. It is usefull e.g. when your application "leaks" databases or collections. Set the warning, critical level to fit your application.

define service {
      use                     generic-service
      hostgroup_name          Mongo Servers
      service_description     MongoDB Number of databases
      check_command           check_mongodb!databases!27017!300!500
}

define service {
      use                     generic-service
      hostgroup_name          Mongo Servers
      service_description     MongoDB Number of collections
      check_command           check_mongodb!collections!27017!300!500
}
#### Check size of a database This will check the size of a database. This is useful for keeping track of growth of a particular database. Replace your-database with the name of your database

define service {
      use                     generic-service
      hostgroup_name          Mongo Servers
      service_description     MongoDB Database size your-database
      check_command           check_mongodb_database!database_size!27017!300!500!your-database
}
#### Check index size of a database This will check the index size of a database. Overlarge indexes eat up memory and indicate a need for compaction. Replace your-database with the name of your database

define service {
      use                     generic-service
      hostgroup_name          Mongo Servers
      service_description     MongoDB Database index size your-database
      check_command           check_mongodb_database!database_indexes!27017!50!100!your-database
}
#### Check index size of a collection This will check the index size of a collection. Overlarge indexes eat up memory and indicate a need for compaction. Replace your-database with the name of your database and your-collection with the name of your collection

define service {
      use                     generic-service
      hostgroup_name          Mongo Servers
      service_description     MongoDB Database index size your-database
      check_command           check_mongodb_collection!collection_indexes!27017!50!100!your-database!your-collection
}
#### Check the primary server of replicaset This will check the primary server of a replicaset. This is useful for catching unexpected stepdowns of the replica's primary server. Replace your-replicaset with the name of your replicaset

define service {
      use                     generic-service
      hostgroup_name          Mongo Servers
      service_description     MongoDB Replicaset Master Monitor: your-replicaset
      check_command           check_mongodb_replicaset!replica_primary!27017!0!1!your-replicaset
}
#### Check the number of queries per second This will check the number of queries per second on a server. Since MongoDB gives us the number as a running counter, we store the last value in the local database in the nagios_check collection. The following types are accepted: query|insert|update|delete|getmore|command This command will check updates per second and alert if the count is over 200 and warn if over 150

define service {
      use                     generic-service
      hostgroup_name          Mongo Servers
      service_description     MongoDB Updates per Second
      check_command           check_mongodb_query!queries_per_second!27017!200!150!update
}
#### Check Primary Connection This will check each host that is listed in the Mongo Servers group. It will issue a warning if the connection to the primary server of current replicaset takes 2 seconds and a critical error if it takes over 4 seconds

define service {
    use                 generic-service
    hostgroup_name          Mongo Servers
    service_description     Mongo Connect Check
    check_command           check_mongodb!connect_primary!27017!2!4
}
#### Check Collection State This will check each host that is listed in the Mongo Servers group. It can be useful to check availability of a critical collection (locks, timeout, config server unavailable...). It will issue a critical error if find_one query failed

define service {
    use                 generic-service
    hostgroup_name          Mongo Servers
    service_description     Mongo Collection State
    check_command           check_mongodb!collection_state!27017!your-database!your-collection
}
nagios-plugins-contrib-9.20140106/check_mongodb/mongodb.cfg0000644000000000000000000000220112262515026020267 0ustar # 'check_mongodb' command definition define command { command_name check_mongodb command_line /usr/lib/nagios/plugins/check_mongodb -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ } # 'check_mongodb_database' command definition define command { command_name check_mongodb_database command_line /usr/lib/nagios/plugins/check_mongodb -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ -d $ARG5$ } # 'check_mongodb_collection' command definition define command { command_name check_mongodb_collection command_line /usr/lib/nagios/plugins/check_mongodb -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ -d $ARG5$ -c $ARG6$ } # 'check_mongodb_replicaset' command definition define command { command_name check_mongodb_replicaset command_line /usr/lib/nagios/plugins/check_mongodb -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ -r $ARG5$ } # 'check_mongodb_query' command definition define command { command_name check_mongodb_query command_line /usr/lib/nagios/plugins/check_mongodb -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ -q $ARG5$ } nagios-plugins-contrib-9.20140106/check_mongodb/check_mongodb.py0000644000000000000000000015626212262515026021336 0ustar #!/usr/bin/env python # # A MongoDB Nagios check script # # Script idea taken from a Tag1 script I found and I modified it a lot # # Main Author # - Mike Zupan # Contributers # - Frank Brandewiede # - Sam Perman # - Shlomo Priymak # - @jhoff909 on github # - @jbraeuer on github # - Dag Stockstad # - @Andor on github # # USAGE # # See the README.md # import sys import time import optparse import textwrap import re import os import socket try: import pymongo except ImportError, e: print e sys.exit(2) # As of pymongo v 1.9 the SON API is part of the BSON package, therefore attempt # to import from there and fall back to pymongo in cases of older pymongo if pymongo.version >= "1.9": import bson.son as son else: import pymongo.son as son # # thanks to http://stackoverflow.com/a/1229667/72987 # def optional_arg(arg_default): def func(option, opt_str, value, parser): if parser.rargs and not parser.rargs[0].startswith('-'): val = parser.rargs[0] parser.rargs.pop(0) else: val = arg_default setattr(parser.values, option.dest, val) return func def performance_data(perf_data, params): data = '' if perf_data: data = " |" for p in params: p += (None, None, None, None) param, param_name, warning, critical = p[0:4] data += "%s=%s" % (param_name, str(param)) if warning or critical: warning = warning or 0 critical = critical or 0 data += ";%s;%s" % (warning, critical) data += " " return data def numeric_type(param): if ((type(param) == float or type(param) == int or param == None)): return True return False def check_levels(param, warning, critical, message, ok=[]): if (numeric_type(critical) and numeric_type(warning)): if param >= critical: print "CRITICAL - " + message sys.exit(2) elif param >= warning: print "WARNING - " + message sys.exit(1) else: print "OK - " + message sys.exit(0) else: if param in critical: print "CRITICAL - " + message sys.exit(2) if param in warning: print "WARNING - " + message sys.exit(1) if param in ok: print "OK - " + message sys.exit(0) # unexpected param value print "CRITICAL - Unexpected value : %d" % param + "; " + message return 2 def get_server_status(con): try: set_read_preference(con.admin) data = con.admin.command(pymongo.son_manipulator.SON([('serverStatus', 1)])) except: data = con.admin.command(son.SON([('serverStatus', 1)])) return data def main(argv): p = optparse.OptionParser(conflict_handler="resolve", description="This Nagios plugin checks the health of mongodb.") p.add_option('-H', '--host', action='store', type='string', dest='host', default='127.0.0.1', help='The hostname you want to connect to') p.add_option('-P', '--port', action='store', type='int', dest='port', default=27017, help='The port mongodb is runnung on') p.add_option('-u', '--user', action='store', type='string', dest='user', default=None, help='The username you want to login as') p.add_option('-p', '--pass', action='store', type='string', dest='passwd', default=None, help='The password you want to use for that user') p.add_option('-W', '--warning', action='store', dest='warning', default=None, help='The warning threshold we want to set') p.add_option('-C', '--critical', action='store', dest='critical', default=None, help='The critical threshold we want to set') p.add_option('-A', '--action', action='store', type='choice', dest='action', default='connect', help='The action you want to take', choices=['connect', 'connections', 'replication_lag', 'replication_lag_percent', 'replset_state', 'memory', 'memory_mapped', 'lock', 'flushing', 'last_flush_time', 'index_miss_ratio', 'databases', 'collections', 'database_size', 'database_indexes', 'collection_indexes', 'queues', 'oplog', 'journal_commits_in_wl', 'write_data_files', 'journaled', 'opcounters', 'current_lock', 'replica_primary', 'page_faults', 'asserts', 'queries_per_second', 'page_faults', 'chunks_balance', 'connect_primary', 'collection_state', 'row_count']) p.add_option('--max-lag', action='store_true', dest='max_lag', default=False, help='Get max replication lag (for replication_lag action only)') p.add_option('--mapped-memory', action='store_true', dest='mapped_memory', default=False, help='Get mapped memory instead of resident (if resident memory can not be read)') p.add_option('-D', '--perf-data', action='store_true', dest='perf_data', default=False, help='Enable output of Nagios performance data') p.add_option('-d', '--database', action='store', dest='database', default='admin', help='Specify the database to check') p.add_option('--all-databases', action='store_true', dest='all_databases', default=False, help='Check all databases (action database_size)') p.add_option('-s', '--ssl', dest='ssl', default=False, action='callback', callback=optional_arg(True), help='Connect using SSL') p.add_option('-r', '--replicaset', dest='replicaset', default=None, action='callback', callback=optional_arg(True), help='Connect to replicaset') p.add_option('-q', '--querytype', action='store', dest='query_type', default='query', help='The query type to check [query|insert|update|delete|getmore|command] from queries_per_second') p.add_option('-c', '--collection', action='store', dest='collection', default='admin', help='Specify the collection to check') p.add_option('-T', '--time', action='store', type='int', dest='sample_time', default=1, help='Time used to sample number of pages faults') options, arguments = p.parse_args() host = options.host port = options.port user = options.user passwd = options.passwd query_type = options.query_type collection = options.collection sample_time = options.sample_time if (options.action == 'replset_state'): warning = str(options.warning or "") critical = str(options.critical or "") else: warning = float(options.warning or 0) critical = float(options.critical or 0) action = options.action perf_data = options.perf_data max_lag = options.max_lag database = options.database ssl = options.ssl replicaset = options.replicaset if action == 'replica_primary' and replicaset is None: return "replicaset must be passed in when using replica_primary check" elif not action == 'replica_primary' and replicaset: return "passing a replicaset while not checking replica_primary does not work" # # moving the login up here and passing in the connection # start = time.time() err, con = mongo_connect(host, port, ssl, user, passwd, replicaset) if err != 0: return err conn_time = time.time() - start conn_time = round(conn_time, 0) if action == "connections": return check_connections(con, warning, critical, perf_data) elif action == "replication_lag": return check_rep_lag(con, host, port, warning, critical, False, perf_data, max_lag, user, passwd) elif action == "replication_lag_percent": return check_rep_lag(con, host, port, warning, critical, True, perf_data, max_lag, user, passwd) elif action == "replset_state": return check_replset_state(con, perf_data, warning, critical) elif action == "memory": return check_memory(con, warning, critical, perf_data, options.mapped_memory) elif action == "memory_mapped": return check_memory_mapped(con, warning, critical, perf_data) elif action == "queues": return check_queues(con, warning, critical, perf_data) elif action == "lock": return check_lock(con, warning, critical, perf_data) elif action == "current_lock": return check_current_lock(con, host, warning, critical, perf_data) elif action == "flushing": return check_flushing(con, warning, critical, True, perf_data) elif action == "last_flush_time": return check_flushing(con, warning, critical, False, perf_data) elif action == "index_miss_ratio": index_miss_ratio(con, warning, critical, perf_data) elif action == "databases": return check_databases(con, warning, critical, perf_data) elif action == "collections": return check_collections(con, warning, critical, perf_data) elif action == "oplog": return check_oplog(con, warning, critical, perf_data) elif action == "journal_commits_in_wl": return check_journal_commits_in_wl(con, warning, critical, perf_data) elif action == "database_size": if options.all_databases: return check_all_databases_size(con, warning, critical, perf_data) else: return check_database_size(con, database, warning, critical, perf_data) elif action == "database_indexes": return check_database_indexes(con, database, warning, critical, perf_data) elif action == "collection_indexes": return check_collection_indexes(con, database, collection, warning, critical, perf_data) elif action == "journaled": return check_journaled(con, warning, critical, perf_data) elif action == "write_data_files": return check_write_to_datafiles(con, warning, critical, perf_data) elif action == "opcounters": return check_opcounters(con, host, warning, critical, perf_data) elif action == "asserts": return check_asserts(con, host, warning, critical, perf_data) elif action == "replica_primary": return check_replica_primary(con, host, warning, critical, perf_data, replicaset) elif action == "queries_per_second": return check_queries_per_second(con, query_type, warning, critical, perf_data) elif action == "page_faults": check_page_faults(con, sample_time, warning, critical, perf_data) elif action == "chunks_balance": chunks_balance(con, database, collection, warning, critical) elif action == "connect_primary": return check_connect_primary(con, warning, critical, perf_data) elif action == "collection_state": return check_collection_state(con, database, collection) elif action == "row_count": return check_row_count(con, database, collection, warning, critical, perf_data) else: return check_connect(host, port, warning, critical, perf_data, user, passwd, conn_time) def mongo_connect(host=None, port=None, ssl=False, user=None, passwd=None, replica=None): try: # ssl connection for pymongo > 2.3 if pymongo.version >= "2.3": if replica is None: con = pymongo.MongoClient(host, port) else: con = pymongo.Connection(host, port, read_preference=pymongo.ReadPreference.SECONDARY, ssl=ssl, replicaSet=replica, network_timeout=10) else: if replica is None: con = pymongo.Connection(host, port, slave_okay=True, network_timeout=10) else: con = pymongo.Connection(host, port, slave_okay=True, network_timeout=10) #con = pymongo.Connection(host, port, slave_okay=True, replicaSet=replica, network_timeout=10) if user and passwd: db = con["admin"] if not db.authenticate(user, passwd): sys.exit("Username/Password incorrect") except Exception, e: if isinstance(e, pymongo.errors.AutoReconnect) and str(e).find(" is an arbiter") != -1: # We got a pymongo AutoReconnect exception that tells us we connected to an Arbiter Server # This means: Arbiter is reachable and can answer requests/votes - this is all we need to know from an arbiter print "OK - State: 7 (Arbiter)" sys.exit(0) return exit_with_general_critical(e), None return 0, con def exit_with_general_warning(e): if isinstance(e, SystemExit): return e else: print "WARNING - General MongoDB warning:", e return 1 def exit_with_general_critical(e): if isinstance(e, SystemExit): return e else: print "CRITICAL - General MongoDB Error:", e return 2 def set_read_preference(db): if pymongo.version >= "2.1": db.read_preference = pymongo.ReadPreference.SECONDARY def check_connect(host, port, warning, critical, perf_data, user, passwd, conn_time): warning = warning or 3 critical = critical or 6 message = "Connection took %i seconds" % conn_time message += performance_data(perf_data, [(conn_time, "connection_time", warning, critical)]) return check_levels(conn_time, warning, critical, message) def check_connections(con, warning, critical, perf_data): warning = warning or 80 critical = critical or 95 try: data = get_server_status(con) current = float(data['connections']['current']) available = float(data['connections']['available']) used_percent = int(float(current / (available + current)) * 100) message = "%i percent (%i of %i connections) used" % (used_percent, current, current + available) message += performance_data(perf_data, [(used_percent, "used_percent", warning, critical), (current, "current_connections"), (available, "available_connections")]) return check_levels(used_percent, warning, critical, message) except Exception, e: return exit_with_general_critical(e) def check_rep_lag(con, host, port, warning, critical, percent, perf_data, max_lag, user, passwd): # Use actual hostname to find replica set member when connecting locally if "127.0.0.1" == host: host = socket.gethostname() if percent: warning = warning or 50 critical = critical or 75 else: warning = warning or 600 critical = critical or 3600 rs_status = {} slaveDelays = {} try: set_read_preference(con.admin) # Get replica set status try: rs_status = con.admin.command("replSetGetStatus") except pymongo.errors.OperationFailure, e: if e.code == None and str(e).find('failed: not running with --replSet"'): print "OK - Not running with replSet" return 0 serverVersion = tuple(con.server_info()['version'].split('.')) if serverVersion >= tuple("2.0.0".split(".")): # # check for version greater then 2.0 # rs_conf = con.local.system.replset.find_one() for member in rs_conf['members']: if member.get('slaveDelay') is not None: slaveDelays[member['host']] = member.get('slaveDelay') else: slaveDelays[member['host']] = 0 # Find the primary and/or the current node primary_node = None host_node = None for member in rs_status["members"]: if member["stateStr"] == "PRIMARY": primary_node = member if member["name"].split(':')[0] == host and int(member["name"].split(':')[1]) == port: host_node = member # Check if we're in the middle of an election and don't have a primary if primary_node is None: print "WARNING - No primary defined. In an election?" return 1 # Check if we failed to find the current host # below should never happen if host_node is None: print "CRITICAL - Unable to find host '" + host + "' in replica set." return 2 # Is the specified host the primary? if host_node["stateStr"] == "PRIMARY": if max_lag == False: print "OK - This is the primary." return 0 else: #get the maximal replication lag data = "" maximal_lag = 0 for member in rs_status['members']: if not member['stateStr'] == "ARBITER": lastSlaveOpTime = member['optimeDate'] replicationLag = abs(primary_node["optimeDate"] - lastSlaveOpTime).seconds - slaveDelays[member['name']] data = data + member['name'] + " lag=%d;" % replicationLag maximal_lag = max(maximal_lag, replicationLag) if percent: err, con = mongo_connect(primary_node['name'].split(':')[0], int(primary_node['name'].split(':')[1]), False, user, passwd) if err != 0: return err primary_timediff = replication_get_time_diff(con) maximal_lag = int(float(maximal_lag) / float(primary_timediff) * 100) message = "Maximal lag is " + str(maximal_lag) + " percents" message += performance_data(perf_data, [(maximal_lag, "replication_lag_percent", warning, critical)]) else: message = "Maximal lag is " + str(maximal_lag) + " seconds" message += performance_data(perf_data, [(maximal_lag, "replication_lag", warning, critical)]) return check_levels(maximal_lag, warning, critical, message) elif host_node["stateStr"] == "ARBITER": print "OK - This is an arbiter" return 0 # Find the difference in optime between current node and PRIMARY optime_lag = abs(primary_node["optimeDate"] - host_node["optimeDate"]) if host_node['name'] in slaveDelays: slave_delay = slaveDelays[host_node['name']] elif host_node['name'].endswith(':27017') and host_node['name'][:-len(":27017")] in slaveDelays: slave_delay = slaveDelays[host_node['name'][:-len(":27017")]] else: raise Exception("Unable to determine slave delay for {0}".format(host_node['name'])) try: # work starting from python2.7 lag = optime_lag.total_seconds() except: lag = float(optime_lag.seconds + optime_lag.days * 24 * 3600) if percent: err, con = mongo_connect(primary_node['name'].split(':')[0], int(primary_node['name'].split(':')[1]), False, user, passwd) if err != 0: return err primary_timediff = replication_get_time_diff(con) if primary_timediff != 0: lag = int(float(lag) / float(primary_timediff) * 100) else: lag = 0 message = "Lag is " + str(lag) + " percents" message += performance_data(perf_data, [(lag, "replication_lag_percent", warning, critical)]) else: message = "Lag is " + str(lag) + " seconds" message += performance_data(perf_data, [(lag, "replication_lag", warning, critical)]) return check_levels(lag, warning + slaveDelays[host_node['name']], critical + slaveDelays[host_node['name']], message) else: # # less than 2.0 check # # Get replica set status rs_status = con.admin.command("replSetGetStatus") # Find the primary and/or the current node primary_node = None host_node = None for member in rs_status["members"]: if member["stateStr"] == "PRIMARY": primary_node = (member["name"], member["optimeDate"]) if member["name"].split(":")[0].startswith(host): host_node = member # Check if we're in the middle of an election and don't have a primary if primary_node is None: print "WARNING - No primary defined. In an election?" sys.exit(1) # Is the specified host the primary? if host_node["stateStr"] == "PRIMARY": print "OK - This is the primary." sys.exit(0) # Find the difference in optime between current node and PRIMARY optime_lag = abs(primary_node[1] - host_node["optimeDate"]) lag = optime_lag.seconds if percent: err, con = mongo_connect(primary_node['name'].split(':')[0], int(primary_node['name'].split(':')[1])) if err != 0: return err primary_timediff = replication_get_time_diff(con) lag = int(float(lag) / float(primary_timediff) * 100) message = "Lag is " + str(lag) + " percents" message += performance_data(perf_data, [(lag, "replication_lag_percent", warning, critical)]) else: message = "Lag is " + str(lag) + " seconds" message += performance_data(perf_data, [(lag, "replication_lag", warning, critical)]) return check_levels(lag, warning, critical, message) except Exception, e: return exit_with_general_critical(e) def check_memory(con, warning, critical, perf_data, mapped_memory): # # These thresholds are basically meaningless, and must be customized to your system's ram # warning = warning or 8 critical = critical or 16 try: data = get_server_status(con) if not data['mem']['supported'] and not mapped_memory: print "OK - Platform not supported for memory info" return 0 # # convert to gigs # message = "Memory Usage:" try: mem_resident = float(data['mem']['resident']) / 1024.0 message += " %.2fGB resident," % (mem_resident) except: mem_resident = 0 message += " resident unsupported," try: mem_virtual = float(data['mem']['virtual']) / 1024.0 message += " %.2fGB virtual," % mem_virtual except: mem_virtual = 0 message += " virtual unsupported," try: mem_mapped = float(data['mem']['mapped']) / 1024.0 message += " %.2fGB mapped," % mem_mapped except: mem_mapped = 0 message += " mapped unsupported," try: mem_mapped_journal = float(data['mem']['mappedWithJournal']) / 1024.0 message += " %.2fGB mappedWithJournal" % mem_mapped_journal except: mem_mapped_journal = 0 message += performance_data(perf_data, [("%.2f" % mem_resident, "memory_usage", warning, critical), ("%.2f" % mem_mapped, "memory_mapped"), ("%.2f" % mem_virtual, "memory_virtual"), ("%.2f" % mem_mapped_journal, "mappedWithJournal")]) #added for unsupported systems like Solaris if mapped_memory and mem_resident == 0: return check_levels(mem_mapped, warning, critical, message) else: return check_levels(mem_resident, warning, critical, message) except Exception, e: return exit_with_general_critical(e) def check_memory_mapped(con, warning, critical, perf_data): # # These thresholds are basically meaningless, and must be customized to your application # warning = warning or 8 critical = critical or 16 try: data = get_server_status(con) if not data['mem']['supported']: print "OK - Platform not supported for memory info" return 0 # # convert to gigs # message = "Memory Usage:" try: mem_mapped = float(data['mem']['mapped']) / 1024.0 message += " %.2fGB mapped," % mem_mapped except: mem_mapped = -1 message += " mapped unsupported," try: mem_mapped_journal = float(data['mem']['mappedWithJournal']) / 1024.0 message += " %.2fGB mappedWithJournal" % mem_mapped_journal except: mem_mapped_journal = 0 message += performance_data(perf_data, [("%.2f" % mem_mapped, "memory_mapped"), ("%.2f" % mem_mapped_journal, "mappedWithJournal")]) if not mem_mapped == -1: return check_levels(mem_mapped, warning, critical, message) else: print "OK - Server does not provide mem.mapped info" return 0 except Exception, e: return exit_with_general_critical(e) def check_lock(con, warning, critical, perf_data): warning = warning or 10 critical = critical or 30 try: data = get_server_status(con) # # calculate percentage # lock_percentage = float(data['globalLock']['lockTime']) / float(data['globalLock']['totalTime']) * 100 message = "Lock Percentage: %.2f%%" % lock_percentage message += performance_data(perf_data, [("%.2f" % lock_percentage, "lock_percentage", warning, critical)]) return check_levels(lock_percentage, warning, critical, message) except Exception, e: return exit_with_general_critical(e) def check_flushing(con, warning, critical, avg, perf_data): # # These thresholds mean it's taking 5 seconds to perform a background flush to issue a warning # and 10 seconds to issue a critical. # warning = warning or 5000 critical = critical or 15000 try: data = get_server_status(con) if avg: flush_time = float(data['backgroundFlushing']['average_ms']) stat_type = "Average" else: flush_time = float(data['backgroundFlushing']['last_ms']) stat_type = "Last" message = "%s Flush Time: %.2fms" % (stat_type, flush_time) message += performance_data(perf_data, [("%.2fms" % flush_time, "%s_flush_time" % stat_type.lower(), warning, critical)]) return check_levels(flush_time, warning, critical, message) except Exception, e: return exit_with_general_critical(e) def index_miss_ratio(con, warning, critical, perf_data): warning = warning or 10 critical = critical or 30 try: data = get_server_status(con) try: serverVersion = tuple(con.server_info()['version'].split('.')) if serverVersion >= tuple("2.4.0".split(".")): miss_ratio = float(data['indexCounters']['missRatio']) else: miss_ratio = float(data['indexCounters']['btree']['missRatio']) except KeyError: not_supported_msg = "not supported on this platform" if data['indexCounters'].has_key('note'): print "OK - MongoDB says: " + not_supported_msg return 0 else: print "WARNING - Can't get counter from MongoDB" return 1 message = "Miss Ratio: %.2f" % miss_ratio message += performance_data(perf_data, [("%.2f" % miss_ratio, "index_miss_ratio", warning, critical)]) return check_levels(miss_ratio, warning, critical, message) except Exception, e: return exit_with_general_critical(e) def check_replset_state(con, perf_data, warning="", critical=""): try: warning = [int(x) for x in warning.split(",")] except: warning = [0, 3, 5] try: critical = [int(x) for x in critical.split(",")] except: critical = [8, 4, -1] ok = range(-1, 8) # should include the range of all posiible values try: try: try: set_read_preference(con.admin) data = con.admin.command(pymongo.son_manipulator.SON([('replSetGetStatus', 1)])) except: data = con.admin.command(son.SON([('replSetGetStatus', 1)])) state = int(data['myState']) except pymongo.errors.OperationFailure, e: if e.code == None and str(e).find('failed: not running with --replSet"'): state = -1 if state == 8: message = "State: %i (Down)" % state elif state == 4: message = "State: %i (Fatal error)" % state elif state == 0: message = "State: %i (Starting up, phase1)" % state elif state == 3: message = "State: %i (Recovering)" % state elif state == 5: message = "State: %i (Starting up, phase2)" % state elif state == 1: message = "State: %i (Primary)" % state elif state == 2: message = "State: %i (Secondary)" % state elif state == 7: message = "State: %i (Arbiter)" % state elif state == -1: message = "Not running with replSet" else: message = "State: %i (Unknown state)" % state message += performance_data(perf_data, [(state, "state")]) return check_levels(state, warning, critical, message, ok) except Exception, e: return exit_with_general_critical(e) def check_databases(con, warning, critical, perf_data=None): try: try: set_read_preference(con.admin) data = con.admin.command(pymongo.son_manipulator.SON([('listDatabases', 1)])) except: data = con.admin.command(son.SON([('listDatabases', 1)])) count = len(data['databases']) message = "Number of DBs: %.0f" % count message += performance_data(perf_data, [(count, "databases", warning, critical, message)]) return check_levels(count, warning, critical, message) except Exception, e: return exit_with_general_critical(e) def check_collections(con, warning, critical, perf_data=None): try: try: set_read_preference(con.admin) data = con.admin.command(pymongo.son_manipulator.SON([('listDatabases', 1)])) except: data = con.admin.command(son.SON([('listDatabases', 1)])) count = 0 for db in data['databases']: dbase = con[db['name']] set_read_preference(dbase) count += len(dbase.collection_names()) message = "Number of collections: %.0f" % count message += performance_data(perf_data, [(count, "collections", warning, critical, message)]) return check_levels(count, warning, critical, message) except Exception, e: return exit_with_general_critical(e) def check_all_databases_size(con, warning, critical, perf_data): warning = warning or 100 critical = critical or 1000 try: set_read_preference(con.admin) all_dbs_data = con.admin.command(pymongo.son_manipulator.SON([('listDatabases', 1)])) except: all_dbs_data = con.admin.command(son.SON([('listDatabases', 1)])) total_storage_size = 0 message = "" perf_data_param = [()] for db in all_dbs_data['databases']: database = db['name'] data = con[database].command('dbstats') storage_size = round(data['storageSize'] / 1024 / 1024, 1) message += "; Database %s size: %.0f MB" % (database, storage_size) perf_data_param.append((storage_size, database + "_database_size")) total_storage_size += storage_size perf_data_param[0] = (total_storage_size, "total_size", warning, critical) message += performance_data(perf_data, perf_data_param) message = "Total size: %.0f MB" % total_storage_size + message return check_levels(total_storage_size, warning, critical, message) def check_database_size(con, database, warning, critical, perf_data): warning = warning or 100 critical = critical or 1000 perfdata = "" try: set_read_preference(con.admin) data = con[database].command('dbstats') storage_size = data['storageSize'] / 1024 / 1024 if perf_data: perfdata += " | database_size=%i;%i;%i" % (storage_size, warning, critical) #perfdata += " database=%s" %(database) if storage_size >= critical: print "CRITICAL - Database size: %.0f MB, Database: %s%s" % (storage_size, database, perfdata) return 2 elif storage_size >= warning: print "WARNING - Database size: %.0f MB, Database: %s%s" % (storage_size, database, perfdata) return 1 else: print "OK - Database size: %.0f MB, Database: %s%s" % (storage_size, database, perfdata) return 0 except Exception, e: return exit_with_general_critical(e) def check_database_indexes(con, database, warning, critical, perf_data): # # These thresholds are basically meaningless, and must be customized to your application # warning = warning or 100 critical = critical or 1000 perfdata = "" try: set_read_preference(con.admin) data = con[database].command('dbstats') index_size = data['indexSize'] / 1024 / 1024 if perf_data: perfdata += " | database_indexes=%i;%i;%i" % (index_size, warning, critical) if index_size >= critical: print "CRITICAL - %s indexSize: %.0f MB %s" % (database, index_size, perfdata) return 2 elif index_size >= warning: print "WARNING - %s indexSize: %.0f MB %s" % (database, index_size, perfdata) return 1 else: print "OK - %s indexSize: %.0f MB %s" % (database, index_size, perfdata) return 0 except Exception, e: return exit_with_general_critical(e) def check_collection_indexes(con, database, collection, warning, critical, perf_data): # # These thresholds are basically meaningless, and must be customized to your application # warning = warning or 100 critical = critical or 1000 perfdata = "" try: set_read_preference(con.admin) data = con[database].command('collstats', collection) total_index_size = data['totalIndexSize'] / 1024 / 1024 if perf_data: perfdata += " | collection_indexes=%i;%i;%i" % (total_index_size, warning, critical) if total_index_size >= critical: print "CRITICAL - %s.%s totalIndexSize: %.0f MB %s" % (database, collection, total_index_size, perfdata) return 2 elif total_index_size >= warning: print "WARNING - %s.%s totalIndexSize: %.0f MB %s" % (database, collection, total_index_size, perfdata) return 1 else: print "OK - %s.%s totalIndexSize: %.0f MB %s" % (database, collection, total_index_size, perfdata) return 0 except Exception, e: return exit_with_general_critical(e) def check_queues(con, warning, critical, perf_data): warning = warning or 10 critical = critical or 30 try: data = get_server_status(con) total_queues = float(data['globalLock']['currentQueue']['total']) readers_queues = float(data['globalLock']['currentQueue']['readers']) writers_queues = float(data['globalLock']['currentQueue']['writers']) message = "Current queue is : total = %d, readers = %d, writers = %d" % (total_queues, readers_queues, writers_queues) message += performance_data(perf_data, [(total_queues, "total_queues", warning, critical), (readers_queues, "readers_queues"), (writers_queues, "writers_queues")]) return check_levels(total_queues, warning, critical, message) except Exception, e: return exit_with_general_critical(e) def check_queries_per_second(con, query_type, warning, critical, perf_data): warning = warning or 250 critical = critical or 500 if query_type not in ['insert', 'query', 'update', 'delete', 'getmore', 'command']: return exit_with_general_critical("The query type of '%s' is not valid" % query_type) try: db = con.local data = get_server_status(con) # grab the count num = int(data['opcounters'][query_type]) # do the math last_count = db.nagios_check.find_one({'check': 'query_counts'}) try: ts = int(time.time()) diff_query = num - last_count['data'][query_type]['count'] diff_ts = ts - last_count['data'][query_type]['ts'] query_per_sec = float(diff_query) / float(diff_ts) # update the count now db.nagios_check.update({u'_id': last_count['_id']}, {'$set': {"data.%s" % query_type: {'count': num, 'ts': int(time.time())}}}) message = "Queries / Sec: %f" % query_per_sec message += performance_data(perf_data, [(query_per_sec, "%s_per_sec" % query_type, warning, critical, message)]) except KeyError: # # since it is the first run insert it query_per_sec = 0 message = "First run of check.. no data" db.nagios_check.update({u'_id': last_count['_id']}, {'$set': {"data.%s" % query_type: {'count': num, 'ts': int(time.time())}}}) except TypeError: # # since it is the first run insert it query_per_sec = 0 message = "First run of check.. no data" db.nagios_check.insert({'check': 'query_counts', 'data': {query_type: {'count': num, 'ts': int(time.time())}}}) return check_levels(query_per_sec, warning, critical, message) except Exception, e: return exit_with_general_critical(e) def check_oplog(con, warning, critical, perf_data): """ Checking the oplog time - the time of the log currntly saved in the oplog collection defaults: critical 4 hours warning 24 hours those can be changed as usual with -C and -W parameters""" warning = warning or 24 critical = critical or 4 try: db = con.local ol = db.system.namespaces.find_one({"name": "local.oplog.rs"}) if (db.system.namespaces.find_one({"name": "local.oplog.rs"}) != None): oplog = "oplog.rs" else: ol = db.system.namespaces.find_one({"name": "local.oplog.$main"}) if (db.system.namespaces.find_one({"name": "local.oplog.$main"}) != None): oplog = "oplog.$main" else: message = "neither master/slave nor replica set replication detected" return check_levels(None, warning, critical, message) try: set_read_preference(con.admin) data = con.local.command(pymongo.son_manipulator.SON([('collstats', oplog)])) except: data = con.admin.command(son.SON([('collstats', oplog)])) ol_size = data['size'] ol_storage_size = data['storageSize'] ol_used_storage = int(float(ol_size) / ol_storage_size * 100 + 1) ol = con.local[oplog] firstc = ol.find().sort("$natural", pymongo.ASCENDING).limit(1)[0]['ts'] lastc = ol.find().sort("$natural", pymongo.DESCENDING).limit(1)[0]['ts'] time_in_oplog = (lastc.as_datetime() - firstc.as_datetime()) message = "Oplog saves " + str(time_in_oplog) + " %d%% used" % ol_used_storage try: # work starting from python2.7 hours_in_oplog = time_in_oplog.total_seconds() / 60 / 60 except: hours_in_oplog = float(time_in_oplog.seconds + time_in_oplog.days * 24 * 3600) / 60 / 60 approx_level = hours_in_oplog * 100 / ol_used_storage message += performance_data(perf_data, [("%.2f" % hours_in_oplog, 'oplog_time', warning, critical), ("%.2f " % approx_level, 'oplog_time_100_percent_used')]) return check_levels(-approx_level, -warning, -critical, message) except Exception, e: return exit_with_general_critical(e) def check_journal_commits_in_wl(con, warning, critical, perf_data): """ Checking the number of commits which occurred in the db's write lock. Most commits are performed outside of this lock; committed while in the write lock is undesirable. Under very high write situations it is normal for this value to be nonzero. """ warning = warning or 10 critical = critical or 40 try: data = get_server_status(con) j_commits_in_wl = data['dur']['commitsInWriteLock'] message = "Journal commits in DB write lock : %d" % j_commits_in_wl message += performance_data(perf_data, [(j_commits_in_wl, "j_commits_in_wl", warning, critical)]) return check_levels(j_commits_in_wl, warning, critical, message) except Exception, e: return exit_with_general_critical(e) def check_journaled(con, warning, critical, perf_data): """ Checking the average amount of data in megabytes written to the recovery log in the last four seconds""" warning = warning or 20 critical = critical or 40 try: data = get_server_status(con) journaled = data['dur']['journaledMB'] message = "Journaled : %.2f MB" % journaled message += performance_data(perf_data, [("%.2f" % journaled, "journaled", warning, critical)]) return check_levels(journaled, warning, critical, message) except Exception, e: return exit_with_general_critical(e) def check_write_to_datafiles(con, warning, critical, perf_data): """ Checking the average amount of data in megabytes written to the databases datafiles in the last four seconds. As these writes are already journaled, they can occur lazily, and thus the number indicated here may be lower than the amount physically written to disk.""" warning = warning or 20 critical = critical or 40 try: data = get_server_status(con) writes = data['dur']['writeToDataFilesMB'] message = "Write to data files : %.2f MB" % writes message += performance_data(perf_data, [("%.2f" % writes, "write_to_data_files", warning, critical)]) return check_levels(writes, warning, critical, message) except Exception, e: return exit_with_general_critical(e) def get_opcounters(data, opcounters_name, host): try: insert = data[opcounters_name]['insert'] query = data[opcounters_name]['query'] update = data[opcounters_name]['update'] delete = data[opcounters_name]['delete'] getmore = data[opcounters_name]['getmore'] command = data[opcounters_name]['command'] except KeyError, e: return 0, [0] * 100 total_commands = insert + query + update + delete + getmore + command new_vals = [total_commands, insert, query, update, delete, getmore, command] return maintain_delta(new_vals, host, opcounters_name) def check_opcounters(con, host, warning, critical, perf_data): """ A function to get all opcounters delta per minute. In case of a replication - gets the opcounters+opcountersRepl""" warning = warning or 10000 critical = critical or 15000 data = get_server_status(con) err1, delta_opcounters = get_opcounters(data, 'opcounters', host) err2, delta_opcounters_repl = get_opcounters(data, 'opcountersRepl', host) if err1 == 0 and err2 == 0: delta = [(x + y) for x, y in zip(delta_opcounters, delta_opcounters_repl)] delta[0] = delta_opcounters[0] # only the time delta shouldn't be summarized per_minute_delta = [int(x / delta[0] * 60) for x in delta[1:]] message = "Test succeeded , old values missing" message = "Opcounters: total=%d,insert=%d,query=%d,update=%d,delete=%d,getmore=%d,command=%d" % tuple(per_minute_delta) message += performance_data(perf_data, ([(per_minute_delta[0], "total", warning, critical), (per_minute_delta[1], "insert"), (per_minute_delta[2], "query"), (per_minute_delta[3], "update"), (per_minute_delta[5], "delete"), (per_minute_delta[5], "getmore"), (per_minute_delta[6], "command")])) return check_levels(per_minute_delta[0], warning, critical, message) else: return exit_with_general_critical("problem reading data from temp file") def check_current_lock(con, host, warning, critical, perf_data): """ A function to get current lock percentage and not a global one, as check_lock function does""" warning = warning or 10 critical = critical or 30 data = get_server_status(con) lockTime = float(data['globalLock']['lockTime']) totalTime = float(data['globalLock']['totalTime']) err, delta = maintain_delta([totalTime, lockTime], host, "locktime") if err == 0: lock_percentage = delta[2] / delta[1] * 100 # lockTime/totalTime*100 message = "Current Lock Percentage: %.2f%%" % lock_percentage message += performance_data(perf_data, [("%.2f" % lock_percentage, "current_lock_percentage", warning, critical)]) return check_levels(lock_percentage, warning, critical, message) else: return exit_with_general_warning("problem reading data from temp file") def check_page_faults(con, host, warning, critical, perf_data): """ A function to get page_faults per second from the system""" warning = warning or 10 critical = critical or 30 data = get_server_status(con) try: page_faults = float(data['extra_info']['page_faults']) except: # page_faults unsupported on the underlaying system return exit_with_general_critical("page_faults unsupported on the underlaying system") err, delta = maintain_delta([page_faults], host, "page_faults") if err == 0: page_faults_ps = delta[1] / delta[0] message = "Page faults : %.2f ps" % page_faults_ps message += performance_data(perf_data, [("%.2f" % page_faults_ps, "page_faults_ps", warning, critical)]) return check_levels(page_faults_ps, warning, critical, message) else: return exit_with_general_warning("problem reading data from temp file") def check_asserts(con, host, warning, critical, perf_data): """ A function to get asserts from the system""" warning = warning or 1 critical = critical or 10 data = get_server_status(con) asserts = data['asserts'] #{ "regular" : 0, "warning" : 6, "msg" : 0, "user" : 12, "rollovers" : 0 } regular = asserts['regular'] warning_asserts = asserts['warning'] msg = asserts['msg'] user = asserts['user'] rollovers = asserts['rollovers'] err, delta = maintain_delta([regular, warning_asserts, msg, user, rollovers], host, "asserts") if err == 0: if delta[5] != 0: #the number of rollovers were increased warning = -1 # no matter the metrics this situation should raise a warning # if this is normal rollover - the warning will not appear again, but if there will be a lot of asserts # the warning will stay for a long period of time # although this is not a usual situation regular_ps = delta[1] / delta[0] warning_ps = delta[2] / delta[0] msg_ps = delta[3] / delta[0] user_ps = delta[4] / delta[0] rollovers_ps = delta[5] / delta[0] total_ps = regular_ps + warning_ps + msg_ps + user_ps message = "Total asserts : %.2f ps" % total_ps message += performance_data(perf_data, [(total_ps, "asserts_ps", warning, critical), (regular_ps, "regular"), (warning_ps, "warning"), (msg_ps, "msg"), (user_ps, "user")]) return check_levels(total_ps, warning, critical, message) else: return exit_with_general_warning("problem reading data from temp file") def get_stored_primary_server_name(db): """ get the stored primary server name from db. """ if "last_primary_server" in db.collection_names(): stored_primary_server = db.last_primary_server.find_one()["server"] else: stored_primary_server = None return stored_primary_server def check_replica_primary(con, host, warning, critical, perf_data, replicaset): """ A function to check if the primary server of a replica set has changed """ if warning is None and critical is None: warning = 1 warning = warning or 2 critical = critical or 2 primary_status = 0 message = "Primary server has not changed" db = con["nagios"] data = get_server_status(con) if replicaset != data['repl'].get('setName'): message = "Replica set requested: %s differs from the one found: %s" % (replicaset, data['repl'].get('setName')) primary_status = 2 return check_levels(primary_status, warning, critical, message) current_primary = data['repl'].get('primary') saved_primary = get_stored_primary_server_name(db) if current_primary is None: current_primary = "None" if saved_primary is None: saved_primary = "None" if current_primary != saved_primary: last_primary_server_record = {"server": current_primary} db.last_primary_server.update({"_id": "last_primary"}, {"$set": last_primary_server_record}, upsert=True, safe=True) message = "Primary server has changed from %s to %s" % (saved_primary, current_primary) primary_status = 1 return check_levels(primary_status, warning, critical, message) def check_page_faults(con, sample_time, warning, critical, perf_data): warning = warning or 10 critical = critical or 20 try: try: set_read_preference(con.admin) data1 = con.admin.command(pymongo.son_manipulator.SON([('serverStatus', 1)])) time.sleep(sample_time) data2 = con.admin.command(pymongo.son_manipulator.SON([('serverStatus', 1)])) except: data1 = con.admin.command(son.SON([('serverStatus', 1)])) time.sleep(sample_time) data2 = con.admin.command(son.SON([('serverStatus', 1)])) try: #on linux servers only page_faults = (int(data2['extra_info']['page_faults']) - int(data1['extra_info']['page_faults'])) / sample_time except KeyError: print "WARNING - Can't get extra_info.page_faults counter from MongoDB" sys.exit(1) message = "Page Faults: %i" % (page_faults) message += performance_data(perf_data, [(page_faults, "page_faults", warning, critical)]) check_levels(page_faults, warning, critical, message) except Exception, e: exit_with_general_critical(e) def chunks_balance(con, database, collection, warning, critical): warning = warning or 10 critical = critical or 20 nsfilter = database + "." + collection try: try: set_read_preference(con.admin) col = con.config.chunks nscount = col.find({"ns": nsfilter}).count() shards = col.distinct("shard") except: print "WARNING - Can't get chunks infos from MongoDB" sys.exit(1) if nscount == 0: print "WARNING - Namespace %s is not sharded" % (nsfilter) sys.exit(1) avgchunksnb = nscount / len(shards) warningnb = avgchunksnb * warning / 100 criticalnb = avgchunksnb * critical / 100 for shard in shards: delta = abs(avgchunksnb - col.find({"ns": nsfilter, "shard": shard}).count()) message = "Namespace: %s, Shard name: %s, Chunk delta: %i" % (nsfilter, shard, delta) if delta >= criticalnb and delta > 0: print "CRITICAL - Chunks not well balanced " + message sys.exit(2) elif delta >= warningnb and delta > 0: print "WARNING - Chunks not well balanced " + message sys.exit(1) print "OK - Chunks well balanced across shards" sys.exit(0) except Exception, e: exit_with_general_critical(e) print "OK - Chunks well balanced across shards" sys.exit(0) def check_connect_primary(con, warning, critical, perf_data): warning = warning or 3 critical = critical or 6 try: try: set_read_preference(con.admin) data = con.admin.command(pymongo.son_manipulator.SON([('isMaster', 1)])) except: data = con.admin.command(son.SON([('isMaster', 1)])) if data['ismaster'] == True: print "OK - This server is primary" return 0 phost = data['primary'].split(':')[0] pport = int(data['primary'].split(':')[1]) start = time.time() err, con = mongo_connect(phost, pport) if err != 0: return err pconn_time = time.time() - start pconn_time = round(pconn_time, 0) message = "Connection to primary server " + data['primary'] + " took %i seconds" % pconn_time message += performance_data(perf_data, [(pconn_time, "connection_time", warning, critical)]) return check_levels(pconn_time, warning, critical, message) except Exception, e: return exit_with_general_critical(e) def check_collection_state(con, database, collection): try: con[database][collection].find_one() print "OK - Collection %s.%s is reachable " % (database, collection) return 0 except Exception, e: return exit_with_general_critical(e) def check_row_count(con, database, collection, warning, critical, perf_data): try: count = con[database][collection].count() message = "Row count: %i" % (count) message += performance_data(perf_data, [(count, "row_count", warning, critical)]) return check_levels(count, warning, critical, message) except Exception, e: return exit_with_general_critical(e) def build_file_name(host, action): #done this way so it will work when run independently and from shell module_name = re.match('(.*//*)*(.*)\..*', __file__).group(2) return "/tmp/" + module_name + "_data/" + host + "-" + action + ".data" def ensure_dir(f): d = os.path.dirname(f) if not os.path.exists(d): os.makedirs(d) def write_values(file_name, string): f = None try: f = open(file_name, 'w') except IOError, e: #try creating if (e.errno == 2): ensure_dir(file_name) f = open(file_name, 'w') else: raise IOError(e) f.write(string) f.close() return 0 def read_values(file_name): data = None try: f = open(file_name, 'r') data = f.read() f.close() return 0, data except IOError, e: if (e.errno == 2): #no previous data return 1, '' except Exception, e: return 2, None def calc_delta(old, new): delta = [] if (len(old) != len(new)): raise Exception("unequal number of parameters") for i in range(0, len(old)): val = float(new[i]) - float(old[i]) if val < 0: val = new[i] delta.append(val) return 0, delta def maintain_delta(new_vals, host, action): file_name = build_file_name(host, action) err, data = read_values(file_name) old_vals = data.split(';') new_vals = [str(int(time.time()))] + new_vals delta = None try: err, delta = calc_delta(old_vals, new_vals) except: err = 2 write_res = write_values(file_name, ";" . join(str(x) for x in new_vals)) return err + write_res, delta def replication_get_time_diff(con): col = 'oplog.rs' local = con.local ol = local.system.namespaces.find_one({"name": "local.oplog.$main"}) if ol: col = 'oplog.$main' firstc = local[col].find().sort("$natural", 1).limit(1) lastc = local[col].find().sort("$natural", -1).limit(1) first = firstc.next() last = lastc.next() tfirst = first["ts"] tlast = last["ts"] delta = tlast.time - tfirst.time return delta # # main app # if __name__ == "__main__": sys.exit(main(sys.argv[1:])) nagios-plugins-contrib-9.20140106/check_mongodb/Makefile0000644000000000000000000000021412262515026017623 0ustar PLUGIN := check_mongodb CLEANFILES := check_mongodb DOCFILES := README.md include ../common.mk check_mongodb: cp $@.py $@ chmod 755 $@ nagios-plugins-contrib-9.20140106/check_v46/0000755000000000000000000000000012262515026015160 5ustar nagios-plugins-contrib-9.20140106/check_v46/control0000644000000000000000000000116712262515026016570 0ustar Watch: https://gitorious.org/nagios-monitoring-tools/nagios-monitoring-tools/commits/master/feed.atom ([^>]+) Version: 2013-08-26T07:33:11Z Homepage: https://gitorious.org/nagios-monitoring-tools/nagios-monitoring-tools/ Uploaders: Bernd Zeimetz Description: ipv4/ipv6 Nagios plugin wrapper Nagios plugin wrapper for running the actual plugin for both / either of IPv6 and/or IPv4. The worst result of the actual plugin runs will be the wrapper return value, that is, result will be OK only if all checks returned OK. Compatible with any plugin with standard command line options -6/-4. nagios-plugins-contrib-9.20140106/check_v46/copyright0000644000000000000000000000130312262515026017110 0ustar 2012-02, 2012-03 Ville.Mattila@csc.fi Copyright (C) 2012-2013 CSC - IT Center for Science Ltd. 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, see . nagios-plugins-contrib-9.20140106/check_v46/check_v460000755000000000000000000002321312262515026016663 0ustar #!/usr/bin/perl # # check_v46 # Nagios plugin wrapper for running the actual plugin for both / either of # IPv6 and/or IPv4. The worst result of the actual plugin runs will be # the wrapper return value, that is, result will be OK only if all checks # returned OK. Compatible with any plugin with standard command line options # -6/-4. # # 2012-02, 2012-03 Ville.Mattila@csc.fi # Copyright (C) 2012-2013 CSC - IT Center for Science Ltd. # # 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 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program; if not, see . use strict; use warnings FATAL => qw(all); use File::Basename; use Getopt::Long; use Socket; # AF_INET, AF_INET6 use Socket6; # getaddrinfo(), getnameinfo() my %ERRORS = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3, ); my %ERRSTR = reverse %ERRORS; $SIG{__DIE__} = sub { die( basename($0) . ": Error: " . $_[0] ); }; $SIG{__WARN__} = sub { print STDERR basename($0) . ": Warning: " . $_[0]; }; Getopt::Long::Configure('bundling'); Getopt::Long::Configure('pass_through'); my %opts; GetOptions( \%opts, "debug-wrapper", "help|h", "hostname|H=s", "IP-address|I=s", # support 'check_http -I' "use-ipv4|4", "use-ipv6|6", "ipv4-address|a=s", "ipv6-address|A=s", ) or die "Problems parsing command line: $!\n"; if ( $opts{help} ) { usage(); exit 0; } # Sanity checks for command line options if (!scalar @ARGV) { die("Nothing to do. Try '".basename($0)." -h'.\n"); } if (!defined($opts{hostname}) && !defined($opts{'IP-address'}) && !(defined($opts{'ipv4-address'}) || defined($opts{'ipv6-address'}))) { die("No host/address specified. Try '".basename($0)." -h'.\n"); } if ( $opts{'use-ipv4'} && $opts{'use-ipv6'} ) { die("Please specify either or none of --use-ipv4 or --use-ipv6, not both.\n"); } my $plugin_prog = shift(@ARGV); # Do both IPv4 and IPv6 checks by default, skipping # IPv6 in case -4 was specified skipping IPv4 in case # of -6. my @protocols = (); if ( $opts{'use-ipv6'} ) { push @protocols, "IPv6"; } elsif ( $opts{'use-ipv4'} ) { push @protocols, "IPv4"; } else { # No address family selected. push @protocols, qw(IPv6 IPv4); } my $out; my $rv; my @checked; foreach my $p (@protocols) { # Use the address specified as --ipv6-address or --ipv4-address argument # or, in case addresses were not specified, resolve --IP-address or # --hostname instead. # Resolve. my @addresses = (); my $addr_optname = '--hostname'; my $optname; my $af; if ( $p eq 'IPv6' ) { $optname = 'ipv6-address'; $af = AF_INET6; } elsif ( $p eq 'IPv4' ) { $optname = 'ipv4-address'; $af = AF_INET; } else { die "Protocol '$p' is not supported.\n"; } if ( defined($opts{$optname}) ) { # --ipvX-address was specified on command line. push @addresses, split( ',', $opts{$optname} ); } elsif ( defined($opts{'IP-address'}) && resolve_address( $opts{'IP-address'} , $af ) ) { # $opts{'IP-address'} has an $af address. Pass it to plugin. @addresses = ( $opts{'IP-address'} ); $addr_optname = '--IP-address'; } elsif ( resolve_address( $opts{hostname}, $af ) ) { # $opts{hostname} has an $af address. Pass it to plugin. @addresses = ( $opts{hostname} ); } else { # Neither $opts{'IP-address'} nor $opts{hostname} resolve for $af. next; } my @plugin_args = @ARGV; # Insert -6 or -4 as first arg for plugin command. unshift(@plugin_args, ( $p eq "IPv6" ) ? "-6" : "-4"); # Pass through --hostname option as-is if --IP-address was also specified. if (defined($opts{'IP-address'}) && defined($opts{hostname})) { push(@plugin_args, '--hostname', $opts{hostname}); } my $an = 1; foreach my $a (@addresses) { my @addr_args = ( $addr_optname, $a ); debug( "Running '$plugin_prog " . join( " ", @plugin_args, @addr_args ) ); open( PLUGIN, "-|", $plugin_prog, @plugin_args, @addr_args ) or die "Problems executing plugin.\n"; push(@checked, $a); my $first = ; chomp($first); debug( "Plugin output 1st line: '" . $first . "'" ); # Strip off performance data from the $first line of plugin # output. $first =~ s/^([^\|]+)\|(.*)/$1/; $out->{$p}->{$a}->{first} = $first; # Add lc($p) as prefix to performance data labels, e.g. # 'loss' becomes 'ipv6_loss' etc. my $perfdata = $2; if ( defined($perfdata) ) { my $label_prefix = lc($p); $label_prefix .= "_a" . $an if ( @addresses ); $perfdata =~ s/(^|\s+)([^=]+)/$1${label_prefix}_$2/g; debug( "Reformatted performance data: '" . $perfdata . "'" ); $out->{$p}->{$a}->{perfdata} = $perfdata; } # Store the rest of plugin output lines. while () { chomp; push(@{ $out->{$p}->{$a}->{multiline} }, $_); debug( "Plugin multiline output: '" . $_ . "'" ); } close(PLUGIN); # Store plugin command return value. my $plugin_rv = ( $? >> 8 ); $rv->{$p}->{$a} = $plugin_rv; debug("Plugin result: ".$plugin_rv." (".$ERRSTR{$plugin_rv}.")"); $an++; } } if ( !@checked ) { print "UNKNOWN: No " . join( ", ", @protocols ) . " address to check.\n"; exit $ERRORS{UNKNOWN}; } my @status_summary = (); my @status_details = (); my @perfdata = (); my $worst_rv = undef; foreach my $p ( sort { $b cmp $a } keys %$rv ) { foreach my $a ( sort keys %{ $rv->{$p} } ) { if ( !defined $worst_rv || $worst_rv < $rv->{$p}->{$a} ) { $worst_rv = $rv->{$p}->{$a}; } push(@status_summary, "$p/$a " . $ERRSTR{ $rv->{$p}->{$a} }); push(@perfdata, $out->{$p}->{$a}->{perfdata}) if ( defined $out->{$p}->{$a}->{perfdata} ); push(@status_details, "$p/$a:"); push(@status_details, $out->{$p}->{$a}->{first}); push(@status_details, @{ $out->{$p}->{$a}->{multiline} }) if ( defined $out->{$p}->{$a}->{multiline} ); } } print $ERRSTR{$worst_rv} . ": " . join( ", ", @status_summary ); print " | " . join( " ", @perfdata ) if ( @perfdata ); print "\n"; print "Status details:\n"; print $_. "\n" foreach (@status_details); exit $worst_rv; sub resolve_address { my ( $hostname, @address_families ) = @_; if (!defined($hostname)) { return (); } $hostname = lc($hostname); @address_families = ( AF_INET6, AF_INET ) unless ( scalar @address_families ); my @addrs = (); foreach my $af (@address_families) { my @res = getaddrinfo( $hostname, 'daytime', $af, SOCK_STREAM ); while ( scalar(@res) >= 5 ) { my ( $family, $socktype, $proto, $saddr, $canonname ) = @res[ 0 .. 4 ]; @res = @res[ 5 .. ($#res) ]; my ( $address, $port ) = getnameinfo( $saddr, NI_NUMERICHOST | NI_NUMERICSERV ); push @addrs, $address; } } return @addrs; # NB: unsorted! } sub usage { my $ME = basename($0); print <<"AMEN"; Usage: $ME -H [--use-ipv4|--use-ipv6] [] \ [] Options: -H, --hostname Hostname or IPv6/IPv4 address to connect to. -I, --IP-address IPv6 or IPv4 address or hostname, preferred over --hostname. Use this with the check_http plugin if you need to specify both --IP-address and --hostname for it. -4, --use-ipv4 Check IPv4 only. -6, --use-ipv6 Check IPv6 only. -a, --ipv4-address=a.b.c.d,e.f.g.h Check IPv4 using addresses a.b.c.d and e.f.g.h; plugin will be run with the address as --hostname option argument (replacing the original argument of --hostname). -A, --ipv6-address=A::B,C::D Check IPv6 using addresses A::B and C::D; see -a above for notes on plugin --hostname option handling. Path to the actual plugin program to run. Any command line arguments besides -H, -4, -6, -a and -A will be passed as-is to the . The order of options is not relevant, e.g. '$ME -H ' is effectively the same as '$ME -H '. Examples: $ME check_ssh -H host.example.org - "Automatic dual stack test": Run check_ssh for IPv6 only if the system resolver returns an IPv6 address and likewise for IPv4. $ME check_ssh -H host.example.org -4 - Run IPv4 check only. $ME check_ssh -H host.example.org -6 - Run IPv6 check only. $ME check_ssh -H host.example.org -a a.b.c.d - Pass "--hostname a.b.c.d" to check_ssh when checking IPv4 and have IPv6 checks run automatically as in the first example. $ME check_ssh -H host.example.org -6 -A A::B - IPv6 checking only, skip resolving host.example.org and just pass "--hostname A::B" to check_ssh. $ME check_http -I vhost.example.org -H lb-01.example.org - Check the HTTP virtual host vhost.example at load balancer node lb-01. AMEN } sub debug { my ($msg) = @_; return unless ( $opts{'debug-wrapper'} ); chomp $msg; print STDERR "debug: " . $msg . "\n"; } nagios-plugins-contrib-9.20140106/check_v46/Makefile0000644000000000000000000000007512262515026016622 0ustar #/usr/bin/make -f PLUGIN = check_v46 include ../common.mk nagios-plugins-contrib-9.20140106/check_multipath/0000755000000000000000000000000012262515026016550 5ustar nagios-plugins-contrib-9.20140106/check_multipath/check-multipath.pl0000644000000000000000000010160012262515026022165 0ustar #!/usr/bin/perl # # DESCRIPTION: Nagios plugin for checking the status of multipath devices on Linux servers. # # # AUTHOR: Hinnerk Rümenapf (hinnerk.ruemenapf@rrz.uni-hamburg.de) # Based on work by # - Trond H. Amundsen # - Gunther Schlegel # - Matija Nalis # #--------------------------------------------------- # # == IMPORTANT == # # "sudo" must be configured to allow 'multipath -l' # for the NAGIOS-user without password # #--------------------------------------------------- # # # $Id: $ # # Copyright (C) 2011-2013 # Hinnerk Rümenapf, Trond H. Amundsen, Gunther Schlegel, Matija Nalis, # Bernd Zeimetz, Sven Anders # # 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 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # # Vs 0.0.1 Initial Version # 0.0.2 added check if path is 'active', fixed messages sorting, # shorter messages, path state line check more flexible # # 0.1.0 added support for older 'multipath'-tool version, added # testcase 14 and 15 # # 0.1.1 bugfix, improved flexibility, added testcases 16 and 17 # 0.1.2 added support for more 'multipath'-tool versions, added testcases 18 and 19 # 0.1.3 minor improvements # 0.1.4 add hostname to "unknown error" message, improve help text # 0.1.5 add debian testcases and patch by Bernd Zeimetz # 0.1.6 Added checklunline test for "-" character, thanks to Sven Anders also for test data (testcase 22) # 0.1.7 Added test option # 0.1.8 Added Support for LUN names without HEX-ID (e.g. iSCSI LUNs) # 0.1.9 Added extraconfig option use strict; use warnings; use Switch; use POSIX qw(isatty); use Getopt::Long qw(:config no_ignore_case); # Global (package) variables used throughout the code use vars qw( $NAME $VERSION $AUTHOR $CONTACT $E_OK $E_WARNING $E_CRITICAL $E_UNKNOWN $USAGE $HELP $LICENSE $SUDO $MULTIPATH $linebreak $counter $exit_code %opt %reverse_exitcode %text2exit @multipathStateLines %nagios_level_count @perl_warnings @reports @ok_reports @debugInput ); #--------------------------------------------------------------------- # Initialization and global variables #--------------------------------------------------------------------- # === Version and similar info === $NAME = 'check-multipath.pl'; $VERSION = '0.1.9 06. MAR. 2013'; $AUTHOR = 'Hinnerk Rümenapf'; $CONTACT = 'hinnerk.ruemenapf@uni-hamburg.de hinnerk.ruemenapf@gmx.de'; # Collect perl warnings in an array $SIG{__WARN__} = sub { push @perl_warnings, [@_]; }; #--------------------------------------------- # TESTCASES # # These testcases are important documentation # and thus included in the script! #--------------------------------------------- @debugInput=( # 0. DUMMY "", # 1. OK, 2 LUNs, 4 paths each (REAL example) "mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK\n" ."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n" ."`-+- policy='round-robin 0' prio=1 status=active\n" ." |- 4:0:1:1 sdd 8:48 active ready running\n" ." |- 4:0:0:1 sdf 8:80 active ready running\n" ." |- 3:0:0:1 sdh 8:112 active ready running\n" ." `- 3:0:1:1 sdk 8:160 active ready running\n" ."mpatha (36000d77b000048d117c68c81bf7c160a) dm-0 FALCON,IPSTOR DISK\n" ."size=2.0T features='1 queue_if_no_path' hwhandler='0' wp=rw\n" ."`-+- policy='round-robin 0' prio=1 status=active\n" ." |- 4:0:1:0 sdc 8:32 active ready running\n" ." |- 4:0:0:0 sde 8:64 active ready running\n" ." |- 3:0:0:0 sdg 8:96 active ready running\n" ." `- 3:0:1:0 sdi 8:128 active ready running\n", # 2. WARN, 2 LUNs, one path missing (REAL example) "mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK\n" ."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n" ."`-+- policy='round-robin 0' prio=1 status=active\n" ." |- 3:0:0:1 sdf 8:80 active ready running\n" ." |- 4:0:0:1 sdi 8:128 active ready running\n" ." `- 4:0:1:1 sdk 8:160 active ready running\n" ."mpatha (36000d77b000048d117c68c81bf7c160a) dm-0 FALCON,IPSTOR DISK\n" ."size=2.0T features='1 queue_if_no_path' hwhandler='0' wp=rw\n" ."`-+- policy='round-robin 0' prio=1 status=active\n" ." |- 3:0:0:0 sdc 8:32 active ready running\n" ." |- 4:0:0:0 sdg 8:96 active ready running\n" ." |- 3:0:1:0 sdh 8:112 active ready running\n" ." `- 4:0:1:0 sde 8:64 active ready running\n", # 3. ERR, 2 LUNs, no paths (REAL example) "mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 \n" ."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n" ."mpatha (36000d77b000048d117c68c81bf7c160a) dm-0 \n" ."size=2.0T features='1 queue_if_no_path' hwhandler='0' wp=rw\n", #4. OK, 1 LUN, 4 paths (edit) "mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK\n" ."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n" ."`-+- policy='round-robin 0' prio=1 status=active\n" ." |- 4:0:1:1 sdd 8:48 active ready running\n" ." |- 4:0:0:1 sdf 8:80 active ready running\n" ." |- 3:0:0:1 sdh 8:112 active ready running\n" ." `- 3:0:1:1 sdk 8:160 active ready running\n", #5. WARN, 1 LUN, 2 paths (edit) "mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK\n" ."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n" ."`-+- policy='round-robin 0' prio=1 status=active\n" ." |- 4:0:1:1 sdd 8:48 active ready running\n" ." `- 3:0:1:1 sdk 8:160 active ready running\n", #6. WARN, 1 LUN, 1 path (edit) "mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK\n" ."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n" ."`-+- policy='round-robin 0' prio=1 status=active\n" ." `- 3:0:1:1 sdk 8:160 active ready running\n", #7. WARN, 1 LUN, 1 no paths (edit) "mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 \n" ."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n", #8. WARN 2 LUNs, 4 paths each, TEST: failed/faulty (edit) "mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK\n" ."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n" ."`-+- policy='round-robin 0' prio=1 status=active\n" ." |- 4:0:1:1 sdd 8:48 active ready running\n" ." |- 4:0:0:1 sdf 8:80 failed ready running\n" ." |- 3:0:0:1 sdh 8:112 active faulty running\n" ." `- 3:0:1:1 sdk 8:160 dadada ready running\n" ."mpatha (36000d77b000048d117c68c81bf7c160a) dm-0 FALCON,IPSTOR DISK\n" ."size=2.0T features='1 queue_if_no_path' hwhandler='0' wp=rw\n" ."`-+- policy='round-robin 0' prio=1 status=active\n" ." |- 4:0:1:0 sdc 8:32 faulty ready running\n" ." |- 4:0:0:0 sde 8:64 dadada ready failed\n" ." `- 3:0:1:0 sdi 8:128 active ready running\n", #9. NO LUN "", #10. Syntax error 1 "mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK\n" ."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n" ."`-+- policy='round-robin 0' prio=1 status=active\n" ."4:0:1:1 sdd 8:48 active ready running\n" ." |- 4:0:0:1 sdf 8:80 failed ready running\n" ." |- 3:0:0:1 sdh 8:112 active faulty running\n" ." `- 3:0:1:1 sdk 8:160 active ready running\n", # 11. Syntax error 2 "mpatha 36000d77b000048d117c68c81bf7c160a) dm-0 FALCON,IPSTOR DISK\n" ."size=2.0T features='1 queue_if_no_path' hwhandler='0' wp=rw\n" ."`-+- policy='round-robin 0' prio=1 status=active\n" ." |- 4:0:1:0 sdc 8:32 faulty ready running\n" ." |- 4:0:0:0 sde 8:64 active ready failed\n" ." `- 3:0:1:0 sdi 8:128 active ready running\n", # 12. Syntax error 3 "mpatha (36000d77b000048d117c68c81bf7c160a) dm-0 FALCON,IPSTOR DISK\n" ."sisze=2.0T features='1 queue_if_no_path' hwhandler='0' wp=rw\n" ."`-+- policy='round-robin 0' prio=1 status=active\n" ." |- 4:0:1:0 sdc 8:32 faulty ready running\n" ." |- 4:0:0:0 sde 8:64 active ready failed\n" ." `- 3:0:1:0 sdi 8:128 active ready running\n", #13. Syntax error 4 " |- 4:0:1:1 sdd 8:48 active ready running\n" ." `- 3:0:1:1 sdk 8:160 active ready running\n", #14. old syntax OK (REAL example) "mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK\n" ."[size=1.9T][features=1 queue_if_no_path][hwhandler=0][rw]\n" ."\\_ round-robin 0 [prio=-4][active]\n" ." \\_ 3:0:1:1 sde 8:64 [active][undef]\n" ." \\_ 3:0:0:1 sdi 8:128 [active][undef]\n" ." \\_ 4:0:1:1 sdj 8:144 [active][undef]\n" ." \\_ 4:0:0:1 sdf 8:80 [active][undef]\n" ."mpatha (36000d77b000048d117c68c81bf7c160a) dm-0 FALCON,IPSTOR DISK\n" ."[size=2.0T][features=1 queue_if_no_path][hwhandler=0][rw]\n" ."\\_ round-robin 0 [prio=-4][active]\n" ." \\_ 3:0:0:0 sdg 8:96 [active][undef]\n" ." \\_ 3:0:1:0 sdc 8:32 [active][undef]\n" ." \\_ 4:0:0:0 sdd 8:48 [active][undef]\n" ." \\_ 4:0:1:0 sdh 8:112 [active][undef]\n", #15. old syntax ERR (edit) "mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK\n" ."[size=1.9T][features=1 queue_if_no_path][hwhandler=0][rw]\n" ."\\_ round-robin 0 [prio=-4][active]\n" ." \\_ 3:0:1:1 sde 8:64 [fault][undef]\n" ." \\_ 4:0:1:1 sdj 8:144 [active][undef]\n" ." \\_ 4:0:0:1 sdf 8:80 [active][undef]\n" ."mpatha (36000d77b000048d117c68c81bf7c160a) dm-0 FALCON,IPSTOR DISK\n" ."[size=2.0T][features=1 queue_if_no_path][hwhandler=0][rw]\n" ."\\_ round-robin 0 [prio=-4][active]\n" ." \\_ 3:0:0:0 sdg 8:96 [active][undef]\n" ." \\_ 3:0:1:0 sdc 8:32 [dadada][undef]\n" ." \\_ 4:0:0:0 sdd 8:48 [active][fail]\n" ." \\_ 4:0:1:0 sdh 8:112 [fault][undef]\n", #16. Other sample (REAL example, thanks to Kai Groshert) "36006016019e02a00d009495ddbf3e011 dm-2 DGC,VRAID\n" ."size=450G features='1 queue_if_no_path' hwhandler='1 emc' wp=rw\n" ."|-+- policy='round-robin 0' prio=0 status=active\n" ."| |- 2:0:0:1 sdi 8:128 active undef running\n" ."| `- 1:0:0:1 sdc 8:32 active undef running\n" ."`-+- policy='round-robin 0' prio=0 status=enabled\n" ." |- 1:0:1:1 sdf 8:80 active undef running\n" ." `- 2:0:1:1 sdl 8:176 active undef running\n" ."36006016019e02a008e1c5f67dbf3e011 dm-5 DGC,VRAID\n" ."size=550G features='1 queue_if_no_path' hwhandler='1 emc' wp=rw\n" ."|-+- policy='round-robin 0' prio=0 status=active\n" ."| |- 1:0:1:2 sdg 8:96 active undef running\n" ."| `- 2:0:1:2 sdm 8:192 active undef running\n" ."`-+- policy='round-robin 0' prio=0 status=enabled\n" ." |- 1:0:0:2 sdd 8:48 active undef running\n" ." `- 2:0:0:2 sdj 8:144 active undef running\n" ."36003005700f0eb70160c9b590a77c13e dm-0 LSI,RAID 5/6 SAS 6G\n" ."size=136G features='0' hwhandler='0' wp=rw\n" ."`-+- policy='round-robin 0' prio=0 status=active\n" ." `- 0:2:0:0 sda 8:0 active undef running\n", #17. Other sample, modified (thanks to Kai Groshert) "36006016019e02a00d009495ddbf3e011 dm-2 DGC,VRAID\n" ."size=450G features='1 queue_if_no_path' hwhandler='1 emc' wp=rw\n" ."|-+- policy='round-robin 0' prio=0 status=active\n" ."| |- 2:0:0:1 sdi 8:128 active undef running\n" ."| `- 1:0:0:1 sdc 8:32 undef undef running\n" ."`-+- policy='round-robin 0' prio=0 status=enabled\n" ." |- 1:0:1:1 sdf 8:80 active undef running\n" ." `- 2:0:1:1 sdl 8:176 active undef running\n" ."36006016019e02a008e1c5f67dbf3e011 dm-5 DGC,VRAID\n" ."size=550G features='1 queue_if_no_path' hwhandler='1 emc' wp=rw\n" ."|-+- policy='round-robin 0' prio=0 status=active\n" ."| |- 1:0:1:2 sdg 8:96 active undef running\n" ."`-+- policy='round-robin 0' prio=0 status=enabled\n" ." |- 1:0:0:2 sdd 8:48 active undef running\n" ." `- 2:0:0:2 sdj 8:144 failed undef dadada\n" ."36003005700f0eb70160c9b590a77c13e dm-0 LSI,RAID 5/6 SAS 6G\n" ."size=136G features='0' hwhandler='0' wp=rw\n" ."`-+- policy='round-robin 0' prio=0 status=active\n" ." `- 0:2:0:0 sda 8:0 active undef running\n", #18. RedHat 4 sample, (thanks to Sébastien Maury) "MYVOLUME (36005076801810523100000000000006f)\n" ."[size=576 GB][features=\"1 queue_if_no_path\"][hwhandler=\"0\"]\n" ."\\_ round-robin 0 [active]\n" ." \\_ 13:0:1:0 sdc 8:32 [active]\n" ." \\_ 13:0:2:0 sdd 8:48 [active]\n" ." \\_ 13:0:3:0 sde 8:64 [active]\n" ." \\_ 13:0:4:0 sdf 8:80 [active]\n" ." \\_ 14:0:1:0 sdh 8:112 [active]\n" ." \\_ 14:0:2:0 sdi 8:128 [active]\n" ." \\_ 14:0:3:0 sdj 8:144 [active]\n" ." \\_ 14:0:4:0 sdk 8:160 [active]\n", #19. RedHat 4 sample, modified (thanks to Sébastien Maury) "MYVOLUME (36005076801810523100000000000006f)\n" ."[size=576 GB][features=\"1 queue_if_no_path\"][hwhandler=\"0\"]\n" ."\\_ round-robin 0 [active]\n" ." \\_ 13:0:1:0 sdc 8:32 [active]\n" ." \\_ 13:0:2:0 sdd 8:48 [active]\n" ." \\_ 13:0:3:0 sde 8:64 [failed]\n" ." \\_ 13:0:4:0 sdf 8:80 [active]\n" ." \\_ 14:0:1:0 sdh 8:112 [faulty]\n" ." \\_ 14:0:2:0 sdi 8:128 [active]\n" ." \\_ 14:0:3:0 sdj 8:144 [dadada]\n" ." \\_ 14:0:4:0 sdk 8:160 [active]\n", #20. netapp / Debian Squeeze sample (thanks to Bernd Zeimetz) "foobar_backup_lun0 (360a98aaaa72d444e423464685a786175) dm-1 NETAPP,LUN\n" ."size=299G features='1 queue_if_no_path' hwhandler='0' wp=rw\n" ."|-+- policy='round-robin 0' prio=8 status=active\n" ."| |- 0:0:0:0 sda 8:0 active ready running\n" ."| `- 1:0:0:0 sde 8:64 active ready running\n" ."`-+- policy='round-robin 0' prio=2 status=enabled\n" ." |- 0:0:1:0 sdb 8:16 active ready running\n" ." `- 1:0:1:0 sdf 8:80 active ready running\n" ."foobar_postgresql_lun0 (360a98aaaa470505a684a656930385a4a) dm-2 NETAPP,LUN\n" ."size=4.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n" ."|-+- policy='round-robin 0' prio=8 status=active\n" ."| |- 0:0:2:0 sdc 8:32 active ready running\n" ."| `- 1:0:2:0 sdg 8:96 active ready running\n" ."`-+- policy='round-robin 0' prio=2 status=enabled\n" ." |- 0:0:3:0 sdd 8:48 active ready running\n" ." `- 1:0:3:0 sdh 8:112 active ready running\n", #21. netapp / Debian Squeeze failed path sample (thanks to Bernd Zeimetz) "foobar_postgresql_lun0 (360a98aaaa470505a684a656930385a4a) dm-2 NETAPP,LUN\n" ."size=299G features='1 queue_if_no_path' hwhandler='0' wp=rw\n" ."`-+- policy='round-robin 0' prio=0 status=enabled\n" ." `- #:#:#:# - #:# active faulty running\n", #22. "-" in LUN name (thanks to Sven Anders ) "tex-lun4 (3600000e00d0000000002161200120000) dm-7 FUJITSU ,ETERNUS_DXL\n" ."[size=1.2T][features=1 queue_if_no_path][hwhandler=0]\n" ."\\_ round-robin 0 [prio=0][active]\n" ." \\_ 7:0:1:4 sdt 65:48 [active][undef]\n" ." \\_ 2:0:1:4 sdu 65:64 [active][undef]\n" ."tex-lun3 (3600000e00d0000000002161200110000) dm-8 FUJITSU ,ETERNUS_DXL\n" ."[size=1.0T][features=1 queue_if_no_path][hwhandler=0]\n" ."\\_ round-robin 0 [prio=0][active]\n" ." \\_ 2:0:1:3 sds 65:32 [active][undef]\n" ." \\_ 7:0:1:3 sdr 65:16 [active][undef]\n", #23. LUN without HEX-ID (iSCSI) thanks to Ernest Beinrohr "1STORAGE_server_target2 dm-2 IET,VIRTUAL-DISK\n" ."size=1.0T features='0' hwhandler='0' wp=rw\n" ."`-+- policy='round-robin 0' prio=0 status=active\n" ." |- 9:0:0:1 sdc 8:32 active undef running\n" ." `- 10:0:0:1 sdd 8:48 active undef running\n", #24. LUN without HEX-ID (iSCSI) thanks to Ernest Beinrohr "1STORAGE_server_target2 dm-2 IET,VIRTUAL-DISK\n" ."size=1.0T features='0' hwhandler='0' wp=rw\n" ."`-+- policy='round-robin 0' prio=1 status=active\n" ." |- 9:0:0:1 sdc 8:32 active ready running\n" ." `- 10:0:0:1 sdd 8:48 failed faulty running\n", ); # Commands with path $SUDO = '/usr/bin/sudo'; $MULTIPATH = '/sbin/multipath -l 2>/dev/null'; # Exit codes $E_OK = 0; $E_WARNING = 1; $E_CRITICAL = 2; $E_UNKNOWN = 3; # Nagios error levels reversed %reverse_exitcode = ( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN', ); # Translate text exit codes to values %text2exit = ( 'ok' => $E_OK, 'warning' => $E_WARNING, 'critical' => $E_CRITICAL, 'unknown' => $E_UNKNOWN, ); # Usage text $USAGE = <<"END_USAGE"; Usage: $NAME [OPTION]... END_USAGE # Help text $HELP = <<'END_HELP'; check-multipath.pl - Nagios plugin to check multipath connections see: http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check-2Dmultipath-2Epl/details http://www.nagios.org/documentation OPTIONS: -s, --state Prefix alerts with alert state -S, --short-state Prefix alerts with alert state abbreviated -h, --help Display this help text -V, --version Display version info -v, --verbose -m, --min-paths Low mark, less paths per LUN are CRITICAL [2] -o, --ok-paths High mark, less paths per LUN raise WARNING [4] -n, --no-multipath Exitcode for no LUNs or no multipath driver [warning] -l, --linebreak Define end-of-line string: REG regular UNIX-Newline HTML
-other- use specified string as linebreak symbol, e.g. ' ' -e, --extraconfig Specify different low/high thresholds for LUNs: ",,:" for each LUN with deviant thresholds e.g. "iscsi_lun_01,2,2:dummyLun,1,1:paranoid_lun,8,16:" "oddLun,3,3:" Use option -v to see LUN names used by this plugin. -d, --di Run testcase instead of real check [0] -t, --test Do not display testcase input, just result -h, --help Display this message END_HELP # Version and license text $LICENSE = <<"END_LICENSE"; $NAME $VERSION Copyright (C) 2011-2013 $AUTHOR License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by $AUTHOR <$CONTACT> Thanks for contributions to Bernd Zeimetz, Sven Anders and others Based on work by - Trond H. Amundsen - Gunther Schlegel - Matija Nalis END_LICENSE # Options with default values %opt = ( #'timeout' => 5, # default timeout is 5 seconds 'help' => 0, 'version' => 0, 'no_multipath' => 'warning', 'min-paths' => 2, 'ok-paths' => 4, 'state' => 0, 'di' => 0, 'shortstate' => 0, 'linebreak' => undef, 'extraconfig' => '', 'verbose' => 0, 'test' => 0, ); # Get options GetOptions(#'t|timeout=i' => \$opt{timeout}, 'h|help' => \$opt{help}, 'V|version' => \$opt{version}, 'n|no-multipath=s' => \$opt{no_multipath}, 'm|min-paths=i' => \$opt{"min-paths"}, 'o|ok-paths=i' => \$opt{"ok-paths"}, 'd|di=i' => \$opt{"di"}, 's|state' => \$opt{state}, 'S|short-state' => \$opt{shortstate}, 'l|linebreak=s' => \$opt{linebreak}, 'e|extraconfig=s' => \$opt{extraconfig}, 'v|verbose' => \$opt{verbose}, 't|test' => \$opt{test}, ) or do { print $USAGE; exit $E_UNKNOWN }; # If user requested help if ($opt{'help'}) { print $USAGE, $HELP; exit $E_OK; } # If user requested version info if ($opt{'version'}) { print $LICENSE; exit $E_OK; } # Reports (messages) are gathered in this array @reports = (); # # DOES NOT WORK when calling commands with qx() # # Setting timeout #$SIG{ALRM} = sub { # print "PLUGIN TIMEOUT: $NAME timed out after $opt{timeout} seconds\n"; # exit $E_UNKNOWN; #}; #alarm $opt{timeout}; # Default line break $linebreak = isatty(*STDOUT) ? "\n" : '
'; # Line break from option if (defined $opt{linebreak}) { if ($opt{linebreak} eq 'REG') { $linebreak = "\n"; } elsif ($opt{linebreak} eq 'HTML') { $linebreak = '
'; } else { $linebreak = $opt{linebreak}; } } # if # extraconfig option my %extraconfig = (); if ($opt{extraconfig} ne '') { if ($opt{extraconfig} !~ m!^(:?[\w\-]+,\d+,\d+:)+$! ) { unknown_error("Wrong usage of '--extraconfig' option: '" . $opt{extraconfig} . "' syntax error. See help information."); } # if while ( $opt{extraconfig} =~ m!(:?[\w\-]+),(\d+),(\d+):+!g ) { my $name =$1; my $crit =$2; my $warn =$3; if ($crit > $warn) { unknown_error("Error in '--extraconfig' option '" . $opt{extraconfig} . "' for LUN '$name': critical threshold ($crit) must not be higher than warning threshold ($warn)."); } # if #print "\n ['$name', '$crit', '$warn' ] \n"; $extraconfig{$name} = {'warn' => $warn, 'crit' => $crit}; } # while } # if # Check syntax of '--no-multipath' option if (!exists $text2exit{$opt{no_multipath}}) { unknown_error("Wrong usage of '--no-multipath' option: '" . $opt{no_multipath} . "' is not a recognized keyword"); } # Check min-paths option if ( $opt{"min-paths"} < 1 ) { unknown_error("Wrong usage of '--min-paths' option: '" . $opt{"min-paths"} . "' (must be at least 1)"); } # Check ok-paths option if ( $opt{"ok-paths"} < $opt{"min-paths"} ) { unknown_error("Wrong usage of '--ok-paths' option: '" . $opt{"ok-paths"} . "' (must NOT be less than '--min-paths': " . $opt{"min-paths"} . ")") ; } # Check di (Debug-Input) option if ( $opt{"di"} > $#debugInput ) { unknown_error("Wrong usage of '--di' option: '" . $opt{"di"} . "' (must NOT be bigger than: " . $#debugInput . ")") ; } #--------------------------------------------------------------------- # Functions #--------------------------------------------------------------------- #--------------------------------------- # # Store a message in the message array # sub report { my ($msg, $exval) = @_; return push @reports, [ $msg, $exval ]; } #--------------------------------------- # # Give an error and exit with unknown state # sub unknown_error { my $msg = shift; my $hostname = qx('hostname'); # add hostname to error message chomp $hostname; if ($opt{"test"}) { print "ERROR: $msg |TESTCASE|\n"; } else { print "ERROR: $msg |Host: $hostname|\n"; } exit $E_UNKNOWN; } #--------------------------------------- # # get output of multipath -l # or debug input (testcase) # sub get_multipath_text { my $output = ""; if ( ! $opt{"di"} ) { # normal action #print "Reale USER-ID : $< Effektive USER-ID : $>\n"; #print getpwuid( $< )."\n"; my $command = ""; if ($< == 0 ) { # called by root? $command = $MULTIPATH; # use command "as is" } else { $command = "$SUDO $MULTIPATH"; # otherwise: use sudo } #print "[$command]\n"; $output = qx($command); my $err = $!; if ($? != 0) { # if no multipath driver found just set empty string (no LUNs) if ( $output =~ m/multipath kernel driver not loaded/ ) { $output = ""; } else { if ($< != 0) { # (root) NOPASSWD: /sbin/multipath -l my $sudoListCommand = "$SUDO -l 2>/dev/null"; my $sudoList = qx($sudoListCommand); if ($sudoList !~ m!\(root\) \s+ NOPASSWD\: \s+ /sbin/multipath \s+ \-l!x ) { unknown_error ("'sudo' not configured for command: '$MULTIPATH'?" ); } # if } # if unknown_error ("command '$command' FAILED: '$output', '$err'"); } } #print "-----\ndi=". $opt{"di"} ."\n-----\n[". $output ."]\n-----\n\n"; } else { # TESTCASE $output = $debugInput[$opt{"di"}]; if (!$opt{"test"} ) { print "=====\nTESTCASE di=". $opt{"di"} ."\n-----\n". $output ."=====\n"; } # if } $output =~ s/[\[\]\\]+/ /g; # substitute special characters with space my @textArray = split (/[\n\r]+/, $output); # Array of text lines return \@textArray; } #--------------------------------------- # # check if text is a LUN description line # if so, set variables for new LUN # sub checkLunLine { my ($textLine, $rCurrentLun, $rLunPaths) = @_; #print "checkLunLine: '$textLine'\n"; # mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK # mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 # MYVOLUME (36005076801810523100000000000006f) # tex-lun4 (3600000e00d0000000002161200120000) dm-7 FUJITSU ,ETERNUS_DXL if ($textLine =~ m/^([\w\-]+) \s+ \([0-9a-fA-F]+\)/x) { $$rCurrentLun = $1; # do initialisations for new LUN #report("named LUN $$rCurrentLun found", $E_OK); $$rLunPaths{$$rCurrentLun} = 0; return 1; } # 36006016019e02a00d009495ddbf3e011 dm-2 DGC,VRAID elsif ($textLine =~ m/^[0-9a-fA-F]+ \s+ ([\w\-\_]+)/x) { $$rCurrentLun = $1; # do initialisations for new LUN #report("simple LUN $$rCurrentLun found", $E_OK); $$rLunPaths{$$rCurrentLun} = 0; return 1; } # iscsi-LUN example # 1STORAGE_server_target2 dm-2 IET,VIRTUAL-DISK #elsif ($textLine =~ m/^([\w\-]+) \s+ [a-z]+\-\d+/x) { elsif ($textLine =~ m/^([\w\-]+) \s+ [a-z]+\-\d+ \s+ [\w\-\,]+/x) { $$rCurrentLun = $1; # do initialisations for new LUN #report("LUN without HEX-ID $$rCurrentLun found", $E_OK); $$rLunPaths{$$rCurrentLun} = 0; return 1; } else { return 0; } # if } # sub #--------------------------------------- # # check if text is a policy description line # sub checkPolicyLine { my ($textLine) = @_; #print "checkPolicyLine: '$textLine'\n"; # `-+- policy='round-robin 0' prio=-1 status=active # |-+- policy='round-robin 0' prio=0 status=active ##\_ round-robin 0 [prio=-4][active] ## _ round-robin 0 prio=-4 active #\_ round-robin 0 [active] # _ round-robin 0 active #if ( $textLine =~ m/^[|\`\-\+_\s]+ \s+ (?:policy=\')?[\w\.\-\_]+ \s \d(?:\')? \s+ prio=/x ) { if ( $textLine =~ m/^[|\`\-\+_\s]+ \s+ (?:policy=\')?[\w\.\-\_]+ \s \d(?:\')? \s+ \w+/x ) { return 1; } else { return 0; } # if } # sub #--------------------------------------- # # analyse multipath state # (output lines) # sub checkMultipathText { my ($rTextArray) = @_; my $state = "pathDesc"; my $currentLun = ""; my %lunPaths = (); my $i = 0; foreach my $textLine (@$rTextArray) { $i++; #print "$i:\n"; switch($state) { # initial state: look for path state, new LUN Name, policy case "pathDesc" { # check for path status line # |- 3:0:0:1 sdf 8:80 active undef running ## \_ 3:0:1:1 sde 8:64 [active][undef] ## _ 3:0:1:1 sde 8:64 active undef ## \_ 13:0:1:0 sdc 8:32 [active] ## _ 13:0:1:0 sdc 8:32 active # (thanks to Bernd Zeimetz) # `- #:#:#:# - #:# active faulty running #if ( $textLine =~ m/^[\s_\|\-\`\\\+]+ [\d\:]+ \s+ (\w+) \s+ [\d\:]+ \s+ \w+ \s+ \w+/xi ) { if ( $textLine =~ m/^[\s_\|\-\`\\\+]+ [#\d\:]+ \s+ ([\w\-]+) \s+ [#\d\:]+ \s+ \w+/xi ) { my $pathName = $1; #print "'$textLine', "; #print "LUN '$currentLun', path '$pathName'\n"; if ($textLine =~ m/fail|fault/) { # fail or fault? #print "FAULT: $textLine\n"; report("LUN $currentLun, path $pathName: ERROR.", $E_WARNING); } elsif ($textLine !~ m/\sactive\s/) { # path is active? #print "NOT active: $textLine\n"; report("LUN $currentLun, path $pathName: NOT active.", $E_WARNING); } else { if ( $currentLun eq "") { # YES => check logic, increase path count for LUN unknown_error ("Path info before LUN name. Line $i:\n'$textLine'") } $lunPaths{$currentLun}++; } # if } # check for new LUN name elsif ( checkLunLine ($textLine, \$currentLun, \%lunPaths) ) { $state="lunInfo"; } # check for new LUN name elsif ( ($currentLun ne "") && checkPolicyLine ($textLine) ) { ; # SKIP NESTED POLICY } else { # error: unknown line format unknown_error ("Line $i not recognised. Expected path info, new LUN or nested policy:\n'$textLine'") } } # case # after new LUN was found skip the INFO-Line (nothing else...) case "lunInfo" { if ( $currentLun eq "") { # check logic unknown_error ("No current LUN while looking for LUN info. Line $i:\n'$textLine'") } # size=2.0T features='1 queue_if_no_path' hwhandler='0' wp=rw ##[size=1.9T][features=1 queue_if_no_path][hwhandler=0][rw] ## size=1.9T features=1 queue_if_no_path hwhandler=0 rw #[size=576 GB][features="1 queue_if_no_path"][hwhandler="0"] # size=576 GB features="1 queue_if_no_path" hwhandler="0" #if ($textLine =~ m/^\s*size=[\w\.]+\s+features=/x) { if ($textLine =~ m/^\s*size=[\w\.]+\s+ ([a-zA-Z]+\s+)? features=/x) { $state = "pathPolicy"; } else { # error: unknown line format unknown_error ("Line $i not recognised. Expected LUN info:\n'$textLine'") } } # case # after LUN info was found skip the path policy (nothing else...) # or handle new LUN if no paths available case "pathPolicy" { if ( $currentLun eq "") { # check logic unknown_error ("No current LUN while looking for path policy. Line $i:\'$textLine'") } if ( checkPolicyLine ($textLine) ) { $state = "pathDesc"; } # new LUN found elsif ( checkLunLine ($textLine, \$currentLun, \%lunPaths) ) { $state = "lunInfo"; } else { # error: unknown line format unknown_error ("Line $i not recognised. Expected path policy or new LUN:\n'$textLine'") } } # case } # switch } # foreach return \%lunPaths } # sub #===================================================================== # Main program #===================================================================== my @multipathStateText = @{ get_multipath_text() }; # get input data my %lunPaths = %{checkMultipathText ( \@multipathStateText )}; # analyse it # if no LUN found... if (scalar keys %lunPaths == 0) { report ("No LUN found or no multipath driver.", $text2exit{$opt{no_multipath}}); } # # Check path count for each LUN # foreach my $lunName ( sort {$a cmp $b} keys %lunPaths) { my $pathCount = $lunPaths{$lunName}; my $warn = $opt{'ok-paths'}; my $crit = $opt{'min-paths'}; # $extraconfig{$name} = {'warn' => $warn, 'crit' => $crit}; if (defined ($extraconfig{$lunName}) ) { # deviant thresholds from options? $warn = ${$extraconfig{$lunName}}{'warn'}; $crit = ${$extraconfig{$lunName}}{'crit'}; #print "$lunName: $pathCount EXTRA: crit=$crit, warn=$warn\n"; } else { #print "$lunName: $pathCount STANDARD\n"; }# if if ($pathCount < $crit){ report("LUN $lunName: less than $crit paths ($pathCount/$warn)!", $E_CRITICAL); } elsif ($pathCount < $warn){ report("LUN $lunName: less than $warn paths ($pathCount/$warn).", $E_WARNING); } else { report("LUN $lunName: $pathCount/$warn.", $E_OK); } } # foreach # Counter variable %nagios_level_count = ( 'OK' => 0, 'WARNING' => 0, 'CRITICAL' => 0, 'UNKNOWN' => 0, ); # holds only ok messages @ok_reports = (); # Reset the WARN signal $SIG{__WARN__} = 'DEFAULT'; # Print any perl warnings that have occured if (@perl_warnings) { foreach (@perl_warnings) { chop @$_; report("INTERNAL ERROR: @$_", $E_UNKNOWN); } # foreach } # if $counter = 0; ALERT: foreach (sort {$a->[1] <= $b->[1]} @reports) { my ($msg, $level) = @{ $_ }; $nagios_level_count{$reverse_exitcode{$level}}++; # Prefix with nagios level if specified with option '--state' $msg = $reverse_exitcode{$level} . ": $msg" if $opt{state}; # Prefix with one-letter nagios level if specified with option '--short-state' $msg = (substr $reverse_exitcode{$level}, 0, 1) . ": $msg" if $opt{shortstate}; if ($level == $E_OK && !$opt{verbose}) { push @ok_reports, $msg; next ALERT; } ($counter++ == 0) ? print $msg : print $linebreak, $msg; } # foreach # Determine our exit code $exit_code = $E_OK; if ($nagios_level_count{UNKNOWN} > 0) { $exit_code = $E_UNKNOWN; } if ($nagios_level_count{WARNING} > 0) { $exit_code = $E_WARNING; } if ($nagios_level_count{CRITICAL} > 0) { $exit_code = $E_CRITICAL; } # Print OK messages $counter = 0; if ($exit_code == $E_OK && !$opt{verbose}) { foreach my $msg (@ok_reports) { ($counter++ == 0) ? print $msg : print $linebreak, $msg; } # foreach } # if print $linebreak; #print "$exit_code\n"; # Exit with proper exit code exit $exit_code; nagios-plugins-contrib-9.20140106/check_multipath/multipath.cfg0000644000000000000000000000022312262515026021235 0ustar # 'multipath' command definition define command{ command_name check_multipath command_line /usr/lib/nagios/plugins/check_multipath } nagios-plugins-contrib-9.20140106/check_multipath/control0000644000000000000000000000065012262515026020154 0ustar Watch: http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check-2Dmultipath-2Epl/details Current Version
([0-9.]+)
Version: 0.1.9 Homepage: http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check-2Dmultipath-2Epl/details Uploaders: Bernd Zeimetz Description: plugin to monitor the number of available and failed paths of multipath devices nagios-plugins-contrib-9.20140106/check_multipath/copyright0000644000000000000000000000131612262515026020504 0ustar Copyright (C) 2011 Hinnerk Rümenapf, Trond H. Amundsen, Gunther Schlegel, Matija Nalis, Bernd Zeimetz 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . nagios-plugins-contrib-9.20140106/check_multipath/version0000644000000000000000000000000612262515026020154 0ustar 0.1.5 nagios-plugins-contrib-9.20140106/check_multipath/Makefile0000644000000000000000000000021412262515026020205 0ustar PLUGIN := check_multipath CLEANFILES := check_multipath include ../common.mk check_multipath: check-multipath.pl cp $< $@ chmod 755 $@ nagios-plugins-contrib-9.20140106/check_whois/0000755000000000000000000000000012262515026015672 5ustar nagios-plugins-contrib-9.20140106/check_whois/control0000644000000000000000000000073512262515026017302 0ustar Homepage: http://dns.measurement-factory.com/tools/nagios-plugins/check_whois.html Watch: http://dns.measurement-factory.com/tools/nagios-plugins/src/check_whois Id: check_whois,v ([0-9.]+) Uploaders: Bernd Zeimetz Description: plugin to check for the expiration of a domain. The plugin may not yet work with all registrars, since their output formats differ or there is no expiration date in the whois output. Recommends: libdate-manip-perl Version: 1.14 nagios-plugins-contrib-9.20140106/check_whois/copyright0000644000000000000000000000272312262515026017631 0ustar Copyright (c) 2008, The Measurement Factory, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of The Measurement Factory nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. nagios-plugins-contrib-9.20140106/check_whois/check_whois0000644000000000000000000001640412262515026020110 0ustar #!/usr/bin/perl # nagios: -epn # $Id: check_whois,v 1.14 2013/09/30 17:24:45 wessels Exp $ # # check_whois # # nagios plugin to check the expiration date of a domain. # Copyright (c) 2008, The Measurement Factory, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # Neither the name of The Measurement Factory nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # usage # # define command { # command_name check-whois # command_line /usr/local/libexec/nagios-local/check_whois $HOSTADDRESS$ # } # # define service { # name whois-service # check_command check-whois # ... # } # # define host { # use dns-zone # host_name zone.example.com # alias ZONE example.com # } # # define service { # use whois-service # host_name zone.example.com # } # AUTHORS and CONTRIBUTORS: # Duane Wessels # Matt Christian # John Lines use strict; use warnings; use Getopt::Std; use Date::Manip; use POSIX qw(strftime); use Env '@PATH'; my %opts; getopts('xds:', \%opts); my $string_found = 0; my $name = shift or die usage(); $name =~ s/^zone\.//; my $whoiscmd = findwhois(); print STDERR "Whois command = $whoiscmd\n" if $opts{d}; grok($whoiscmd, $name); exit 0; sub findwhois { # List of whois commands to find (in order) my @whoiscmds = qw( jwhois whois ); foreach my $wc (@whoiscmds) { if (grep { -x "$_/$wc" } @PATH) { $wc .= ' -n ' if ($wc eq 'jwhois'); return $wc; } } die "Could not find a whois command!\n"; } sub grok { my $whoiscmd = shift || die; my $name = shift || die; my $arg = $name; if ($name =~ /\.name$/) { # In order to get useful information out of # the .NAME whois server, the query must # be reformatted $arg = "'domain = $name'"; } open (CMD, "$whoiscmd $arg|") || die; my $registrar = undef; my $whoisservice = undef; my $expires = undef; my $status = ''; my $state = 0; print STDERR "checking $name\n" if $opts{d}; while () { tr/A-Z/a-z/; print if $opts{d}; $registrar = $1 if (/registrar:\s*(\S.*)/); if (!defined($registrar)) { $registrar = $1 if (/registrar id:\s*(\S.*)/); $registrar = $1 if (/registrar handle\.*:\s*(\S.*)/); $registrar = $1 if (/\s+(.*)\s*\[tag\s*=.*\]/); # # CIRA whois output if ($name =~ /\.ca$/ && /^registrar:/) { $_ = ; tr/A-Z/a-z/; $registrar = $1 if (/name:\s+(.*)/); } } if (!defined($whoisservice)) { $whoisservice = $1 if (/the\s+(\w+)\s+whois\s+database/); $whoisservice = $1 if (/^\s+(\w+)\s+whois\s+service/); $whoisservice = $1 if (/record\s+maintained\s+by:\s+(\S.*)/); } if (/expiration date:\s*(\d\d-\w\w\w-\d\d\d\d)/) { $expires = $1; } elsif (/(record )?(will )?expires? on[ :](.*)\.?$/) { $expires = $3; } elsif (/expires:\s+([-\w\s]+)/) { $expires = $1; } elsif (/(domain )?expiration date:\s+(.*)/) { $expires = $2; } elsif ($name =~ /\.gov\.uk$/ && /renewal date:/) { chomp($_ = ); tr/A-Z/a-z/; $expires = $_; } elsif (/(expiry|renewal) date:\s+(.*)/) { $expires = $2; } if (defined $opts{s}) { $string_found = 1 if (/$opts{s}/i); } } close(CMD); # Remove any trailing dot from the expire time # $expires =~ s/\.$// if defined $expires; if (defined $registrar) { $registrar = 'gandi' if ($registrar eq 'r42-lror'); $registrar = 'go daddy' if ($registrar =~ /go daddy/); $registrar = 'go daddy' if ($registrar eq 'r91-lror'); } elsif (defined $whoisservice) { $registrar = $whoisservice . ' whois service'; } elsif (defined $opts{x}) { $registrar = 'UNKNOWN'; } else { critical("Didn't find Registrar"); } # Date::Manip doesn't like the DD-MM-YYYY format, so we reformat it # as YYYY-MM-DD. Also month might not be numeric. # if ($expires =~ /-\w+-\d\d\d\d$/) { my @p = split(/-/, $expires); if ($p[1] =~ /^[a-zA-Z]+$/ || $p[0] > 12) { # DD-MM-YYYY $expires = join('-', $p[2], $p[1], $p[0]); } elsif ($p[0] =~ /^[a-zA-Z]+$/ || $p[1] > 12) { # MM-DD-YYYY $expires = join('-', $p[2], $p[0], $p[1]); } else { # Unknown, assume DD-MM-YYYY $expires = join('-', $p[2], $p[1], $p[0]); } } my $t; if (defined $expires) { $t = UnixDate($expires, "%s"); critical("Invalid expiration time '$expires'") unless defined $t; critical("Invalid expiration time '$expires'") if ($t < 0); $expires = strftime("%Y-%m-%d", localtime($t)); } elsif (defined $opts{x}) { $t = time + (86400 * 90); $expires = 'UNKNOWN'; } else { critical("Didn't find expiration timestamp"); } if (defined $opts{s} && 0 == $string_found) { critical ("String '$opts{s}' not found in whois output"); } my $tense = $t < time ? 'd' : 's'; critical("Expire$tense $expires at $registrar") if ($t - time < (86400*7)); warning ("Expire$tense $expires at $registrar") if ($t - time < (86400*28)); success ("Expires $expires at $registrar"); } sub success { output('OK', shift); exit(0); } sub warning { output('WARNING', shift); exit(1); } sub critical { output('CRITICAL', shift); exit(2); } sub output { my $state = shift; my $msg = shift; printf "WHOIS %s: %s\n", $state, $msg; } sub usage { "usage: $0 [-xd] [-s string] domain\n". "\t-d\tDebugging\n". "\t-x\tDon't complain if Registrar cannot be determined.\n". "\t-s str\tRequire that the string 'str' appear in the whois output\n"; } nagios-plugins-contrib-9.20140106/check_whois/whois.cfg0000644000000000000000000000016512262515026017506 0ustar define command { command_name check_whois command_line /usr/lib/nagios/plugins/check_whois $HOSTADDRESS$ } nagios-plugins-contrib-9.20140106/check_whois/Makefile0000644000000000000000000000002512262515026017327 0ustar include ../common.mk nagios-plugins-contrib-9.20140106/debian/0000755000000000000000000000000012262515411014624 5ustar nagios-plugins-contrib-9.20140106/debian/README.Debian.plugins.in0000644000000000000000000000127412262515026020760 0ustar nagios-plugins-contrib ====================== Some plugins require additional libraries. To prevent you from having to install dozens of further packages that you don't actually need, there is no strict dependency on those libraries. Rather, they are listed as recommenda- tions or suggestions. apt-get(8) and aptitude(8) will install recommended packages automatically by default. If you did not disable this feature you will have everything in place to operate all plugins when installing the "nagios-plugins-contrib" package. Else you have to install missing dependencies manually (see the section "Plugin dependencies" below). Plugin dependencies: -------------------- #AUTO_UPDATE_README# nagios-plugins-contrib-9.20140106/debian/changelog0000644000000000000000000003271512262515026016510 0ustar nagios-plugins-contrib (9.20140106) unstable; urgency=low [ Bernd Zeimetz ] * [63ddfa7a] Make checksum file readable for nagios. * [583b6cde] Avoid line overflows due to expansion of $0. * [9895bf1b] Merge pull request #18 from waja/solid.net solid.net seems expired (maybe come back in the future) * [31a0dc1f] Fix POD encoding in check_rbl. Thanks to David Suárez (Closes: #724175) * [a58ff4e7] Run dh_python2 for plugins and normal modules. * [cd30e982] Add check_graphite. * [e234911d] Auto update of debian/copyright * [cb276d08] Auto update of debian/control * [9dc17c93] Merge remote-tracking branch 'github/master' * [4e577da9] Revert accidentally merged, duplicated bugfix. This reverts commit 98008e4aea3687cff8c7ab3f871809e219591cde. * [e8387d2a] Merge pull request #23 from waja/update_check_rbl_1.3.1. Update check rbl 1.3.1 * [826a436e] Merge pull request #24 from waja/update_check_webinject_1.80. Update check_webinject to 1.80 * [5c2907b0] Merge pull request #25 from waja/update_check_whois_1.14. Update check_whois to 1.14 * [e8c11f0a] Merge pull request #26 from waja/fix_check_rbl_patch. Remove accidently double added check_rbl/disable_solid.net in patch seri... * [bfb67e88] Use dh --with autotools_dev. (Closes: #727468) * [363af25f] Auto update of debian/control * [952811b3] Run dh --with autotools_dev in the clean target, too. * [8898d503] Merge pull request #27 from waja/check_cups. Check cups * [8abc4359] Merge pull request #28 from waja/check_mongodb. Add check_mongodb plugin * [423e59f0] Merge pull request #30 from waja/fix_check_rbl. Fix version of check_rbl in control file * [00be70e5] Merge pull request #33 from waja/check_bgpstate. Add check_bgpstate plugin * [9591a3ca] Merge pull request #29 from waja/check_drbd. Add check_drdb plugin * [5f531a44] Merge pull request #32 from waja/fix_check_webinject_epn. Disable epn for check_webinject, cause it leaves temp files around * [ef8ba64d] Remove 'read LICENSE ...' from check_graphite/copyright [ Jan Wagner ] * [5c207ef5] Add check_snmp_time plugin [ Bernd Zeimetz ] * [a6165e60] Merge remote-tracking branch 'origin/master' * [de5770f4] Merge remote-tracking branch 'github/master' * [41c9df6a] Merge pull request #38 from evgeni/ignore-ganeti check_libs: ignore /var/lib/ganeti/ * [4badebed] Merge pull request #37 from evgeni/check-raid-305. Update check_raid to 3.0.5 -- Bernd Zeimetz Mon, 06 Jan 2014 12:56:27 +0100 nagios-plugins-contrib (8.20130824) unstable; urgency=low [ Jan Wagner ] * [3bce1c4b] Merge remote-tracking branch 'debian/master' * [bcf6f1d9] Merge remote-tracking branch 'bzed/master' * [d436ca0e] Fixing check_raid for 3ware controllers when reporting "NOT-PRESENT" (Closes: #692598) * [8f55cc69] add patch check_raid/3ware_fix_notpresent * [506000a8] Merge remote-tracking branch 'bzed/master' * [62bbdd2f] disable epn * [6c73c15b] Auto update of debian/control * [5e43a9ae] update check_ssl_cert * [ad1c463d] update check_ssl_cert * [4975ff97] Revert "Fixing check_raid for 3ware controllers when reporting "NOT-PRESENT"" This reverts commit d436ca0e6a4e3147265627afd256856c9fab3836. * [f6c71f97] drop removed patch * [4e52a4ad] Merge remote-tracking branch 'bzed/master' * [c01cd192] fix typo in patches/check_rbl/epn [ Bernd Zeimetz ] * [a61aefc4] Add syslog output to check_checksums * [62d55e7e] New plugin: check_ajp * [5a00818c] Auto update of debian/control * [eb29e6c6] Auto update of debian/copyright * [cf6c7f44] Delete unused patch file check_raid/cciss_bugfix * [a3e036b7] Fix an error message in check_raid if not using cciss_vol_status. Use of uninitialized value in -x at /usr/lib/nagios/plugins/check_raid line 2495. Thanks to Stefan Kaltenbrunner * [6dddc838] Updating changelog. * [192396b7] Fix check_ajp to return CRITICAL on connection errors. * [d8d41faf] Add config file for check_ajp. * [4e092c04] Read 5 bytes only - thats all an AJP pong needs. * [26cb156f] Be nice and close the AJP connection socket. * [ccc8f7d6] check_ajp: print an error message if --app is not specified. * [915d3708] Add -epn to check_packages. Thanks to Salvatore Bonaccorso (Closes: #691012) * [240ca0fc] Updating date/version in changelog. * [8534630e] Update DSA nagios checks/scripts * [5078ff97] Refresh patches for new dsa plugin versions -- Bernd Zeimetz Sat, 24 Aug 2013 00:06:27 +0200 nagios-plugins-contrib (7.20130614) unstable; urgency=low [ Bernd Zeimetz ] * [036816ff] Merge pull request #15 from evgeni/master check_packages should find security updates on the official security mirror too * [658a2e93] Add check_checksums nagios plugin. * [9d5d2056] Updating check_raid. * [e3ec1293] Updating check_ssl_cert to 1.14.6 * [779543ef] Updating check_hpasm to 4.6.3.2 * [0c838ee9] Updating check_multipath to 0.1.9 * [bec11251] Updating check_whois to 1.13 * [8e0a65d0] Refreshing patches. * [c0b88cdb] Auto update of debian/copyright * [59648a17] Fix src link for check_hpasm * [8c242d0f] Support pre-Wheezy versions of coretutils in check_checksums. * [7d3d2a06] Update release date in changelog (gah!). * [768e463b] Merge pull request #16 from evgeni/master check_libs: ignore /var/lib/postgresql/ and /var/log/ * [2b9aace5] Bumping standards-Verison, no changes needed. [ Jan Wagner ] * [3bb873e4] disable epn for check_rbl [ Evgeni Golov ] * [2a7ab4b8] check_libs: ignore /var/spool/ -- Bernd Zeimetz Fri, 14 Jun 2013 20:53:49 +0200 nagios-plugins-contrib (6.20130521) unstable; urgency=low * [e68c82e1] check_raid: do not run hpacucli if cciss_vol_status is available. * [4a1c57e8] Also support tw-cli as additional name for the 3ware binary. Thanks to Dennis Hoppe * [eb5e1c7c] Add /run/ to the check_libs ignore file. -- Bernd Zeimetz Tue, 21 May 2013 22:11:50 +0200 nagios-plugins-contrib (5.20130307) experimental; urgency=low * [aa113517] Fix typos s/Recommands/Recommends/ * [8e2b3019] Ensure typoed fieldnames in control files are not ignored. * [ecead75d] Add extras folder. * [0423b2a4] Add check_memory. * [90ba4bec] Better command example for send_nsca_host_or_service_check_result * [a564c43d] Add check_nfsmounts. * [dc3d5425] Add Recommends for check_nfsmounts. * [bf12e2e0] Add check_apt for check_multi. * [52d46e1a] Add perl dependencies automatically. * [e77b2058] Fix building check_memcached in Ubuntu. * [98c1f4c1] extras needs to Suggests only. * [f84d3678] Add check_clamav. * [05cca8f6] Merge branch 'master' of vasks.debian.org:/git/pkg-nagios/pkg-nagios-plugins-contrib * [80415a76] Add some missing directories to the check-libs config. * [08a91068] Add check_varnish * [15385538] Fix watch line of check_clamav. * [74bf1d94] Update check_raid to version 3.0 * [26209f4e] Update check_hpasm to 4.6.3 * [6cd0fa8f] Updating check_multipath to 0.1.8 * [34fa0ffc] Updating check_mysql_health to 2.1.8.2 * [9e3f357d] Updating check_ssl_cert to 1.14.4 * [6e6813a9] Refreshing patches. * [b6f439c4] Remove unused check_varnish Makefile. * [6151979b] Rename buggy auto-generated libexec directory. * [4c08976d] Add pkg-config as check_varnish build dependency. * [05f09fee] Auto update of debian/copyright * [9d462776] Auto update of debian/control * [09060a70] Add --enable-stack-protector to default options. * [37896ae4] Add a cciss related bugfix to check_raid. -- Bernd Zeimetz Thu, 07 Mar 2013 00:31:10 +0100 nagios-plugins-contrib (4.20120702) unstable; urgency=low * [bf291c63] check_backuppc: move backuppc to Suggests. Thanks to Werner Detter (Closes: #679871) * [0997dfd3] Auto update of debian/control -- Bernd Zeimetz Mon, 02 Jul 2012 19:28:52 +0200 nagios-plugins-contrib (3.20120614) unstable; urgency=low * [30fd20be] check_packages should return CRITICAL for outstanding security updates. * [3cd5656f] Fix last patch; refresh others. * [2c3c1626] Remove extra debug print statement. * [4e43ec28] Fix a funky ? : related bug. * [e9172807] Add a check_apt.cmd example config for check_multi. * [15d58b48] Remove unneeded || COUNT(CRITICAL) > 0 in check_apt.cmd * [ea2f8abc] check_ipmi_sensor: updating to 3.1 * [d405a206] check_ssl_cert: fix version number (was updated already). -- Bernd Zeimetz Thu, 14 Jun 2012 22:02:34 +0200 nagios-plugins-contrib (2.20120529) unstable; urgency=low * [c6b83cea] Fix email_delivery.cfg * [f250c516] Merge pull request #5 from waja/master. Add perl-doc at Suggests, as needed by check_email_delivery --help * [9533beb7] Add check_webinject plugin. * [05a3af45] Auto update of debian/copyright * [255aa819] Auto update of debian/control * [853905cf] Fix CLEANFILES in common.mk * [3e75a059] Better webinject command definitions. * [6275a3f3] check_raid should use cciss_vol_status if available. Only use hpacucli if not. * [9859f269] Add some missing version information. * [d142da3c] Update check_raid to 1.107 * [942e9f23] Updating check_email_delivery. * [749c40e1] Auto update of debian/control * [c593192c] Add Enhances: nagios-plugins,.... to the package. * [24486361] Merge pull request #6 from waja/master add check_backuppc * [8d634bb6] Better/fixed CLEANFILES target handling. Please note that CLEANFILES must be defined before including ../common.mk * [558e31aa] Merge branch 'master' of vasks.debian.org:/git/pkg-nagios/pkg-nagios-plugins-contrib. Conflicts: check_backuppc/Makefile * [dea493d7] Add (unfinished) DSA checks and check_libs from weaselutils. * [5d0cf660] Finish integration of the check_libs plugin. * [f2a3d5b6] Add (unfinished) control and copyright file for dsa checks. * [f7c33de6] Auto update of debian/copyright * [fd344412] Auto update of debian/control * [8c9693ee] Updating check_hpasm to 4.5.2 * [3f0a95dc] Updating check_raid to rev1.119 * [5220084d] Update check_ssl_cert to 1.13.0 * [c2c83516] More progress on the DSA plugins * [a9f80a8d] Implement a way to install cronjob scripts. CRONJOBDIR := /usr/lib/nagios/cronjobs * [a8dc3842] Finishing dsa check packaging. * [de999e73] Add config location patch for check_libs. * [336ad307] Auto update of debian/control * [33b86286] Typo fix. * [d0140fd4] Auto update of debian/control * [9059ab99] Don't reset LD/C/CXX/CPPFLAGS when including common.mk * [f0e986fa] Add snmp to check_printer's Recommends. * [f993848c] Add missing recommends for DSA plugins. * [80938fd9] Support checks written in Python. * [cbf5f37f] Auto update of debian/control * [6f5f3157] Updating changelog. * [72492690] Fix location of check_packages in cron script. * [68284bb0] Add patch to fix check_packages output. * [fd32ac40] check_libs needs libyaml-syck-perl. * [63d54efa] Updating changelog. * [f29b76d6] Add check_zone_auth plugin. * [0f95a649] Add check_whois plugin. * [3562b848] Add check_zone_rrsig_expiration plugin. -- Bernd Zeimetz Tue, 29 May 2012 22:33:51 +0200 nagios-plugins-contrib (1.20120228) unstable; urgency=low * [9079e12a] Add check-multipath.pl upstream version. * [8e0a5908] Add patch for check_multipath * [6da07d78] Ignore .rej and .orig files. * [4bda0e7c] Upstream included our patch already. * [21e3756b] Add packaging info for check_multipath. * [9f664c91] Link debian/README.source to README for github fancyness. * [a527810c] Add check_snmp_environment (unfinished). * [41052baf] Add some useful error messages for the packaging-helper.py * [afa04c7b] Finish check_snmp_environment plugin. No .cfg file included yet. * [743e5dfd] Add current version info to check_snmp_environment. * [76bccfe3] Fix SHA1 watch in packaging-helper.py * [8f4c4d13] Add check_printer plugin. * [7dc69bf0] Add check_haproxy and check_httpd_status. manually merging the work of Jan Wagner . * [2577af3a] Better sorting of the quilt series file. * [0526814c] Add nagios: -epn tags to the non epn checks in check_email_delivery. * [caadc8e7] Don't add a dependency if it is listed already. * [974e8d36] Add check_hpasm. * [0d3b76da] make -j should work for debian/rules now * [6f4593ac] Fix too long description. * [a3cce5ad] check_hpasm needs snmpwalk, recommend it. * [4760a28d] shorter check_snmp_environment desc * [1af8a931] Fix FSF address. * [a2e9282a] Auto update of debian/copyright * [3a702550] Auto update of debian/control * [d4d74a06] Add --parallel to dh calls. * [a41f66fe] Merge remote-tracking branch 'github/master' Conflicts: debian/control * [65d87a13] Merge pull request #3 from waja/master adding check_mysql_health * [573abd8c] Ensure Depends is nto used in plugin control files. * [42d0dcfe] Auto update of debian/control * [58e56a7b] Auto-generate and install README.Debian.plugins * [4a73d8a7] Enhance dependency description in debian/README.source * [69f4e3e9] Merge pull request #4 from waja/master fixing 'check_ipmi_sensor_exclude' command definition (Closes: #661528) -- Bernd Zeimetz Tue, 28 Feb 2012 20:17:06 +0100 nagios-plugins-contrib (1.20120220) unstable; urgency=low * [462444da] Removing unused code copies of the install module. -- Bernd Zeimetz Mon, 20 Feb 2012 22:49:53 +0100 nagios-plugins-contrib (1.20120219) unstable; urgency=low * Initial Release. -- Bernd Zeimetz Sun, 19 Feb 2012 00:42:17 +0100 nagios-plugins-contrib-9.20140106/debian/copyright.in0000644000000000000000000000224312262515026017167 0ustar The Debian packaging is Copyright © 2012 Bernd Zeimetz and is licensed under der GPL, either version 3 of the License, or (at your option) any later version. 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 3 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". Part of the Debian packaging is the content of the debian directory, and the following files: common*.mk */control */copyright */Makefile The copyright information for the included plugins is listed below: #AUTO_UPDATE_Copyright# nagios-plugins-contrib-9.20140106/debian/rules0000755000000000000000000000702412262515026015711 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 PLUGINS := $(shell find $(CURDIR) -mindepth 1 -maxdepth 1 -name .git -prune -o -name .pc -prune -o -name debian -prune -o -type d -printf '%f\n' | sort) PKGNAME = nagios-plugins-contrib %: dh $@ --with quilt,python2,autotools_dev --parallel # Here follows a small shell snipped to call dh_auto_* for all plugins # Currently # - if a Makefile exists in the plugin directory # we run dh_auto_$(1) with -O--sourcedirectory="$$plugin" # - if $${plugin}/src exists, we run dh_auto_$(1) on that directory # - else: fail :) DH_AUTO_CALL = if [ "$$auto_command" == "dh_auto_configure" ]; then \ export options="$$options -- --enable-stack-protector" ;\ fi ;\ if [ -f $(CURDIR)/$$plugin/Makefile ]; then \ $$auto_command -O--sourcedirectory="$${plugin}" $$options; \ elif [ -d $(CURDIR)/$$plugin/src ]; then \ $$auto_command -O--sourcedirectory="$${plugin}/src" $$options; \ else \ echo failed to build $$plugin; exit 255 ; \ fi PACKAGING_HELPER = /usr/bin/python $(CURDIR)/debian/packaging-helper.py clean: $(PLUGINS:%=clean-%) debian/copyright debian/control dh $@ --with quilt,python2,autotools_dev --parallel rm -f debian/$(PKGNAME).install rm -f debian/README.Debian.plugins clean-%: rm -rf debian/$* dh_auto_install-%: # run dh_auto_install to debian/$plugin set -e ;\ export auto_command="dh_auto_install" ;\ export plugin="$*" ;\ export options="--destdir=debian/$*" ;\ $(DH_AUTO_CALL) if [ -d debian/$*/usr/lib/$(PKGNAME) ]; then \ mkdir -p debian/$*/usr/lib/nagios ;\ mv debian/$*/usr/lib/$(PKGNAME) debian/$*/usr/lib/nagios/plugins ;\ fi # add files to debian/$(PKGNAME).install set -e; find debian/$* -type f -printf '%h\n' | sort -u |\ while read dir; do \ echo "$$dir/* `echo $$dir | sed 's,debian/$*/,,'`" ;\ done >> debian/$(PKGNAME).install # create shlibdeps for the plugin into a temp file set -e; \ opts=`find debian/$* -type f -exec file {} \; |\ grep -E ' ELF ' |\ sed 's,:.*,,;s,^,-e,' |\ tr '\n' ' '` ;\ if [ -n "$$opts" ]; then \ dpkg-shlibdeps -O $$opts | grep shlibs:Depends > debian/$*/substvars ;\ fi dh_auto_%: set -e; \ export auto_command=`echo $* | sed 's,-.*,,;s,^,dh_auto_,'` ;\ export plugin=`echo $* | sed 's,.*-,,'` ;\ $(DH_AUTO_CALL) override_dh_auto_build: $(PLUGINS:%=dh_auto_build-%) override_dh_auto_clean: $(PLUGINS:%=dh_auto_clean-%) override_dh_auto_configure: $(PLUGINS:%=dh_auto_configure-%) override_dh_auto_install: $(PLUGINS:%=dh_auto_install-%) $(PACKAGING_HELPER) --generate-readme #override_dh_auto_test: $(PLUGINS:%=dh_auto_test-%) override_dh_auto_test: # nothign to do right now. override_dh_python2: dh_python2 dh_python2 usr/lib/nagios/plugins usr/lib/nagios/cronjobs CONTROL_FILES := $(shell for p in $(PLUGINS); do echo $$p/control; done) COPYRIGHT_FILES := $(shell for p in $(PLUGINS); do echo $$p/copyright; done) debian/copyright: debian/copyright.in debian/packaging-helper.py $(CONTROL_FILES) $(COPYRIGHT_FILES) $(PACKAGING_HELPER) --copyright -if [ -d .git ]; then git add $@; git commit -m 'Auto update of $@' $@; fi debian/control: debian/control.in debian/packaging-helper.py $(CONTROL_FILES) $(PACKAGING_HELPER) --control -if [ -d .git ]; then git add $@; git commit -m 'Auto update of $@' $@; fi watch: @$(PACKAGING_HELPER) --watch .PHONY: watch override_dh_auto_build override_dh_auto_clean override_dh_auto_configure override_dh_auto_install override_dh_auto_test nagios-plugins-contrib-9.20140106/debian/control0000644000000000000000000002365312262515026016242 0ustar Source: nagios-plugins-contrib Section: net Priority: extra Maintainer: Debian Nagios Maintainer Group Uploaders: Bernd Zeimetz , Jan Wagner Build-Depends: debhelper (>= 8.0.0), python, python-debian, quilt (>= 0.46-7), autotools-dev, autotools-dev, flex, libmemcached-dev, libvarnishapi-dev, pkg-config Standards-Version: 3.9.4 Vcs-Git: git://git.debian.org/pkg-nagios/pkg-nagios-plugins-contrib Vcs-Browser: http://git.debian.org/?p=pkg-nagios/pkg-nagios-plugins-contrib;a=summary Package: nagios-plugins-contrib Architecture: any Depends: ${misc:Depends} Recommends: ${shlibs:Depends}, ${python:Depends}, libsocket-perl, libnagios-plugin-perl, libnet-snmp-perl, whois, nagios-plugins-basic, libnet-dns-perl, libdate-manip-perl, libnagios-plugin-perl (>= 0.31), libnet-cups-perl, libio-socket-ssl-perl, libmail-imapclient-perl, libnet-smtp-tls-perl, libnet-ssleay-perl, python, liblocale-gettext-perl, liblwp-useragent-determined-perl, snmp, freeipmi-tools, libipc-run-perl, lsof, libyaml-syck-perl, python-pymongo, libdbd-mysql-perl, libreadonly-perl, libnet-snmp-perl (>= 5), libtimedate-perl, openssl, libwebinject-perl, libnet-dns-sec-perl, ruby | ruby-interpreter, ${perl:Depends} Suggests: backuppc, perl-doc, cciss-vol-status, mpt-status, smstools (>= 3~), expect, nagios-plugin-check-multi, moreutils Enhances: nagios-plugins, nagios-plugins-basic, nagios-plugins-standard Description: Plugins for nagios compatible monitoring systems This package provides various plugins for Nagios compatible monitoring systems like Nagios and Icinga. It contains the following plugins: . * check_ajp (1): plugin to monitor the AJP ping response time Should work with all application servers (Tomcat, JBoss,....) which provide an AJPv13 connector. * check_backuppc (1.1.0): plugin for checking on the status of BackupPC backups * check_bgpstate (1.0): plugin to check all BGP session on Cisco routers * check_checksums (20130611): plugin to verify file checksums against (local, not 100% secure) lists. Supports md5 sha1 sha224 sha256 sha384 sha512 checksums. * check_clamav (1.2): plugin to check for clamav signature freshness This script is used to compare the version and signature level of the currently running clamd daemon with the latest available versions listed in the TXT record for current.cvd.clamav.net. * check_cups (0.2): plugin to check queues on a remote CUPS server This plugin is monitoring of queues on a remote CUPS server, which means that it doesn't need to be installed on the print server and run via NRPE. * check_drbd (0.5.3): plugin to check DRBD device states This plugin is for checking DRBD device states. It parses the /proc/drbd device and analyses the output. * check_email_delivery (0.7.1b): plugin to monitor email delivery Some typical uses of this plugin include: - check SMTP server - check messages and quota on IMAP server - check email delivery loop - check auto-responder function - keep an eye on email lag - monitor automated mailboxes - check email-to-FTP or other special email gateways * check_graphite: Plugin to monitor graphite metrics * check_haproxy (rev135): plugin check the HAProxy statistics url * check_hpasm (4.6.3.2): plugin to check the hardware health of HP Proliant Servers It either uses snmp or - if installed - the hpasm package locally. The plugin checks the health of * Processors * Power supplies * Memory modules * Fans * CPU- and board-temperatures * Raids and alerts you if one of these components is faulty or operates outside its normal parameters. * check_httpd_status (rev140): plugin checking Apache or Lighthttpd server-status page (using mod_status) * check_ipmi_sensor (3.1): IPMI Sensor Monitoring Plugin Plugin to monitor the hardware status (fan speed, temperaturs, voltages, power usage, ...) of a server using IPMI. * check_libs (520): plugin to report the usage of no longer existing libraries by running processes * check_lm_sensors (3.1.1): plugin to monitor hardware sensors and disk temperatures * check_memcached (1.3): plugin to check memcached instances It will give a critical message if a partiular memcached host is inaccessible and generate a warning if the hit/miss ratio falls below a given threshold or the number of evictions exceeds a given limit. Hit/miss and evictions are measured over a 30 minute interval, using a memcached object to store the earlier statistics. * check_memory (1.0): plugin to check for free memory This plugin excludes the system cache and buffer, because on some system with very stable memory usage it is perfectly normal for system cache to fill in all available memory. * check_mongodb (b14ad3ef17): Plugin script to monitor your MongoDB server(s) * check_multipath (0.1.9): plugin to monitor the number of available and failed paths of multipath devices * check_mysql_health (2.1.8.2): plugin to check various parameters of a MySQL database * check_nfsmounts: checks whether there are stale NFS mounts on the host * check_printer: plugin to check printer supply levels using SNMP It outputs performance data for all supplies found, for example toner and drum. * check_raid (3.0.5): plugin to check sw/hw RAID status The plugin looks for any known types of RAID configurations, and checks them all. . Supports: - Adaptec AAC RAID via aaccli or afacli or arcconf - AIX software RAID via lsvg - HP/Compaq Smart Array via cciss_vol_status (hpsa supported too) - HP Smart Array Controllers and MSA Controllers via hpacucli - HP Smart Array (MSA1500) via serial line - Linux 3ware SATA RAID via tw_cli - Linux Device Mapper RAID via dmraid - Linux DPT/I2O hardware RAID controllers via /proc/scsi/dpt_i2o - Linux GDTH hardware RAID controllers via /proc/scsi/gdth - Linux LSI MegaRaid hardware RAID via CmdTool2 - Linux LSI MegaRaid hardware RAID via megarc - Linux LSI MegaRaid hardware RAID via /proc/megaraid - Linux MegaIDE hardware RAID controllers via /proc/megaide - Linux MPT hardware RAID via mpt-status - Linux software RAID (md) via /proc/mdstat - LSI Logic MegaRAID SAS series via MegaCli - LSI MegaRaid via lsraid - Serveraid IPS via ipssend - Solaris software RAID via metastat - Areca SATA RAID Support via cli64/cli32 * check_rbl (1.3.1): plugin to check if a server is blacklisted * check_smstools: plugin to check GSM Modems using smstools check_smstools is a plugin to monitor a GSM modem signal quality and registration status with smstools. * check_snmp_environment (0.7): plugin to check various hardware statuses Using snmp the plugin is able to retrieve Fan, power-supply, voltage, temperature, card and module status and various other information from Cisco, Nokia, Blue Coat, IronPort, Foundry Network, Linux (using lm-sensors), Extreme Networks, Juniper Networks, HP ProCurve, Netscreen, Citrix NetScaler and Transmode Systems hardware. * check_snmp_time (1.1): plugin to check the time on a server using SNMP This plugin queries the remote systems time through SNMP and compares it against the local time on the Nagios server. This identifies systems with no correct time set and sends alarms if the time is off to far. HOST-RESOURCES-MIB::hrSystemDate.0 used here returns 8 or 11 byte octets. SNMP translation needs to be switched off and we need to convert the received SNMP data into readable strings. * check_ssl_cert (1.15.0): plugin to check the CA and validity of an X.509 certificate * check_v46 (2013-08-26T07:33:11Z): ipv4/ipv6 Nagios plugin wrapper Nagios plugin wrapper for running the actual plugin for both / either of IPv6 and/or IPv4. The worst result of the actual plugin runs will be the wrapper return value, that is, result will be OK only if all checks returned OK. Compatible with any plugin with standard command line options -6/-4. * check_varnish (1.1): plugin to monitor varnish instances * check_webinject (1.80): plugin for testing web services It uses the WebInject Perl module for automated testing of web applications and web services. It can be used to check individual system components that have HTTP interfaces (JSP, ASP, CGI, PHP, AJAX, Servlets, HTML Forms, XML/SOAP Web Services, REST, etc). * check_whois (1.14): plugin to check for the expiration of a domain. The plugin may not yet work with all registrars, since their output formats differ or there is no expiration date in the whois output. * check_zone_auth (1.13): plugin to ensure that the authoritative nameservers for a given zone remain in sync. * check_zone_rrsig_expiration (1.10): plugin to check for expiration of signatures in dnssec-enabled zones. * dsa: plugins from the Debian System Administrators nagios plugins repository. * check_cert_expire: check for certificate expiration using openssl on the certificate file * check_dnssec_delegation: check for correct DNSSEC delegation * check_entropy: check if there is enough entropy available. * check_packages: replacement for check_apt; needs a cronjob to update the apt database regularily * check_running_kernel: check if a system was rebooted after a kernel upgrade * check_soas: check SOA records * check_statusfile: deliver the content of a status file as check result * extras (1): various scripts and extras Not a plugin, but a collection of various useful event/obsession handlers and similar scripts. . Some scripts and binaries need more packages installed to work, which is implemented as recommends. nagios-plugins-contrib-9.20140106/debian/copyright0000644000000000000000000010441612262515026016567 0ustar The Debian packaging is Copyright © 2012 Bernd Zeimetz and is licensed under der GPL, either version 3 of the License, or (at your option) any later version. 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 3 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". Part of the Debian packaging is the content of the debian directory, and the following files: common*.mk */control */copyright */Makefile The copyright information for the included plugins is listed below: check_ajp: The plugin was downloaded from: http://blog.devnu11.net/projects/ Comment: Please send bug fixes and enhancements to check_ajp - nagios plugin for jboss monitoring Copyright (C) 2010 Michel Rode 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . ------------------------------------------------------------------------------ check_backuppc: The plugin was downloaded from: http://n-backuppc.sourceforge.net/ Copyright (C) 2006,2007 Seneca Cunningham License: GPL v2 On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". ------------------------------------------------------------------------------ check_bgpstate: The plugin was downloaded from: https://raw.github.com/nagios-plugins/nagios-plugins/ba7615631add0b610ada6a819d6c8f8c46a2d36d/contrib/check_bgpstate.pl C) 2000 Christoph Kron License: GPL-2 On Debian systems, the complete text of the GNU General Public License version 1 can be found in "/usr/share/common-licenses/GPL-2". ------------------------------------------------------------------------------ check_checksums: Copyright (C) 2013 Bernd Zeimetz 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . ------------------------------------------------------------------------------ check_clamav: The plugin was downloaded from: http://exchange.nagios.org/directory/Plugins/Anti-2DVirus/ClamAV/ClamAV-check-plugin/details Copyright (c) 2005-2008 Darren Spruell Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------------------ check_cups: The plugin was downloaded from: https://www.monitoringexchange.org/inventory/Check-Plugins/Hardware/Devices/Printer/check_cups Copyright (C) Steve Huff This Nagios plugin is free software, and comes with ABSOLUTELY NO WARRANTY. It may be used, redistributed and/or modified under the terms of the GNU General Public Licence (see http://www.fsf.org/licensing/licenses/gpl.txt). ------------------------------------------------------------------------------ check_drbd: The plugin was downloaded from: https://www.monitoringexchange.org/inventory/Check-Plugins/Operating-Systems/Linux/check_drbd Copyright (C) Brandon Lee Poyner The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute copies of the plugins under the terms of the GNU General Public License. On Debian systems, the complete text of the GNU General Public License version 1 can be found in "/usr/share/common-licenses/GPL-1". ------------------------------------------------------------------------------ check_email_delivery: The plugin was downloaded from: http://buhacoff.net/software/check_email_delivery/ Copyright (C) 2005-2011 Jonathan Buhacoff 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . ------------------------------------------------------------------------------ check_graphite: The plugin was downloaded from: https://github.com/disqus/nagios-plugins Copyright: (c) 2012 DISQUS. License: Apache License 2.0 On Debian systems, a copy of the Apache License 2.0 can be found in /usr/share/common-licenses/Apache-2.0 ------------------------------------------------------------------------------ check_haproxy: The plugin was downloaded from: http://cvs.orion.education.fr/viewvc/viewvc.cgi/nagios-plugins-perl/trunk/plugins/check_haproxy.pl?view=log 2010 Stéphane Urbanovski License: GPL v2 On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". ------------------------------------------------------------------------------ check_hpasm: The plugin was downloaded from: http://labs.consol.de/lang/en/nagios/check_hpasm/ AUTHOR: Gerhard Lausser 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ------------------------------------------------------------------------------ check_httpd_status: The plugin was downloaded from: http://cvs.orion.education.fr/viewvc/viewvc.cgi/nagios-plugins-perl/trunk/plugins/check_httpd_status.pl?view=log Dennis D. Spreen (dennis at spreendigital.de) De Bodt Lieven (Lieven dot DeBodt at gmail.com) Karsten Behrens (karsten at behrens dot in) Geoff McQueen (geoff dot mcqueen at hiivesystems dot com ) Dave Steinberg (dave at redterror dot net) Gerhard Lausser (gerhard dot lausser at consol dot de) Stéphane Urbanovski License: GPL v2 On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". ------------------------------------------------------------------------------ check_ipmi_sensor: The plugin was downloaded from: http://www.thomas-krenn.com/en/oss/ipmi-plugin.html Copyright (C) 2009-2011 Thomas-Krenn.AG (written by Werner Fischer), additional contributors see changelog.txt 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, see . License and copyright for contrib/default-combinedgraph.template: Author: Andy Spiegl This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . ------------------------------------------------------------------------------ check_libs: The plugin was downloaded from: http://svn.noreply.org/cgi-bin/viewvc.cgi/weaselutils/trunk/?logsort=cvs&diff_format=s&sortby=file#dirlist Copyright (C) 2005, 2006, 2007, 2008, 2012 Peter Palfrader 2012 Uli Martens 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. ------------------------------------------------------------------------------ check_lm_sensors: The plugin was downloaded from: https://trac.id.ethz.ch/projects/nagios_plugins/wiki/check_lm_sensors Copyright (c) 2007, ETH Zurich. Author: Matteo Corti This module is free software; you can redistribute it and/or modify it under the terms of GNU general public license (gpl) version 3. ------------------------------------------------------------------------------ check_memcached: The plugin was downloaded from: http://exchange.nagios.org/directory/Plugins/Websites,-Forms-and-Transactions/check_memcached-IV/details This program was initially developed by Lonely Planet for internal use and has kindly been made available to the Open Source community for redistribution and further development under the terms of the GNU General Public License v3: http://www.gnu.org/licenses/gpl.html This program is supplied 'as-is', in the hope that it will be useful, but neither Lonely Planet nor the authors make any warranties or guarantees as to its correct operation, including its intended function. Or in other words: Test it yourself, and make sure it works for YOU. Author: George Hansper e-mail: George.Hansper@lonelyplanet.com.au On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". ------------------------------------------------------------------------------ check_memory: The plugin was downloaded from: https://www.monitoringexchange.org/inventory/Check-Plugins/Operating-Systems/Linux/check_memory Copyright (C) 2007 Thomas Guyot-Sionnest 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. ------------------------------------------------------------------------------ check_mongodb: The plugin was downloaded from: https://github.com/mzupan/nagios-plugin-mongodb Copyright: (c) 2012, Mike Zupan License: BSD On Debian systems, a copy of the BSD License can be found in /usr/share/common-licenses/BSD ------------------------------------------------------------------------------ check_multipath: The plugin was downloaded from: http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check-2Dmultipath-2Epl/details Copyright (C) 2011 Hinnerk Rümenapf, Trond H. Amundsen, Gunther Schlegel, Matija Nalis, Bernd Zeimetz 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . ------------------------------------------------------------------------------ check_mysql_health: The plugin was downloaded from: http://labs.consol.de/lang/en/nagios/check_mysql_health/ AUTHOR: Gerhard Lausser 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ------------------------------------------------------------------------------ check_nfsmounts: The plugin was downloaded from: http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_nfsmounts/details Author: Clint Byrum Copyright 2007 Adicio, 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . ------------------------------------------------------------------------------ check_printer: The plugin was downloaded from: https://www.secure-computing.net/svn/trunk/nagios/ Copyright (c) 2007,2011 Eric F Crist All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------ check_raid: The plugin was downloaded from: https://github.com/glensc/nagios-plugin-check_raid 2004-2006 Steve Shipway, university of auckland, 2009-2013 Elan Ruusamäe License: GPL v2 On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". ------------------------------------------------------------------------------ check_rbl: The plugin was downloaded from: https://svn.id.ethz.ch/projects/nagios_plugins/wiki/check_rbl Copyright (c) 2009 ETH Zurich Copyright (c) 2010 Elan Ruusamae 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 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 St, Fifth Floor, Boston, MA 02110-1301, USA. ------------------------------------------------------------------------------ check_smstools: The plugin was downloaded from: http://exchange.nagios.org/directory/Plugins/Hardware/Mobile-Devices/check_smstools/details Author: Patrick Schoenfeld This file is licensed under the terms of the GPL v2 or later. ------------------------------------------------------------------------------ check_snmp_environment: The plugin was downloaded from: http://exchange.nagios.org/directory/Plugins/Hardware/Network-Gear/Cisco/Check-various-hardware-environmental-sensors/details Author : Michiel Timmers ( michiel.timmers AT gmx.net) Based on : "check_snmp_env" plugin (version 1.3) from Patrick Proy 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see ------------------------------------------------------------------------------ check_snmp_time: The plugin was downloaded from: https://raw.github.com/mludvig/nagios-plugins/master/check_snmp_time.pl (c) 2007 Karl Bolingbroke (c) 2010 Frank Migge License: GPL-1 On Debian systems, the complete text of the GNU General Public License version 1 can be found in "/usr/share/common-licenses/GPL-1". ------------------------------------------------------------------------------ check_ssl_cert: The plugin was downloaded from: https://trac.id.ethz.ch/projects/nagios_plugins/wiki/check_ssl_cert Copyright (c) 2007-2011 ETH Zurich Authors: Dan Wallis Lawren Quigley-Jones Marc Fournier Marcus RejÃ¥s Matteo Corti Matthias Fuhrmeister Raphael Thoma Scott Worthington Sven Nierlein Tuomas Haarala Wolfgang Schricker Yannick Gravel This module is free software; you can redistribute it and/or modify it under the terms of GNU general public license (gpl) version 3. ------------------------------------------------------------------------------ check_v46: The plugin was downloaded from: https://gitorious.org/nagios-monitoring-tools/nagios-monitoring-tools/ 2012-02, 2012-03 Ville.Mattila@csc.fi Copyright (C) 2012-2013 CSC - IT Center for Science Ltd. 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, see . ------------------------------------------------------------------------------ check_varnish: The plugin was downloaded from: http://repo.varnish-cache.org/source/ Copyright (c) 2007-2009 Linpro AS All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------ check_webinject: The plugin was downloaded from: http://labs.consol.de/lang/en/nagios/check_webinject/ Copyright 2010 Sven Nierlein (nierlein@cpan.org) Copyright 2004-2006 Corey Goldberg (corey@goldb.org) This file is part of WebInject. WebInject 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. WebInject 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. ------------------------------------------------------------------------------ check_whois: The plugin was downloaded from: http://dns.measurement-factory.com/tools/nagios-plugins/check_whois.html Copyright (c) 2008, The Measurement Factory, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of The Measurement Factory nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------ check_zone_auth: The plugin was downloaded from: http://dns.measurement-factory.com/tools/nagios-plugins/check_zone_auth.html Copyright (c) 2008, The Measurement Factory, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of The Measurement Factory nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------ check_zone_rrsig_expiration: The plugin was downloaded from: http://dns.measurement-factory.com/tools/nagios-plugins/check_zone_rrsig_expiration.html Copyright (c) 2008, The Measurement Factory, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of The Measurement Factory nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------ dsa: The plugin was downloaded from: http://anonscm.debian.org/gitweb/?p=mirror/dsa-nagios.git;a=tree;f=dsa-nagios-checks;hb=HEAD checks/dsa-check-cert-expire:# Copyright 2009 Peter Palfrader checks/dsa-check-dnssec-delegation:# Copyright (c) 2010 Peter Palfrader checks/dsa-check-entropy:# Copyright 2011 Peter Palfrader checks/dsa-check-soas:# Copyright 2006, 2012 Peter Palfrader checks/dsa-check-packages:# Copyright (C) 2008, 2009 Peter Palfrader checks/dsa-check-statusfile:# Copyright 2008, 2012 Peter Palfrader checks/dsa-check-running-kernel:# Copyright 2008,2009,2011 Peter Palfrader checks/dsa-check-running-kernel:# Copyright 2009 Stephen Gran checks/dsa-check-running-kernel:# Copyright 2010 Uli Martens checks/dsa-check-running-kernel:# Copyright 2011 Alexander Reichle-Schmehl sbin/dsa-update-apt-status:# Copyright 2009 Peter Palfrader sbin/dsa-update-unowned-file-status:# Copyright 2012 Peter Palfrader 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. ------------------------------------------------------------------------------ extras: send_nsca_host_or_service_check_result: Based on the example in the icinga documentation. Enhanced to handle service and host checks by Bernd Zeimetz . Copyright (c) 1999-2009 Ethan Galstad (nagios@nagios.org) Copyright (c) 2009-2010 Icinga Development Team (info@icinga.org) Copyright (c) 2012 Bernd Zeimetz License: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License, version 2, can be found in /usr/share/common-licenses/GPL-2. nagios-plugins-contrib-9.20140106/debian/nagios-plugins-contrib.docs0000644000000000000000000000003512262515026022073 0ustar debian/README.Debian.plugins nagios-plugins-contrib-9.20140106/debian/source/0000755000000000000000000000000012262515026016126 5ustar nagios-plugins-contrib-9.20140106/debian/source/format0000644000000000000000000000001512262515026017335 0ustar 3.0 (native) nagios-plugins-contrib-9.20140106/debian/nagios-plugins-contrib.lintian-overrides0000644000000000000000000000020712262515026024602 0ustar # as mentioned in the description people need to # install whats mentioned in recommends. nagios-plugins-contrib: missing-depends-line nagios-plugins-contrib-9.20140106/debian/README.source0000644000000000000000000000532112262515026017006 0ustar nagios-plugins-contrib - Plugins for nagios compatible monitoring systems -------------------------------------------------------------------------- This README.source should give a short instruction about the way the pkg-nagios-plugins-contrib repository is structured and defines basic policies. * build-system: git-buildpackage. As we build a Debian native package pristine-tar is not necessary. * debian/changelog: - preferable generated using git-dch - versioning schema: X.$(date '+%Y%m%d'). X will be increased by one with each release. In case there are bugfixes in stable releases necessary, use X.$(date '+%Y%m%d').Y See http://kitenet.net/~joey/blog/entry/version_numbers/ for details. * debian/copyright.in, debian/control.in: Base files we fill automatically with information from all plugins to generate the full files. This is done in the clean target. DO NOT MODIFY debian/control or debian/copyright! * nagios plugins: - one directory per plugin - required files: * $plugin/control: file format similar to debian/control. - Required is the Description and Uploaders part. Add Build-Depends, Recommends, Suggests and Homepage to have their content added to debian/control/ debian/copyright. Don't use Depends as we don't want to force people to install dependencies for a plugin they might not want to use. - Add Version to be able to track an upstream version of the plugin. - Add Watch to check for new versions using ./debian/packaging-helper.py Format: Watch URL python-regex Watch URL SHA1:sha1sum - Don't add empty lines - only the first paragraph will be handled. * $plugin/copyright: copyright information for the files in $plugin. Will be added to debian/copyright automatically, properly indented and with a header which describes that the coming block is for the files in $plugin. ** DEP-5 IS NOT SUPPORTED ** - what you should have: Currently there are two options on how to build and install plugins: * you have a single script or file or need some hand-made build system anyway: add $plugin/Makefile and implement the all / install / clean targets. include ../common.mk is there for common tasks. If $plugin/Makefile exists the way described below *will not* be built. * your plugin comes with a fancy build system already: extract the source in $plugin and let a symlink called 'src' point to the subdirectory of $plugin. If dh_auto_* is not able to build the plugin, please use the Makefile way as described above. Please ensure that a proper .cfg file will be installed. nagios-plugins-contrib-9.20140106/debian/compat0000644000000000000000000000000212262515026016024 0ustar 8 nagios-plugins-contrib-9.20140106/debian/gbp.conf0000644000000000000000000000011212262515026016237 0ustar [git-buildpackage] sign-tags = True posttag = git push && git push --tags nagios-plugins-contrib-9.20140106/debian/control.in0000644000000000000000000000210512262515026016634 0ustar Source: nagios-plugins-contrib Section: net Priority: extra Maintainer: Debian Nagios Maintainer Group Uploaders: #AUTO_UPDATE_Uploaders# Build-Depends: debhelper (>= 8.0.0), python, python-debian, quilt (>= 0.46-7), autotools-dev, #AUTO_UPDATE_Build-Depends# Standards-Version: 3.9.4 Vcs-Git: git://git.debian.org/pkg-nagios/pkg-nagios-plugins-contrib Vcs-Browser: http://git.debian.org/?p=pkg-nagios/pkg-nagios-plugins-contrib;a=summary Package: nagios-plugins-contrib Architecture: any Depends: ${misc:Depends} Recommends: ${shlibs:Depends}, ${python:Depends}, #AUTO_UPDATE_Recommends#, ${perl:Depends} Suggests: #AUTO_UPDATE_Suggests# Enhances: nagios-plugins, nagios-plugins-basic, nagios-plugins-standard Description: Plugins for nagios compatible monitoring systems This package provides various plugins for Nagios compatible monitoring systems like Nagios and Icinga. It contains the following plugins: . #AUTO_UPDATE_Description# . Some scripts and binaries need more packages installed to work, which is implemented as recommends. nagios-plugins-contrib-9.20140106/debian/patches/0000755000000000000000000000000012262515026016255 5ustar nagios-plugins-contrib-9.20140106/debian/patches/check_httpd_status/0000755000000000000000000000000012262515026022140 5ustar nagios-plugins-contrib-9.20140106/debian/patches/check_httpd_status/epn0000644000000000000000000000040212262515026022641 0ustar --- a/check_httpd_status/check_httpd_status +++ b/check_httpd_status/check_httpd_status @@ -1,4 +1,6 @@ #!/usr/bin/perl -w +# nagios: -epn +# ####################### check_apachestatus_auto.pl ####################### # Version : 1.3 # Date : 06 Aug 2010 nagios-plugins-contrib-9.20140106/debian/patches/check_printer/0000755000000000000000000000000012262515026021075 5ustar nagios-plugins-contrib-9.20140106/debian/patches/check_printer/use_nagios_plugin0000644000000000000000000000060312262515026024531 0ustar --- a/check_printer/check_printer +++ b/check_printer/check_printer @@ -33,14 +33,7 @@ use strict; use warnings; -my $OS = `uname`; -if ($OS =~ m/^\wBSD/){ - use lib "/usr/local/libexec/nagios"; -} elsif ($OS =~ m/Linux/){ - use lib "/usr/local/nagios/libexec"; -} - -use utils qw(%ERRORS); +use Nagios::Plugin qw(%ERRORS); '$Revision$' =~ m/Revision: (\d+)/; my $revision = $1; nagios-plugins-contrib-9.20140106/debian/patches/check_printer/use_data_dumper_if_needed0000644000000000000000000000070012262515026026140 0ustar --- a/check_printer/check_printer +++ b/check_printer/check_printer @@ -41,7 +41,6 @@ if ($OS =~ m/^\wBSD/){ } use utils qw(%ERRORS); -use Data::Dumper; '$Revision$' =~ m/Revision: (\d+)/; my $revision = $1; @@ -58,6 +57,7 @@ found for toner and drum. ## set to 1 if you want debug output for development my $debug = 0; if ($ARGV[4]){ + use Data::Dumper; $debug = 1; print "check_printer Revision $revision\n$src_url\n\n"; } nagios-plugins-contrib-9.20140106/debian/patches/check_printer/debian_bts0000644000000000000000000000254712262515026023122 0ustar --- a/check_printer/check_printer +++ b/check_printer/check_printer @@ -35,10 +35,6 @@ use warnings; use Nagios::Plugin qw(%ERRORS); -'$Revision$' =~ m/Revision: (\d+)/; -my $revision = $1; -'$HeadURL$' =~ m/HeadURL: ([\w\:\/\-\.\_]+) /; -my $src_url = $1; my $usage = " Usage: $0 host_addr community warn% crit% @@ -52,7 +48,6 @@ my $debug = 0; if ($ARGV[4]){ use Data::Dumper; $debug = 1; - print "check_printer Revision $revision\n$src_url\n\n"; } die $usage unless ($#ARGV >= 3); my $base_oid = ".1.3.6.1.2.1.43.11.1.1"; @@ -235,10 +230,9 @@ while (my($key, $value) = each(%status)) if ($debug){ print Dumper(\%status); print "\n\n############ ATTENTION ############\n"; - print "You have debug enabled. If asked to enable debug by the developer,\n"; - print "please send all of the output, including your command line to\n"; - print "ecrist\@secure-computing.net with the subject line 'check_printer DEBUG' along\n"; - print "with a description of the problem you're experiencing.\n###################################\n"; + print "You have debug enabled. If asked to enable debug by the Debian Maintainer,\n"; + print "please send all of the output to the Debian Bug Tracking System, either by \n"; + print "replying to an existing bug or by opening a new bug.\n"; } if ($is_crit){ print "$err_str CRITICAL. See http://$ARGV[0] | $perf_str"; nagios-plugins-contrib-9.20140106/debian/patches/check_clamav/0000755000000000000000000000000012262515026020655 5ustar nagios-plugins-contrib-9.20140106/debian/patches/check_clamav/clamav_locations0000644000000000000000000000541012262515026024116 0ustar --- a/check_clamav/check_clamav +++ b/check_clamav/check_clamav @@ -16,18 +16,18 @@ # ################################################################################ # This script is used to compare the version and signature level of the -# currently running clamd daemon with the latest available versions listed in +# currently running clamscan daemon with the latest available versions listed in # the TXT record for current.cvd.clamav.net. # # In order to use this script, you might need to make the following adjustments: # - Set the "use lib" path correctly (where utils.pm is located.) -# - Set the path to your clamd binary in $clamd_cmd. +# - Set the path to your clamscan binary in $clamscan_cmd. # # This plugin requires the Net::DNS Perl module. ################################################################################ # Plugin directory / home of utils.pm. -use lib "/usr/local/libexec/nagios"; +use lib "/usr/lib/nagios/plugins"; use utils qw(%ERRORS &print_revision &support &usage); use Getopt::Long qw(:config no_ignore_case bundling); use File::Basename; @@ -35,8 +35,8 @@ use Net::DNS; use strict; -# Path to installed clamd binary. -my $clamd_cmd = "/usr/local/sbin/clamd"; +# Path to installed clamscan binary. +my $clamscan_cmd = "/usr/bin/clamscan"; # Leave the rest of this alone: my $prog_name = basename $0; @@ -153,28 +153,28 @@ if ($vers_val != 0) { } # Make sure the binary exists. -if (-x $clamd_cmd) { - &print_debug("Found clamd at $clamd_cmd"); +if (-x $clamscan_cmd) { + &print_debug("Found clamscan at $clamscan_cmd"); } else { - &print_debug("Can't execute clamd at $clamd_cmd"); - die("FATAL: Unable to execute $clamd_cmd"); + &print_debug("Can't execute clamscan at $clamscan_cmd"); + die("FATAL: Unable to execute $clamscan_cmd"); } &print_debug("Threshhold values: warning=$warn_val, critical=$crit_val"); # Should return something like: ClamAV 0.87.1/1205/Wed Dec 7 07:00:48 2005 -chomp(my $clamd_ver = `$clamd_cmd -V`); +chomp(my $clamscan_ver = `$clamscan_cmd -V`); # Should return something like: 0.87.1:34:1206:1134072033:1 chomp(my $dnstxt_ver = &lookup_current()); -# Parse what we get from clamd -V and our DNS query -my @clamdresults = split(/\//,$clamd_ver); +# Parse what we get from clamscan -V and our DNS query +my @clamscanresults = split(/\//,$clamscan_ver); my @txtresults = split(/:/,$dnstxt_ver); # Get the currently running ClamAV sig level and cvd date out of this -my $local_latest_daily = $clamdresults[1]; -my $local_latest_date = $clamdresults[2]; +my $local_latest_daily = $clamscanresults[1]; +my $local_latest_date = $clamscanresults[2]; &print_debug("Local daily.cvd dated $local_latest_date"); &print_debug("Local daily.cvd version = $local_latest_daily"); nagios-plugins-contrib-9.20140106/debian/patches/check_raid/0000755000000000000000000000000012262515026020331 5ustar nagios-plugins-contrib-9.20140106/debian/patches/check_raid/prefer_cciss_vol_status_over_hpacucli0000644000000000000000000000054012262515026030110 0ustar --- a/check_raid/check_raid +++ b/check_raid/check_raid @@ -3112,8 +3112,10 @@ sub check { package hpacucli; use base 'plugin'; -# register -push(@utils::plugins, __PACKAGE__); +# register if cciss_vol_status is not available +if (! utils::which('cciss_vol_status')) { + push(@utils::plugins, __PACKAGE__); +} sub program_names { __PACKAGE__; nagios-plugins-contrib-9.20140106/debian/patches/check_haproxy/0000755000000000000000000000000012262515026021104 5ustar nagios-plugins-contrib-9.20140106/debian/patches/check_haproxy/epn0000644000000000000000000000032012262515026021604 0ustar --- a/check_haproxy/check_haproxy +++ b/check_haproxy/check_haproxy @@ -1,4 +1,5 @@ #!/usr/bin/perl -w +# nagios: -epn # # Copyright (c) 2010 Stéphane Urbanovski # nagios-plugins-contrib-9.20140106/debian/patches/check_webinject/0000755000000000000000000000000012262515026021364 5ustar nagios-plugins-contrib-9.20140106/debian/patches/check_webinject/epn0000644000000000000000000000024512262515026022072 0ustar --- a/check_webinject/check_webinject +++ b/check_webinject/check_webinject @@ -1,5 +1,5 @@ #!/usr/bin/perl -# nagios: +epn +# nagios: -epn package Webinject; nagios-plugins-contrib-9.20140106/debian/patches/check_cups/0000755000000000000000000000000012262515026020364 5ustar nagios-plugins-contrib-9.20140106/debian/patches/check_cups/epn0000644000000000000000000000017212262515026021071 0ustar --- a/check_cups/check_cups +++ b/check_cups/check_cups @@ -1,4 +1,5 @@ #!/usr/bin/perl +# nagios: -epn =head1 NAME nagios-plugins-contrib-9.20140106/debian/patches/series0000644000000000000000000000152212262515026017472 0ustar check_v46/no_epn check_rbl/pod_encoding_fix check_ajp/return_critical_on_failed_connection check_raid/prefer_cciss_vol_status_over_hpacucli check_clamav/clamav_locations check_nfsmounts/perl_module check_nfsmounts/nfs_write_location dsa/security_updates_critical dsa/check_packages_location check_libs/config_location check_libs/config_path dsa/status_directory dsa/check_packages-inifile check_email_delivery/epn check_email_delivery/paths check_printer/use_data_dumper_if_needed check_printer/use_nagios_plugin check_printer/debian_bts check_lm_sensors/manpage_whatis_fix check_lm_sensors/spelling_errors check_lm_sensors/interpreter check_rbl/interpreter check_rbl/spelling_errors check_rbl/disable_solid.net check_haproxy/epn check_httpd_status/epn check_backuppc/use_nagios_plugins dsa/epn check_cups/epn check_webinject/epn check_snmp_time/epn nagios-plugins-contrib-9.20140106/debian/patches/check_libs/0000755000000000000000000000000012262515026020343 5ustar nagios-plugins-contrib-9.20140106/debian/patches/check_libs/config_path0000644000000000000000000000057412262515026022555 0ustar --- a/check_libs/nagios-check-libs +++ b/check_libs/nagios-check-libs @@ -71,7 +71,7 @@ if ($params->{'version'}) { }; if (! defined $params->{'config'}) { - $params->{'config'} = '/etc/nagios/check-libs.conf'; + $params->{'config'} = '/etc/nagios-plugins/check-libs.conf'; } elsif (! -e $params->{'config'}) { dief("Config file $params->{'config'} does not exist.\n"); } nagios-plugins-contrib-9.20140106/debian/patches/check_libs/config_location0000644000000000000000000000057412262515026023431 0ustar --- a/check_libs/nagios-check-libs +++ b/check_libs/nagios-check-libs @@ -71,7 +71,7 @@ if ($params->{'version'}) { }; if (! defined $params->{'config'}) { - $params->{'config'} = '/etc/nagios-plugins/check-libs.conf'; + $params->{'config'} = '/etc/nagios/check-libs.conf'; } elsif (! -e $params->{'config'}) { dief("Config file $params->{'config'} does not exist.\n"); } nagios-plugins-contrib-9.20140106/debian/patches/check_ajp/0000755000000000000000000000000012262515026020164 5ustar nagios-plugins-contrib-9.20140106/debian/patches/check_ajp/return_critical_on_failed_connection0000644000000000000000000000436212262515026027524 0ustar --- a/check_ajp/check_ajp +++ b/check_ajp/check_ajp @@ -7,6 +7,7 @@ # # check_ajp - nagios plugin for jboss monitoring # Copyright (C) 2010 Michel Rode +# Copyright (C) 2013 Bernd Zeimetz # # 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 @@ -30,6 +31,8 @@ use strict; use Getopt::Long; use Socket; use Time::HiRes 'time'; +use IO::Socket; + my $app = ''; my $port = '8009'; @@ -37,9 +40,14 @@ my $warntime = '1.5'; my $crittime = '3'; my $timeout = '10'; -my ($iaddr, $paddr, $proto, $sock, $time1, $time2); +my ($sock, $time1, $time2); my $pong = 'null'; +sub conndie{ + my $msg = shift; + print "CRITICAL : $msg\n"; + exit 2; +} sub xdie{ my $msg = shift; printf STDERR "Usage: check_ajp --app ip.of.the.app [--port 8009 --warn 1 --crit 2 --timeout 5]\n\n"; @@ -49,6 +57,10 @@ sub xdie{ GetOptions("app=s" => \$app, "port=s" => \$port, "warn=f" => \$warntime, "crit=f" => \$crittime, "timeout=f" => \$timeout); +if ($app eq '') { + xdie('--app not given') +} + my $ping = pack 'C5' # Format template. , 0x12, 0x34 # Magic number for server->container packets. , 0x00, 0x01 # 2 byte int length of payload. @@ -61,24 +73,23 @@ my $expected = pack 'C5' # Format tem , 0x09 # Type of packet. 9 = CPong reply. ; -$iaddr = inet_aton($app) || xdie("No host given !"); -$paddr = sockaddr_in($port, $iaddr) || xdie("Wrong port !"); -$proto = getprotobyname 'tcp'; - $time1 = time(); eval { local $SIG{ALRM} = sub { die "alarm\n" }; alarm($timeout); - socket $sock, PF_INET, SOCK_STREAM, $proto || xdie("socket !"); - connect $sock, $paddr || xdie("connect !"); - syswrite $sock, $ping || xdie("syswrite !"); - sysread $sock, $pong, 5 || xdie("sysread !"); + $sock = IO::Socket::INET->new(Proto => "tcp", + PeerAddr => $app, + PeerPort => $port) || conndie($@); + $sock->autoflush(1); + print $sock $ping; + $sock->recv($pong,5); + close $sock; alarm(0); }; if ($@) { - die unless $@ eq "alarm\n"; + conndie($@) unless $@ eq "alarm\n"; $time2 = (time() - $time1); printf "CRITICAL - AJP - Timeout after %1.0fs\n",$time2; exit 2; nagios-plugins-contrib-9.20140106/debian/patches/check_backuppc/0000755000000000000000000000000012262515026021202 5ustar nagios-plugins-contrib-9.20140106/debian/patches/check_backuppc/use_nagios_plugins0000644000000000000000000000045312262515026025024 0ustar --- a/check_backuppc/src/check_backuppc +++ b/check_backuppc/src/check_backuppc @@ -32,7 +32,7 @@ no utf8; # Nagios use lib "NAGIOS_LIB"; -use utils qw(%ERRORS $TIMEOUT); +use Nagios::Plugin qw(%ERRORS); use POSIX qw(strftime difftime); use Getopt::Long; Getopt::Long::Configure('bundling'); nagios-plugins-contrib-9.20140106/debian/patches/check_v46/0000755000000000000000000000000012262515026020031 5ustar nagios-plugins-contrib-9.20140106/debian/patches/check_v46/no_epn0000644000000000000000000000030412262515026021227 0ustar --- a/check_v46/check_v46 +++ b/check_v46/check_v46 @@ -1,4 +1,6 @@ #!/usr/bin/perl +# nagios: -epn +# # # check_v46 # Nagios plugin wrapper for running the actual plugin for both / either of nagios-plugins-contrib-9.20140106/debian/patches/check_snmp_time/0000755000000000000000000000000012262515026021405 5ustar nagios-plugins-contrib-9.20140106/debian/patches/check_snmp_time/epn0000644000000000000000000000036312262515026022114 0ustar --- a/check_snmp_time/check_snmp_time +++ b/check_snmp_time/check_snmp_time @@ -1,4 +1,5 @@ #!/usr/bin/perl -w +# nagios: -epn ############################## check_snmp_time.pl ################# my $Version='1.1'; # Date : Dec 08 2010 nagios-plugins-contrib-9.20140106/debian/patches/check_nfsmounts/0000755000000000000000000000000012262515026021446 5ustar nagios-plugins-contrib-9.20140106/debian/patches/check_nfsmounts/perl_module0000644000000000000000000000065612262515026023707 0ustar --- a/check_nfsmounts/check_nfsmounts +++ b/check_nfsmounts/check_nfsmounts @@ -21,14 +21,14 @@ # along with this program. If not, see . # -use utils qw{$TIMEOUT %ERRORS}; +use Nagios::Plugin qw(%ERRORS); use Time::HiRes qw{time alarm}; use Getopt::Long; use strict; my $version="1.0"; -my $nfs_timeout=$TIMEOUT; +my $nfs_timeout=15; my $nfs_warn=-1; my $writemode=0; my $help=0; nagios-plugins-contrib-9.20140106/debian/patches/check_nfsmounts/nfs_write_location0000644000000000000000000000117512262515026025265 0ustar --- a/check_nfsmounts/check_nfsmounts +++ b/check_nfsmounts/check_nfsmounts @@ -23,6 +23,7 @@ use Nagios::Plugin qw(%ERRORS); use Time::HiRes qw{time alarm}; +use Sys::Hostname; use Getopt::Long; use strict; @@ -107,7 +108,8 @@ foreach $dir (@dirs) { if($pid==0) { chdir $dir or &bad_mount($dir,$!); if($writemode and exists($mountmodes{$dir}->{"rw"})) { - open X,"> $dir/.nfscheck" or exit $?; + my $check_filename="$dir/.nfscheck_" . hostname; + open X,"> $check_filename" or exit $?; print X $ENV{HOSTNAME}."\n".localtime()."\n"; # XXX Full disk may fail.. close X or exit $?; } nagios-plugins-contrib-9.20140106/debian/patches/check_rbl/0000755000000000000000000000000012262515026020171 5ustar nagios-plugins-contrib-9.20140106/debian/patches/check_rbl/spelling_errors0000644000000000000000000000044112262515026023324 0ustar --- a/check_rbl/src/check_rbl.pod +++ b/check_rbl/src/check_rbl.pod @@ -58,7 +58,7 @@ the querying mechanism. =head1 EXIT STATUS 0 if OK, 1 in case of a warning, 2 in case of a critical status and 3 -in case of an unkown problem +in case of an unknown problem =head1 DEPENDENCIES nagios-plugins-contrib-9.20140106/debian/patches/check_rbl/pod_encoding_fix0000644000000000000000000000031112262515026023405 0ustar --- a/check_rbl/src/check_rbl.pod +++ b/check_rbl/src/check_rbl.pod @@ -6,6 +6,8 @@ =pod +=encoding utf8 + =head1 NAME C - a Nagios plugin to check if an SMTP server is blacklisted nagios-plugins-contrib-9.20140106/debian/patches/check_rbl/disable_solid.net0000644000000000000000000000045312262515026023500 0ustar --- a/check_rbl/src/check_rbl.ini +++ b/check_rbl/src/check_rbl.ini @@ -36,7 +36,7 @@ server=blacklist.sci.kun.nl server=bl.technovision.dk server=dnsbl.kempt.net -server=dnsbl.solid.net +;server=dnsbl.solid.net ; domain offline server=dul.ru server=forbidden.icm.edu.pl server=hil.habeas.com nagios-plugins-contrib-9.20140106/debian/patches/check_rbl/interpreter0000644000000000000000000000017012262515026022455 0ustar --- a/check_rbl/src/check_rbl +++ b/check_rbl/src/check_rbl @@ -1,4 +1,4 @@ -#!perl +#!/usr/bin/perl package main; nagios-plugins-contrib-9.20140106/debian/patches/check_email_delivery/0000755000000000000000000000000012262515026022404 5ustar nagios-plugins-contrib-9.20140106/debian/patches/check_email_delivery/epn0000644000000000000000000000241112262515026023107 0ustar --- a/check_email_delivery/src/check_email_delivery +++ b/check_email_delivery/src/check_email_delivery @@ -1,4 +1,6 @@ #!/usr/bin/perl +# nagios: -epn + use strict; my $VERSION = '0.7.1'; my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff '; --- a/check_email_delivery/src/check_imap_quota +++ b/check_email_delivery/src/check_imap_quota @@ -1,4 +1,6 @@ #!/usr/bin/perl +# nagios: -epn + use strict; my $VERSION = '0.2'; my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff '; --- a/check_email_delivery/src/check_imap_receive +++ b/check_email_delivery/src/check_imap_receive @@ -1,4 +1,6 @@ #!/usr/bin/perl +# nagios: -epn + use strict; my $VERSION = '0.7.5'; my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff '; --- a/check_email_delivery/src/check_smtp_send +++ b/check_email_delivery/src/check_smtp_send @@ -1,4 +1,6 @@ #!/usr/bin/perl +# nagios: -epn + use strict; use POSIX qw(strftime); my $VERSION = '0.7.3'; --- a/check_email_delivery/src/imap_ssl_cert +++ b/check_email_delivery/src/imap_ssl_cert @@ -1,4 +1,6 @@ #!/usr/bin/perl +# nagios: -epn + use strict; my $VERSION = '0.1'; my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff '; nagios-plugins-contrib-9.20140106/debian/patches/check_email_delivery/paths0000644000000000000000000000161112262515026023445 0ustar Author: Tom Jampen Description: Patches check_email_delivery and check_email_delivery_epn to use debian specific paths. --- a/check_email_delivery/src/check_email_delivery +++ b/check_email_delivery/src/check_email_delivery @@ -63,7 +63,7 @@ my $default_warn = 15; my $default_wait = 5; my $default_timeout = 60; my $time_hires = ""; -my $libexec = "/usr/local/nagios/libexec"; +my $libexec = "/usr/lib/nagios/plugins"; my $ok; $ok = Getopt::Long::GetOptions( "V|version"=>\$show_version, --- a/check_email_delivery/src/check_email_delivery_epn +++ b/check_email_delivery/src/check_email_delivery_epn @@ -61,7 +61,7 @@ my $default_warn = 15; my $default_wait = 5; my $default_timeout = 60; my $time_hires = ""; -my $libexec = "/usr/local/nagios/libexec"; +my $libexec = "/usr/lib/nagios/plugins"; my $ok; $ok = Getopt::Long::GetOptions( "V|version"=>\$show_version, nagios-plugins-contrib-9.20140106/debian/patches/dsa/0000755000000000000000000000000012262515026017024 5ustar nagios-plugins-contrib-9.20140106/debian/patches/dsa/check_packages-inifile0000644000000000000000000000063312262515026023301 0ustar --- a/dsa/checks/dsa-check-packages +++ b/dsa/checks/dsa-check-packages @@ -37,8 +37,8 @@ use strict; use warnings; use English; -my $IGNORE = "/etc/nagios/obsolete-packages-ignore"; -my $IGNORED = "/etc/nagios/obsolete-packages-ignore.d"; +my $IGNORE = "/etc/nagios-plugins/obsolete-packages-ignore"; +my $IGNORED = "/etc/nagios-plugins/obsolete-packages-ignore.d"; my %CODE = ( 'OK' => 0, nagios-plugins-contrib-9.20140106/debian/patches/dsa/security_updates_critical0000644000000000000000000000505412262515026024221 0ustar --- a/dsa/checks/dsa-check-packages +++ b/dsa/checks/dsa-check-packages @@ -94,6 +94,7 @@ sub get_packages { chomp(@lines); my $pkgname = undef; + my $candidate_found = 0; while (defined($line = shift @lines)) { if ($line =~ /^([^ ]*):$/) { # when we have multi-arch capable fu, we require that @@ -132,8 +133,19 @@ sub get_packages { } elsif ($line =~ /^ +Installed: (.*)$/) { # etch dpkg -l does not print epochs, so use this info, it's better $installed->{$pkgname}{'installed'} = $1; + # initialize security-update + $installed->{$pkgname}{'security-update'} = 0; } elsif ($line =~ /^ +Candidate: (.*)$/) { $installed->{$pkgname}{'candidate'} = $1; + } elsif ($line =~ / ([^ ]+) [0-9]+/) { + # check if the next lines show the sources of our candidate + if ($1 eq $installed->{$pkgname}{'candidate'}) { + $candidate_found = 1; + } else { + $candidate_found = 0; + } + } elsif (($line =~ / +[0-9]+ [^ ]+\/(security\.([^ ]+\.)?debian\.org|debian-security).*\/updates\//) && $candidate_found ) { + $installed->{$pkgname}{'security-update'} = 1; } elsif ($line =~ /^ +\*\*\*/) { $line = shift @lines; my @l = split(/ +/, $line); @@ -141,7 +153,7 @@ sub get_packages { } } - my (%current, %obsolete, %outofdate); + my (%current, %obsolete, %outofdate, %security_outofdate); for my $pkgname (keys %$installed) { my $pkg = $installed->{$pkgname}; @@ -151,7 +163,11 @@ sub get_packages { } if ($pkg->{'candidate'} ne $pkg->{'installed'}) { - $outofdate{$pkgname} = $pkg; + if ($pkg->{'security-update'}) { + $security_outofdate{$pkgname} = $pkg; + } else { + $outofdate{$pkgname} = $pkg; + } next; }; if ($pkg->{'origin'} eq '/var/lib/dpkg/status') { @@ -163,6 +179,7 @@ sub get_packages { $pkgs{'current'} = \%current; $pkgs{'outofdate'} = \%outofdate; + $pkgs{'security_outofdate'} = \%security_outofdate; $pkgs{'obsolete'} = \%obsolete; return \%pkgs; } @@ -298,6 +315,12 @@ my @reportform = ( 'short' => "%d pc", 'perf' => "prg_conf=%d;1;;0", 'status' => 'WARNING' }, + { 'key' => 'security_outofdate', + 'listpackages' => 1, + 'long' => "%d packages with outstanding security updates: %s", + 'short' => "%d security-updates", + 'perf' => "security_outdated=%d;;1;0", + 'status' => 'CRITICAL' }, ); my @longout; nagios-plugins-contrib-9.20140106/debian/patches/dsa/check_packages_location0000644000000000000000000000053112262515026023551 0ustar --- a/dsa/sbin/dsa-update-apt-status +++ b/dsa/sbin/dsa-update-apt-status @@ -78,7 +78,7 @@ fi tmp=`tempfile` trap "rm -f '$tmp'" exit #/usr/share/dsa/apt-status-check --noupdate --timeout=600 > "$tmp" -/usr/lib/nagios/plugins/dsa-check-packages > "$tmp" +/usr/lib/nagios/plugins/check_packages > "$tmp" result="$?" case "$result" in 0) nagios-plugins-contrib-9.20140106/debian/patches/dsa/epn0000644000000000000000000000022312262515026017526 0ustar --- a/dsa/checks/dsa-check-packages +++ b/dsa/checks/dsa-check-packages @@ -1,4 +1,5 @@ #!/usr/bin/perl +# nagios: -epn # dsa-check-packages nagios-plugins-contrib-9.20140106/debian/patches/dsa/status_directory0000644000000000000000000000170512262515026022361 0ustar --- a/dsa/sbin/dsa-update-apt-status +++ b/dsa/sbin/dsa-update-apt-status @@ -22,7 +22,8 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. UPDATE_RUNS=3 -STATUS=/var/cache/dsa/nagios/apt +STATUSDIR=/var/cache/nagios_status +STATUS=${STATUSDIR}/apt SLEEP_MAX=$(( 15 * 60 )) MAX_AGE=$(( 23 * 60 * 60 )) @@ -50,6 +51,10 @@ run_required() { return $norun } +if [ ! -d ${STATUSDIR} ]; then + mkdir -p ${STATUSDIR} +fi + # do stuff only when required, or when asked to if [ "${1:-""}" != "-f" ] ; then run_required || exit 0 --- a/dsa/sbin/dsa-update-unowned-file-status +++ b/dsa/sbin/dsa-update-unowned-file-status @@ -22,7 +22,13 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. CUTOFF=40 -STATUS=/var/cache/dsa/nagios/nouser +STATUSDIR=/var/cache/nagios_status +STATUS=${STATUSDIR}/nouser + + +if [ ! -d ${STATUSDIR} ]; then + mkdir -p ${STATUSDIR} +fi tmp=`tempfile` trap "rm -f '$tmp'" exit nagios-plugins-contrib-9.20140106/debian/patches/check_lm_sensors/0000755000000000000000000000000012262515026021576 5ustar nagios-plugins-contrib-9.20140106/debian/patches/check_lm_sensors/spelling_errors0000644000000000000000000000046012262515026024732 0ustar --- a/check_lm_sensors/src/check_lm_sensors.pod +++ b/check_lm_sensors/src/check_lm_sensors.pod @@ -49,7 +49,7 @@ verbosity. =head1 EXIT STATUS 0 if OK, 1 in case of a warning, 2 in case of a critical status and 3 -in case of an unkown problem +in case of an unknown problem =head1 DEPENDENCIES nagios-plugins-contrib-9.20140106/debian/patches/check_lm_sensors/manpage_whatis_fix0000644000000000000000000000055712262515026025365 0ustar --- a/check_lm_sensors/src/check_lm_sensors.pod +++ b/check_lm_sensors/src/check_lm_sensors.pod @@ -2,8 +2,7 @@ =head1 NAME -C is a Nagios plugin to monitor the values of on -board sensors and hard disk temperatures on Linux systems +C - Nagios plugin to monitor hardware sensors and disk temperatures =head1 DESCRIPTION nagios-plugins-contrib-9.20140106/debian/patches/check_lm_sensors/interpreter0000644000000000000000000000040312262515026024061 0ustar --- a/check_lm_sensors/src/check_lm_sensors +++ b/check_lm_sensors/src/check_lm_sensors @@ -1,4 +1,4 @@ -#!perl +#!/usr/bin/perl # check_lm_sensors is a Nagios plugin to monitor the values of on board sensors and hard # disk temperatures on Linux systems nagios-plugins-contrib-9.20140106/debian/packaging-helper.py0000755000000000000000000002505312262515026020411 0ustar #!/usr/bin/python # -*- coding: utf-8 -*- import sys import os import re from debian import deb822 ALLOWED_FIELDS = ('Suggests', 'Recommends', 'Depends', 'Uploaders', 'Version', 'Homepage', 'Watch', 'Description', 'Build-Depends') # find all plugins __basedir__ = os.path.realpath(os.path.dirname(sys.argv[0]) + os.path.sep + '..') __plugins__ = [p for p in os.listdir(__basedir__) if (os.path.isdir(__basedir__ + os.path.sep + p) and p!='debian' and p!='.git' and p!='.pc')] __plugins__.sort() __uploaders_re__ = re.compile(r', *') __shlibs_re__ = re.compile(r'shlibs:Depends=(.+)') def __get_control_data__(): # returns (plug, parsed control field data) # We look at the first paragraph only! for plugin in __plugins__: data=(plugin, [x for x in deb822.Packages.iter_paragraphs(file(__basedir__ + os.path.sep+ plugin + os.path.sep + 'control'))][0]) for key in data[1].iterkeys(): if key not in ALLOWED_FIELDS: raise Exception("Unknown control field in plugin %s: %s" %(data[0],key)) yield data def generate_debian_readme_plugins(): plugins_depends={} for plugin, _control in __get_control_data__(): plugins_depends[plugin]={} # look trough keys we might want to merge for key in ['Suggests', 'Recommends']: if _control.has_key(key): plugins_depends[plugin][key]=deb822.PkgRelation.parse_relations(_control[key]) # check for generated substvars files substvarsfile = __basedir__ + os.path.sep + 'debian' + os.path.sep + plugin + os.path.sep + 'substvars' if os.path.exists(substvarsfile): with open(substvarsfile, 'r') as fd: substvars = fd.read() try: rel = deb822.PkgRelation.parse_relations(__shlibs_re__.findall(substvars)[0]) if plugins_depends[plugin].has_key('Recommends'): plugins_depends[plugin]['Recommends'].extend(rel) else: plugins_depends[plugin]['Recommends']=rel except IndexError: pass # generate content result=[] for plugin in __plugins__: if len(plugins_depends[plugin]) > 0: rtext = '%s:' %(plugin,) if plugins_depends[plugin].has_key('Recommends'): rtext = '%s\n Required Packages: %s' %( rtext, deb822.PkgRelation.str(plugins_depends[plugin]['Recommends']) ) if plugins_depends[plugin].has_key('Suggests'): rtext = '%s\n Optional Packages: %s' %( rtext, deb822.PkgRelation.str(plugins_depends[plugin]['Suggests']) ) result.append(rtext) readmefile=__basedir__ + os.path.sep + 'debian' + os.path.sep + 'README.Debian.plugins' with open(readmefile + '.in', 'r') as fd: readme=fd.read() readme=readme.replace('#AUTO_UPDATE_README#', '\n\n'.join(result)) with open(readmefile, 'w') as fd: fd.write(readme) def update_control(): control_data = { 'Suggests' : [], 'Recommends' : [], 'Build-Depends' : [], 'Description' : [], 'Uploaders' : [] } for plugin, _control in __get_control_data__(): # look trough keys we might want to merge if _control.has_key('Depends'): print "Don't use 'Depends' in %s/control - use 'Recommends' instead" %(plugin,) sys.exit(1) for key in ['Build-Depends', 'Suggests', 'Recommends']: if _control.has_key(key): for rel in deb822.PkgRelation.parse_relations(_control[key]): if not rel in control_data[key]: control_data[key].append(rel) # extract description description = ' * %s' %(plugin,) if _control.has_key('Version'): description = '%s (%s)' %(description, _control['Version']) try: description = '%s: %s' %(description, _control['Description'].replace('\n','\n ')) except KeyError: print 'Description for plugin %s missing!' %(plugin,) sys.exit(1) try: for uploader in __uploaders_re__.split(_control['Uploaders']): if uploader not in control_data['Uploaders']: control_data['Uploaders'].append(uploader) except KeyError: 'Uploaders for plugin %s missing!' %(plugin,) sys.exit(1) # disables right now. do we want to have the homepage in the description? # if _control.has_key('Homepage'): # description = '%s\n Homepage: %s' %(description, _control['Homepage']) control_data['Description'].append(description) with open(__basedir__ + os.path.sep + 'debian' + os.path.sep + 'control.in', 'r') as f: control_in = f.read() for k, v in control_data.iteritems(): if k == 'Description': control_in = control_in.replace('#AUTO_UPDATE_Description#', u'\n'.join(v)) elif k == 'Uploaders': control_in = control_in.replace('#AUTO_UPDATE_Uploaders#', u', '.join(v)) else: control_in = control_in.replace('#AUTO_UPDATE_%s#' %(k, ), deb822.PkgRelation.str(v)) with open(__basedir__ + os.path.sep + 'debian' + os.path.sep + 'control', 'w') as f: f.write(control_in) def update_copyright(): copyrights = [] for plugin, _control in __get_control_data__(): _p_copyright = '%s:\n\n' %(plugin,) if _control.has_key('Homepage'): _p_copyright = '%sThe plugin was downloaded from: \n%s\n\n' %(_p_copyright, _control['Homepage']) try: with open(__basedir__ + os.path.sep + plugin + os.path.sep + 'copyright', 'r') as f: _p_copyright = '%s %s' %(_p_copyright, f.read().decode('utf-8').replace('\n','\n ')) except IOError: print 'copyright file for plugin %s missing!' %(plugin,) sys.exit(1) copyrights.append(_p_copyright) with open(__basedir__ + os.path.sep + 'debian' + os.path.sep + 'copyright.in', 'r') as f: copyright_in = f.read().decode('utf-8') copyright_in = copyright_in.replace('#AUTO_UPDATE_Copyright#', u'\n\n------------------------------------------------------------------------------\n\n'.join(copyrights)) with open(__basedir__ + os.path.sep + 'debian' + os.path.sep + 'copyright', 'w') as f: f.write(copyright_in.encode('utf-8')) def watch(): import apt_pkg apt_pkg.init_system() import hashlib import urllib2 url_opener = urllib2.build_opener() url_opener.addheaders = [('User-agent', 'Debian nagios-plugins-contrib 1.0')] watch_re = re.compile(r'([^ ]+) (.+)') whitespace_re = re.compile(r'\s') for plugin, _control in __get_control_data__(): if not _control.has_key('Watch'): print 'WARNING: %s - missing watch information!' %(plugin,) continue try: url, check = watch_re.findall(_control['Watch'])[0] except IndexError: print 'WARNING: %s - failed to parse Watch line!' %(plugin,) continue try: f=url_opener.open(url) content = f.read() f.close() except IOError: print 'WARNING: %s - failed to retrieve %s !' %(plugin,url) continue check=check.strip() if check.startswith('SHA1:'): check=check.replace('SHA1:','') new_sha=hashlib.sha1(content).hexdigest() if check != new_sha: print 'UPDATE NECESSARY: %s - SHA1 checksum does not match! New checksum: %s' %(plugin,new_sha) else: print 'OK: %s' %(plugin,) else: if not _control.has_key('Version'): print 'WARNING: %s - missing current version information!' %(plugin,) continue check_re=re.compile(check) # check for simple matches found_versions=check_re.findall(content) # now also see if the regexp author added too many .* parts and the match is a bit buggy # we replace all whitespaces with \n and try again. for v in check_re.findall(whitespace_re.sub('\n',content)): if not v in found_versions: found_versions.append(v) if not found_versions: print "WARNING: %s - regex does not match!" %(plugin) continue new_version = found_versions[0] for v in found_versions: if (apt_pkg.version_compare(v, found_versions[0]) > 0): new_version = v if (apt_pkg.version_compare(new_version, _control['Version'].strip()) > 0): print 'UPDATE NECESSARY: %s - found new version %s' %(plugin, new_version) elif (apt_pkg.version_compare(new_version, _control['Version'].strip()) < 0): print 'WARNING: %s - could not find the current version (found: %s, control says: %s)!' %(plugin, new_version, _control['Version']) else: print 'OK: %s' %(plugin,) if __name__ == '__main__': from optparse import OptionParser prog = os.path.basename(sys.argv[0]) usage = ('%s [--copyright] [--control] [--watch] [--generate-readme] [-h|--help]') %(prog,) parser = OptionParser(usage=usage) parser.add_option( '--copyright', dest='copyright', action='store_true', default=False, help='Update debian/copyright' ) parser.add_option( '--control', dest='control', action='store_true', default=False, help='Update debian/control' ) parser.add_option( '--watch', dest='watch', action='store_true', default=False, help='Search for updates' ) parser.add_option( '--generate-readme', dest='generate_readme', action='store_true', default=False, help='Generate debian/README.Debian.plugins' ) (options, args) = parser.parse_args() if not (options.control or options.copyright or options.watch or options.generate_readme): parser.print_help() sys.exit(1) if options.control: update_control() if options.copyright: update_copyright() if options.watch: watch() if options.generate_readme: generate_debian_readme_plugins() nagios-plugins-contrib-9.20140106/check_snmp_time/0000755000000000000000000000000012262515026016534 5ustar nagios-plugins-contrib-9.20140106/check_snmp_time/control0000644000000000000000000000136112262515026020140 0ustar Homepage: https://raw.github.com/mludvig/nagios-plugins/master/check_snmp_time.pl Watch: https://raw.github.com/mludvig/nagios-plugins/master/check_snmp_time.pl Version='([0-9.]+)'; Recommends: libnet-snmp-perl (>= 5), libtimedate-perl Version: 1.1 Uploaders: Jan Wagner Description: plugin to check the time on a server using SNMP This plugin queries the remote systems time through SNMP and compares it against the local time on the Nagios server. This identifies systems with no correct time set and sends alarms if the time is off to far. HOST-RESOURCES-MIB::hrSystemDate.0 used here returns 8 or 11 byte octets. SNMP translation needs to be switched off and we need to convert the received SNMP data into readable strings. nagios-plugins-contrib-9.20140106/check_snmp_time/copyright0000644000000000000000000000034012262515026020464 0ustar (c) 2007 Karl Bolingbroke (c) 2010 Frank Migge License: GPL-1 On Debian systems, the complete text of the GNU General Public License version 1 can be found in "/usr/share/common-licenses/GPL-1". nagios-plugins-contrib-9.20140106/check_snmp_time/check_snmp_time0000644000000000000000000002736712262515026021626 0ustar #!/usr/bin/perl -w ############################## check_snmp_time.pl ################# my $Version='1.1'; # Date : Dec 08 2010 # Purpose : Nagios plugin to check the time on a server using SNMP.\n"; # Author : Karl Bolingbroke, 2007 # Updated : Frank Migge (support at frank4dd dot com) # Help : http://www.frank4dd.com/howto # Licence : GPL - http://www.fsf.org/licenses/gpl.txt ################################################################# # # Help : ./check_snmp_time.pl -h # # This plugin queries the remote systems time through SNMP and compares # it against the local time on the Nagios server. This identifies systems # with no correct time set and sends alarms if the time is off to far. # HOST-RESOURCES-MIB::hrSystemDate.0 used here returns 8 or 11 byte octets. # SNMP translation needs to be switched off and we need to convert the # received SNMP data into readable strings. # # snmpget example data on Windows 2003 # susie112:~ > snmpget -v 1 -c SECro 192.168.100.21 1.3.6.1.2.1.25.1.2.0 # HOST-RESOURCES-MIB::hrSystemDate.0 = STRING: 2010-12-10,14:27:36.5 # example data on Linux 2.6 # susie112:~ > snmpget -v 1 -c SECro 192.168.103.32 1.3.6.1.2.1.25.1.2.0 # HOST-RESOURCES-MIB::hrSystemDate.0 = STRING: 2010-12-10,14:27:44.0,+9:0 # example data on AIX 6.1 # susie112:~ > snmpget -v 1 -c SECro 192.168.98.109 1.3.6.1.2.1.25.1.2.0 # HOST-RESOURCES-MIB::hrSystemDate.0 = STRING: 2010-12-10,14:27:59.0 use strict; use Net::SNMP 5.0; use Getopt::Long; use Date::Format; use Time::Local; # Nagios specific my $TIMEOUT = 15; my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4); # HOST-RESOURCES-MIB::hrSystemDate.0 OID my $remote_time_oid = '1.3.6.1.2.1.25.1.2.0'; # Globals my $o_host = undef; # hostname my $o_community = undef; # community my $o_port = 161; # port my $o_help= undef; # wan't some help ? my $o_verb= undef; # verbose mode my $o_version= undef; # print version # End compatibility my $o_tzoff= 0; # remote TZ offset in mins my $o_warn= undef; # warning level in seconds my $o_crit= undef; # critical level in seconds my $o_timeout= undef; # Timeout (Default 5) my $o_perf= undef; # Output performance data my $o_version2= undef; # use snmp v2c # SNMPv3 specific my $o_login= undef; # Login for snmpv3 my $o_passwd= undef; # Pass for snmpv3 my $v3protocols=undef; # V3 protocol list. my $o_authproto='md5'; # Auth protocol my $o_privproto='des'; # Priv protocol my $o_privpass= undef; # priv password # functions sub p_version { print "check_snmp_time version : $Version\n"; } sub print_usage { print "Usage: $0 [-v] -H -C [-2] | (-l login -x passwd [-X pass -L ,]) [-p ] -w -c [-f] [-t ] [-V]\n"; } sub isnnum { # Return true if arg is not a number my $num = shift; if ( $num =~ /^(\d+\.?\d*)|(^\.\d+)$|^-(\d+\.?\d*)|(^-\.\d+)$/ ) { return 0 ;} return 1; } sub help { print "\nRemote SNMP System Time Monitor for Nagios version ",$Version,"\n"; print "GPL licence, (c) 2007 Karl Bolingbroke, update (c)2010 Frank Migge\n\n"; print_usage(); print <, : Authentication protocol (md5|sha : default md5) : Priv protocole (des|aes : default des) -P, --port=PORT SNMP port (Default 161) -o, --tzoffset=MINS the remote systems timezone offset to the Nagios server, in minutes -w, --warn=INTEGER warning level for time difference in seconds -c, --crit=INTEGER critical level for time difference in seconds -f, --perfparse Perfparse compatible output -t, --timeout=INTEGER timeout for SNMP in seconds (Default: 5) -V, --version prints version number EOT } # For verbose output sub verb { my $t=shift; print $t,"\n" if defined($o_verb) ; } sub check_options { Getopt::Long::Configure ("bundling"); GetOptions( 'v' => \$o_verb, 'verbose' => \$o_verb, 'h' => \$o_help, 'help' => \$o_help, 'H:s' => \$o_host, 'hostname:s' => \$o_host, 'p:i' => \$o_port, 'port:i' => \$o_port, 'C:s' => \$o_community, 'community:s' => \$o_community, 'l:s' => \$o_login, 'login:s' => \$o_login, 'x:s' => \$o_passwd, 'passwd:s' => \$o_passwd, 'X:s' => \$o_privpass, 'privpass:s' => \$o_privpass, 'L:s' => \$v3protocols, 'protocols:s' => \$v3protocols, 't:i' => \$o_timeout, 'timeout:i' => \$o_timeout, 'V' => \$o_version, 'version' => \$o_version, '2' => \$o_version2, 'v2c' => \$o_version2, 'c:s' => \$o_crit, 'critical:s' => \$o_crit, 'w:s' => \$o_warn, 'warn:s' => \$o_warn, 'o:i' => \$o_tzoff, 'tzoffset:s' => \$o_tzoff, 'f' => \$o_perf, 'perfparse' => \$o_perf, ); # Basic checks if (defined($o_timeout) && (isnnum($o_timeout) || ($o_timeout < 2) || ($o_timeout > 60))) { print "Timeout must be >1 and <60 !\n"; print_usage(); exit $ERRORS{"UNKNOWN"}} if (!defined($o_timeout)) {$o_timeout=5;} if (defined ($o_help) ) { help(); exit $ERRORS{"UNKNOWN"}}; if (defined($o_version)) { p_version(); exit $ERRORS{"UNKNOWN"}}; if ( ! defined($o_host) ) # check host and filter { print_usage(); exit $ERRORS{"UNKNOWN"}} # check snmp information if ( !defined($o_community) && (!defined($o_login) || !defined($o_passwd)) ) { print "Put snmp login info!\n"; print_usage(); exit $ERRORS{"UNKNOWN"}} if ((defined($o_login) || defined($o_passwd)) && (defined($o_community) || defined($o_version2)) ) { print "Can't mix snmp v1,2c,3 protocols!\n"; print_usage(); exit $ERRORS{"UNKNOWN"}} if (defined ($v3protocols)) { if (!defined($o_login)) { print "Put snmp V3 login info with protocols!\n"; print_usage(); exit $ERRORS{"UNKNOWN"}} my @v3proto=split(/,/,$v3protocols); if ((defined ($v3proto[0])) && ($v3proto[0] ne "")) {$o_authproto=$v3proto[0]; } # Auth protocol if (defined ($v3proto[1])) {$o_privproto=$v3proto[1]; } # Priv protocol if ((defined ($v3proto[1])) && (!defined($o_privpass))) { print "Put snmp V3 priv login info with priv protocols!\n"; print_usage(); exit $ERRORS{"UNKNOWN"}} } # Check remote timezone offset if (defined($o_tzoff) && (isnnum($o_tzoff) || ($o_tzoff < -600) || ($o_tzoff > 600))) { print "Timezone offset must be > -600 and < 600 !\n"; print_usage(); exit $ERRORS{"UNKNOWN"}} # Check warnings and critical if (!defined($o_warn) || !defined($o_crit)) { print "put warning and critical info!\n"; print_usage(); exit $ERRORS{"UNKNOWN"}} # Get rid of % sign $o_warn =~ s/\%//g; $o_crit =~ s/\%//g; if ( isnnum($o_warn) || isnnum($o_crit) ) { print "Numeric value for warning or critical !\n";print_usage(); exit $ERRORS{"UNKNOWN"}} if ($o_warn > $o_crit) { print "warning <= critical ! \n";print_usage(); exit $ERRORS{"UNKNOWN"}} } ########## MAIN ####### check_options(); # Check gobal timeout if snmp screws up if (defined($TIMEOUT)) { verb("Alarm at $TIMEOUT + 5"); alarm($TIMEOUT+5); } else { verb("no global timeout defined : $o_timeout + 10"); alarm ($o_timeout+10); } $SIG{'ALRM'} = sub { print "No answer from host\n"; exit $ERRORS{"UNKNOWN"}; }; # Connect to host my ($session,$error); if ( defined($o_login) && defined($o_passwd)) { # SNMPv3 login verb("SNMPv3 login"); if (!defined ($o_privpass)) { verb("SNMPv3 AuthNoPriv login : $o_login, $o_authproto"); ($session, $error) = Net::SNMP->session( -hostname => $o_host, -version => '3', -username => $o_login, -authpassword => $o_passwd, -authprotocol => $o_authproto, -translate => 0, -timeout => $o_timeout ); } else { verb("SNMPv3 AuthPriv login : $o_login, $o_authproto, $o_privproto"); ($session, $error) = Net::SNMP->session( -hostname => $o_host, -version => '3', -username => $o_login, -authpassword => $o_passwd, -authprotocol => $o_authproto, -privpassword => $o_privpass, -privprotocol => $o_privproto, -translate => 0, -timeout => $o_timeout ); } } else { if (defined ($o_version2)) { # SNMPv2 Login verb("SNMP v2c login"); ($session, $error) = Net::SNMP->session( -hostname => $o_host, -version => 2, -community => $o_community, -port => $o_port, -translate => 0, -timeout => $o_timeout ); } else { # SNMPV1 login verb("SNMP v1 login"); ($session, $error) = Net::SNMP->session( -hostname => $o_host, -community => $o_community, -port => $o_port, -translate => 0, -timeout => $o_timeout ); } } if (!defined($session)) { printf("ERROR opening session: %s.\n", $error); exit $ERRORS{"UNKNOWN"}; } my $exit_val=undef; ############## Start SNMP time check ################ # 1. get local time "seconds since epoch, UTC" into local_timestamp my $local_timestamp = time; # 2. get remote date and time my $result = $session->get_request(-varbindlist => [$remote_time_oid],); if (!defined($result)) { printf("ERROR: Description table : %s.\n", $session->error); $session->close; exit $ERRORS{"UNKNOWN"}; } $session->close; if (!defined ($$result{$remote_time_oid})) { print "No time information : UNKNOWN\n"; exit $ERRORS{"UNKNOWN"}; } # 3. convert remote date and time into remote_timestamp "seconds since epoch, localtime" my $remote_octets = $result->{$remote_time_oid}; # translate the received binary data i.e. #0x07da0c0a17393a002b0900 my @remote_date = unpack 'n C6 a C2', $remote_octets; # my $remote_timestamp = timelocal($remote_date[5],$remote_date[4],$remote_date[3], $remote_date[2],$remote_date[1]-1, $remote_date[0]); # 4. calculate remote timezone offset $remote_timestamp = $remote_timestamp + ($o_tzoff * 60); my $local_timestring = time2str("%Y-%m-%e_%T", $local_timestamp); my $remote_timestring = time2str("%Y-%m-%e_%T", $remote_timestamp); verb("Local Time: $local_timestring\nRemote Time: $remote_timestring"); # 5. compare offset against -w and -c values my $offset = $local_timestamp - $remote_timestamp; # 6. return offset in seconds, together with Nagios status: if ( $offset == 0 ) { print "$o_host clock is accurate to the second"; } else { if ( abs($offset) != $offset ) { print "$o_host clock is ".abs($offset)." seconds late"; } if ( abs($offset) == $offset ) { print "$o_host clock is $offset seconds early"; } } $exit_val=$ERRORS{"OK"}; if ( abs($offset) > $o_crit ) { print " ($offset > +/-$o_crit) : CRITICAL"; $exit_val=$ERRORS{"CRITICAL"}; } if ( abs($offset) > $o_warn ) { # output warn error only if no critical was found if ($exit_val eq $ERRORS{"OK"}) { print " ($offset > +/-$o_warn) : WARNING"; $exit_val=$ERRORS{"WARNING"}; } } print " : OK" if ($exit_val eq $ERRORS{"OK"}); if (defined($o_perf)) { print " | local=$local_timestring remote=$remote_timestring offset=$offset"; } print "\n"; exit $exit_val; nagios-plugins-contrib-9.20140106/check_snmp_time/snmp_time.cfg0000644000000000000000000000070412262515026021211 0ustar # 'check_snmp_time' command definition define command{ command_name check_snmp_time command_line /usr/lib/nagios/plugins/check_snmp_time -H $HOSTADDRESS$ -C $ARG1$ -w $ARG2$ -c $ARG3$ -p $ARG4$ -f } # 'check_snmp_time_v2' command definition define command{ command_name check_snmp_time_v2 command_line /usr/lib/nagios/plugins/check_snmp_time -H $HOSTADDRESS$ -2 -C $ARG1$ -w $ARG2$ -c $ARG3$ -p $ARG4$ -f } nagios-plugins-contrib-9.20140106/check_snmp_time/Makefile0000644000000000000000000000005112262515026020170 0ustar #/usr/bin/make -f include ../common.mk nagios-plugins-contrib-9.20140106/check_smstools/0000755000000000000000000000000012262515026016424 5ustar nagios-plugins-contrib-9.20140106/check_smstools/README.check_smstools0000644000000000000000000000250012262515026022320 0ustar check_smstools -------------- Depends: -------- - Nagios::Plugin - smstools3 Usage: ------ The plugin can be used to monitor a gsm modem used together with smstools. For this to work it relies on a smstools feature which should be available since version 3.1 called regular_run_cmd. So the following change is needed in the modem section of the modem that is to be monitored: regular_run_cmd = AT+CSQ regular_run_cmd = AT+CREG? regular_run_cmd = AT+COPS? regular_run_interval = 60 regular_run_statfile = /var/log/smstools/smsd_stats/modem_status The interval and the file can of course be adjusted. However the file given above is the default file used by the plugin. If it is changed then the plugin needs to be called with --stat-file . The commands however are required, except for the AT+COPS? command. This is only for operator detection and can be disabled, if one isn't interested what operator the modem is registered to. Known Bugs: ----------- Currently the script does not work with the embedded perl interpreter for unknown reasons. Therefore it contains a # nagios: -epn header, which causes nagios to not use the embedded perl interpreter for it. License: ------- This plugin is licensed under the terms of the GPL v2 or later. See COPYING for details. Author: ------ Patrick Schoenfeld nagios-plugins-contrib-9.20140106/check_smstools/bin/0000755000000000000000000000000012262515026017174 5ustar nagios-plugins-contrib-9.20140106/check_smstools/bin/check_smstools0000755000000000000000000001325612262515026022151 0ustar #!/usr/bin/perl # # Retrieves the status of an SMS Modem via smstools3. # # Author: Patrick Schoenfeld # This file is licensed under the terms of the GPL v2 or later. # See the file COPYING for details. # Currently this plugin does not work with nagios embedded perl # nagios: -epn use strict; use warnings; use Nagios::Plugin; use POSIX; # Define regular expressions used to find the correct lines from # the status file my $signal_command = 'AT\+CSQ'; my $registration_status_command = 'AT\+CREG\?'; my $operator_command = 'AT\+COPS\?'; # Define a regular expression that is used to check against # the answer of the modem to the AT+CREG? command in order # to determine registration status of the modem my $registration_status_expect = '.,1'; # Define the default path of the status file my $status_file = '/var/log/smstools/smsd_stats/modem_status'; # Default Threshoulds my $warning_lvl = 12; # WARNING, if signal level < threshould my $critical_lvl = 10; # CRITICAL, if signal level < threshould my $maxage = 60; # CRIRTICAL, if status file is more then x seconds old # Status variables my $siglvl; my $sigdbm; my $operator; my $expected_operator; my $registration_status; my $timestamp; my $np; sub init_plugin { $np = Nagios::Plugin->new(usage => "usage: %s"); $np->add_arg( spec => 'warning|w=f', help => 'the signal level (as a positive float between 0..32) at which' . 'to emit a WARNING state if the signal level is below this value' ); $np->add_arg( spec => 'critical|c=f', help => 'the signal level (as a positive float between 0..32) at which to ' . 'emit a CRITICAL state if the signal level is below this value' ); $np->add_arg( spec => 'max-age=i', help => 'specify the maximum tolerated age of the status file in seconds' ); $np->add_arg( spec => 'status-file=s', help => 'specifies the file which is checked for the status information' ); $np->add_arg( spec => 'expected-operator=s', help => 'Specifies an operator that is expected. If the registered operator ' . 'is not the same as specified here, the plugin will exit with a ' . 'CRITICAL state' ); $np->add_arg( spec => 'debug|d', help => 'Enable debug mode' ); $np->getopts; if ($np->opts->warning) { $warning_lvl = $np->opts->warning; } if ($np->opts->critical) { $critical_lvl = $np->opts->critical; } if ($np->opts->get('status-file')) { $status_file = $np->opts->get('status-file'); } if ($np->opts->get('max-age')) { $maxage = $np->opts->get('max-age'); } if ($np->opts->get('expected-operator')) { $expected_operator = $np->opts->get('expected-operator'); } if ($critical_lvl > $warning_lvl) { $np->nagios_die("Critical level ($critical_lvl) is higher then the warning level ($warning_lvl)"); } # Test if status_file is readable unless (-r $status_file) { $np->nagios_die("Unable to read modem status file"); } } sub parse_logline { my $line = shift; my %result; # Use the line without the timestamp $line = substr($line, 22); $line =~ s/://g; # Split line into an array my @line = split(/\s/, $line); # Modem chomp $line[1]; $result{'modem'} = $line[1]; # Command $result{'cmd'} = $line[3]; # Answer $result{'answer'} = $line[5]; return %result; } sub process_statusfile { open(STATUS_FILE, "< $status_file") or $np->nagios_die("Unable to open modem status file"); # Check status file freshness my $fileage = (stat(STATUS_FILE))[9]; my $fileage_difference = time() - $fileage; if ($fileage_difference > $maxage) { $np->nagios_exit(CRITICAL, "Status file has not changed since $maxage seconds\n"); } while() { my %result = parse_logline($_); unless ($registration_status) { if ($result{'cmd'} =~ /$registration_status_command/) { $registration_status = $result{'answer'}; } } unless ($siglvl) { if ($result{'cmd'} =~ /$signal_command/) { $siglvl = $result{'answer'}; $siglvl =~ s/,/./g; $sigdbm = (2*$siglvl) - 113; } } unless ($operator) { if ($result{'cmd'} =~ /$operator_command/) { $operator = $result{'answer'}; $operator =~ s/0,0,"//g; } } # No need to parse the rest of the file, if signal # and registration status are known if ($siglvl and $registration_status and $operator) { last; } } close(STATUS_FILE); } sub check_registration { unless ($registration_status) { $np->nagios_die("Unable to determine modem registration status."); } unless ($registration_status =~ /$registration_status_expect/) { $np->nagios_exit(CRITICAL, "Modem is not registered to a GSM network."); } } sub check_signal { unless ($siglvl) { $np->nagios_die("Unable to determine the modem signal strength."); } if (($siglvl < 0) or ($siglvl > 31)) { $np->nagios_die("Unable to determine the modem signal strength."); } # Add performance data information $np->add_perfdata( label => 'level', value => $siglvl ); $np->add_perfdata( label => 'dBm', value => $sigdbm ); if ($siglvl <= $critical_lvl) { $np->nagios_exit(CRITICAL, "Modem is registered ($operator), but signal quality ($siglvl) is below threshould."); } if ($siglvl <= $warning_lvl) { $np->nagios_exit(WARNING, "Modem is registered ($operator), but signal quality ($siglvl) is below threshould."); } # If we get here we can exit with OK $np->nagios_exit(OK, "Modem is registered ($operator). Signal quality is $siglvl / $sigdbm dBm."); } sub check_operator { unless ($operator) { $operator = "Unknown Operator"; } if ($expected_operator) { if ($operator ne $expected_operator) { $np->nagios_exit(CRITICAL, "Modem is registered to $operator while $expected_operator is expected."); } } } init_plugin; process_statusfile; check_registration; check_operator; check_signal; nagios-plugins-contrib-9.20140106/check_smstools/control0000644000000000000000000000051512262515026020030 0ustar Homepage: http://exchange.nagios.org/directory/Plugins/Hardware/Mobile-Devices/check_smstools/details Uploaders: Bernd Zeimetz Description: plugin to check GSM Modems using smstools check_smstools is a plugin to monitor a GSM modem signal quality and registration status with smstools. Suggests: smstools (>= 3~) nagios-plugins-contrib-9.20140106/check_smstools/copyright0000644000000000000000000000016112262515026020355 0ustar Author: Patrick Schoenfeld This file is licensed under the terms of the GPL v2 or later. nagios-plugins-contrib-9.20140106/check_smstools/Makefile0000644000000000000000000000025412262515026020065 0ustar PLUGIN := check_smstools CLEANFILES := check_smstools DOCFILES := README.check_smstools include ../common.mk check_smstools: bin/check_smstools cp $< $@ chmod 755 $@ nagios-plugins-contrib-9.20140106/check_nfsmounts/0000755000000000000000000000000012262515026016575 5ustar nagios-plugins-contrib-9.20140106/check_nfsmounts/control0000644000000000000000000000037012262515026020200 0ustar Homepage: http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_nfsmounts/details Recommends: libnagios-plugin-perl Uploaders: Bernd Zeimetz Description: checks whether there are stale NFS mounts on the host nagios-plugins-contrib-9.20140106/check_nfsmounts/copyright0000644000000000000000000000131412262515026020527 0ustar Author: Clint Byrum Copyright 2007 Adicio, 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . nagios-plugins-contrib-9.20140106/check_nfsmounts/check_nfsmounts0000644000000000000000000000734712262515026021724 0ustar #!/usr/bin/perl # vim: ts=2 sts=2 sw=2:et ai: # # Usage: check_nfsmounts [ -t nfs timeout ] [ -w ] # Description: determines whether there are stale NFS mounts on the host. # Author: Clint Byrum # # Copyright 2007 Adicio, 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 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # use utils qw{$TIMEOUT %ERRORS}; use Time::HiRes qw{time alarm}; use Getopt::Long; use strict; my $version="1.0"; my $nfs_timeout=$TIMEOUT; my $nfs_warn=-1; my $writemode=0; my $help=0; sub usage { print STDERR "NFS UNKNOWN: version $version, check_nfs_client [ --nfs-critical|-c seconds ]\n"; print STDERR " [ --nfs-warning seconds ][ --writemode|-w ]\n"; exit $ERRORS{'UNKNOWN'}; } if(!GetOptions('nfs-timeout|nfstimeout|critical|c|t=f' => \$nfs_timeout, 'nfs-warning=f' => \$nfs_warn, 'writemode|write|w' => \$writemode, 'help' => \$help, )) { &usage; } if($help) { &usage; } if($nfs_timeout <= 0) { print STDERR "timeout must be greater than 0\n"; &usage; } our $dir; # Because its a signal handler, we have to sub alarm_handler { print "NFS CRITICAL: Stale NFS mount point - $dir.\n"; exit $ERRORS{'CRITICAL'}; } sub bad_mount { my $mountpoint=shift(); my $emsg=shift(); print "NFS CRITICAL: cannot operate on mount point $mountpoint. [$emsg]\n"; exit $ERRORS{'CRITICAL'}; } #my @dirs = `mount | grep " type nfs " | awk '{print \$3}'`; if(!open MTAB,"< /etc/mtab") { print "NFS UNKNOWN: could not open mtab.\n"; exit $ERRORS{'UNKNOWN'}; } my @dirs=(); my %mountmodes=(); while(my $line=) { if($line =~ /^[^ ]+ [^ ]+ nfs /) { my @fields=split(/\s+/,$line); my $mountpoint=$fields[1]; push(@dirs,$mountpoint); #my %modes=split(/,/,$fields[3]); my $modes = {}; foreach my $mode (split(/,/,$fields[3])) { $modes->{$mode}=1; } $mountmodes{$mountpoint}=$modes; } } close MTAB; if(@dirs < 1) { print "NFS OK: no NFS mounts found.\n"; exit $ERRORS{'OK'}; } my @ages=(); my @warnings=(); foreach $dir (@dirs) { chomp $dir; $SIG{ALRM} = \&alarm_handler; my $start=time; my $pid=fork; if($pid==0) { chdir $dir or &bad_mount($dir,$!); if($writemode and exists($mountmodes{$dir}->{"rw"})) { open X,"> $dir/.nfscheck" or exit $?; print X $ENV{HOSTNAME}."\n".localtime()."\n"; # XXX Full disk may fail.. close X or exit $?; } exit 0; } else { alarm $nfs_timeout; waitpid $pid,0; if($?) { &bad_mount($dir,$?); }; alarm 0; } my $age=time()-$start; if($nfs_warn > 0 and $age > $nfs_warn) { push(@warnings,sprintf("$dir took %7.5f to complete all operations ",$age)); } push(@ages,$age); } my $x=0; my $agetot=0; my $maxage=0; foreach my $age (@ages) { $agetot+=$age; if($age > $maxage) { $maxage=$age; } $x++; } my $avgage=$agetot/$x; my $perfdata=sprintf("maxtime=%9.7f;avgtime=%9.7f;mountpoints=$x",$maxage,$avgage); if(@warnings) { print "NFS WARNING: @warnings|$perfdata\n"; exit $ERRORS{'WARNING'}; } printf "NFS OK: $x mount points avg of %7.5f secs, max %7.5f secs.|$perfdata\n",$avgage,$maxage,$maxage,$avgage; exit $ERRORS{'OK'}; nagios-plugins-contrib-9.20140106/check_nfsmounts/Makefile0000644000000000000000000000002512262515026020232 0ustar include ../common.mk nagios-plugins-contrib-9.20140106/check_rbl/0000755000000000000000000000000012262515026015320 5ustar nagios-plugins-contrib-9.20140106/check_rbl/control0000644000000000000000000000055412262515026016727 0ustar Uploaders: Bernd Zeimetz Recommends: libnagios-plugin-perl (>= 0.31), libreadonly-perl, libnet-dns-perl Version: 1.3.1 Homepage: https://svn.id.ethz.ch/projects/nagios_plugins/wiki/check_rbl Watch: https://svn.id.ethz.ch/projects/nagios_plugins/wiki/check_rbl check_rbl-([0-9.]+)\.tar\.gz Description: plugin to check if a server is blacklisted nagios-plugins-contrib-9.20140106/check_rbl/copyright0000644000000000000000000000134512262515026017256 0ustar Copyright (c) 2009 ETH Zurich Copyright (c) 2010 Elan Ruusamae 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 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 St, Fifth Floor, Boston, MA 02110-1301, USA. nagios-plugins-contrib-9.20140106/check_rbl/src0000777000000000000000000000000012262515026020403 2check_rbl-1.3.1/ustar nagios-plugins-contrib-9.20140106/check_rbl/rbl.cfg0000644000000000000000000000033412262515026016560 0ustar # 'check_rbl' command definition define command{ command_name check_rbl command_line /usr/lib/nagios/plugins/check_rbl -H '$HOSTADDRESS$' --extra-opts='rbl@/etc/nagios-plugins/check_rbl.ini' --timeout=60 } nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/0000755000000000000000000000000012262515026017672 5ustar nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/Changes0000644000000000000000000000361012262515026021165 0ustar 2013-09-26 Matteo Corti * Version 1.3.1 * check_rbl: disabled embedded Perl 2012-08-31 Matteo Corti * check_rbl: fixed a possible variable name conflict 2012-01-25 Matteo Corti * Added a note on public DNS resolvers (as Google) by being banned from Spamhaus 2011-07-11 Matteo Corti * Version 1.3.0 * check_rbl: applied patch from Jan Kantert to support whitelists * added support for unit tests 2011-03-22 Matteo Corti * Version 1.2.2 * check_rbl: specified the dependency on Nagios::Plugin > 0.31 (earlier versions caused parameter parsing errors, thanks to Elan Ruusamäe) 2010-07-05 Matteo Corti * Version 1.2.1 * check_rbl: fixed a problem with operator precedence that made some checks fail 2010-04-07 Matteo Corti * Version 1.2.0 * check_rbl: applied patch to report the hostname being checked and increase the verbosity (#66) * check_rbl.ini: sample configuration file * check_rbl: removed unnecessary dependencies * check_rbl: applied the patch from #69 (improved parallelism) 2009-10-27 Matteo Corti * check_rbl: applied patch to parallelize the checks 2009-01-22 Matteo Corti * check_rbl: command line argument to set the numer of tries in DNS queries 2009-01-06 Matteo Corti * check_rbl: execution time in the performace data 2008-12-29 Matteo Corti * check_rbl: Initial release # File version information: # $Id: Changes 1344 2013-09-26 06:26:05Z corti $ # $Revision: 1344 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_rbl/Changes $ # $Date: 2013-09-26 08:26:05 +0200 (Thu, 26 Sep 2013) $ nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/INSTALL0000644000000000000000000000370512262515026020730 0ustar Build and install check_rbl Dependences =========== check_rbl depends on several Perl modules: * Getopt::Long * IO::Select * Nagios::Plugin * Nagios::Plugin::Threshold * Number::Format * Net::DNS * Readonly Perl modules can be found on the "Comprehensive Perl Archive Network" (CPAN). The "How to install CPAN modules" guide summarizes how these can be installed http://www.cpan.org/modules/INSTALL.html On many systems Perl modules are also available as installation packages (refer to your system documentation on how to install them). The 'perl Makefile.PL' command (see below) will list the missing packages the you will need to install. Install to /usr/lib/nagios/plugins/contrib ========================================== In the source directory run: perl Makefile.PL make make install Install to a custom directory (CUSTOM_DIR) ========================================= In the source directory run: perl Makefile.PL INSTALLSITESCRIPT=CUSTOM_DIR make make install You can override the INSTALLSCRIPT, INSTALLNBIN or INSTALLSITESCRIPT variable depending on your perl installation. The man page is installed to /usr/share/man/man1/check_rbl.1 you can customize the path by setting INSTALLMAN1DIR as follows perl Makefile.PL INSTALLSCRIPT=CUSTOM_DIR INSTALLMAN1DIR=CUSTOM_MAN_DIR make make install Manual installation =================== Substitute #!perl at the beginning of the script with the location of your Perl interpreter and copy it to the desired location Generate the man page with pod2man pod2man check_rbl.pod > CUSTOM_MAN_FILE Please report any installation problem to or open a ticket at https://trac.id.ethz.ch/projects/nagios_plugins/newticket # File version information: # $Id: INSTALL 1312 2012-08-24 06:59:49Z corti $ # $Revision: 1312 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_rbl/INSTALL $ # $Date: 2012-08-24 08:59:49 +0200 (Fri, 24 Aug 2012) $ nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/META.yml0000644000000000000000000000116112262515026021142 0ustar --- abstract: ~ author: - 'Matteo Corti ' build_requires: ExtUtils::MakeMaker: 6.42 configure_requires: ExtUtils::MakeMaker: 6.42 distribution_type: module generated_by: 'Module::Install version 1.01' license: gpl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: check_rbl no_index: directory: - inc - t requires: IO::Select: 0 Nagios::Plugin: 0.31 Nagios::Plugin::Getopt: 0 Nagios::Plugin::Threshold: 0 Net::DNS: 0 Readonly: 0 perl: 5.8.0 resources: license: http://opensource.org/licenses/gpl-license.php version: 1.3.0 nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/check_rbl.pod0000644000000000000000000001105212262515026022311 0ustar # File version information: # $Id: check_rbl.pod 1344 2013-09-26 06:26:05Z corti $ # $Revision: 1344 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_rbl/check_rbl.pod $ # $Date: 2013-09-26 08:26:05 +0200 (Thu, 26 Sep 2013) $ =pod =head1 NAME C - a Nagios plugin to check if an SMTP server is blacklisted =head1 DESCRIPTION check_rbl is a Nagios plugin to check if an SMTP server is blacklisted =head1 VERSION Version 1.3.1 =head1 SYNOPSIS check_rbl [--help] [--verbose] [--version] [--timeout t] -H hostname --server servername [--critical n] [--warning n] [--workers n] =head1 REQUIRED ARGUMENTS -s, --server=STRING RBL server (may be repeated) -H, --host=STRING SMTP server to check =head1 OPTIONS -?, --usage Print usage information -h, --help Print detailed help screen -V, --version Print version information --extra-opts=[
[@]] Section and/or config_file from which to load extra options (may repeat) -c, --critical=INTEGER Number of blacklisting servers for a critical warning -w, --warning=INTEGER Number of blacklisting servers for a warning -d, --debug Prints debugging information -r, --retry=INTEGER Number of times to try a DNS query (default is 4) --workers=INTEGER Number of parallel checks --whitelistings, --wl Check whitelistings instead of blacklistings --query-timeout=INTEGER Timeout of the RBL queries -t, --timeout=INTEGER Seconds before plugin times out (default: 15) -v, --verbose Show details for command-line debugging (can repeat up to 3 times) =head1 EXAMPLE check_rbl -t 30 -H matteocorti.ch -s zen.spamhaus.org -s bl.spamcop.net =head1 DIAGNOSTICS You can specify multiple --verbose options to increase the program verbosity. --debug can be used to display the process and internals of the querying mechanism. =head1 EXIT STATUS 0 if OK, 1 in case of a warning, 2 in case of a critical status and 3 in case of an unkown problem =head1 DEPENDENCIES check_updates depends on =over 4 =item * Getopt::Long =item * IO::Select =item * Nagios::Plugin =item * Nagios::Plugin::Threshold =item * Number::Format =item * Net::DNS =item * Readonly =back =head1 CONFIGURATION =head1 INCOMPATIBILITIES None reported. =head1 SEE ALSO Nagios documentation =head1 BUGS AND LIMITATIONS No bugs have been reported. Please report any bugs or feature requests to matteo.corti@id.ethz.ch, or through the web interface at https://trac.id.ethz.ch/projects/nagios_plugins/newticket?component=check_rbl =head1 AUTHOR Matteo Corti =head1 LICENSE AND COPYRIGHT Copyright (c) 2010, Elan Ruusamae Copyright (c) 2008-2011, Matteo Corti This module is free software; you can redistribute it and/or modify it under the terms of GNU general public license (gpl) version 3. See the LICENSE file for details. =head1 DISCLAIMER OF WARRANTY BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "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 SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. 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 SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (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 SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. =head1 ACKNOWLEDGMENTS Elan Ruusamäe for the improved parallel support and several fixes Victor V Kudlak for parallel support Jan Kantert for whitelistings support nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/AUTHORS0000644000000000000000000000120512262515026020740 0ustar Matteo Corti Elan Ruusamäe (improved parallel support and several fixes) Victor V Kudlak (parallel support) Jan Kantert for the whitelisting support Please report any bugs or feature requests to matteo.corti@id.ethz.ch, or through the web interface at https://trac.id.ethz.ch/projects/nagios_plugins/newticket?component=check_rbl # File version information: # $Id: AUTHORS 1264 2011-07-11 05:45:43Z corti $ # $Revision: 1264 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_rbl/AUTHORS $ # $Date: 2011-07-11 07:45:43 +0200 (Mon, 11 Jul 2011) $ nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/VERSION0000644000000000000000000000000712262515026020737 0ustar 1.3.1 nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/README0000644000000000000000000000330512262515026020553 0ustar check_rbl is a Nagios plugin to check if an SMTP server is blacklisted Note: some blacklister as Spamhaus ban DNS queries from public DNS resolvers as Google resulting in no host being listed. If you are experiencing problems with the plugin just try the DNS query with a tool as nslookup to check your DNS configuration. Example: check_rbl -H example.org -t 60 -c 1 -w 1 -s dnsbl.ahbl.org -s cbl.anti-spam.org.cn -s cblplus.anti-spam.org.cn -s cblless.anti-spam.org.cn -s cdl.anti-spam.org.cn -s cbl.abuseat.org -s dnsbl.cyberlogic.net -s bl.deadbeef.com -s t1.dnsbl.net.au -s spamtrap.drbl.drand.net -s spamsources.fabel.dk -s 0spam.fusionzero.com -s dnsbl.isoc.bg -s mail-abuse.blacklist.jippg.org -s korea.services.net -s spamguard.leadmon.net -s ix.dnsbl.manitu.net -s relays.nether.net -s dnsbl.njabl.org -s bhnc.njabl.org -s no-more-funn.moensted.dk -s rbl.orbitrbl.com -s psbl.surriel.com -s dyna.spamrats.com -s noptr.spamrats.com -s spam.spamrats.com -s dnsbl.sorbs.net -s dul.dnsbl.sorbs.net -s old.spam.dnsbl.sorbs.net -s problems.dnsbl.sorbs.net -s safe.dnsbl.sorbs.net -s spam.dnsbl.sorbs.net -s bl.spamcannibal.org -s bl.spamcop.net -s pbl.spamhaus.org -s sbl.spamhaus.org -s xbl.spamhaus.org -s ubl.unsubscore.com -s dnsbl-1.uceprotect.net -s dnsbl-2.uceprotect.net -s dnsbl-3.uceprotect.net -s db.wpbl.info Please report any bugs or feature requests to matteo.corti@id.ethz.ch, or through the web interface at https://trac.id.ethz.ch/projects/nagios_plugins/newticket?component=check_rbl # File version information: # $Id: README 1310 2012-08-17 05:09:32Z corti $ # $Revision: 1310 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_rbl/README $ # $Date: 2012-08-17 07:09:32 +0200 (Fri, 17 Aug 2012) $ nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/check_rbl.spec0000644000000000000000000000554112262515026022467 0ustar ################################################################################ # File version information: # $Id: check_rbl.spec 1344 2013-09-26 06:26:05Z corti $ # $Revision: 1344 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_rbl/check_rbl.spec $ # $Date: 2013-09-26 08:26:05 +0200 (Thu, 26 Sep 2013) $ ################################################################################ %define version 1.3.1 %define release 0 %define sourcename check_rbl %define packagename nagios-plugins-check-rbl %define nagiospluginsdir %{_libdir}/nagios/plugins # No binaries in this package %define debug_package %{nil} Summary: check_rbl is a Nagios plugin to check if an SMTP server is blacklisted Name: %{packagename} Obsoletes: check_rbl Version: %{version} Release: %{release}%{?dist} License: GPLv3+ Packager: Matteo Corti Group: Applications/System BuildRoot: %{_tmppath}/%{packagename}-%{version}-%{release}-root-%(%{__id_u} -n) URL: https://trac.id.ethz.ch/projects/nagios_plugins/wiki/check_rbl Source: http://www.id.ethz.ch/people/allid_list/corti/%{sourcename}-%{version}.tar.gz # Fedora build requirement (not needed for EPEL{4,5}) BuildRequires: perl(ExtUtils::MakeMaker) Requires: nagios-plugins %description check_rbl is a Nagios plugin to check if an SMTP server is blacklisted %prep %setup -q -n %{sourcename}-%{version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor \ INSTALLSCRIPT=%{nagiospluginsdir} \ INSTALLVENDORSCRIPT=%{nagiospluginsdir} make %{?_smp_mflags} %install rm -rf %{buildroot} make pure_install PERL_INSTALL_ROOT=%{buildroot} find %{buildroot} -type f -name .packlist -exec rm -f {} \; find %{buildroot} -type f -name "*.pod" -exec rm -f {} \; find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \; %{_fixperms} %{buildroot}/* %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc AUTHORS Changes NEWS README TODO COPYING COPYRIGHT %{nagiospluginsdir}/%{sourcename} %{_mandir}/man1/%{sourcename}.1* %changelog * Mon Jul 11 2011 Matteo Corti - 1.3.0-0 - Updated to 1.3.0 (whitelistings support) * Tue Mar 22 2011 Matteo Corti - 1.2.2-0 - Updated to 1.2.2 (bug fix) and renamed the package * Mon Jul 5 2010 Matteo Corti - 1.2.1-0 - Updated to 1.2.1 (bug fix) * Thu Apr 8 2010 Matteo Corti - 1.2.0-0 - Updated to 1.2.0 and imprved the SPEC file * Tue Oct 27 2009 Matteo Corti - 1.1.0-0 - Updated to 1.1.0 (parallel checks) * Thu Jan 22 2009 Matteo Corti - 1.0.2-0 - --retry command line argument * Tue Jan 6 2009 Matteo Corti - 1.0.1-0 - Execution time in the performance data * Mon Dec 29 2008 Matteo Corti - 1.0.0-0 - Initial release nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/Makefile.PL0000644000000000000000000000233612262515026021650 0ustar # Load the Module::Install bundled in ./inc/ use inc::Module::Install; # File version information: # $Id: Makefile.PL 1264 2011-07-11 05:45:43Z corti $ # $Revision: 1264 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_rbl/Makefile.PL $ # $Date: 2011-07-11 07:45:43 +0200 (Mon, 11 Jul 2011) $ ############################################################################## # Define metadata (we read it from the binary) name 'check_rbl'; version_from 'check_rbl'; perl_version_from 'check_rbl'; all_from 'check_rbl.pod'; ############################################################################## # Specific dependencies include 'version'; requires 'Nagios::Plugin' => 0.31; requires 'Nagios::Plugin::Getopt' => 0; requires 'Nagios::Plugin::Threshold' => 0; requires 'Net::DNS' => 0; requires 'Readonly' => 0; requires 'IO::Select' => 0; install_script 'check_rbl'; tests 't/*.t'; WriteMakefile( INSTALLSCRIPT => '/usr/lib/nagios/plugins/contrib', INSTALLSITESCRIPT => '/usr/lib/nagios/plugins/contrib', MAN1PODS => { 'check_rbl.pod' =>'blib/man1/check_rbl.1', }, MAN3PODS => { }, ); nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/check_rbl.ini0000644000000000000000000000225212262515026022310 0ustar [rbl] server=dnsbl.ahbl.org server=cbl.abuseat.org server=dnsbl.cyberlogic.net server=bl.deadbeef.com server=spamtrap.drbl.drand.net server=spamsources.fabel.dk server=0spam.fusionzero.com server=mail-abuse.blacklist.jippg.org server=korea.services.net server=spamguard.leadmon.net server=ix.dnsbl.manitu.net server=relays.nether.net server=dnsbl.njabl.org server=bhnc.njabl.org server=no-more-funn.moensted.dk server=rbl.orbitrbl.com server=psbl.surriel.com server=dyna.spamrats.com server=noptr.spamrats.com server=spam.spamrats.com ; this keeps all zones of sorbs excl. spam server=dnsbl.sorbs.net server=spam.dnsbl.sorbs.net server=bl.spamcannibal.org server=bl.spamcop.net server=pbl.spamhaus.org server=sbl.spamhaus.org server=xbl.spamhaus.org server=ubl.unsubscore.com server=dnsbl-1.uceprotect.net server=dnsbl-2.uceprotect.net server=dnsbl-3.uceprotect.net server=db.wpbl.info server=access.redhawk.org server=blacklist.sci.kun.nl server=bl.technovision.dk server=dnsbl.kempt.net server=dnsbl.solid.net server=dul.ru server=forbidden.icm.edu.pl server=hil.habeas.com server=rbl.schulte.org server=sbl-xbl.spamhaus.org ; these are rather slow ;server=bl.csma.biz ;server=sbl.csma.biz nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/TODO0000644000000000000000000000042112262515026020357 0ustar * refactor mdns to reduce code complexity * unit tests # File version information: # $Id: TODO 1230 2011-03-22 06:41:47Z corti $ # $Revision: 1230 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_rbl/TODO $ # $Date: 2011-03-22 07:41:47 +0100 (Tue, 22 Mar 2011) $ nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/NEWS0000644000000000000000000000124512262515026020373 0ustar 2013-09-26: 1.3.1 - disabled embedded Perl 2011-07-11: 1.3.0 - whitelistings support 2011-03-22: 1.2.2 - bug fix release (dependencies fixed) 2010-07-05: 1.2.1 - bug fix release (see Changes) 2010-04-08: 1.2.0 - improved parallel checks and several fixes 2009-10-27: 1.1.0 - parallel checks 2009- : 1.0.2 - --retry command line argument to specify DNS retries 2009-01-06: 1.0.1 - Execution time in the performance data 2008-12-29: 1.0.0 - Initial release # File version information: # $Id: NEWS 1344 2013-09-26 06:26:05Z corti $ # $Revision: 1344 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_rbl/NEWS $ # $Date: 2013-09-26 08:26:05 +0200 (Thu, 26 Sep 2013) $ nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/t/0000755000000000000000000000000012262515026020135 5ustar nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/t/00_modules.t0000644000000000000000000000224212262515026022271 0ustar #!perl # $Id: README 1103 2009-12-07 07:49:19Z corti $ # $Revision: 1103 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_updates/README $ # $Date: 2009-12-07 08:49:19 +0100 (Mon, 07 Dec 2009) $ use 5.00800; use strict; use warnings; use Test::More tests => 23; our $VERSION = '1.3.0'; use_ok('Nagios::Plugin'); can_ok( 'Nagios::Plugin', 'new' ); can_ok( 'Nagios::Plugin', 'nagios_exit' ); can_ok( 'Nagios::Plugin', 'add_perfdata' ); use_ok('Nagios::Plugin::Getopt'); can_ok( 'Nagios::Plugin::Getopt', 'new' ); can_ok( 'Nagios::Plugin::Getopt', 'arg' ); can_ok( 'Nagios::Plugin::Getopt', 'getopts' ); can_ok( 'Nagios::Plugin::Getopt', 'get' ); use_ok('Nagios::Plugin::Threshold'); can_ok( 'Nagios::Plugin::Threshold', 'new' ); can_ok( 'Nagios::Plugin::Threshold', 'set_thresholds' ); use_ok('IO::Select'); can_ok( 'IO::Select', 'new' ); can_ok( 'IO::Select', 'count' ); can_ok( 'IO::Select', 'can_read' ); can_ok( 'IO::Select', 'remove' ); can_ok( 'IO::Select', 'handles' ); use_ok('Net::DNS::Resolver'); can_ok( 'Net::DNS::Resolver', 'new' ); can_ok( 'Net::DNS::Resolver', 'can' ); can_ok( 'Net::DNS::Resolver', 'bgsend' ); can_ok( 'Net::DNS::Resolver', 'bgread' ); nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/MANIFEST.SKIP0000644000000000000000000000020712262515026021567 0ustar \.DS_Store$ ^_build ^Build$ ^blib ~$ \.bak$ \.sw.$ \.svn ^cover_db ^Makefile$ ^Makefile.old$ ^pm_to_blib$ ^.# ^# ^check_rbl- notes.txt nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/COPYRIGHT0000644000000000000000000000132412262515026021165 0ustar Copyright (c) 2009 ETH Zurich Copyright (c) 2010 Elan Ruusamae 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 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. nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/check_rbl0000644000000000000000000003275012262515026021540 0ustar #!perl # nagios: -epn package main; # check_rbl is a Nagios plugin to check if an SMTP server is black- or # white- listed # # See the INSTALL file for installation instructions # # Copyright (c) 2007, ETH Zurich. # Copyright (c) 2010, Elan Ruusamae . # # This module is free software; you can redistribute it and/or modify it # under the terms of GNU general public license (gpl) version 3. # See the LICENSE file for details. # # RCS information # enable substitution with: # $ svn propset svn:keywords "Id Revision HeadURL Source Date" # # $Id: check_rbl 1344 2013-09-26 06:26:05Z corti $ # $Revision: 1344 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_rbl/check_rbl $ # $Date: 2013-09-26 08:26:05 +0200 (Thu, 26 Sep 2013) $ use strict; use warnings; use 5.00800; use IO::Select; use Nagios::Plugin 0.31; use Nagios::Plugin::Getopt; use Nagios::Plugin::Threshold; use Net::DNS; use Readonly; our $VERSION = '1.3.1'; Readonly our $DEFAULT_RETRIES => 4; Readonly our $DEFAULT_WORKERS => 20; Readonly our $DEFAULT_QUERY_TIMEOUT => 15; # IMPORTANT: Nagios plugins could be executed using embedded perl in this case # the main routine would be executed as a subroutine and all the # declared subroutines would therefore be inner subroutines # This will cause all the global lexical variables not to stay shared # in the subroutines! # # All variables are therefore declared as package variables... # ## no critic (ProhibitPackageVars) our ( @listed, @timeouts, $ip, $options, $plugin, $threshold, $res, $timeouts_string, ); # the script is declared as a package so that it can be unit tested # but it should not be used as a module if ( !caller ) { run(); } ############################################################################## # subroutines ############################################################################## # Usage : verbose("some message string", $optional_verbosity_level); # Purpose : write a message if the verbosity level is high enough # Returns : n/a # Arguments : message : message string # level : options verbosity level # Throws : n/a # Comments : n/a # See also : n/a sub verbose { # arguments my $message = shift; my $level = shift; if ( !defined $message ) { $plugin->nagios_exit( UNKNOWN, q{Internal error: not enough parameters for 'verbose'} ); } if ( !defined $level ) { $level = 0; } if ( $level < $options->verbose ) { if ( !print $message ) { $plugin->nagios_exit( UNKNOWN, 'Error: cannot write to STDOUT' ); } } return; } ############################################################################## # Usage : mdns(\@addresses, $callback) # Purpose : Perform multiple DNS lookups in parallel # Returns : n/a # See also : Perl Net::DNS module mresolv in examples # # Resolves all IPs in C<@addresses> in parallel. # If answer is found C<$callback> is called with arguments as: $name, $host. # # Author: Elan Ruusamae , (c) 1999-2010 ## no critic (ProhibitExcessComplexity) sub mdns { my ( $data, $callback ) = @_; # number of requests to have outstanding at any time my $workers = $options->workers(); # timeout per query (seconds) my $timeout = $options->get('query-timeout'); my $debug = $options->debug(); my $sel = IO::Select->new(); my $eof = 0; my @addrs = @{$data}; my %addrs; while (1) { #---------------------------------------------------------------------- # Read names until we've filled our quota of outstanding requests. #---------------------------------------------------------------------- while ( !$eof && $sel->count() < $workers ) { if ($debug) { ## no critic (RequireCheckedSyscall) print 'DEBUG: reading...'; } my $name = shift @addrs; if ( !defined $name ) { if ($debug) { ## no critic (RequireCheckedSyscall) print "EOF.\n"; } $eof = 1; last; } if ($debug) { ## no critic (RequireCheckedSyscall) print "NAME: $name\n"; } my $sock = $res->bgsend($name); if ( !defined $sock ) { verbose 'DNS query error: ' . $res->errorstring; verbose "Skipping $name"; } else { # we store in a hash the query we made, as parsing it back from # response gives different ip for ips with multiple hosts $addrs{$sock} = $name; $sel->add($sock); if ($debug) { ## no critic (RequireCheckedSyscall) print "DEBUG: name = $name, outstanding = ", $sel->count(), "\n"; } } } #---------------------------------------------------------------------- # Wait for any replies. Remove any replies from the outstanding pool. #---------------------------------------------------------------------- my @ready; my $timed_out = 1; if ($debug) { ## no critic (RequireCheckedSyscall) print "DEBUG: waiting for replies\n"; } @ready = $sel->can_read($timeout); while (@ready) { $timed_out = 0; if ($debug) { ## no critic (RequireCheckedSyscall) print 'DEBUG: replies received: ', scalar @ready, "\n"; } foreach my $sock (@ready) { if ($debug) { ## no critic (RequireCheckedSyscall) print "DEBUG: handling a reply\n"; } my $addr = $addrs{$sock}; delete $addrs{$sock}; $sel->remove($sock); my $ans = $res->bgread($sock); my $host; if ($ans) { foreach my $rr ( $ans->answer ) { ## no critic(ProhibitDeepNests) if ( !( $rr->type eq 'A' ) ) { next; } $host = $rr->address; # take just the first answer last; } } else { if ($debug) { ## no critic (RequireCheckedSyscall) print 'DEBUG: no answer: ' . $res->errorstring() . "\n"; } } &{$callback}( $addr, $host ); } @ready = $sel->can_read(0); } #---------------------------------------------------------------------- # If we timed out waiting for replies, remove all entries from the # outstanding pool. #---------------------------------------------------------------------- if ($timed_out) { if ($debug) { ## no critic (RequireCheckedSyscall) print "DEBUG: timeout: clearing the outstanding pool.\n"; } foreach my $sock ( $sel->handles() ) { my $addr = $addrs{$sock}; delete $addrs{$sock}; $sel->remove($sock); # callback for hosts that timed out &{$callback}( $addr, q{} ); } } if ($debug) { ## no critic (RequireCheckedSyscall) print 'DEBUG: outstanding = ', $sel->count(), ", eof = $eof\n"; } #---------------------------------------------------------------------- # We're done if there are no outstanding queries and we've read EOF. #---------------------------------------------------------------------- last if ( $sel->count() == 0 ) && $eof; } return; } ############################################################################## # Usage : run(); # Purpose : main method # Returns : n/a # Arguments : n/a # Throws : n/a # Comments : n/a # See also : n/a sub run { ################################################################################ # Initialization $plugin = Nagios::Plugin->new( shortname => 'CHECK_RBL' ); my $time = time; ######################## # Command line arguments $options = Nagios::Plugin::Getopt->new( usage => 'Usage: %s [OPTIONS]', version => $VERSION, url => 'https://trac.id.ethz.ch/projects/nagios_plugins', blurb => 'Check SMTP blakl- or white- isting status', ); $options->arg( spec => 'critical|c=i', help => 'Number of blacklisting servers for a critical warning', required => 0, default => 0, ); $options->arg( spec => 'warning|w=i', help => 'Number of blacklisting servers for a warning', required => 0, default => 0, ); $options->arg( spec => 'debug|d', help => 'Prints debugging information', required => 0, default => 0, ); $options->arg( spec => 'server|s=s@', help => 'RBL server', required => 1, ); $options->arg( spec => 'host|H=s', help => 'SMTP server to check', required => 1, ); $options->arg( spec => 'retry|r=i', help => 'Number of times to try a DNS query (default is 4) ', required => 0, default => $DEFAULT_RETRIES, ); $options->arg( spec => 'workers=i', help => 'Number of parallel checks', required => 0, default => $DEFAULT_WORKERS, ); $options->arg( spec => 'whitelistings|wl', help => 'Check whitelistings instead of blacklistings', required => 0, default => 0, ); $options->arg( spec => 'query-timeout=i', help => 'Timeout of the RBL queries', required => 0, default => $DEFAULT_QUERY_TIMEOUT, ); $options->getopts(); ############### # Sanity checks if ( $options->critical < $options->warning ) { $plugin->nagios_exit( UNKNOWN, 'critical has to be greater or equal warning' ); } $res = Net::DNS::Resolver->new(); if ( $res->can('force_v4') ) { $res->force_v4(1); } $res->retry( $options->retry() ); $ip = $options->host; if ( $ip =~ m/[[:lower:]]/mxs ) { mdns( [ $options->host ], sub { my ( $addr, $host ) = @_; $ip = $host; } ); } if ( !$ip ) { $plugin->nagios_exit( UNKNOWN, 'Cannot resolve ' . $options->host ); } verbose 'Using ' . $options->timeout . " as global script timeout\n"; alarm $options->timeout; ################ # Set the limits $threshold = Nagios::Plugin::Threshold->set_thresholds( warning => $options->warning, critical => $options->critical, ); ################################################################################ my @servers = @{ $options->server }; my $nservers = scalar @servers; verbose 'Checking ' . $options->host . " ($ip) on $nservers server(s)\n"; # build address lists my @addrs; foreach my $server (@servers) { ( my $local_ip = $ip ) =~ s/(\d{1,3}) [.] (\d{1,3}) [.] (\d{1,3}) [.] (\d{1,3})/$4.$3.$2.$1.$server/mxs; push @addrs, $local_ip; } mdns( \@addrs, sub { my ( $addr, $host ) = @_; # extract RBL we checked $addr =~ s/^(?:\d+[.]){4}//mxs; if ( defined $host ) { if ( $host eq q{} ) { push @timeouts, $addr; } else { verbose "listed in $addr as $host\n"; if ( !$options->get('whitelistings') ) { push @listed, $addr; } } } else { verbose "not listed in $addr\n"; if ( $options->get('whitelistings') ) { push @listed, $addr; } } } ); my $total = scalar @listed; my $status; if ( $options->get('whitelistings') ) { $status = $options->host . " NOT WHITELISTED on $total " . ( ( $total == 1 ) ? 'server' : 'servers' ) . " of $nservers"; } else { $status = $options->host . " BLACKLISTED on $total " . ( ( $total == 1 ) ? 'server' : 'servers' ) . " of $nservers"; } # append timeout info, but do not account these in status if (@timeouts) { $timeouts_string = scalar @timeouts; $status = " ($timeouts_string server" . ( ( $timeouts_string > 1 ) ? 's' : q{} ) . ' timed out: ' . join( ', ', @timeouts ) . ')'; } if ( $total > 0 ) { $status .= " (@listed)"; } $plugin->add_perfdata( label => 'servers', value => $total, uom => q{}, threshold => $threshold, ); $plugin->add_perfdata( label => 'time', value => time - $time, uom => q{s}, ); $plugin->nagios_exit( $threshold->get_status($total), $status ); return; } 1; nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/MANIFEST0000644000000000000000000000064212262515026021025 0ustar AUTHORS Changes check_rbl check_rbl.ini check_rbl.pod check_rbl.spec COPYING COPYRIGHT inc/Module/Install.pm inc/Module/Install/Base.pm inc/Module/Install/Include.pm inc/Module/Install/Makefile.pm inc/Module/Install/MakeMaker.pm inc/Module/Install/Metadata.pm inc/Module/Install/Scripts.pm inc/version.pm INSTALL Makefile.PL MANIFEST This list of files MANIFEST.SKIP META.yml NEWS README t/00_modules.t TODO VERSION nagios-plugins-contrib-9.20140106/check_rbl/check_rbl-1.3.1/COPYING0000644000000000000000000004311012262515026020724 0ustar 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) 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) year 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. nagios-plugins-contrib-9.20140106/check_rbl/Makefile0000644000000000000000000000033512262515026016761 0ustar #/usr/bin/make -f PLUGIN = src/check_rbl MANPAGES = check_rbl.7 INIFILES = src/check_rbl.ini DOCFILES = src/README CLEANFILES = check_rbl.7 include ../common.mk check_rbl.7: src/check_rbl.pod pod2man -s 7 $< > $@ nagios-plugins-contrib-9.20140106/check_email_delivery/0000755000000000000000000000000012262515026017533 5ustar nagios-plugins-contrib-9.20140106/check_email_delivery/email_delivery.cfg0000644000000000000000000000066312262515026023213 0ustar define command{ command_name check_email_delivery command_line $USER1$/check_email_delivery -p '$USER1$/check_smtp_send -H $HOSTADDRESS$ --mailfrom $ARG3$ --mailto $ARG4$ -U $ARG5$ -P $ARG6$ --header "Subject: Nagios %TOKEN1%" -w $ARG1$ -c $ARG2$' -p '$USER1$/check_imap_receive -H $HOSTADDRESS$ -U $ARG5$ -P $ARG6$ -s SUBJECT -s "Nagios %TOKEN1%" -w $ARG1$ -c $ARG2$' -w $ARG1$,$ARG1$ -c $ARG2$,$ARG2$ } nagios-plugins-contrib-9.20140106/check_email_delivery/control0000644000000000000000000000131512262515026021136 0ustar Uploaders: Bernd Zeimetz Recommends: libnagios-plugin-perl (>= 0.31), libio-socket-ssl-perl, libmail-imapclient-perl, libnet-smtp-tls-perl, libnet-ssleay-perl Suggests: perl-doc Version: 0.7.1b Homepage: http://buhacoff.net/software/check_email_delivery/ Watch: http://buhacoff.net/software/check_email_delivery/ archive/check_email_delivery-(\S+)\.tar\.gz Description: plugin to monitor email delivery Some typical uses of this plugin include: - check SMTP server - check messages and quota on IMAP server - check email delivery loop - check auto-responder function - keep an eye on email lag - monitor automated mailboxes - check email-to-FTP or other special email gateways nagios-plugins-contrib-9.20140106/check_email_delivery/copyright0000644000000000000000000000122012262515026021461 0ustar Copyright (C) 2005-2011 Jonathan Buhacoff 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . nagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/0000755000000000000000000000000012262515026024465 5ustar nagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/CHANGES.txt0000644000000000000000000000160612262515026026301 0ustar 2005-11-10 * published 2005-05-10 * received patches from Johan Nilsson 2006-07-20 * received patches from Geoff Crompton 2007-04-24 * packaged ePN version of the plugins -- the __END__ block for embedded documentation was causing an error because of the way ePN wraps the perl scripts. see http://nagios.sourceforge.net/docs/2_0/embeddedperl.html * added SSL support using patch from Benjamin Ritcey 2007-10-21 * added TLS support for SMTP using Net::SMTP::TLS * added SSL support for SMTP using Net::SMTP::SSL, but NOTE that I don't have access to an SMTPS server so I cannot test this. 2007-12-04 * small fix with SSL support for IMAP related to bugfix in Mail::IMAPClient 3.00 over 2.2.9 thanks to Seth P. Low * added --usage option to all three plugins for familiarity with the official nagios plugins nagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/imap_ssl_cert_epn0000644000000000000000000000663012262515026030103 0ustar #!/usr/bin/perl use strict; my $VERSION = '0.1'; my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff '; my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt'; my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 ); use Getopt::Long; use Mail::IMAPClient; use IO::Socket::SSL; use Net::SSLeay; # get options from command line Getopt::Long::Configure("bundling"); my $verbose = 0; my $help = ""; my $help_usage = ""; my $show_version = ""; my $imap_server = ""; my $default_imap_port = "143"; my $default_imap_ssl_port = "993"; my $imap_port = ""; my $timeout = 60; my $ok; $ok = Getopt::Long::GetOptions( "V|version"=>\$show_version, "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage, # imap settings "H|hostname=s"=>\$imap_server,"p|port=i"=>\$imap_port, # time "t|timeout=i"=>\$timeout ); if( $show_version ) { print "$VERSION\n"; exit $status{UNKNOWN}; } if( $help ) { exec "perldoc", $0 or print "Try `perldoc $0`\n"; exit $status{UNKNOWN}; } if( $help_usage || ( $imap_server eq "" ) ) { print "Usage: $0 -H host [-p port]\n"; exit $status{UNKNOWN}; } my @certs = (); # we have to store the certs we get Net::SSLeay here so that we can output them in REVERSE order (server cert first, root cert last) # connect to IMAP server print "connecting to server $imap_server\n" if $verbose > 2; my $imap; eval { local $SIG{ALRM} = sub { die "exceeded timeout $timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm` alarm $timeout; $imap_port = $default_imap_ssl_port unless $imap_port; my $socket = IO::Socket::SSL->new( PeerAddr => "$imap_server:$imap_port", SSL_verify_mode => 1, SSL_ca_file => undef, SSL_verifycn_scheme => 'imap', SSL_verifycn_name => $imap_server, SSL_verify_callback => \&ssl_printer ); die IO::Socket::SSL::errstr() unless $socket; $socket->autoflush(1); $imap = Mail::IMAPClient->new(Socket=>$socket, Debug => 0 ); $imap->State(Mail::IMAPClient->Connected); $imap->_read_line() if "$Mail::IMAPClient::VERSION" le "2.2.9"; # necessary to remove the server's "ready" line from the input buffer for old versions of Mail::IMAPClient. Using string comparison for the version check because the numeric didn't work on Darwin and for Mail::IMAPClient the next version is 2.3.0 and then 3.00 so string comparison works # $imap->User($username); # $imap->Password($password); # $imap->login() or die "Cannot login: $@"; print join("\n",reverse(@certs)); alarm 0; }; if( $@ ) { chomp $@; print "Could not connect to $imap_server port $imap_port: $@\n"; exit $status{CRITICAL}; } unless( $imap ) { print "Could not connect to $imap_server port $imap_port: $@\n"; exit $status{CRITICAL}; } # deselect the mailbox $imap->close(); # disconnect from IMAP server print "disconnecting from server\n" if $verbose > 2; $imap->logout(); exit $status{OK}; # see IO::Socket::SSL documentation for SSL_verify_callback: sub ssl_printer { my ($boolOpenSSLResult, $cmemCertificateStore, $strCertIssuerOwnerAttr, $strError, $cmemPeerCertificate) = @_; warn "OpenSSL says certificate is " . ( $boolOpenSSLResult ? "valid" : "invalid" ) if $verbose > 0; warn "Peer certificate: $strCertIssuerOwnerAttr" if $verbose > 0; warn "Errors: $strError" if $verbose > 0; #print Net::SSLeay::PEM_get_string_X509($cmemPeerCertificate); push @certs, $strCertIssuerOwnerAttr . "\n" . Net::SSLeay::PEM_get_string_X509($cmemPeerCertificate); } package main; 1; nagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/check_smtp_send0000644000000000000000000005772112262515026027555 0ustar #!/usr/bin/perl use strict; use POSIX qw(strftime); my $VERSION = '0.7.3'; my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff '; my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt'; my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 ); # look for required modules exit $status{UNKNOWN} unless load_modules(qw/Getopt::Long Net::SMTP/); BEGIN { if( grep { /^--hires$/ } @ARGV ) { eval "use Time::HiRes qw(time);"; warn "Time::HiRes not installed\n" if $@; } } Getopt::Long::Configure("bundling"); my $verbose = 0; my $help = ""; my $help_usage = ""; my $show_version = ""; my $smtp_server = ""; my $default_smtp_port = "25"; my $default_smtp_ssl_port = "465"; my $default_smtp_tls_port = "587"; my $smtp_port = ""; my @mailto = (); my $mailfrom = ""; my @header = (); my $body = ""; my $stdin = ""; my $template = ""; my $expect_response = "250"; my $warntime = 15; my $criticaltime = 30; my $timeout = 60; my $tls = 0; my $ssl = 0; my $auth_method = undef; my $username = ""; my $password = ""; my $time_hires = ""; my $mx_lookup = 0; my $ok; $ok = Getopt::Long::GetOptions( "V|version"=>\$show_version, "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage, "w|warning=i"=>\$warntime,"c|critical=i"=>\$criticaltime,"t|timeout=i"=>\$timeout, # smtp settings "H|hostname=s"=>\$smtp_server,"p|port=i"=>\$smtp_port, "mailto=s"=>\@mailto, "mailfrom=s",\$mailfrom, "header=s"=>\@header, "body=s"=>\$body, "stdin"=>\$stdin, "template!"=>\$template, # SSL/TLS/auth options "tls!"=>\$tls, "ssl!"=>\$ssl, "auth=s"=>\$auth_method, "U|username=s"=>\$username,"P|password=s"=>\$password, # Server response "E|expect-response=s"=>\$expect_response, # Time "hires"=>\$time_hires, ); if( $show_version ) { print "$VERSION\n"; if( $verbose ) { print "Default warning threshold: $warntime seconds\n"; print "Default critical threshold: $criticaltime seconds\n"; print "Default timeout: $timeout seconds\n"; } exit $status{UNKNOWN}; } if( $help ) { exec "perldoc", $0 or print "Try `perldoc $0`\n"; exit $status{UNKNOWN}; } if( $smtp_server eq "" && scalar(@mailto) == 1 ) { # no SMTP server specified but one mailto address given means we can look up the MX record $mx_lookup = 1; } my @required_module = (); push @required_module, 'Net::SMTP::SSL' if $ssl; push @required_module, ('MIME::Base64','Authen::SASL') if $ssl && $username; push @required_module, 'Net::SMTP::TLS' if $tls; push @required_module, 'Net::SMTP_auth' if $auth_method and not $tls; # whereas if auth_method and tls we use TLS_auth, which is included in this script! push @required_module, 'Text::Template' if $template; push @required_module, 'Net::DNS' if $mx_lookup; push @required_module, 'Email::Address' if $mx_lookup; exit $status{UNKNOWN} unless load_modules(@required_module); # split up @mailto if commas were used instead of multiple options @mailto = split(/,/,join(',',@mailto)); if( $help_usage || ( ($smtp_server eq "" && !$mx_lookup) || scalar(@mailto)==0 || $mailfrom eq "" ) ) { print "Usage: $0 [-H host [-p port]] --mailto recipient\@your.net [--mailto recipient2\@your.net ...] --mailfrom sender\@your.net --body 'some text' [-w ] [-c ]\n"; exit $status{UNKNOWN}; } # initialize my $report = new PluginReport; my $time_start = time; my $actual_response = undef; my @warning = (); my @critical = (); my $smtp_debug = 0; $smtp_debug = 1 if $verbose >= 3; # default date and message id headers push @header, default_date_header() unless find_header("Date",@header); push @header, default_messageid_header() unless find_header("Message-ID",@header); # look up MX server if necessary if( $mx_lookup ) { my $addr = Email::Address->new( undef, $mailto[0] ); my $mx_domain = $addr->host; print "MX lookup " . $mx_domain . "\n" if $verbose > 1; my $res = Net::DNS::Resolver->new; my @mx = Net::DNS::mx($res, $mx_domain); if( @mx ) { # use the first server foreach my $rr (@mx) { print "pref : " . $rr->preference . " exchange: " . $rr->exchange . "\n" if $verbose > 2; } $smtp_server = $mx[0]->exchange; print "smtp server: $smtp_server\n" if $verbose; } else { print "SMTP SEND CRITICAL - Cannot find MX records for $mx_domain\n"; exit $status{CRITICAL}; } } # connect to SMTP server # create the smtp handle using Net::SMTP, Net::SMTP::SSL, Net::SMTP::TLS, or an authentication variant my $smtp; eval { if( $tls and $auth_method ) { $smtp_port = $default_smtp_tls_port unless $smtp_port; $smtp = TLS_auth->new($smtp_server, Timeout=>$timeout, Port=>$smtp_port, User=>$username, Password=>$password, Auth_Method=>$auth_method); if( $smtp ) { my $message = oneline($smtp->message()); die "cannot connect with TLS/$auth_method: $message" if $smtp->code() =~ m/53\d/; } } elsif( $tls ) { $smtp_port = $default_smtp_tls_port unless $smtp_port; $smtp = Net::SMTP::TLS->new($smtp_server, Timeout=>$timeout, Port=>$smtp_port, User=>$username, Password=>$password); if( $smtp ) { my $message = oneline($smtp->message()); die "cannot connect with TLS: $message" if $smtp->code() =~ m/53\d/; } } elsif( $ssl ) { $smtp_port = $default_smtp_ssl_port unless $smtp_port; $smtp = Net::SMTP::SSL->new($smtp_server, Port => $smtp_port, Timeout=>$timeout,Debug=>$smtp_debug); if( $smtp && $username ) { $smtp->auth($username, $password); my $message = oneline($smtp->message()); die "cannot connect with SSL/password: $message" if $smtp->code() =~ m/53\d/; } } elsif( $auth_method ) { $smtp_port = $default_smtp_port unless $smtp_port; $smtp = Net::SMTP_auth->new($smtp_server, Port=>$smtp_port, Timeout=>$timeout,Debug=>$smtp_debug); if( $smtp ) { $smtp->auth($auth_method, $username, $password); my $message = oneline($smtp->message()); die "cannot connect with SSL/$auth_method: $message" if $smtp->code() =~ m/53\d/; } } else { $smtp_port = $default_smtp_port unless $smtp_port; $smtp = Net::SMTP->new($smtp_server, Port=>$smtp_port, Timeout=>$timeout,Debug=>$smtp_debug); if( $smtp && $username ) { $smtp->auth($username, $password); my $message = oneline($smtp->message()); die "cannot connect with password: $message" if $smtp->code() =~ m/53\d/; } } }; if( $@ ) { $@ =~ s/\n/ /g; # the error message can be multiline but we want our output to be just one line print "SMTP SEND CRITICAL - $@\n"; exit $status{CRITICAL}; } unless( $smtp ) { print "SMTP SEND CRITICAL - Could not connect to $smtp_server port $smtp_port\n"; exit $status{CRITICAL}; } my $time_connected = time; # add the monitored server's banner to the report if( $tls ) { $report->{banner} = ""; } elsif( $ssl ) { $report->{banner} = $smtp->banner || ""; chomp $report->{banner}; } else { $report->{banner} = $smtp->banner || ""; chomp $report->{banner}; } # send email if( $stdin ) { $body = ""; while() { $body .= $_; } } # if user wants to use template substitutions, this is the place to process body and headers if( $template ) { foreach my $item (@header,$body) { my $t = Text::Template->new(TYPE=>'STRING',SOURCE=>$item,PACKAGE=>'SmtpMessageTemplate'); $item = $t->fill_in(PREPEND=>q{package SmtpMessageTemplate;}); # print "item: $item\n"; } } $smtp->mail($mailfrom); foreach( @mailto ) { # the two SMTP modules have different error reporting mechanisms: if( $tls ) { # Net::SMTP::TLS croaks when the recipient is rejected eval { $smtp->to($_); }; if( $@ ) { print "SMTP SEND CRITICAL - Could not send to $_\n"; print "Reason: $@\n" if $verbose; exit $status{CRITICAL}; } } else { # Net::SMTP returns false when the recipient is rejected my $to_returned = $smtp->to($_); if( !$to_returned ) { print "SMTP SEND CRITICAL - Could not send to $_\n"; print "Reason: Recipient rejected or authentication failed\n" if $verbose; exit $status{CRITICAL}; } } } # Net::SMTP::TLS doesn't implement code() so we need to wrap calls in eval to get our error messages # start data transfer (expect response 354) $smtp->data(); # send data $smtp->datasend("To: ".join(", ",@mailto)."\n"); $smtp->datasend("From: $mailfrom\n"); foreach( @header ) { $smtp->datasend("$_\n"); } $smtp->datasend("\n"); $smtp->datasend($body); $smtp->datasend("\n"); eval { # end data transfer (expect response 250) $smtp->dataend(); }; if( $@ ) { $actual_response = $tls ? get_tls_error($@) : $smtp->code(); } else { $actual_response = $tls ? "250" : $smtp->code(); # no error means we got 250 } eval { # disconnect from SMTP server (expect response 221) $smtp->quit(); }; if( $@ ) { push @warning, "Error while disconnecting from $smtp_server"; } # calculate elapsed time and issue warnings my $time_end = time; my $elapsedtime = $time_end - $time_start; $report->{seconds} = $elapsedtime; push @warning, "connection time more than $warntime" if( $time_connected - $time_start > $warntime ); push @critical, "connection time more than $criticaltime" if( $time_connected - $time_start > $criticaltime ); push @critical, "response was $actual_response but expected $expect_response" if ( $actual_response ne $expect_response ); # print report and exit with known status my $perf_data = "elapsed=".$report->{seconds}."s;$warntime;$criticaltime"; # TODO: need a component for safely generating valid perf data format. for notes on the format, see http://www.perfparse.de/tiki-view_faq.php?faqId=6 and http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN185 my $short_report = $report->text(qw/seconds/) . " | $perf_data"; my $long_report = join("", map { "$_: $report->{$_}\n" } qw/banner/ ); if( scalar @critical ) { my $crit_alerts = join(", ", @critical); print "SMTP SEND CRITICAL - $crit_alerts; $short_report\n"; print $long_report if $verbose; exit $status{CRITICAL}; } if( scalar @warning ) { my $warn_alerts = join(", ", @warning); print "SMTP SEND WARNING - $warn_alerts; $short_report\n"; print $long_report if $verbose; exit $status{WARNING}; } print "SMTP SEND OK - $short_report\n"; print $long_report if $verbose; exit $status{OK}; # utility to load required modules. exits if unable to load one or more of the modules. sub load_modules { my @missing_modules = (); foreach( @_ ) { eval "require $_"; push @missing_modules, $_ if $@; } if( @missing_modules ) { print "Missing perl modules: @missing_modules\n"; return 0; } return 1; } # utility to extract error codes out of Net::SMTP::TLS croak messages sub get_tls_error { my ($errormsg) = @_; $errormsg =~ m/: (\d+) (.+)/; my $code = $1; return $code; } # looks for a specific header in a list of headers; returns true if found sub find_header { my ($name, @list) = @_; return scalar grep { m/^$name: /i } @list; } # RFC 2822 date header sub default_date_header { return strftime "Date: %a, %e %b %Y %H:%M:%S %z (%Z)", gmtime; } # RFC 2822 message id header sub default_messageid_header { my $random = randomstring(16,qw/0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z/); my $hostname = `hostname`; chomp $hostname; return "Message-ID: <".time.".".$random.".checksmtpsend@".$hostname.">"; } # returns a random string of specified length using characters from specified set sub randomstring { my ($length,@set) = @_; my $size = scalar @set; my $string = ""; while($length--) { $string .= $set[int(rand($size))]; } return $string; } # replaces all newlines in the input string with spaces sub oneline { my ($input) = @_; $input =~ s/[\r\n]+/ /g; return $input; } # NAME # PluginReport # SYNOPSIS # $report = new PluginReport; # $report->{label1} = "value1"; # $report->{label2} = "value2"; # print $report->text(qw/label1 label2/); package PluginReport; sub new { my ($proto,%p) = @_; my $class = ref($proto) || $proto; my $self = bless {}, $class; $self->{$_} = $p{$_} foreach keys %p; return $self; } sub text { my ($self,@labels) = @_; my @report = map { "$self->{$_} $_" } grep { defined $self->{$_} } @labels; my $text = join(", ", @report); return $text; } package SmtpMessageTemplate; sub trim { my ($text) = @_; $text =~ s/^\s*//; $text =~ s/\s*$//; return $text; } # NAME # TLS_auth # SYNOPSYS # # Based on contribution by Brad Guillory package TLS_auth; #use Net::SMTP::TLS; our @ISA = qw(Net::SMTP::TLS); use Carp; sub new { my ($proto,$server,%p) = @_; my $class = ref($proto) || $proto; #my $self = bless {}, $class; no strict 'refs'; no warnings 'once'; *Net::SMTP::TLS::login = *TLS_auth::login; # override parent's login with ours so when it's called in the constructor, our overriden version will be used my $self = Net::SMTP::TLS->new($server,%p); return $self; } sub login { my ($self) = @_; my $type = $self->{features}->{AUTH}; if(not $type){ die "Server did not return AUTH in capabilities\n"; # croak } # print "Feature: $type\nAuth Method: $self->{Auth_Method}\n"; if($type =~ /CRAM\-MD5/ and $self->{Auth_Method} =~ /CRAM\-MD5/i){ $self->auth_MD5(); }elsif($type =~ /LOGIN/ and $self->{Auth_Method} =~ /LOGIN/i){ $self->auth_LOGIN(); }elsif($type =~ /PLAIN/ and $self->{Auth_Method} =~ /PLAIN/i){ #print "Calling auth_PLAIN\n"; $self->auth_PLAIN(); }else{ die "Unsupported Authentication mechanism: $self->{Auth_Method}\n"; # croak } } package main; 1; __END__ =pod =head1 NAME check_smtp_send - connects to an SMTP server and sends a message =head1 SYNOPSIS check_smtp_send -vV check_smtp_send -? check_smtp_send --help =head1 OPTIONS =over =item --warning Warn if it takes longer than to connect to the SMTP server. Default is 15 seconds. Also known as: -w =item --critical Return a critical status if it takes longer than to connect to the SMTP server. Default is 30 seconds. Also known as: -c =item --timeout Abort with critical status if it takes longer than to connect to the SMTP server. Default is 60 seconds. The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer than 30 seconds. Also known as: -t =item --hostname Address or name of the SMTP server. Examples: mail.server.com, localhost, 192.168.1.100 If not provided, and if there is only one --mailto address, the script will automatically look up the MX record for the --mailto address and use that as the hostname. You can use this to check that your MX records are correct. When omitting the --hostname option, it doesn't really make sense to specify --port, --username, or --password but you can still do so and they will have their normal effect. To look up the MX records you need to have the module Net::DNS and Email::Address installed. Also known as: -H =item --port Service port on the SMTP server. Default is 25 for regular SMTP, 465 for SSL, and 587 for TLS. Also known as: -p =item --tls =item --notls Enable TLS/AUTH protocol. Requires Net::SMTP::TLS, availble on CPAN. When using this option, the default port is 587. You can specify a port from the command line using the --port option. Use the notls option to turn off the tls option. Also, you may need to fix your copy of Net::SMTP::TLS. Here is the diff against version 0.12: 254c254 < $me->_command(sprintf("AUTH PLAIN %S", --- > $me->_command(sprintf("AUTH PLAIN %s", =item --ssl =item --nossl Enable SSL protocol. Requires Net::SMTP::SSL and Authen::SASL, availble on CPAN. When using this option, the default port is 465. You can override with the --port option. Use the nossl option to turn off the ssl option. =item --auth Enable authentication with Net::SMTP_auth (sold separately). For example, try using --auth PLAIN or --auth CRAM-MD5. =item --username =item --password Username and password to use when connecting to SMTP server. Also known as: -U -P =item --body Use this option to specify the body of the email message. If you need newlines in your message, you might need to use the --stdin option instead. =item --header
Use this option to set an arbitrary header in the message. You can use it multiple times. =item --stdin Grab the body of the email message from stdin. =item --mailto recipient@your.net You can send a message to multiple recipients by repeating this option or by separating the email addresses with commas (no whitespace allowed): $ check_smtp_send -H mail.server.net --mailto recipient@your.net,recipient2@your.net --mailfrom sender@your.net SMTP SEND OK - 1 seconds =item --mailfrom sender@your.net Use this option to set the "from" address in the email. =item --template =item --notemplate Enable (or disable) processing of message body and headers. Requires Text::Template. Use this option to apply special processing to your message body and headers that allows you to use the results of arbitrary computations in the text. For example, you can use this feature to send a message containing the hostname of the machine that sent the message without customizing the plugin configuration on each machine. When you enable the --template option, the message body and headers are parsed by Text::Template. Even a message body provided using the --stdin option will be parsed. See the Text::Template manual for more information, but in general any expression written in Perl will work. There is one convenience function provided to you, trim, which will remove leading and trailing whitespace from its parameter. Here's an example: check_smtp_send -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net --template --body 'hello, this message is from {use Sys::Hostname; hostname}' --header 'Subject: test message from {trim(`whoami`)}' =item --expect-response Use this option to specify which SMTP response code should be expected from the server after the SMTP dialog is complete. The default is 250 (message accepted). Also known as: -E =item --hires Use the Time::HiRes module to measure time, if available. =item --verbose Display additional information. Useful for troubleshooting. One --verbose will show extra information for OK, WARNING, and CRITICAL status. Use one --verbose together with --version to see the default warning and critical timeout values. Three --verbose (or -vvv) will show debug information, unless you're using --tls because Net::SMTP::TLS does not have a Debug feature. Also known as: -v =item --version Display plugin version and exit. Also known as: -V =item --help Display this documentation and exit. Does not work in the ePN version. Also known as: -h =item --usage Display a short usage instruction and exit. =back =head1 EXAMPLES =head2 Send a message with custom headers $ check_smtp_send -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net --body 'Homeruns 5' --header 'Subject: Hello, world!' --header 'X-Your-Header: Yes' SMTP SEND OK - 1 seconds =head1 EXIT CODES Complies with the Nagios plug-in specification: 0 OK The plugin was able to check the service and it appeared to be functioning properly 1 Warning The plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly 2 Critical The plugin detected that either the service was not running or it was above some "critical" threshold 3 Unknown Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service =head1 NAGIOS PLUGIN NOTES Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because the path to utils.pm must be specified completely in this program and forces users to edit the source code if their install location is different (if they realize this is the problem). You can view the default timeout for this module by using the --verbose and --version options together. The short form is -vV. Other than that, it attempts to follow published guidelines for Nagios plugins. =head1 CHANGES Wed Oct 29 14:05:00 PST 2005 + version 0.1 Wed Nov 9 15:01:48 PST 2005 + now using an inline PluginReport package to generate the report + added stdin option + copyright notice and GNU GPL + version 0.2 Thu Apr 20 16:00:00 PST 2006 (by Geoff Crompton ) + added bailing if the $smtp->to() call fails + added support for mailto recipients separated by commas + version 0.2.1 Tue Apr 24 21:17:53 PDT 2007 + moved POD text to separate file in order to accomodate the new embedded-perl Nagios feature + version 0.2.3 Fri Apr 27 20:26:42 PDT 2007 + documentation now mentions every command-line option accepted by the plugin, including abbreviations + version 0.3 Sun Oct 21 10:34:14 PDT 2007 + added support for TLS and authentication via the Net::SMTP::TLS module. see --tls option. + version 0.4 Sun Oct 21 13:54:26 PDT 2007 + added support for SSL via the Net::SMTP::SSL module. see --ssl option. + port is no longer a required option. defaults to 25 for regular smtp, 465 for ssl, and 587 for tls. + added port info to the "could not connect" error message + version 0.4.1 Tue Dec 4 07:42:32 PST 2007 + added --usage option because the official nagios plugins have both --help and --usage + added --timeout option to match the official nagios plugins + fixed some minor pod formatting issues for perldoc + version 0.4.2 Mon Feb 11 19:09:37 PST 2008 + fixed a bug for embedded perl version, variable "%status" will not stay shared in load_modules + version 0.4.3 Mon May 26 09:12:14 PDT 2008 + fixed warning and critical messages to use "more than" or "less than" instead of the angle brackets, to make them more web friendly + version 0.4.4 Wed Jul 2 07:12:35 PDT 2008 + added --expect-response option submitted by Christian Kauhaus + added support for authentication via Net::SMTP_auth. see --auth option. + version 0.4.5 Sun Oct 5 15:18:23 PDT 2008 + added error handling for smtp server disconnects ungracefully during QUIT (gmail.com does) + version 0.4.6 Thu Oct 1 12:09:35 PDT 2009 + added --template option to allow arbitrary substitutions for body and headers, and provided one convenience function for trimming strings + added performance data for use with PNP4Nagios! + version 0.5.0 Thu Oct 8 11:17:04 PDT 2009 + added more detailed error messages when using --verbose + version 0.5.1 Tue Feb 9 12:14:49 PST 2010 + added support for combining --auth with --tls using a subclass of Net::SMTP::TLS submitted by Brad Guillory; please note that to use the "PLAIN" authentication type you need to patch your Net::SMTP:TLS because it has a bug in sub auth_PLAIN (sprintf %S instead of %s) + version 0.5.2 Mon Jan 3 10:39:42 PST 2011 + added default Date and Message-ID headers; Date header uses POSIX strftime and Message-ID header uses hostname command to get localhost name + version 0.7.0 Fri May 6 08:35:09 AST 2011 + added --hires option to enable use of Time::Hires if available + version 0.7.1 Wed Jul 6 19:18:26 AST 2011 + the --hostname is now optional; if not provided the plugin will lookup the MX record for the --mailto address (requires Net::DNS) + version 0.7.2 Tue Dec 13 09:24:04 PST 2011 + separated authentication errors from connection errors + version 0.7.3 =head1 AUTHOR Jonathan Buhacoff =head1 COPYRIGHT AND LICENSE Copyright (C) 2005-2011 Jonathan Buhacoff 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . http://www.gnu.org/licenses/gpl.txt =cut ././@LongLink0000644000000000000000000000015212262515411011637 Lustar rootrootnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/check_imap_receive_epnnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/check_imap_receiv0000644000000000000000000003660112262515026030036 0ustar #!/usr/bin/perl use strict; my $VERSION = '0.7.5'; my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff '; my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt'; my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 ); # look for required modules exit $status{UNKNOWN} unless load_modules(qw/Getopt::Long Mail::IMAPClient/); BEGIN { if( grep { /^--hires$/ } @ARGV ) { eval "use Time::HiRes qw(time);"; warn "Time::HiRes not installed\n" if $@; } } # get options from command line Getopt::Long::Configure("bundling"); my $verbose = 0; my $help = ""; my $help_usage = ""; my $show_version = ""; my $imap_server = ""; my $default_imap_port = "143"; my $default_imap_ssl_port = "993"; my $imap_port = ""; my $username = ""; my $password = ""; my $mailbox = "INBOX"; my @search = (); my $search_critical_min = 1; my $search_critical_max = -1; # -1 means disabled for this option my $search_warning_min = 1; my $search_warning_max = -1; # -1 means disabled for this option my $capture_max = ""; my $capture_min = ""; my $delete = 1; my $no_delete_captured = ""; my $warntime = 15; my $criticaltime = 30; my $timeout = 60; my $interval = 5; my $max_retries = 10; my $download = ""; my $download_max = ""; my $peek = ""; my $template = ""; my $ssl = 0; my $ssl_ca_file = ""; my $tls = 0; my $time_hires = ""; my $ok; $ok = Getopt::Long::GetOptions( "V|version"=>\$show_version, "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage, "w|warning=i"=>\$warntime,"c|critical=i"=>\$criticaltime,"t|timeout=i"=>\$timeout, # imap settings "H|hostname=s"=>\$imap_server,"p|port=i"=>\$imap_port, "U|username=s"=>\$username,"P|password=s"=>\$password, "m|mailbox=s"=>\$mailbox, "imap-check-interval=i"=>\$interval,"imap-retries=i"=>\$max_retries, "ssl!"=>\$ssl, "ssl-ca-file=s"=>\$ssl_ca_file, "tls!"=>\$tls, # search settings "s|search=s"=>\@search, "search-critical-min=i"=>\$search_critical_min, "search-critical-max=i"=>\$search_critical_max, "search-warning-min=i"=>\$search_warning_min, "search-warning-max=i"=>\$search_warning_max, "capture-max=s"=>\$capture_max, "capture-min=s"=>\$capture_min, "delete!"=>\$delete, "nodelete-captured"=>\$no_delete_captured, "download!"=>\$download, "download_max=i"=>\$download_max, "download-max=i"=>\$download_max, "peek!"=>\$peek, "template!"=>\$template, # Time "hires"=>\$time_hires, ); if( $show_version ) { print "$VERSION\n"; if( $verbose ) { print "Default warning threshold: $warntime seconds\n"; print "Default critical threshold: $criticaltime seconds\n"; print "Default timeout: $timeout seconds\n"; } exit $status{UNKNOWN}; } if( $help ) { exec "perldoc", $0 or print "Try `perldoc $0`\n"; exit $status{UNKNOWN}; } my @required_module = (); push @required_module, 'IO::Socket::SSL' if $ssl || $tls; push @required_module, 'Email::Simple' if $download; push @required_module, ('Text::Template','Date::Manip') if $template; exit $status{UNKNOWN} unless load_modules(@required_module); if( $help_usage || ( $imap_server eq "" || $username eq "" || $password eq "" || scalar(@search)==0 ) ) { print "Usage: $0 -H host [-p port] -U username -P password -s HEADER -s X-Nagios -s 'ID: 1234.' [-w ] [-c ] [--imap-check-interval ] [--imap-retries ]\n"; exit $status{UNKNOWN}; } # before attempting to connect to the server, check if any of the search parameters # use substitution functions and make sure we can parse them first. if we can't we # need to abort since the search will be meaningless. if( $template ) { foreach my $token (@search) { my $t = Text::Template->new(TYPE=>'STRING',SOURCE=>$token,PACKAGE=>'ImapSearchTemplate'); $token = $t->fill_in(PREPEND=>q{package ImapSearchTemplate;}); #print "token: $token\n"; } } # initialize my $report = new PluginReport; my $time_start = time; # connect to IMAP server print "connecting to server $imap_server\n" if $verbose > 2; my $imap; eval { local $SIG{ALRM} = sub { die "exceeded timeout $timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm` alarm $timeout; if( $ssl || $tls ) { $imap_port = $default_imap_ssl_port unless $imap_port; my %ssl_args = (); if( length($ssl_ca_file) > 0 ) { $ssl_args{SSL_verify_mode} = 1; $ssl_args{SSL_ca_file} = $ssl_ca_file; $ssl_args{SSL_verifycn_scheme} = 'imap'; $ssl_args{SSL_verifycn_name} = $imap_server; } my $socket = IO::Socket::SSL->new(PeerAddr=>"$imap_server:$imap_port", %ssl_args); die IO::Socket::SSL::errstr() . " (if you get this only when using both --ssl and --ssl-ca-file, but not when using just --ssl, the server SSL certificate failed validation)" unless $socket; $socket->autoflush(1); $imap = Mail::IMAPClient->new(Socket=>$socket, Debug => 0 ); $imap->State(Mail::IMAPClient->Connected); $imap->_read_line() if "$Mail::IMAPClient::VERSION" le "2.2.9"; # necessary to remove the server's "ready" line from the input buffer for old versions of Mail::IMAPClient. Using string comparison for the version check because the numeric didn't work on Darwin and for Mail::IMAPClient the next version is 2.3.0 and then 3.00 so string comparison works $imap->User($username); $imap->Password($password); $imap->login() or die "Cannot login: $@"; } else { $imap_port = $default_imap_port unless $imap_port; $imap = Mail::IMAPClient->new(Debug => 0 ); $imap->Server("$imap_server:$imap_port"); $imap->User($username); $imap->Password($password); $imap->connect() or die "$@"; } $imap->Peek(1) if $peek; $imap->Ignoresizeerrors(1); alarm 0; }; if( $@ ) { chomp $@; print "IMAP RECEIVE CRITICAL - Could not connect to $imap_server port $imap_port: $@\n"; exit $status{CRITICAL}; } unless( $imap ) { print "IMAP RECEIVE CRITICAL - Could not connect to $imap_server port $imap_port: $@\n"; exit $status{CRITICAL}; } my $time_connected = time; # select a mailbox print "selecting mailbox $mailbox\n" if $verbose > 2; unless( $imap->select($mailbox) ) { print "IMAP RECEIVE CRITICAL - Could not select $mailbox: $@ $!\n"; if( $verbose > 2 ) { print "Mailbox list:\n" . join("\n", $imap->folders) . "\n"; print "Mailbox separator: " . $imap->separator . "\n"; ##print "Special mailboxes:\n" . join("\n", map { "$_ => ". } $imap->logout(); exit $status{CRITICAL}; } # search for messages my $tries = 0; my @msgs; until( scalar(@msgs) != 0 || $tries >= $max_retries ) { eval { $imap->select( $mailbox ); # if download flag is on, we download recent messages and search ourselves if( $download ) { print "downloading messages to search\n" if $verbose > 2; @msgs = download_and_search($imap,@search); } else { print "searching on server\n" if $verbose > 2; @msgs = $imap->search(@search); die "Invalid search parameters: $@" if $@; } }; if( $@ ) { chomp $@; print "Cannot search messages: $@\n"; $imap->close(); $imap->logout(); exit $status{UNKNOWN}; } $report->{found} = scalar(@msgs); $tries++; sleep $interval unless (scalar(@msgs) != 0 || $tries >= $max_retries); } sub download_and_search { my ($imap,@search) = @_; my $ims = new ImapMessageSearch; $ims->querytokens(@search); my @found = (); @msgs = reverse $imap->messages or (); # die "Cannot list messages: $@\n"; # reversing to get descending order, which is most recent messages first! (at least on my mail servers) @msgs = @msgs[0..$download_max-1] if $download_max && scalar(@msgs) > $download_max; foreach my $m (@msgs) { my $message = $imap->message_string($m); push @found, $m if $ims->match($message); } return @found; } # capture data in messages my $captured_max_id = ""; my $captured_min_id = ""; if( $capture_max || $capture_min ) { my $max = undef; my $min = undef; my %captured = (); for (my $i=0;$i < scalar(@msgs); $i++) { my $message = $imap->message_string($msgs[$i]); if( $message =~ m/$capture_max/ ) { if( !defined($max) || $1 > $max ) { $captured{ $i } = 1; $max = $1; $captured_max_id = $msgs[$i]; } } if( $message =~ m/$capture_min/ ) { if( !defined($min) || $1 < $min ) { $captured{ $i } = 1; $min = $1; $captured_min_id = $msgs[$i]; } } print $message if $verbose > 1; } $report->{captured} = scalar keys %captured; $report->{max} = $max if defined $max; $report->{min} = $min if defined $min; } # delete messages if( $delete ) { print "deleting matching messages\n" if $verbose > 2; my $deleted = 0; for (my $i=0;$i < scalar(@msgs); $i++) { next if ($no_delete_captured && ($captured_max_id eq $msgs[$i])); next if ($no_delete_captured && ($captured_min_id eq $msgs[$i])); $imap->delete_message($msgs[$i]); $deleted++; } $report->{deleted} = $deleted; $imap->expunge() if $deleted; } # deselect the mailbox $imap->close(); # disconnect from IMAP server print "disconnecting from server\n" if $verbose > 2; $imap->logout(); # calculate elapsed time and issue warnings my $time_end = time; my $elapsedtime = $time_end - $time_start; $report->{seconds} = $elapsedtime; $report->{found} = 0 unless defined $report->{found}; $report->{captured} = 0 unless defined $report->{captured}; my @warning = (); my @critical = (); push @warning, "found less than $search_warning_min" if( scalar(@msgs) < $search_warning_min ); push @warning, "found more than $search_warning_max" if ( $search_warning_max > -1 && scalar(@msgs) > $search_warning_max ); push @critical, "found less than $search_critical_min" if ( scalar(@msgs) < $search_critical_min ); push @critical, "found more than $search_critical_max" if ( $search_critical_max > -1 && scalar(@msgs) > $search_critical_max ); push @warning, "connection time more than $warntime" if( $time_connected - $time_start > $warntime ); push @critical, "connection time more than $criticaltime" if( $time_connected - $time_start > $criticaltime ); # print report and exit with known status my $perf_data = "elapsed=".$report->{seconds}."s found=".$report->{found}."messages captured=".$report->{captured}."messages"; # TODO: need a component for safely generating valid perf data format. for notes on the format, see http://www.perfparse.de/tiki-view_faq.php?faqId=6 and http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN185 my $short_report = $report->text(qw/seconds found captured max min deleted/) . " | $perf_data"; if( scalar @critical ) { my $crit_alerts = join(", ", @critical); print "IMAP RECEIVE CRITICAL - $crit_alerts; $short_report\n"; exit $status{CRITICAL}; } if( scalar @warning ) { my $warn_alerts = join(", ", @warning); print "IMAP RECEIVE WARNING - $warn_alerts; $short_report\n"; exit $status{WARNING}; } print "IMAP RECEIVE OK - $short_report\n"; exit $status{OK}; # utility to load required modules. exits if unable to load one or more of the modules. sub load_modules { my @missing_modules = (); foreach( @_ ) { eval "require $_"; push @missing_modules, $_ if $@; } if( @missing_modules ) { print "Missing perl modules: @missing_modules\n"; return 0; } return 1; } # NAME # PluginReport # SYNOPSIS # $report = new PluginReport; # $report->{label1} = "value1"; # $report->{label2} = "value2"; # print $report->text(qw/label1 label2/); package PluginReport; sub new { my ($proto,%p) = @_; my $class = ref($proto) || $proto; my $self = bless {}, $class; $self->{$_} = $p{$_} foreach keys %p; return $self; } sub text { my ($self,@labels) = @_; my @report = map { "$self->{$_} $_" } grep { defined $self->{$_} } @labels; my $text = join(", ", @report); return $text; } package ImapMessageSearch; require Email::Simple; sub new { my ($proto,%p) = @_; my $class = ref($proto) || $proto; my $self = bless {}, $class; $self->{querystring} = []; $self->{querytokens} = []; $self->{queryfnlist} = []; $self->{mimemessage} = undef; $self->{$_} = $p{$_} foreach keys %p; return $self; } sub querystring { my ($self,$string) = @_; $self->{querystring} = $string; return $self->querytokens( parseimapsearch($string) ); } sub querytokens { my ($self,@tokens) = @_; $self->{querytokens} = [@tokens]; $self->{queryfnlist} = [create_search_expressions(@tokens)]; return $self; } sub match { my ($self,$message_string) = @_; return 0 unless defined $message_string; my $message_mime = Email::Simple->new($message_string); return $self->matchmime($message_mime); } sub matchmime { my ($self,$message_mime) = @_; my $match = 1; foreach my $x (@{$self->{queryfnlist}}) { $match = $match && $x->($message_mime); } return $match; } # this should probably become its own Perl module... see also Net::IMAP::Server::Command::Search sub create_search_expressions { my (@search) = @_; return () unless scalar(@search); my $token = shift @search; if( $token eq 'TEXT' ) { my $value = shift @search; return (sub {shift->as_string =~ /\Q$value\E/i},create_search_expressions(@search)); } if( $token eq 'BODY' ) { my $value = shift @search; return (sub {shift->body =~ /\Q$value\E/i},create_search_expressions(@search)); } if( $token eq 'SUBJECT' ) { my $value = shift @search; return (sub {shift->header('Subject') =~ /\Q$value\E/i},create_search_expressions(@search)); } if( $token eq 'HEADER' ) { my $name = shift @search; my $value = shift @search; return (sub {shift->header($name) =~ /\Q$value\E/i},create_search_expressions(@search)); } if( $token eq 'NOT' ) { my @exp = create_search_expressions(@search); my $next = shift @exp; return (sub { ! $next->(@_) }, @exp); } if( $token eq 'OR' ) { my @exp = create_search_expressions(@search); my $next1 = shift @exp; my $next2 = shift @exp; return (sub { $next1->(@_) or $next2->(@_) }, @exp); } if( $token eq 'SENTBEFORE' ) { my $value = shift @search; return (sub {datecmp(shift->header('Date'),$value) < 0},create_search_expressions(@search)); } if( $token eq 'SENTON' ) { my $value = shift @search; return (sub {datecmp(shift->header('Date'),$value) == 0},create_search_expressions(@search)); } if( $token eq 'SENTSINCE' ) { my $value = shift @search; return (sub {datecmp(shift->header('Date'),$value) > 0},create_search_expressions(@search)); } return sub { die "invalid search parameter: $token" }; } sub datecmp { my ($date1,$date2) = @_; my $parsed1 = Date::Manip::ParseDate($date1); my $parsed2 = Date::Manip::ParseDate($date2); my $cmp = Date::Manip::Date_Cmp($parsed1,$parsed2); print " $date1 <=> $date2 -> $cmp\n"; return $cmp <=> 0; } package ImapSearchTemplate; # Takes an English date specification ("now", etc) and an optional offset ("-4 hours") # and returns an RFC 2822 formatted date string. # see http://search.cpan.org/dist/Date-Manip/lib/Date/Manip.pod sub rfc2822dateHeader { my ($when,$delta) = @_; $when = Date::Manip::ParseDate($when); $delta = Date::Manip::ParseDateDelta($delta) if $delta; my $d = $delta ? Date::Manip::DateCalc($when,$delta) : $when; return Date::Manip::UnixDate($d, "%a, %d %b %Y %H:%M:%S %z"); } sub rfc2822date { my ($when,$delta) = @_; $when = Date::Manip::ParseDate($when); $delta = Date::Manip::ParseDateDelta($delta) if $delta; my $d = $delta ? Date::Manip::DateCalc($when,$delta) : $when; return Date::Manip::UnixDate($d, "%d-%b-%Y"); } # alias for 2822 ... RFC 822 is an older version and specifies 2-digit years, but we ignore that for now. sub rfc822dateHeader { return rfc2822dateHeader(@_); } sub rfc822date { return rfc2822date(@_); } sub date { my ($format,$when,$delta) = @_; $when = Date::Manip::ParseDate($when); $delta = Date::Manip::ParseDateDelta($delta) if $delta; my $d = $delta ? Date::Manip::DateCalc($when,$delta) : $when; return Date::Manip::UnixDate($d, $format); } package main; 1; ././@LongLink0000644000000000000000000000014612262515411011642 Lustar rootrootnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/check_imap_receivenagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/check_imap_receiv0000644000000000000000000011133612262515026030035 0ustar #!/usr/bin/perl use strict; my $VERSION = '0.7.5'; my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff '; my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt'; my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 ); # look for required modules exit $status{UNKNOWN} unless load_modules(qw/Getopt::Long Mail::IMAPClient/); BEGIN { if( grep { /^--hires$/ } @ARGV ) { eval "use Time::HiRes qw(time);"; warn "Time::HiRes not installed\n" if $@; } } # get options from command line Getopt::Long::Configure("bundling"); my $verbose = 0; my $help = ""; my $help_usage = ""; my $show_version = ""; my $imap_server = ""; my $default_imap_port = "143"; my $default_imap_ssl_port = "993"; my $imap_port = ""; my $username = ""; my $password = ""; my $mailbox = "INBOX"; my @search = (); my $search_critical_min = 1; my $search_critical_max = -1; # -1 means disabled for this option my $search_warning_min = 1; my $search_warning_max = -1; # -1 means disabled for this option my $capture_max = ""; my $capture_min = ""; my $delete = 1; my $no_delete_captured = ""; my $warntime = 15; my $criticaltime = 30; my $timeout = 60; my $interval = 5; my $max_retries = 10; my $download = ""; my $download_max = ""; my $peek = ""; my $template = ""; my $ssl = 0; my $ssl_ca_file = ""; my $tls = 0; my $time_hires = ""; my $ok; $ok = Getopt::Long::GetOptions( "V|version"=>\$show_version, "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage, "w|warning=i"=>\$warntime,"c|critical=i"=>\$criticaltime,"t|timeout=i"=>\$timeout, # imap settings "H|hostname=s"=>\$imap_server,"p|port=i"=>\$imap_port, "U|username=s"=>\$username,"P|password=s"=>\$password, "m|mailbox=s"=>\$mailbox, "imap-check-interval=i"=>\$interval,"imap-retries=i"=>\$max_retries, "ssl!"=>\$ssl, "ssl-ca-file=s"=>\$ssl_ca_file, "tls!"=>\$tls, # search settings "s|search=s"=>\@search, "search-critical-min=i"=>\$search_critical_min, "search-critical-max=i"=>\$search_critical_max, "search-warning-min=i"=>\$search_warning_min, "search-warning-max=i"=>\$search_warning_max, "capture-max=s"=>\$capture_max, "capture-min=s"=>\$capture_min, "delete!"=>\$delete, "nodelete-captured"=>\$no_delete_captured, "download!"=>\$download, "download_max=i"=>\$download_max, "download-max=i"=>\$download_max, "peek!"=>\$peek, "template!"=>\$template, # Time "hires"=>\$time_hires, ); if( $show_version ) { print "$VERSION\n"; if( $verbose ) { print "Default warning threshold: $warntime seconds\n"; print "Default critical threshold: $criticaltime seconds\n"; print "Default timeout: $timeout seconds\n"; } exit $status{UNKNOWN}; } if( $help ) { exec "perldoc", $0 or print "Try `perldoc $0`\n"; exit $status{UNKNOWN}; } my @required_module = (); push @required_module, 'IO::Socket::SSL' if $ssl || $tls; push @required_module, 'Email::Simple' if $download; push @required_module, ('Text::Template','Date::Manip') if $template; exit $status{UNKNOWN} unless load_modules(@required_module); if( $help_usage || ( $imap_server eq "" || $username eq "" || $password eq "" || scalar(@search)==0 ) ) { print "Usage: $0 -H host [-p port] -U username -P password -s HEADER -s X-Nagios -s 'ID: 1234.' [-w ] [-c ] [--imap-check-interval ] [--imap-retries ]\n"; exit $status{UNKNOWN}; } # before attempting to connect to the server, check if any of the search parameters # use substitution functions and make sure we can parse them first. if we can't we # need to abort since the search will be meaningless. if( $template ) { foreach my $token (@search) { my $t = Text::Template->new(TYPE=>'STRING',SOURCE=>$token,PACKAGE=>'ImapSearchTemplate'); $token = $t->fill_in(PREPEND=>q{package ImapSearchTemplate;}); #print "token: $token\n"; } } # initialize my $report = new PluginReport; my $time_start = time; # connect to IMAP server print "connecting to server $imap_server\n" if $verbose > 2; my $imap; eval { local $SIG{ALRM} = sub { die "exceeded timeout $timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm` alarm $timeout; if( $ssl || $tls ) { $imap_port = $default_imap_ssl_port unless $imap_port; my %ssl_args = (); if( length($ssl_ca_file) > 0 ) { $ssl_args{SSL_verify_mode} = 1; $ssl_args{SSL_ca_file} = $ssl_ca_file; $ssl_args{SSL_verifycn_scheme} = 'imap'; $ssl_args{SSL_verifycn_name} = $imap_server; } my $socket = IO::Socket::SSL->new(PeerAddr=>"$imap_server:$imap_port", %ssl_args); die IO::Socket::SSL::errstr() . " (if you get this only when using both --ssl and --ssl-ca-file, but not when using just --ssl, the server SSL certificate failed validation)" unless $socket; $socket->autoflush(1); $imap = Mail::IMAPClient->new(Socket=>$socket, Debug => 0 ); $imap->State(Mail::IMAPClient->Connected); $imap->_read_line() if "$Mail::IMAPClient::VERSION" le "2.2.9"; # necessary to remove the server's "ready" line from the input buffer for old versions of Mail::IMAPClient. Using string comparison for the version check because the numeric didn't work on Darwin and for Mail::IMAPClient the next version is 2.3.0 and then 3.00 so string comparison works $imap->User($username); $imap->Password($password); $imap->login() or die "Cannot login: $@"; } else { $imap_port = $default_imap_port unless $imap_port; $imap = Mail::IMAPClient->new(Debug => 0 ); $imap->Server("$imap_server:$imap_port"); $imap->User($username); $imap->Password($password); $imap->connect() or die "$@"; } $imap->Peek(1) if $peek; $imap->Ignoresizeerrors(1); alarm 0; }; if( $@ ) { chomp $@; print "IMAP RECEIVE CRITICAL - Could not connect to $imap_server port $imap_port: $@\n"; exit $status{CRITICAL}; } unless( $imap ) { print "IMAP RECEIVE CRITICAL - Could not connect to $imap_server port $imap_port: $@\n"; exit $status{CRITICAL}; } my $time_connected = time; # select a mailbox print "selecting mailbox $mailbox\n" if $verbose > 2; unless( $imap->select($mailbox) ) { print "IMAP RECEIVE CRITICAL - Could not select $mailbox: $@ $!\n"; if( $verbose > 2 ) { print "Mailbox list:\n" . join("\n", $imap->folders) . "\n"; print "Mailbox separator: " . $imap->separator . "\n"; ##print "Special mailboxes:\n" . join("\n", map { "$_ => ". } $imap->logout(); exit $status{CRITICAL}; } # search for messages my $tries = 0; my @msgs; until( scalar(@msgs) != 0 || $tries >= $max_retries ) { eval { $imap->select( $mailbox ); # if download flag is on, we download recent messages and search ourselves if( $download ) { print "downloading messages to search\n" if $verbose > 2; @msgs = download_and_search($imap,@search); } else { print "searching on server\n" if $verbose > 2; @msgs = $imap->search(@search); die "Invalid search parameters: $@" if $@; } }; if( $@ ) { chomp $@; print "Cannot search messages: $@\n"; $imap->close(); $imap->logout(); exit $status{UNKNOWN}; } $report->{found} = scalar(@msgs); $tries++; sleep $interval unless (scalar(@msgs) != 0 || $tries >= $max_retries); } sub download_and_search { my ($imap,@search) = @_; my $ims = new ImapMessageSearch; $ims->querytokens(@search); my @found = (); @msgs = reverse $imap->messages or (); # die "Cannot list messages: $@\n"; # reversing to get descending order, which is most recent messages first! (at least on my mail servers) @msgs = @msgs[0..$download_max-1] if $download_max && scalar(@msgs) > $download_max; foreach my $m (@msgs) { my $message = $imap->message_string($m); push @found, $m if $ims->match($message); } return @found; } # capture data in messages my $captured_max_id = ""; my $captured_min_id = ""; if( $capture_max || $capture_min ) { my $max = undef; my $min = undef; my %captured = (); for (my $i=0;$i < scalar(@msgs); $i++) { my $message = $imap->message_string($msgs[$i]); if( $message =~ m/$capture_max/ ) { if( !defined($max) || $1 > $max ) { $captured{ $i } = 1; $max = $1; $captured_max_id = $msgs[$i]; } } if( $message =~ m/$capture_min/ ) { if( !defined($min) || $1 < $min ) { $captured{ $i } = 1; $min = $1; $captured_min_id = $msgs[$i]; } } print $message if $verbose > 1; } $report->{captured} = scalar keys %captured; $report->{max} = $max if defined $max; $report->{min} = $min if defined $min; } # delete messages if( $delete ) { print "deleting matching messages\n" if $verbose > 2; my $deleted = 0; for (my $i=0;$i < scalar(@msgs); $i++) { next if ($no_delete_captured && ($captured_max_id eq $msgs[$i])); next if ($no_delete_captured && ($captured_min_id eq $msgs[$i])); $imap->delete_message($msgs[$i]); $deleted++; } $report->{deleted} = $deleted; $imap->expunge() if $deleted; } # deselect the mailbox $imap->close(); # disconnect from IMAP server print "disconnecting from server\n" if $verbose > 2; $imap->logout(); # calculate elapsed time and issue warnings my $time_end = time; my $elapsedtime = $time_end - $time_start; $report->{seconds} = $elapsedtime; $report->{found} = 0 unless defined $report->{found}; $report->{captured} = 0 unless defined $report->{captured}; my @warning = (); my @critical = (); push @warning, "found less than $search_warning_min" if( scalar(@msgs) < $search_warning_min ); push @warning, "found more than $search_warning_max" if ( $search_warning_max > -1 && scalar(@msgs) > $search_warning_max ); push @critical, "found less than $search_critical_min" if ( scalar(@msgs) < $search_critical_min ); push @critical, "found more than $search_critical_max" if ( $search_critical_max > -1 && scalar(@msgs) > $search_critical_max ); push @warning, "connection time more than $warntime" if( $time_connected - $time_start > $warntime ); push @critical, "connection time more than $criticaltime" if( $time_connected - $time_start > $criticaltime ); # print report and exit with known status my $perf_data = "elapsed=".$report->{seconds}."s found=".$report->{found}."messages captured=".$report->{captured}."messages"; # TODO: need a component for safely generating valid perf data format. for notes on the format, see http://www.perfparse.de/tiki-view_faq.php?faqId=6 and http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN185 my $short_report = $report->text(qw/seconds found captured max min deleted/) . " | $perf_data"; if( scalar @critical ) { my $crit_alerts = join(", ", @critical); print "IMAP RECEIVE CRITICAL - $crit_alerts; $short_report\n"; exit $status{CRITICAL}; } if( scalar @warning ) { my $warn_alerts = join(", ", @warning); print "IMAP RECEIVE WARNING - $warn_alerts; $short_report\n"; exit $status{WARNING}; } print "IMAP RECEIVE OK - $short_report\n"; exit $status{OK}; # utility to load required modules. exits if unable to load one or more of the modules. sub load_modules { my @missing_modules = (); foreach( @_ ) { eval "require $_"; push @missing_modules, $_ if $@; } if( @missing_modules ) { print "Missing perl modules: @missing_modules\n"; return 0; } return 1; } # NAME # PluginReport # SYNOPSIS # $report = new PluginReport; # $report->{label1} = "value1"; # $report->{label2} = "value2"; # print $report->text(qw/label1 label2/); package PluginReport; sub new { my ($proto,%p) = @_; my $class = ref($proto) || $proto; my $self = bless {}, $class; $self->{$_} = $p{$_} foreach keys %p; return $self; } sub text { my ($self,@labels) = @_; my @report = map { "$self->{$_} $_" } grep { defined $self->{$_} } @labels; my $text = join(", ", @report); return $text; } package ImapMessageSearch; require Email::Simple; sub new { my ($proto,%p) = @_; my $class = ref($proto) || $proto; my $self = bless {}, $class; $self->{querystring} = []; $self->{querytokens} = []; $self->{queryfnlist} = []; $self->{mimemessage} = undef; $self->{$_} = $p{$_} foreach keys %p; return $self; } sub querystring { my ($self,$string) = @_; $self->{querystring} = $string; return $self->querytokens( parseimapsearch($string) ); } sub querytokens { my ($self,@tokens) = @_; $self->{querytokens} = [@tokens]; $self->{queryfnlist} = [create_search_expressions(@tokens)]; return $self; } sub match { my ($self,$message_string) = @_; return 0 unless defined $message_string; my $message_mime = Email::Simple->new($message_string); return $self->matchmime($message_mime); } sub matchmime { my ($self,$message_mime) = @_; my $match = 1; foreach my $x (@{$self->{queryfnlist}}) { $match = $match && $x->($message_mime); } return $match; } # this should probably become its own Perl module... see also Net::IMAP::Server::Command::Search sub create_search_expressions { my (@search) = @_; return () unless scalar(@search); my $token = shift @search; if( $token eq 'TEXT' ) { my $value = shift @search; return (sub {shift->as_string =~ /\Q$value\E/i},create_search_expressions(@search)); } if( $token eq 'BODY' ) { my $value = shift @search; return (sub {shift->body =~ /\Q$value\E/i},create_search_expressions(@search)); } if( $token eq 'SUBJECT' ) { my $value = shift @search; return (sub {shift->header('Subject') =~ /\Q$value\E/i},create_search_expressions(@search)); } if( $token eq 'HEADER' ) { my $name = shift @search; my $value = shift @search; return (sub {shift->header($name) =~ /\Q$value\E/i},create_search_expressions(@search)); } if( $token eq 'NOT' ) { my @exp = create_search_expressions(@search); my $next = shift @exp; return (sub { ! $next->(@_) }, @exp); } if( $token eq 'OR' ) { my @exp = create_search_expressions(@search); my $next1 = shift @exp; my $next2 = shift @exp; return (sub { $next1->(@_) or $next2->(@_) }, @exp); } if( $token eq 'SENTBEFORE' ) { my $value = shift @search; return (sub {datecmp(shift->header('Date'),$value) < 0},create_search_expressions(@search)); } if( $token eq 'SENTON' ) { my $value = shift @search; return (sub {datecmp(shift->header('Date'),$value) == 0},create_search_expressions(@search)); } if( $token eq 'SENTSINCE' ) { my $value = shift @search; return (sub {datecmp(shift->header('Date'),$value) > 0},create_search_expressions(@search)); } return sub { die "invalid search parameter: $token" }; } sub datecmp { my ($date1,$date2) = @_; my $parsed1 = Date::Manip::ParseDate($date1); my $parsed2 = Date::Manip::ParseDate($date2); my $cmp = Date::Manip::Date_Cmp($parsed1,$parsed2); print " $date1 <=> $date2 -> $cmp\n"; return $cmp <=> 0; } package ImapSearchTemplate; # Takes an English date specification ("now", etc) and an optional offset ("-4 hours") # and returns an RFC 2822 formatted date string. # see http://search.cpan.org/dist/Date-Manip/lib/Date/Manip.pod sub rfc2822dateHeader { my ($when,$delta) = @_; $when = Date::Manip::ParseDate($when); $delta = Date::Manip::ParseDateDelta($delta) if $delta; my $d = $delta ? Date::Manip::DateCalc($when,$delta) : $when; return Date::Manip::UnixDate($d, "%a, %d %b %Y %H:%M:%S %z"); } sub rfc2822date { my ($when,$delta) = @_; $when = Date::Manip::ParseDate($when); $delta = Date::Manip::ParseDateDelta($delta) if $delta; my $d = $delta ? Date::Manip::DateCalc($when,$delta) : $when; return Date::Manip::UnixDate($d, "%d-%b-%Y"); } # alias for 2822 ... RFC 822 is an older version and specifies 2-digit years, but we ignore that for now. sub rfc822dateHeader { return rfc2822dateHeader(@_); } sub rfc822date { return rfc2822date(@_); } sub date { my ($format,$when,$delta) = @_; $when = Date::Manip::ParseDate($when); $delta = Date::Manip::ParseDateDelta($delta) if $delta; my $d = $delta ? Date::Manip::DateCalc($when,$delta) : $when; return Date::Manip::UnixDate($d, $format); } package main; 1; __END__ =pod =head1 NAME check_imap_receive - connects to and searches an IMAP account for messages =head1 SYNOPSIS check_imap_receive -vV check_imap_receive -? check_imap_receive --help =head1 OPTIONS =over =item --warning Warn if it takes longer than to connect to the IMAP server. Default is 15 seconds. Also known as: -w =item --critical Return a critical status if it takes longer than to connect to the IMAP server. Default is 30 seconds. See also: --capture-critical Also known as: -c =item --timeout Abort with critical status if it takes longer than to connect to the IMAP server. Default is 60 seconds. The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer than 30 seconds. Also known as: -t =item --imap-check-interval How long to wait after searching for a matching message before searching again. Only takes effect if no messages were found. Default is 5 seconds. =item --imap-retries How many times to try searching for a matching message before giving up. If you set this to 0 then messages will not be searched at all. Setting this to 1 means the plugin only tries once. Etc. Default is 10 times. =item --hostname Address or name of the IMAP server. Examples: mail.server.com, localhost, 192.168.1.100 Also known as: -H =item --port Service port on the IMAP server. Default is 143. If you use SSL, default is 993. Also known as: -p =item --username =item --password Username and password to use when connecting to IMAP server. Also known as: -U -P =item --mailbox Use this option to specify the mailbox to search for messages. Default is INBOX. Also known as: -m =item --search Use this option to filter the messages. Default is not to filter. You may (must) use this option multiple times in order to create any valid IMAP search criteria. See the examples and see also http://www.ietf.org/rfc/rfc2060.txt (look for section 6.4.4, the SEARCH command) This is the way to find messages matching a given subject: -s SUBJECT -s "a given subject" You can use the following technique for any header, including Subject. To find "Header-Name: some value": -s HEADER -s Header-Name -s "some value" Modern IMAP servers that support rfc5032 extensions allow you to search for messages older or younger than a number of seconds. So to find messages received in the past hour, you can do: -s YOUNGER -s 3600 Or to find messages received more than 5 minutes ago, you can do: -s OLDER -s 300 Also known as: -s =item --download =item --nodownload This option causes all messages in the specified mailbox to be downloaded from the server and searched locally. See --download-max if you only want to download a few messages. Currently only the following RFC 2060 search criteria are supported: TEXT, BODY, SUBJECT, HEADER, NOT, OR, SENTBEFORE, SENTON, SENTSINCE. Requires Email::Simple to be installed. It is available on CPAN. This option may be particularly useful to you if your mail server is slow to index messages (like Exchange 2003), causing the plugin not to find them with IMAP SEARCH even though they are in the inbox. It's also useful if you're searching for messages that have been on the server for a specified amount of time, like some minutes or hours, because the standard IMAP search function only allows whole dates. For this, use the standard search keywords but you can specify either just a date like in RFC 2060 or a date and a time. If you use SENTBEFORE, SENTON, or SENTSINCE, you must have Date::Manip installed on your system. =item --download-max Limits the number of messages downloaded from the server when the --download option is used. Default is to download and search all messages. =item --search-critical-min This option will trigger a CRITICAL status if the number of messages found by the search criteria is below the given number. Use in conjunction with --search. This parameter defaults to 1 so that if no messages are found, the plugin will exit with a CRITICAL status. If you want the original behavior where the plugin exits with a WARNING status when no messages are found, set this parameter to 0. =item --search-critical-max This option will trigger a CRITICAL status if the number of messages found by the search criteria is above the given number. Use in conjunction with --search. This parameter defaults to -1 meaning it's disabled. If you set it to 10, the plugin will exit with CRITICAL if it finds 11 messages. If you set it to 1, the plugin will exit with CRITICAL if it finds any more than 1 message. If you set it to 0, the plugin will exit with CRITICAL if it finds any messages at all. If you set it to -1 it will be disabled. =item --search-warning-min This option will trigger a WARNING status if the number of messages found by the search criteria is below the given number. Use in conjunction with --search. This parameter defaults to 1 so that if no messages are found, the plugin will exit with a WARNING status. If you want to suppress the original behavior where the plugin exits with a WARNING status when no messages are found, set this parameter to 0. When this parameter is 0, it means that you expect the mailbox not to have any messages. =item --search-warning-max This option will trigger a WARNING status if the number of messages found by the search criteria is above the given number. Use in conjunction with --search. This parameter defaults to -1 meaning it's disabled. If you set it to 10, the plugin will exit with WARNING if it finds 11 messages. If you set it to 1, the plugin will exit with WARNING if it finds any more than 1 message. If you set it to 0, the plugin will exit with WARNING if it finds any messages at all. If you set it to -1 it will be disabled. =item --capture-max In addition to specifying search arguments to filter the emails in the IMAP account, you can specify a "capture-max" regexp argument and the eligible emails (found with search arguments) will be compared to each other and the OK line will have the highest captured value. The regexp is expected to capture a numeric value. =item --capture-min In addition to specifying search arguments to filter the emails in the IMAP account, you can specify a "capture-min" regexp argument and the eligible emails (found with search arguments) will be compared to each other and the OK line will have the lowest captured value. The regexp is expected to capture a numeric value. =item --delete =item --nodelete Use the delete option to delete messages that matched the search criteria. This is useful for preventing the mailbox from filling up with automated messages (from the check_smtp_send plugin, for example). THE DELETE OPTION IS TURNED *ON* BY DEFAULT, in order to preserve compatibility with an earlier version. Use the nodelete option to turn off the delete option. =item --nodelete-captured If you use both the capture-max and delete arguments, you can also use the nodelete-captured argument to specify that the email with the highest captured value should not be deleted. This leaves it available for comparison the next time this plugin runs. If you do not use the delete option, this option has no effect. =item --ssl =item --nossl Enable SSL protocol. Requires IO::Socket::SSL. Using this option automatically changes the default port from 143 to 993. You can still override this from the command line using the --port option. Use the nossl option to turn off the ssl option. =item --ssl-ca-file Use this to verify the server SSL certificate against a local .pem file. You'll need to specify the path to the .pem file as the parameter. You can use the imap_ssl_cert utility included in this distribution to connect to your IMAP server and save its SSL certificates into your .pem file. Usage is like this: imap_ssl_cert -H imap.server.com > ca_file.pem Only applicable when --ssl option is enabled. =item --template =item --notemplate Enable (or disable) processing of IMAP search parameters. Requires Text::Template and Date::Manip. Use this option to apply special processing to IMAP search parameters that allows you to use the results of arbitrary computations as the parameter values. For example, you can use this feature to search for message received up to 4 hours ago. Modern IMAP servers that support rfc5032 extensions allow searching with the YOUNGER and OLDER criteria so a message received up to 4 hours ago is -s YOUNGER -s 14400. But if your mail server doesn't support that, you could use the --template option to get similar functionality. When you enable the --template option, each parameter you pass to the -s option is parsed by Text::Template. See the Text::Template manual for more information, but in general any expression written in Perl will work. A convenience function called rfc2822dateHeader is provided to you so you can easily compute properly formatted dates for use as search parameters. The rfc2822date function can take one or two parameters itself: the date to format and an optional offset. To use the current time as a search parameter, you can write this: $ check_imap_receive ... --template -s HEADER -s Delivery-Date -s '{rfc2822dateHeader("now")}' The output of {rfc2822dateHeader("now")} looks like this: Wed, 30 Sep 2009 22:44:03 -0700 and is suitable for use with a date header, like HEADER Delivery-Date. To use a time in the past relative to the current time or day, you can use a second convenience function called rfc2822date and write this: $ check_imap_receive ... --template -s SENTSINCE -s '{rfc2822date("now","-1 day")}' The output of {rfc2822date("now","-1 day")} looks like this: 29-Sep-2009 and is suitable for use with BEFORE, ON, SENTBEFORE, SENTON, SENTSINCE, and SINCE. I have seen some email clients use a different format in the Date field, like September 17, 2009 9:46:51 AM PDT. To specify an arbitrary format like this one, write this: $ check_imap_receive ... --template -s HEADER -s Delivery-Date -s '{date("%B %e, %Y %i:%M:%S %p %Z","now","-4 hours")}' You can use BEFORE, ON, SENTBEFORE, SENTON, SENTSINCE, or SINCE to search for messages that arrived on, before, or after a given day but not on, before, or after a specific time on that day. To search for messages that arrived on, before, or after a specific time you have to use the Delivery-Date or another date field, like with -s HEADER -s Delivery-Date in the example above. See the Date::Manip manual for more information on the allowed expressions for date and delta strings. =item --hires Use the Time::HiRes module to measure time, if available. =item --verbose Display additional information. Useful for troubleshooting. Use together with --version to see the default warning and critical timeout values. If the selected mailbox was not found, you can use verbosity level 3 (-vvv) to display a list of all available mailboxes on the server. Also known as: -v =item --version Display plugin version and exit. Also known as: -V =item --help Display this documentation and exit. Does not work in the ePN version. Also known as: -h =item --usage Display a short usage instruction and exit. =back =head1 EXAMPLES =head2 Report how many emails are in the mailbox $ check_imap_receive -H mail.server.net --username mailuser --password mailpass -s ALL --nodelete IMAP RECEIVE OK - 1 seconds, 7 found =head2 Report the email with the highest value Suppose your mailbox has some emails from an automated script and that a message from this script typically looks like this (abbreviated): To: mailuser@server.net From: autoscript@server.net Subject: Results of Autoscript Date: Wed, 09 Nov 2005 08:30:40 -0800 Message-ID: Homeruns 5 And further suppose that you are interested in reporting the message that has the highest number of home runs, and also to leave this message in the mailbox for future checks, but remove the other matching messages with lesser values: $ check_imap_receive -H mail.server.net --username mailuser --password mailpass -s SUBJECT -s "Results of Autoscript" --capture-max "Homeruns (\d+)" --nodelete-captured IMAP RECEIVE OK - 1 seconds, 3 found, 1 captured, 5 max, 2 deleted =head2 Troubleshoot your search parameters Add the --nodelete and --imap-retries=1 parameters to your command line. =head1 EXIT CODES Complies with the Nagios plug-in specification: 0 OK The plugin was able to check the service and it appeared to be functioning properly 1 Warning The plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly 2 Critical The plugin detected that either the service was not running or it was above some "critical" threshold 3 Unknown Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service =head1 NAGIOS PLUGIN NOTES Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because the path to utils.pm must be specified completely in this program and forces users to edit the source code if their install location is different (if they realize this is the problem). You can view the default timeout for this module by using the --verbose and --version options together. The short form is -vV. Other than that, it attempts to follow published guidelines for Nagios plugins. =head1 SEE ALSO http://nagios.org/ http://search.cpan.org/~djkernen/Mail-IMAPClient-2.2.9/IMAPClient.pod http://search.cpan.org/~markov/Mail-IMAPClient-3.00/lib/Mail/IMAPClient.pod =head1 CHANGES Wed Oct 29 11:00:00 PST 2005 + version 0.1 Wed Nov 9 09:53:32 PST 2005 + added delete/nodelete option. deleting found messages is still default behavior. + added capture-max option + added nodelete-captured option + added mailbox option + added eval/alarm block to implement -c option + now using an inline PluginReport package to generate the report + copyright notice and GNU GPL + version 0.2 Thu Apr 20 14:00:00 CET 2006 (by Johan Nilsson ) + version 0.2.1 + added support for multiple polls of imap-server, with specified intervals Tue Apr 24 21:17:53 PDT 2007 + now there is an alternate version (same but without embedded perl POD) that is compatible with the new new embedded-perl Nagios feature + added patch from Benjamin Ritcey for SSL support on machines that have an SSL-enabled + version 0.2.3 Fri Apr 27 18:56:50 PDT 2007 + fixed problem that "Invalid search parameters" was not printed because of missing newline to flush it + warnings and critical errors now try to append error messages received from the IMAP client + changed connection error to display timeout only if timeout was the error + documentation now mentions every command-line option accepted by the plugin, including abbreviations + added abbreviations U for username, P for password, m for mailbox + fixed bug that imap-check-interval applied even after the last try (imap-retries) when it was not necessary + the IMAP expunge command is not sent unless at least one message is deleted + fixed bug that the "no messages" warning was printed even if some messages were found + version 0.3 Sun Oct 21 14:08:07 PDT 2007 + added port info to the "could not connect" error message + fixed bug that occurred when using --ssl --port 143 which caused port to remain at the default 993 imap/ssl port + added clarity shortcuts --search-subject and --search-header + port is no longer a required option. defaults to 143 for regular IMAP and 993 for IMAP/SSL + version 0.3.1 Sun Oct 21 20:41:56 PDT 2007 + reworked ssl support to use IO::Socket::SSL instead of the convenience method Mail::IMAPClient->Ssl (which is not included in the standard Mail::IMAPClient package) + removed clarity shortcuts (bad idea, code bloat) + version 0.4 Tue Dec 4 07:05:27 PST 2007 + added version check to _read_line workaround for SSL-related bug in Mail::IMAPClient version 2.2.9 ; newer versions fixed the bug + added --usage option because the official nagios plugins have both --help and --usage + added --timeout option to match the official nagios plugins + fixed some minor pod formatting issues for perldoc + version 0.4.1 Sat Dec 15 07:39:59 PST 2007 + improved compatibility with Nagios embedded perl (ePN) + version 0.4.2 Mon Jan 7 21:35:23 PST 2008 + changed version check for Mail::IMAPClient version 2.2.9 to use string comparison le "2.2.9" + fixed bug where script was dying on socket->autoflush when socket does not exist because autoflush was being called before checking the socket object + version 0.4.3 Mon Feb 11 19:13:38 PST 2008 + fixed a bug for embedded perl version, variable "%status" will not stay shared in load_modules + version 0.4.4 Mon May 26 08:33:27 PDT 2008 + fixed a bug for number captured, it now reflects number of messages captured instead of always returning "1" + added --capture-min option to complement --capture-max + added --search-critical-min to trigger a CRITICAL alert if number of messages found is less than argument, with default 1. + fixed warning and critical messages to use "more than" or "less than" instead of the angle brackets, to make them more web friendly + version 0.5 Wed Jul 2 14:59:05 PDT 2008 + fixed a bug for not finding a message after the first try, by reselecting the mailbox before each search + version 0.5.1 Sat Dec 13 08:57:29 PST 2008 + added --download option to allow local searching of messages (useful if your server has an index that handles searching but it takes a while before new emails show up and you want immediate results), supports only the TEXT, BODY, SUBJECT, and HEADER search keys + added --download-max option to set a limit on number of messages downloaded with --download + version 0.6.0 Wed Sep 30 23:25:33 PDT 2009 + fixed --download-max option (was incorrectly looking for --download_max). currently both will work, in the future only --download-max will work + added --template option to allow arbitrary substitutions for search parameters, and provided three convenience functions for working with dates + added date search criteria to the --download option: SENTBEFORE, SENTON, and SENTSINCE which check the Date header and allow hours and minutes in addition to dates (whereas the IMAP standard only allows dates) + added --search-critical-max to trigger a CRITICAL alert if number of messages found is more than argument, disabled by default. + fixed a bug in --download --search where messages would match even though they failed the search criteria + changed behavior of --download-max to look at the most recent messages first (hopefully); the IMAP protocol doesn't guarantee the order that the messages are returned but I observed that many mail servers return them in chronological order; so now --download-max reverses the order to look at the newer messages first + added performance data for use with PNP4Nagios! + version 0.7.0 Fri Oct 2 15:22:00 PDT 2009 + added --search-warning-max and --search-warning-min to trigger a WARNING alert if number of messages is more than or less than the specified number. + fixed --download option not to fail with CRITICAL if mailbox is empty; now this can be configured with --search-warning-min or --search-critical-min + version 0.7.1 Sat Nov 21 18:27:17 PST 2009 + fixed problem with using --download option on certain mail servers by turning on the IgnoreSizeErrors feature in IMAPClient + added --peek option to prevent marking messages as seen + version 0.7.2 Tue Jan 5 12:13:53 PST 2010 + added error message and exit with unknown status when an unrecognized IMAP search criteria is encountered by the --download --search option Wed May 5 11:14:51 PDT 2010 + added mailbox list when mailbox is not found and verbose level 3 is on (-vvv) + version 0.7.3 Tue Mar 8 18:58:14 AST 2011 + updated documentation for --search and --template to mention rfc5032 extensions (thanks to Stuart Henderson) Fri May 6 08:35:09 AST 2011 + added --hires option to enable use of Time::Hires if available + version 0.7.4 Fri Nov 11 01:51:40 AST 2011 + added --ssl-ca-file option to allow verifying the server certificate against a local .pem file (thanks to Alexandre Bezroutchko) + added imap_ssl_cert.pl utility (not in this file) to conveniently save the server's SSL certificates into a local .pem file + version 0.7.5 =head1 AUTHOR Jonathan Buhacoff =head1 COPYRIGHT AND LICENSE Copyright (C) 2005-2011 Jonathan Buhacoff 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . http://www.gnu.org/licenses/gpl.txt =cut nagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/imap_ssl_cert0000644000000000000000000001435512262515026027244 0ustar #!/usr/bin/perl use strict; my $VERSION = '0.1'; my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff '; my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt'; my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 ); use Getopt::Long; use Mail::IMAPClient; use IO::Socket::SSL; use Net::SSLeay; # get options from command line Getopt::Long::Configure("bundling"); my $verbose = 0; my $help = ""; my $help_usage = ""; my $show_version = ""; my $imap_server = ""; my $default_imap_port = "143"; my $default_imap_ssl_port = "993"; my $imap_port = ""; my $timeout = 60; my $ok; $ok = Getopt::Long::GetOptions( "V|version"=>\$show_version, "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage, # imap settings "H|hostname=s"=>\$imap_server,"p|port=i"=>\$imap_port, # time "t|timeout=i"=>\$timeout ); if( $show_version ) { print "$VERSION\n"; exit $status{UNKNOWN}; } if( $help ) { exec "perldoc", $0 or print "Try `perldoc $0`\n"; exit $status{UNKNOWN}; } if( $help_usage || ( $imap_server eq "" ) ) { print "Usage: $0 -H host [-p port]\n"; exit $status{UNKNOWN}; } my @certs = (); # we have to store the certs we get Net::SSLeay here so that we can output them in REVERSE order (server cert first, root cert last) # connect to IMAP server print "connecting to server $imap_server\n" if $verbose > 2; my $imap; eval { local $SIG{ALRM} = sub { die "exceeded timeout $timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm` alarm $timeout; $imap_port = $default_imap_ssl_port unless $imap_port; my $socket = IO::Socket::SSL->new( PeerAddr => "$imap_server:$imap_port", SSL_verify_mode => 1, SSL_ca_file => undef, SSL_verifycn_scheme => 'imap', SSL_verifycn_name => $imap_server, SSL_verify_callback => \&ssl_printer ); die IO::Socket::SSL::errstr() unless $socket; $socket->autoflush(1); $imap = Mail::IMAPClient->new(Socket=>$socket, Debug => 0 ); $imap->State(Mail::IMAPClient->Connected); $imap->_read_line() if "$Mail::IMAPClient::VERSION" le "2.2.9"; # necessary to remove the server's "ready" line from the input buffer for old versions of Mail::IMAPClient. Using string comparison for the version check because the numeric didn't work on Darwin and for Mail::IMAPClient the next version is 2.3.0 and then 3.00 so string comparison works # $imap->User($username); # $imap->Password($password); # $imap->login() or die "Cannot login: $@"; print join("\n",reverse(@certs)); alarm 0; }; if( $@ ) { chomp $@; print "Could not connect to $imap_server port $imap_port: $@\n"; exit $status{CRITICAL}; } unless( $imap ) { print "Could not connect to $imap_server port $imap_port: $@\n"; exit $status{CRITICAL}; } # deselect the mailbox $imap->close(); # disconnect from IMAP server print "disconnecting from server\n" if $verbose > 2; $imap->logout(); exit $status{OK}; # see IO::Socket::SSL documentation for SSL_verify_callback: sub ssl_printer { my ($boolOpenSSLResult, $cmemCertificateStore, $strCertIssuerOwnerAttr, $strError, $cmemPeerCertificate) = @_; warn "OpenSSL says certificate is " . ( $boolOpenSSLResult ? "valid" : "invalid" ) if $verbose > 0; warn "Peer certificate: $strCertIssuerOwnerAttr" if $verbose > 0; warn "Errors: $strError" if $verbose > 0; #print Net::SSLeay::PEM_get_string_X509($cmemPeerCertificate); push @certs, $strCertIssuerOwnerAttr . "\n" . Net::SSLeay::PEM_get_string_X509($cmemPeerCertificate); } package main; 1; __END__ =pod =head1 NAME imap_ssl_cert - connects to an IMAP server using SSL and saves the server certificate into a .pem file =head1 SYNOPSIS imap_ssl_cert -H imap.server.com > server_ca_file.pem imap_ssl_cert -? imap_ssl_cert --help =head1 DEPENDENCIES This utility requires the following perl modules to be installed: Getopt::Long Mail::IMAPClient IO::Socket::SSL Net::SSLeay =head1 OPTIONS =over =item --timeout Abort with critical status if it takes longer than to connect to the IMAP server. Default is 60 seconds. The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer than 30 seconds. Also known as: -t =item --hostname Address or name of the IMAP server. Examples: mail.server.com, localhost, 192.168.1.100 Also known as: -H =item --port Service port on the IMAP server. Default is 143. If you use SSL, default is 993. Also known as: -p =item --verbose Display additional information. Useful for troubleshooting. Also known as: -v =item --version Display plugin version and exit. Also known as: -V =item --help Display this documentation and exit. Also known as: -h =item --usage Display a short usage instruction and exit. =back =head1 EXAMPLES =head2 Print the server's SSL certificate chain $ perl imap_ssl_cert.pl -H imap.server.com > ca_file.pem $ cat ca_file.pem -----BEGIN CERTIFICATE----- MIID1zCCAr+gAwIBAgIQPr3bVk0SkuXygjxgA7EVGDANBgkqhkiG9w0BAQUFADA8 [...snip...] 0FF4warjskrfqaVtWeIV58LJheaM4cPJkc2M -----END CERTIFICATE----- $ openssl x509 -in ca_file.pem -text =head1 SEE ALSO http://en.wikipedia.org/wiki/X.509 http://en.wikipedia.org/wiki/Privacy_Enhanced_Mail http://tools.ietf.org/html/rfc1422 http://search.cpan.org/~mikem/Net-SSLeay-1.42/lib/Net/SSLeay.pm http://search.cpan.org/~plobbes/Mail-IMAPClient-3.29/lib/Mail/IMAPClient.pod =head1 CHANGES Fri Nov 11 03:38:13 AST 2011 + version 0.1 =head1 AUTHOR Jonathan Buhacoff =head1 COPYRIGHT AND LICENSE Copyright (C) 2011 Jonathan Buhacoff 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . http://www.gnu.org/licenses/gpl.txt =cut ././@LongLink0000644000000000000000000000017412262515411011643 Lustar rootrootnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/nagios-plugins-check_email_delivery.specnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/nagios-plugins-ch0000644000000000000000000000401012262515026027732 0ustar Summary: A Nagios plugin to check IMAP delivery times #Name: check_email_delivery Name: nagios-plugins-check_email_delivery Version: 0.7.1a Release: 0.2%{?dist} License: GPLv2 Group: Applications/System URL: http://buhacoff.net/software/check_email_delivery/ Source0: http://buhacoff.net/software/check_email_delivery/archive/check_email_delivery-%{version}.tar.gz #http://exchange.nagios.org/components/com_mtree/attachment.php?link_id=1339&cf_id=30 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root # For handling --help options Requires: /usr/bin/nroff %description The Nagios email delivery plugin uses two other plugins (smtp send and imap receive), also included, to send a message to an email account and then check that account for the message and delete it. The plugin times how long it takes for the message to be delivered and the warning and critical thresholds are for this elapsed time. %prep #%setup -q %setup -n check_email_delivery-%{version} # Avoid filenames with unnecessary punction in them %{__mv} "./docs/check_smtp_send (Greek's conflicted copy 2011-08-24).pod" \ ./docs/check_smtp_send-Greeks-conflicted-copy-2011-08-24.pod %{__mv} "docs/How to connect to IMAP server manually.txt" \ docs/How-to-connect-to-IMAP-server-manually.txt %build # No build required, just drop in place %install rm -rf $RPM_BUILD_ROOT %{__install} -d -m0755 %{buildroot}%{_libdir}/nagios/plugins # No instlalation procedure, install manually %{__install} -m0755 -m0755 check_* %{buildroot}%{_libdir}/nagios/plugins %{__install} -m0755 -m0755 imap_* %{buildroot}%{_libdir}/nagios/plugins %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-, root, root, 0755) %{_libdir}/nagios/plugins/check_* %{_libdir}/nagios/plugins/imap_* %doc CHANGES.txt LICENSE.txt README.txt %doc docs/* %changelog * Sun Feb 5 2012 Nico Kadel-Garcia - 0.68-0.1 - Update to 0.7.1a - Add nroff dependency for --help options * Thu Nov 3 2011 Nico Kadel-Garcia - 0.68-0.1 - Initial build. nagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/0000755000000000000000000000000012262515026025415 5ustar ././@LongLink0000644000000000000000000000015612262515411011643 Lustar rootrootnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_quota.htmlnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_q0000644000000000000000000002354612262515026027755 0ustar check_imap_quota - connects to an IMAP account and checks the quota


NAME

check_imap_quota - connects to an IMAP account and checks the quota


SYNOPSIS

 check_imap_quota -vV
 check_imap_quota -?
 check_imap_quota --help


OPTIONS

--warning <seconds>

Warn if it takes longer than <seconds> to connect to the IMAP server. Default is 15 seconds. Also known as: -w <seconds>

--critical <seconds>

Return a critical status if it takes longer than <seconds> to connect to the IMAP server. Default is 30 seconds. See also: --capture-critical <messages> Also known as: -c <seconds>

--timeout <seconds>

Abort with critical status if it takes longer than <seconds> to connect to the IMAP server. Default is 60 seconds. The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer than 30 seconds. Also known as: -t <seconds>

--hostname <server>

Address or name of the IMAP server. Examples: mail.server.com, localhost, 192.168.1.100 Also known as: -H <server>

--port <number>

Service port on the IMAP server. Default is 143. If you use SSL, default is 993. Also known as: -p <number>

--username <username>
--password <password>

Username and password to use when connecting to IMAP server. Also known as: -U <username> -P <password>

--mailbox <mailbox>

Use this option to specify the mailbox to search for messages. Default is INBOX. Also known as: -m <mailbox>

--ssl
--nossl

Enable SSL protocol. Requires IO::Socket::SSL.

Using this option automatically changes the default port from 143 to 993. You can still override this from the command line using the --port option.

Use the nossl option to turn off the ssl option.

--hires

Use the Time::HiRes module to measure time, if available.

--verbose

Display additional information. Useful for troubleshooting. Use together with --version to see the default warning and critical timeout values.

If the selected mailbox was not found, you can use verbosity level 3 (-vvv) to display a list of all available mailboxes on the server.

Also known as: -v

--version

Display plugin version and exit. Also known as: -V

--help

Display this documentation and exit. Does not work in the ePN version. Also known as: -h

--usage

Display a short usage instruction and exit.


EXAMPLES

Report how many emails are in the mailbox

 $ check_imap_receive -H mail.server.net --username mailuser --password mailpass
 -s ALL --nodelete
 IMAP RECEIVE OK - 1 seconds, 7 found

Report the email with the highest value

Suppose your mailbox has some emails from an automated script and that a message from this script typically looks like this (abbreviated):

 To: mailuser@server.net
 From: autoscript@server.net
 Subject: Results of Autoscript
 Date: Wed, 09 Nov 2005 08:30:40 -0800
 Message-ID: <auto-000000992528@server.net>
 Homeruns 5

And further suppose that you are interested in reporting the message that has the highest number of home runs, and also to leave this message in the mailbox for future checks, but remove the other matching messages with lesser values:

 $ check_imap_receive -H mail.server.net --username mailuser --password mailpass
 -s SUBJECT -s "Results of Autoscript" --capture-max "Homeruns (\d+)"  --nodelete-captured
 IMAP RECEIVE OK - 1 seconds, 3 found, 1 captured, 5 max, 2 deleted

Troubleshoot your search parameters

Add the --nodelete and --imap-retries=1 parameters to your command line.


EXIT CODES

Complies with the Nagios plug-in specification:
0OKThe plugin was able to check the service and it appeared to be functioning properly
1WarningThe plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly
2CriticalThe plugin detected that either the service was not running or it was above some "critical" threshold
3UnknownInvalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service


NAGIOS PLUGIN NOTES

Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html

This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because the path to utils.pm must be specified completely in this program and forces users to edit the source code if their install location is different (if they realize this is the problem). You can view the default timeout for this module by using the --verbose and --version options together. The short form is -vV.

Other than that, it attempts to follow published guidelines for Nagios plugins.


SEE ALSO

http://nagios.org/ http://search.cpan.org/~djkernen/Mail-IMAPClient-2.2.9/IMAPClient.pod http://search.cpan.org/~markov/Mail-IMAPClient-3.00/lib/Mail/IMAPClient.pod


CHANGES

 Fri Nov 11 04:53:09 AST 2011
 + version 0.1 created with quota code contributed by Johan Romme
 Tue Dec 20 17:38:04 PST 2011
 + fixed bug where a quota of 0 was reported as an incorrect response from the server, thanks to Eike Arndt
 + version 0.2


AUTHOR

Jonathan Buhacoff <jonathan@buhacoff.net>


COPYRIGHT AND LICENSE

 Copyright (C) 2011 Jonathan Buhacoff
 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 3 of the License, or
 (at your option) any later version.
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>;.
 http://www.gnu.org/licenses/gpl.txt
././@LongLink0000644000000000000000000000015312262515411011640 Lustar rootrootnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/imap_ssl_cert.htmlnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/imap_ssl_cer0000644000000000000000000001306112262515026030001 0ustar imap_ssl_cert - connects to an IMAP server using SSL and saves the server certificate into a .pem file


NAME

imap_ssl_cert - connects to an IMAP server using SSL and saves the server certificate into a .pem file


SYNOPSIS

 imap_ssl_cert -H imap.server.com > server_ca_file.pem
 imap_ssl_cert -?
 imap_ssl_cert --help


DEPENDENCIES

This utility requires the following perl modules to be installed:

Getopt::Long Mail::IMAPClient IO::Socket::SSL Net::SSLeay


OPTIONS

--timeout <seconds>

Abort with critical status if it takes longer than <seconds> to connect to the IMAP server. Default is 60 seconds. The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer than 30 seconds. Also known as: -t <seconds>

--hostname <server>

Address or name of the IMAP server. Examples: mail.server.com, localhost, 192.168.1.100 Also known as: -H <server>

--port <number>

Service port on the IMAP server. Default is 143. If you use SSL, default is 993. Also known as: -p <number>

--verbose

Display additional information. Useful for troubleshooting.

Also known as: -v

--version

Display plugin version and exit. Also known as: -V

--help

Display this documentation and exit. Also known as: -h

--usage

Display a short usage instruction and exit.


EXAMPLES

Print the server's SSL certificate chain

 $ perl imap_ssl_cert.pl -H imap.server.com > ca_file.pem
 $ cat ca_file.pem
 -----BEGIN CERTIFICATE-----
 MIID1zCCAr+gAwIBAgIQPr3bVk0SkuXygjxgA7EVGDANBgkqhkiG9w0BAQUFADA8
 [...snip...]
 0FF4warjskrfqaVtWeIV58LJheaM4cPJkc2M
 -----END CERTIFICATE-----
 $ openssl x509 -in ca_file.pem -text


SEE ALSO

http://en.wikipedia.org/wiki/X.509 http://en.wikipedia.org/wiki/Privacy_Enhanced_Mail http://tools.ietf.org/html/rfc1422 http://search.cpan.org/~mikem/Net-SSLeay-1.42/lib/Net/SSLeay.pm http://search.cpan.org/~plobbes/Mail-IMAPClient-3.29/lib/Mail/IMAPClient.pod


CHANGES

 Fri Nov 11 03:38:13 AST 2011
 + version 0.1


AUTHOR

Jonathan Buhacoff <jonathan@buhacoff.net>


COPYRIGHT AND LICENSE

 Copyright (C) 2011 Jonathan Buhacoff
 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 3 of the License, or
 (at your option) any later version.
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>;.
 http://www.gnu.org/licenses/gpl.txt
././@LongLink0000644000000000000000000000020312262515411011634 Lustar rootrootnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/How to connect to IMAP server manually.txtnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/How to conne0000644000000000000000000000603312262515026027565 0ustar HOW TO CONNECT TO IMAP SERVER MANUALLY This how-to borrowed from: http://www.bincimap.org/bincimap-faq.html 1) Connection Using telnet, connect to your service on port 143. Replace "server" with your server's name. If the server is set up correctly, you will see this greeting: # telnet server 143 * OK IMAP Server ready If you have SSL enabled (most likely you do), connect to port 993 with the openssl tool. If the server is set up correctly, you will see this greeting: # openssl s_client -connect server:993 -crlf * OK IMAP Server ready 2) Logging in / authenticating Firstly, check your bincimap.conf file, in the "Authentication" section, for this setting: allow plain auth in non ssl = "no" If you want users to be able to connect without using SSL, set this to "yes". Using either the telnet (in case of "yes" in the above example) or openssl tool, try the LOGIN command, replacing "username" with one username on your server, and "password" with that user's password. You should get the reply on the second line. 1 LOGIN username password 1 LOGIN completed Note that you should try logging in with at least two users to check that this feature is working properly. 3) Listing, creating, renaming and deleting mailboxes Enter the following command to list the user's first level mailboxes. You should get at least one line of response (starting with "* LIST") before you get the "2 OK LIST" reponse. 2 LIST "" "%" * LIST (\UnMarked) "/" "INBOX" 2 OK LIST completed Check your bincimap.conf file, under the Mailbox section, and check the "depot" setting. Try creating a mailbox with the following command, replacing mailbox with a name of your choice. Note that if you are using the Maildir++ depot setting, you must use "INBOX/mailbox" instead: 3 CREATE mailbox 3 OK CREATE completed Rename the mailbox with this command. Note the "INBOX/" prefix when using a Maildir++ depot. (After that, rerunning the LIST command from above will give you a slightly different result than before): 4 RENAME mailbox newmailbox 4 OK RENAME completed Now delete the mailbox with this command: 5 DELETE newmailbox 5 OK DELETE completed 4) Selecting a mailbox and looking inside Select your INBOX with this command. Note that the response may be slightly different from in this example: 6 SELECT INBOX * 146 EXISTS * OK [UIDVALIDITY 1047992537] * OK [UIDNEXT 2683] 2683 is the next UID * FLAGS (\Answered \Flagged \Deleted \Recent \Seen \Draft) * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft)] Limited 6 OK [READ-WRITE] Fetch the flags of all your messages with this command. Note that the "..." is for editorial clarity, many lines of output have been omitted in this example: 7 FETCH 1:* FLAGS * 1 FETCH (FLAGS (\Seen \Answered)) * 2 FETCH (FLAGS (\Seen \Answered)) ... * 146 FETCH (FLAGS (\Seen \Answered)) 7 OK FETCH completed Set a flag with this command: 8 STORE 1 +FLAGS \Flagged * FETCH (FLAGS (\Seen \Flagged)) 8 OK STORE completed 5) Logging out 9 LOGOUT * BYE Server logging out 9 OK LOGOUT finished. ././@LongLink0000644000000000000000000000016012262515411011636 Lustar rootrootnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_receive.htmlnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_r0000644000000000000000000006712612262515026027760 0ustar check_imap_receive - connects to and searches an IMAP account for messages


NAME

check_imap_receive - connects to and searches an IMAP account for messages


SYNOPSIS

 check_imap_receive -vV
 check_imap_receive -?
 check_imap_receive --help


OPTIONS

--warning <seconds>

Warn if it takes longer than <seconds> to connect to the IMAP server. Default is 15 seconds. Also known as: -w <seconds>

--critical <seconds>

Return a critical status if it takes longer than <seconds> to connect to the IMAP server. Default is 30 seconds. See also: --capture-critical <messages> Also known as: -c <seconds>

--timeout <seconds>

Abort with critical status if it takes longer than <seconds> to connect to the IMAP server. Default is 60 seconds. The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer than 30 seconds. Also known as: -t <seconds>

--imap-check-interval <seconds>

How long to wait after searching for a matching message before searching again. Only takes effect if no messages were found. Default is 5 seconds.

--imap-retries <number>

How many times to try searching for a matching message before giving up. If you set this to 0 then messages will not be searched at all. Setting this to 1 means the plugin only tries once. Etc. Default is 10 times.

--hostname <server>

Address or name of the IMAP server. Examples: mail.server.com, localhost, 192.168.1.100 Also known as: -H <server>

--port <number>

Service port on the IMAP server. Default is 143. If you use SSL, default is 993. Also known as: -p <number>

--username <username>
--password <password>

Username and password to use when connecting to IMAP server. Also known as: -U <username> -P <password>

--mailbox <mailbox>

Use this option to specify the mailbox to search for messages. Default is INBOX. Also known as: -m <mailbox>

--search <string>

Use this option to filter the messages. Default is not to filter. You may (must) use this option multiple times in order to create any valid IMAP search criteria. See the examples and see also http://www.ietf.org/rfc/rfc2060.txt (look for section 6.4.4, the SEARCH command)

This is the way to find messages matching a given subject: -s SUBJECT -s "a given subject"

You can use the following technique for any header, including Subject. To find "Header-Name: some value": -s HEADER -s Header-Name -s "some value"

Modern IMAP servers that support rfc5032 extensions allow you to search for messages older or younger than a number of seconds. So to find messages received in the past hour, you can do:

 -s YOUNGER -s 3600

Or to find messages received more than 5 minutes ago, you can do:

 -s OLDER -s 300

Also known as: -s <string>

--download
--nodownload

This option causes all messages in the specified mailbox to be downloaded from the server and searched locally. See --download-max if you only want to download a few messages. Currently only the following RFC 2060 search criteria are supported: TEXT, BODY, SUBJECT, HEADER, NOT, OR, SENTBEFORE, SENTON, SENTSINCE.

Requires Email::Simple to be installed. It is available on CPAN.

This option may be particularly useful to you if your mail server is slow to index messages (like Exchange 2003), causing the plugin not to find them with IMAP SEARCH even though they are in the inbox.

It's also useful if you're searching for messages that have been on the server for a specified amount of time, like some minutes or hours, because the standard IMAP search function only allows whole dates. For this, use the standard search keywords but you can specify either just a date like in RFC 2060 or a date and a time.

If you use SENTBEFORE, SENTON, or SENTSINCE, you must have Date::Manip installed on your system.

--download-max

Limits the number of messages downloaded from the server when the --download option is used. Default is to download and search all messages.

--search-critical-min <messages>

This option will trigger a CRITICAL status if the number of messages found by the search criteria is below the given number. Use in conjunction with --search.

This parameter defaults to 1 so that if no messages are found, the plugin will exit with a CRITICAL status.

If you want the original behavior where the plugin exits with a WARNING status when no messages are found, set this parameter to 0.

--search-critical-max <messages>

This option will trigger a CRITICAL status if the number of messages found by the search criteria is above the given number. Use in conjunction with --search.

This parameter defaults to -1 meaning it's disabled. If you set it to 10, the plugin will exit with CRITICAL if it finds 11 messages. If you set it to 1, the plugin will exit with CRITICAL if it finds any more than 1 message. If you set it to 0, the plugin will exit with CRITICAL if it finds any messages at all. If you set it to -1 it will be disabled.

--search-warning-min <messages>

This option will trigger a WARNING status if the number of messages found by the search criteria is below the given number. Use in conjunction with --search.

This parameter defaults to 1 so that if no messages are found, the plugin will exit with a WARNING status.

If you want to suppress the original behavior where the plugin exits with a WARNING status when no messages are found, set this parameter to 0. When this parameter is 0, it means that you expect the mailbox not to have any messages.

--search-warning-max <messages>

This option will trigger a WARNING status if the number of messages found by the search criteria is above the given number. Use in conjunction with --search.

This parameter defaults to -1 meaning it's disabled. If you set it to 10, the plugin will exit with WARNING if it finds 11 messages. If you set it to 1, the plugin will exit with WARNING if it finds any more than 1 message. If you set it to 0, the plugin will exit with WARNING if it finds any messages at all. If you set it to -1 it will be disabled.

--capture-max <regexp>

In addition to specifying search arguments to filter the emails in the IMAP account, you can specify a "capture-max" regexp argument and the eligible emails (found with search arguments) will be compared to each other and the OK line will have the highest captured value.

The regexp is expected to capture a numeric value.

--capture-min <regexp>

In addition to specifying search arguments to filter the emails in the IMAP account, you can specify a "capture-min" regexp argument and the eligible emails (found with search arguments) will be compared to each other and the OK line will have the lowest captured value.

The regexp is expected to capture a numeric value.

--delete
--nodelete

Use the delete option to delete messages that matched the search criteria. This is useful for preventing the mailbox from filling up with automated messages (from the check_smtp_send plugin, for example). THE DELETE OPTION IS TURNED *ON* BY DEFAULT, in order to preserve compatibility with an earlier version.

Use the nodelete option to turn off the delete option.

--nodelete-captured

If you use both the capture-max and delete arguments, you can also use the nodelete-captured argument to specify that the email with the highest captured value should not be deleted. This leaves it available for comparison the next time this plugin runs.

If you do not use the delete option, this option has no effect.

--ssl
--nossl

Enable SSL protocol. Requires IO::Socket::SSL.

Using this option automatically changes the default port from 143 to 993. You can still override this from the command line using the --port option.

Use the nossl option to turn off the ssl option.

--ssl-ca-file

Use this to verify the server SSL certificate against a local .pem file. You'll need to specify the path to the .pem file as the parameter.

You can use the imap_ssl_cert utility included in this distribution to connect to your IMAP server and save its SSL certificates into your .pem file. Usage is like this:

 imap_ssl_cert -H imap.server.com > ca_file.pem

Only applicable when --ssl option is enabled.

--template
--notemplate

Enable (or disable) processing of IMAP search parameters. Requires Text::Template and Date::Manip.

Use this option to apply special processing to IMAP search parameters that allows you to use the results of arbitrary computations as the parameter values. For example, you can use this feature to search for message received up to 4 hours ago.

Modern IMAP servers that support rfc5032 extensions allow searching with the YOUNGER and OLDER criteria so a message received up to 4 hours ago is -s YOUNGER -s 14400. But if your mail server doesn't support that, you could use the --template option to get similar functionality.

When you enable the --template option, each parameter you pass to the -s option is parsed by Text::Template. See the Text::Template manual for more information, but in general any expression written in Perl will work.

A convenience function called rfc2822dateHeader is provided to you so you can easily compute properly formatted dates for use as search parameters. The rfc2822date function can take one or two parameters itself: the date to format and an optional offset. To use the current time as a search parameter, you can write this:

 $ check_imap_receive ... --template -s HEADER -s Delivery-Date -s '{rfc2822dateHeader("now")}'

The output of {rfc2822dateHeader("now")} looks like this: Wed, 30 Sep 2009 22:44:03 -0700 and is suitable for use with a date header, like HEADER Delivery-Date.

To use a time in the past relative to the current time or day, you can use a second convenience function called rfc2822date and write this:

 $ check_imap_receive ... --template -s SENTSINCE -s '{rfc2822date("now","-1 day")}'

The output of {rfc2822date("now","-1 day")} looks like this: 29-Sep-2009 and is suitable for use with BEFORE, ON, SENTBEFORE, SENTON, SENTSINCE, and SINCE.

I have seen some email clients use a different format in the Date field, like September 17, 2009 9:46:51 AM PDT. To specify an arbitrary format like this one, write this:

 $ check_imap_receive ... --template -s HEADER -s Delivery-Date -s '{date("%B %e, %Y %i:%M:%S %p %Z","now","-4 hours")}'

You can use BEFORE, ON, SENTBEFORE, SENTON, SENTSINCE, or SINCE to search for messages that arrived on, before, or after a given day but not on, before, or after a specific time on that day.

To search for messages that arrived on, before, or after a specific time you have to use the Delivery-Date or another date field, like with -s HEADER -s Delivery-Date in the example above.

See the Date::Manip manual for more information on the allowed expressions for date and delta strings.

--hires

Use the Time::HiRes module to measure time, if available.

--verbose

Display additional information. Useful for troubleshooting. Use together with --version to see the default warning and critical timeout values.

If the selected mailbox was not found, you can use verbosity level 3 (-vvv) to display a list of all available mailboxes on the server.

Also known as: -v

--version

Display plugin version and exit. Also known as: -V

--help

Display this documentation and exit. Does not work in the ePN version. Also known as: -h

--usage

Display a short usage instruction and exit.


EXAMPLES

Report how many emails are in the mailbox

 $ check_imap_receive -H mail.server.net --username mailuser --password mailpass
 -s ALL --nodelete
 IMAP RECEIVE OK - 1 seconds, 7 found

Report the email with the highest value

Suppose your mailbox has some emails from an automated script and that a message from this script typically looks like this (abbreviated):

 To: mailuser@server.net
 From: autoscript@server.net
 Subject: Results of Autoscript
 Date: Wed, 09 Nov 2005 08:30:40 -0800
 Message-ID: <auto-000000992528@server.net>
 Homeruns 5

And further suppose that you are interested in reporting the message that has the highest number of home runs, and also to leave this message in the mailbox for future checks, but remove the other matching messages with lesser values:

 $ check_imap_receive -H mail.server.net --username mailuser --password mailpass
 -s SUBJECT -s "Results of Autoscript" --capture-max "Homeruns (\d+)"  --nodelete-captured
 IMAP RECEIVE OK - 1 seconds, 3 found, 1 captured, 5 max, 2 deleted

Troubleshoot your search parameters

Add the --nodelete and --imap-retries=1 parameters to your command line.


EXIT CODES

Complies with the Nagios plug-in specification:
0OKThe plugin was able to check the service and it appeared to be functioning properly
1WarningThe plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly
2CriticalThe plugin detected that either the service was not running or it was above some "critical" threshold
3UnknownInvalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service


NAGIOS PLUGIN NOTES

Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html

This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because the path to utils.pm must be specified completely in this program and forces users to edit the source code if their install location is different (if they realize this is the problem). You can view the default timeout for this module by using the --verbose and --version options together. The short form is -vV.

Other than that, it attempts to follow published guidelines for Nagios plugins.


SEE ALSO

http://nagios.org/ http://search.cpan.org/~djkernen/Mail-IMAPClient-2.2.9/IMAPClient.pod http://search.cpan.org/~markov/Mail-IMAPClient-3.00/lib/Mail/IMAPClient.pod


CHANGES

 Wed Oct 29 11:00:00 PST 2005
 + version 0.1
 Wed Nov  9 09:53:32 PST 2005
 + added delete/nodelete option.  deleting found messages is still default behavior.
 + added capture-max option
 + added nodelete-captured option
 + added mailbox option
 + added eval/alarm block to implement -c option
 + now using an inline PluginReport package to generate the report
 + copyright notice and GNU GPL
 + version 0.2
 Thu Apr 20 14:00:00 CET 2006 (by Johan Nilsson <johann (at) axis.com>)
 + version 0.2.1
 + added support for multiple polls of imap-server, with specified intervals
 Tue Apr 24 21:17:53 PDT 2007
 + now there is an alternate version (same but without embedded perl POD) that is compatible with the new new embedded-perl Nagios feature
 + added patch from Benjamin Ritcey <ben@ritcey.com> for SSL support on machines that have an SSL-enabled
 + version 0.2.3
 Fri Apr 27 18:56:50 PDT 2007 
 + fixed problem that "Invalid search parameters" was not printed because of missing newline to flush it
 + warnings and critical errors now try to append error messages received from the IMAP client
 + changed connection error to display timeout only if timeout was the error
 + documentation now mentions every command-line option accepted by the plugin, including abbreviations
 + added abbreviations U for username, P for password, m for mailbox
 + fixed bug that imap-check-interval applied even after the last try (imap-retries) when it was not necessary
 + the IMAP expunge command is not sent unless at least one message is deleted
 + fixed bug that the "no messages" warning was printed even if some messages were found
 + version 0.3
 Sun Oct 21 14:08:07 PDT 2007
 + added port info to the "could not connect" error message
 + fixed bug that occurred when using --ssl --port 143 which caused port to remain at the default 993 imap/ssl port
 + added clarity shortcuts --search-subject and --search-header
 + port is no longer a required option. defaults to 143 for regular IMAP and 993 for IMAP/SSL
 + version 0.3.1
 Sun Oct 21 20:41:56 PDT 2007
 + reworked ssl support to use IO::Socket::SSL instead of the convenience method Mail::IMAPClient->Ssl (which is not included in the standard Mail::IMAPClient package)
 + removed clarity shortcuts (bad idea, code bloat) 
 + version 0.4
 Tue Dec  4 07:05:27 PST 2007
 + added version check to _read_line workaround for SSL-related bug in Mail::IMAPClient version 2.2.9 ; newer versions fixed the bug 
 + added --usage option because the official nagios plugins have both --help and --usage
 + added --timeout option to match the official nagios plugins
 + fixed some minor pod formatting issues for perldoc
 + version 0.4.1
 Sat Dec 15 07:39:59 PST 2007
 + improved compatibility with Nagios embedded perl (ePN)
 + version 0.4.2
 Mon Jan  7 21:35:23 PST 2008
 + changed version check for Mail::IMAPClient version 2.2.9 to use string comparison le "2.2.9"
 + fixed bug where script was dying on socket->autoflush when socket does not exist because autoflush was being called before checking the socket object 
 + version 0.4.3
 Mon Feb 11 19:13:38 PST 2008
 + fixed a bug for embedded perl version, variable "%status" will not stay shared in load_modules
 + version 0.4.4
 Mon May 26 08:33:27 PDT 2008
 + fixed a bug for number captured, it now reflects number of messages captured instead of always returning "1"
 + added --capture-min option to complement --capture-max
 + added --search-critical-min to trigger a CRITICAL alert if number of messages found is less than argument, with default 1.
 + fixed warning and critical messages to use "more than" or "less than" instead of the angle brackets, to make them more web friendly
 + version 0.5
 Wed Jul  2 14:59:05 PDT 2008
 + fixed a bug for not finding a message after the first try, by reselecting the mailbox before each search
 + version 0.5.1
 Sat Dec 13 08:57:29 PST 2008
 + added --download option to allow local searching of messages (useful if your server has an index that handles searching but it takes a while before new emails show up and you want immediate results), supports only the TEXT, BODY, SUBJECT, and HEADER search keys 
 + added --download-max option to set a limit on number of messages downloaded with --download
 + version 0.6.0
 Wed Sep 30 23:25:33 PDT 2009
 + fixed --download-max option (was incorrectly looking for --download_max). currently both will work, in the future only --download-max will work
 + added --template option to allow arbitrary substitutions for search parameters, and provided three convenience functions for working with dates
 + added date search criteria to the --download option: SENTBEFORE, SENTON, and SENTSINCE which check the Date header and allow hours and minutes in addition to dates (whereas the IMAP standard only allows dates)
 + added --search-critical-max to trigger a CRITICAL alert if number of messages found is more than argument, disabled by default.
 + fixed a bug in --download --search where messages would match even though they failed the search criteria
 + changed behavior of --download-max to look at the most recent messages first (hopefully); the IMAP protocol doesn't guarantee the order that the messages are returned but I observed that many mail servers return them in chronological order; so now --download-max reverses the order to look at the newer messages first
 + added performance data for use with PNP4Nagios!
 + version 0.7.0
 Fri Oct  2 15:22:00 PDT 2009
 + added --search-warning-max and --search-warning-min to trigger a WARNING alert if number of messages is more than or less than the specified number. 
 + fixed --download option not to fail with CRITICAL if mailbox is empty; now this can be configured with --search-warning-min or --search-critical-min
 + version 0.7.1
 Sat Nov 21 18:27:17 PST 2009
 + fixed problem with using --download option on certain mail servers by turning on the IgnoreSizeErrors feature in IMAPClient
 + added --peek option to prevent marking messages as seen 
 + version 0.7.2
 Tue Jan  5 12:13:53 PST 2010
 + added error message and exit with unknown status when an unrecognized IMAP search criteria is encountered by the --download --search option
 Wed May  5 11:14:51 PDT 2010
 + added mailbox list when mailbox is not found and verbose level 3 is on (-vvv)
 + version 0.7.3
 Tue Mar  8 18:58:14 AST 2011
 + updated documentation for --search and --template to mention rfc5032 extensions (thanks to Stuart Henderson)
 Fri May  6 08:35:09 AST 2011
 + added --hires option to enable use of Time::Hires if available
 + version 0.7.4
 Fri Nov 11 01:51:40 AST 2011
 + added --ssl-ca-file option to allow verifying the server certificate against a local .pem file (thanks to Alexandre Bezroutchko)
 + added imap_ssl_cert.pl utility (not in this file) to conveniently save the server's SSL certificates into a local .pem file
 + version 0.7.5


AUTHOR

Jonathan Buhacoff <jonathan@buhacoff.net>


COPYRIGHT AND LICENSE

 Copyright (C) 2005-2011 Jonathan Buhacoff
 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 3 of the License, or
 (at your option) any later version.
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>;.
 http://www.gnu.org/licenses/gpl.txt
././@LongLink0000644000000000000000000000015712262515411011644 Lustar rootrootnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/How to test plugin.txtnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/How to test 0000644000000000000000000000033012262515026027474 0ustar HOW TO TEST THE PLUGIN Run the shell script tests which start the test server automatically: ./test/3_email_delivery.sh If you want to start up the test server yourself: sudo perl test/dummy_smtp_server.pl ././@LongLink0000644000000000000000000000016112262515411011637 Lustar rootrootnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/check_email_delivery.podnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/check_email_0000644000000000000000000004464212262515026027735 0ustar =pod =head1 NAME check_email_delivery - sends email and verifies delivery =head1 SYNOPSIS check_email_delivery -vV check_email_delivery --usage check_email_delivery --help =head1 OPTIONS =over =item --warning [,,] Exit with WARNING if the most recent email found is older than . The optional and parameters will be passed on to the included plugins that are used for those tasks. If they are not given then they will not be passed on and the default for that plugin will apply. Also known as: -w [,[,]] When using the --plugin option, only one parameter is supported (-w ) and it will apply to the entire process. You can specify a warning threshold specific to each plugin in the plugin command line. When using the --plugin option, no measuring of "most recent email" is done because we would not know how to read this information from receive plugins. This may be addressed in future versions. =item --critical [,,] Exit with CRITICAL if the most recent email found is older than . The optional and parameters will be passed on to the included plugins that are used for those tasks. If they are not given then they will not be passed on and the default for that plugin will apply. Also known as: -c [,[,]] When using the --plugin option, only one parameter is supported (-c ) and it will apply to the entire process. You can specify a critical threshold specific to each plugin in the plugin command line. When using the --plugin option, no measuring of "most recent email" is done because we would not know how to read this information from receive plugins. This may be addressed in future versions. =item --timeout =item --timeout , =item --timeout ,,... Exit with CRITICAL if the plugins do not return a status within the specified number of seconds. When only one parameter is used, it applies to each plugin. When multiple parameters are used (separated by commas) they apply to plugins in the same order the plugins were specified on the command line. When using --timeout but not the --plugin option, the first parameter is for check_smtp_send and the second is for check_imap_receive. =item --alert Exit with WARNING or CRITICAL only if a warning or error (--warning, --critical, or --timeout) occurs for specified plugins. If a warning or error occurs for non-specified plugins that run BEFORE the specified plugins, the exit status will be UNKNOWN. If a warning of error occurs for non-specified plugins that run AFTER the specified plugins, the exit status will not be affected. You would use this option if you are using check_email_delivery with the --plugin option and the plugins you configure each use different servers, for example different SMTP and IMAP servers. By default, if you do not use the --alert option, if anything goes wrong during the email delivery check, a WARNING or CRITICAL alert will be issued. This means that if you define check_email_delivery for the SMTP server only and the IMAP server fails, Nagios will alert you for the SMTP server which would be misleading. If you define it for both the SMTP server and IMAP server and just one of them fails, Nagios will alert you for both servers, which would still be misleading. If you have this situation, you may want to use the --alert option. You define the check_email_delivery check for both servers: for the SMTP server (first plugin) you use --alert 1, and for for the IMAP server (second plugin) you use --alert 2. When check_email_delivery runs with --alert 1 and the SMTP server fails, you will get the appropriate alert. If the IMAP server fails it will not affect the status. When check_email_delivery runs with --alert 2 and the SMTP server fails, you will get the UNKNOWN return code. If the IMAP server generates an alert you will get a WARNING or CRITICAL as appropriate. You can repeat this option to specify multiple plugins that should cause an alert. Do this if you have multiple plugins on the command line but some of them involve the same server. See also: --plugin. Also known as: -A =item --wait [,,...] How long to wait between sending the message and checking that it was received. View default with the -vV option. When using the --plugin option, you can specify as many wait-between times as you have plugins (minus the last plugin, because it makes no sense to wait after running the last one). For example, if you use the --plugin option twice to specify an SMTP plugin and an IMAP plugin, and you want to wait 5 seconds between sending and receiving, then you would specify --wait 5. A second example, if you are using the --plugin option three times, then specifying -w 5 will wait 5 seconds between the second and third plugins also. You can specify a different wait time of 10 seconds between the second and third plugins, like this: -w 5,10. =item --hostname Address or name of the SMTP and IMAP server. Examples: mail.server.com, localhost, 192.168.1.100. Also known as: -H =item --smtp-server Address or name of the SMTP server. Examples: smtp.server.com, localhost, 192.168.1.100. Using this option overrides the hostname option. =item --smtp-port Service port on the SMTP server. Default is 25. =item --smtp-username =item --smtp-password Username and password to use when connecting to the SMTP server with the TLS option. Use these options if the SMTP account has a different username/password than the IMAP account you are testing. These options take precendence over the --username and the --password options. These are shell-escaped; special characters are ok. =item --imap-server Address or name of the IMAP server. Examples: imap.server.com, localhost, 192.168.1.100. Using this option overrides the hostname option. =item --imap-port Service port on the IMAP server. Default is 143. If you use SSL the default is 993. =item --imap-username =item --imap-password Username and password to use when connecting to the IMAP server. Use these options if the IMAP account has a different username/password than the SMTP account you are testing. These options take precendence over the --username and the --password options. These are shell-escaped; special characters are ok. =item --username =item --password Username and password to use when connecting to IMAP server. Also known as: -U -P Also used as the username and password for SMTP when the TLS option is enabled. To specify a separate set of credentials for SMTP authentication, see the options --smtp-username and --smtp-password. =item --imap-check-interval How long to wait between polls of the imap-server for the specified mail. Default is 5 seconds. =item --imap-retries How many times to poll the imap-server for the mail, before we give up. Default is 10. =item --body Use this option to specify the body of the email message. =item --header
Use this option to set an arbitrary header in the message. You can use it multiple times. =item --mailto recipient@your.net You can send a message to multiple recipients by repeating this option or by separating the email addresses with commas (no whitespace allowed): $ check_email_delivery ... --mailto recipient@your.net,recipient2@your.net --mailfrom sender@your.net This argument is shell-escaped; special characters or angle brackets around the address are ok. =item --mailfrom sender@your.net Use this option to set the "from" address in the email. =item --imapssl =item --noimapssl Use this to enable or disable SSL for the IMAP plugin. This argument is shell-escaped; special characters or angle brackets around the address are ok. =item --smtptls =item --nosmtptls Use this to enable or disable TLS/AUTH for the SMTP plugin. =item --libexec Use this option to set the path of the Nagios libexec directory. The default is /usr/local/nagios/libexec. This is where this plugin looks for the SMTP and IMAP plugins that it depends on. =item --plugin This is a new option introduced in version 0.5 of the check_email_delivery plugin. It frees the plugin from depending on specific external plugins and generalizes the work done to determine that the email loop is operational. When using the --plugin option, the following options are ignored: libexec, imapssl, smtptls, hostname, username, password, smtp*, imap*, mailto, mailfrom, body, header, search. Use this option multiple times to specify the complete trip. Typically, you would use this twice to specify plugins for SMTP and IMAP, or SMTP and POP3. The output will be success if all the plugins return success. Each plugin should be a standard Nagios plugin. A random token will be automatically generated and passed to each plugin specified on the command line by substituting the string %TOKEN1%. Example usage: command_name check_email_delivery command_line check_email_delivery --plugin "$USER1$/check_smtp_send -H $ARG1$ --mailto recipient@your.net --mailfrom sender@your.net --header 'Subject: Nagios Test %TOKEN1%.'" --plugin "$USER1$/check_imap_receive -H $ARG1$ -U $ARG1$ -P $ARG2$ -s SUBJECT -s 'Nagios Test %TOKEN1%.'" This technique allows for a lot of flexibility in configuring the plugins that test each part of your email delivery loop. See also: --token. Also known as: -p =item --token This is a new option introduced in version 0.5 of the check_email_delivery plugin. It can be used in conjunction with --plugin to control the tokens that are generated and passed to the plugins, like %TOKEN1%. Use this option multiple times to specify formats for different tokens. For example, if you want %TOKEN1% to consist of only alphabetical characters but want %TOKEN2% to consist of only digits, then you might use these options: --token aaaaaa --token nnnnn Any tokens used in your plugin commands that have not been specified by --token will default to --token U-X-Y Token formats: a - alpha character (a-z) n - numeric character (0-9) c - alphanumeric character (a-z0-9) h - hexadecimal character (0-9a-f) U - unix time, seconds from epoch. eg 1193012441 X - a word from the pgp even list. eg aardvark Y - a word from the pgp odd list. eg adroitness Caution: It has been observed that some IMAP servers do not handle underscores well in the search criteria. For best results, avoid using underscores in your tokens. Use hyphens or commas instead. See also: --plugin. Also known as: -T The PGP word list was obtained from http://en.wikipedia.org/wiki/PGP_word_list =item --file Save (append) status information into the given tab-delimited file. Format used: token start-time end-time status plugin-num output Note: format may change in future versions and may become configurable. This option available as of version 0.6.2. Also known as: -F =item --hires Use the Time::HiRes module to measure time, if available. =item --verbose Display additional information. Useful for troubleshooting. Use together with --version to see the default warning and critical timeout values. Also known as: -v =item --version Display plugin version and exit. Also known as: -V =item --help Display this documentation and exit. Does not work in the ePN version. Also known as: -h =item --usage Display a short usage instruction and exit. =back =head1 EXAMPLES =head2 Send a message with custom headers $ check_email_delivery -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net --username recipient --password secret EMAIL DELIVERY OK - 1 seconds =head2 Set warning and critical timeouts for receive plugin only: $ check_email_delivery -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net --username recipient --password secret -w ,,5 -c ,,15 EMAIL DELIVERY OK - 1 seconds =head1 EXIT CODES Complies with the Nagios plug-in specification: 0 OK The plugin was able to check the service and it appeared to be functioning properly 1 Warning The plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly 2 Critical The plugin detected that either the service was not running or it was above some "critical" threshold 3 Unknown Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service =head1 NAGIOS PLUGIN NOTES Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because the path to utils.pm must be specified completely in this program and forces users to edit the source code if their install location is different (if they realize this is the problem). You can view the default timeout for this module by using the --verbose and --version options together. The short form is -vV. Other than that, it attempts to follow published guidelines for Nagios plugins. =head1 CHANGES Wed Oct 29 13:08:00 PST 2005 + version 0.1 Wed Nov 9 17:16:09 PST 2005 + updated arguments to check_smtp_send and check_imap_receive + added eval/alarm block to implement -c option + added wait option to adjust sleep time between smtp and imap calls + added delay-warn and delay-crit options to adjust email delivery warning thresholds + now using an inline PluginReport package to generate the report + copyright notice and GNU GPL + version 0.2 Thu Apr 20 14:00:00 CET 2006 (by Johan Nilsson ) + version 0.2.1 + corrected bug in getoptions ($imap_server would never ever be set from command-line...) + will not make $smtp_server and $imap_server == $host if they're defined on commandline + added support for multiple polls of imap-server, with specified intervals + changed default behaviour in check_imap_server (searches for the specific id in subject and deletes mails found) + increased default delay_warn from 65 seconds to 95 seconds Thu Apr 20 16:00:00 PST 2006 (by Geoff Crompton ) + fixed a bug in getoptions + version 0.2.2 Tue Apr 24 21:17:53 PDT 2007 + now there is an alternate version (same but without embedded perl POD) that is compatible with the new new embedded-perl Nagios feature + version 0.2.3 Fri Apr 27 20:32:53 PDT 2007 + documentation now mentions every command-line option accepted by the plugin, including abbreviations + changed connection error to display timeout only if timeout was the error + default IMAP plugin is libexec/check_imap_receive (also checking for same but with .pl extension) + default SMTP plugin is libexec/check_smtp_send (also checking for same but with .pl extension) + removed default values for SMTP port and IMAP port to allow those plugins to set the defaults; so current behavior stays the same and will continue to make sense with SSL + version 0.3 Thu Oct 11 10:00:00 EET 2007 (by Timo Virtaneva + Changed the header and the search criteria so that the same email-box can be used for all smtp-servers + version 0.3.1 Sun Oct 21 11:01:03 PDT 2007 + added support for TLS options to the SMTP plugin + version 0.4 Sun Oct 21 16:17:14 PDT 2007 + added support for arbitrary plugins to send and receive mail (or anthing else!). see the --plugin option. + version 0.5 Tue Dec 4 07:36:20 PST 2007 + added --usage option because the official nagios plugins have both --help and --usage + added --timeout option to match the official nagios plugins + shortcut option for --token is now -T to avoid clash with standard shortcut -t for --timeout + fixed some minor pod formatting issues for perldoc + version 0.5.1 Sat Dec 15 07:39:59 PST 2007 + improved compatibility with Nagios embedded perl (ePN) + version 0.5.2 Thu Jan 17 20:27:36 PST 2008 (by Timo Virtaneva on Thu Oct 11 10:00:00 EET 2007) + Changed the header and the search criteria so that the same email-box can be used for all smtp-servers + version 0.5.3 Mon Jan 28 22:11:02 PST 2008 + fixed a bug, smtp-password and imap-password are now string parameters + added --alert option to allow selection of which plugin(s) should cause a WARNING or CRITICAL alert + version 0.6 Mon Feb 11 19:09:37 PST 2008 + fixed a bug for embedded perl version, variable "%status" will not stay shared in load_modules + version 0.6.1 Mon May 26 10:39:19 PDT 2008 + added --file option to allow plugin to record status information into a tab-delimited file + changed default token from U_X_Y to U-X-Y + version 0.6.2 Wed Jan 14 08:29:35 PST 2009 + fixed a bug that the --header parameter was not being passed to the smtp plugin. + version 0.6.3 Mon Jun 8 15:43:48 PDT 2009 + added performance data for use with PNP4Nagios! (thanks to Ben Ritcey for the patch) + version 0.6.4 Wed Sep 16 07:10:10 PDT 2009 + added elapsed time in seconds to performance data + version 0.6.5 Fri Oct 8 19:48:44 PDT 2010 + fixed uniform IMAP and SMTP username and password bug (thanks to Micle Moerenhout for pointing it out) + version 0.6.6 Mon Jan 3 08:24:23 PST 2011 + added shell escaping for smtp-username, smtp-password, mailto, mailfrom, imap-username, and imap-password arguments + version 0.7.0 Fri May 6 08:35:09 AST 2011 + added --hires option to enable use of Time::Hires if available + version 0.7.1 Sun Jun 12 17:17:06 AST 2011 + added --imap-mailbox option to pass through to check_imap_receive --mailbox option + added --ssl option to conveniently enable both --smtp-tls and --imap-ssl + version 0.7.2 =head1 AUTHOR Jonathan Buhacoff =head1 COPYRIGHT AND LICENSE Copyright (C) 2005-2011 Jonathan Buhacoff 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . http://www.gnu.org/licenses/gpl.txt =cut ././@LongLink0000644000000000000000000000015412262515411011641 Lustar rootrootnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/check_smtp_send.podnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/check_smtp_s0000644000000000000000000002560412262515026030011 0ustar =pod =head1 NAME check_smtp_send - connects to an SMTP server and sends a message =head1 SYNOPSIS check_smtp_send -vV check_smtp_send -? check_smtp_send --help =head1 OPTIONS =over =item --warning Warn if it takes longer than to connect to the SMTP server. Default is 15 seconds. Also known as: -w =item --critical Return a critical status if it takes longer than to connect to the SMTP server. Default is 30 seconds. Also known as: -c =item --timeout Abort with critical status if it takes longer than to connect to the SMTP server. Default is 60 seconds. The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer than 30 seconds. Also known as: -t =item --hostname Address or name of the SMTP server. Examples: mail.server.com, localhost, 192.168.1.100 If not provided, and if there is only one --mailto address, the script will automatically look up the MX record for the --mailto address and use that as the hostname. You can use this to check that your MX records are correct. When omitting the --hostname option, it doesn't really make sense to specify --port, --username, or --password but you can still do so and they will have their normal effect. To look up the MX records you need to have the module Net::DNS and Email::Address installed. Also known as: -H =item --port Service port on the SMTP server. Default is 25 for regular SMTP, 465 for SSL, and 587 for TLS. Also known as: -p =item --tls =item --notls Enable TLS/AUTH protocol. Requires Net::SMTP::TLS, availble on CPAN. When using this option, the default port is 587. You can specify a port from the command line using the --port option. Use the notls option to turn off the tls option. Also, you may need to fix your copy of Net::SMTP::TLS. Here is the diff against version 0.12: 254c254 < $me->_command(sprintf("AUTH PLAIN %S", --- > $me->_command(sprintf("AUTH PLAIN %s", =item --ssl =item --nossl Enable SSL protocol. Requires Net::SMTP::SSL and Authen::SASL, availble on CPAN. When using this option, the default port is 465. You can override with the --port option. Use the nossl option to turn off the ssl option. =item --auth Enable authentication with Net::SMTP_auth (sold separately). For example, try using --auth PLAIN or --auth CRAM-MD5. =item --username =item --password Username and password to use when connecting to SMTP server. Also known as: -U -P =item --body Use this option to specify the body of the email message. If you need newlines in your message, you might need to use the --stdin option instead. =item --header
Use this option to set an arbitrary header in the message. You can use it multiple times. =item --stdin Grab the body of the email message from stdin. =item --mailto recipient@your.net You can send a message to multiple recipients by repeating this option or by separating the email addresses with commas (no whitespace allowed): $ check_smtp_send -H mail.server.net --mailto recipient@your.net,recipient2@your.net --mailfrom sender@your.net SMTP SEND OK - 1 seconds =item --mailfrom sender@your.net Use this option to set the "from" address in the email. =item --template =item --notemplate Enable (or disable) processing of message body and headers. Requires Text::Template. Use this option to apply special processing to your message body and headers that allows you to use the results of arbitrary computations in the text. For example, you can use this feature to send a message containing the hostname of the machine that sent the message without customizing the plugin configuration on each machine. When you enable the --template option, the message body and headers are parsed by Text::Template. Even a message body provided using the --stdin option will be parsed. See the Text::Template manual for more information, but in general any expression written in Perl will work. There is one convenience function provided to you, trim, which will remove leading and trailing whitespace from its parameter. Here's an example: check_smtp_send -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net --template --body 'hello, this message is from {use Sys::Hostname; hostname}' --header 'Subject: test message from {trim(`whoami`)}' =item --expect-response Use this option to specify which SMTP response code should be expected from the server after the SMTP dialog is complete. The default is 250 (message accepted). Also known as: -E =item --hires Use the Time::HiRes module to measure time, if available. =item --verbose Display additional information. Useful for troubleshooting. One --verbose will show extra information for OK, WARNING, and CRITICAL status. Use one --verbose together with --version to see the default warning and critical timeout values. Three --verbose (or -vvv) will show debug information, unless you're using --tls because Net::SMTP::TLS does not have a Debug feature. Also known as: -v =item --version Display plugin version and exit. Also known as: -V =item --help Display this documentation and exit. Does not work in the ePN version. Also known as: -h =item --usage Display a short usage instruction and exit. =back =head1 EXAMPLES =head2 Send a message with custom headers $ check_smtp_send -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net --body 'Homeruns 5' --header 'Subject: Hello, world!' --header 'X-Your-Header: Yes' SMTP SEND OK - 1 seconds =head1 EXIT CODES Complies with the Nagios plug-in specification: 0 OK The plugin was able to check the service and it appeared to be functioning properly 1 Warning The plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly 2 Critical The plugin detected that either the service was not running or it was above some "critical" threshold 3 Unknown Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service =head1 NAGIOS PLUGIN NOTES Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because the path to utils.pm must be specified completely in this program and forces users to edit the source code if their install location is different (if they realize this is the problem). You can view the default timeout for this module by using the --verbose and --version options together. The short form is -vV. Other than that, it attempts to follow published guidelines for Nagios plugins. =head1 CHANGES Wed Oct 29 14:05:00 PST 2005 + version 0.1 Wed Nov 9 15:01:48 PST 2005 + now using an inline PluginReport package to generate the report + added stdin option + copyright notice and GNU GPL + version 0.2 Thu Apr 20 16:00:00 PST 2006 (by Geoff Crompton ) + added bailing if the $smtp->to() call fails + added support for mailto recipients separated by commas + version 0.2.1 Tue Apr 24 21:17:53 PDT 2007 + moved POD text to separate file in order to accomodate the new embedded-perl Nagios feature + version 0.2.3 Fri Apr 27 20:26:42 PDT 2007 + documentation now mentions every command-line option accepted by the plugin, including abbreviations + version 0.3 Sun Oct 21 10:34:14 PDT 2007 + added support for TLS and authentication via the Net::SMTP::TLS module. see --tls option. + version 0.4 Sun Oct 21 13:54:26 PDT 2007 + added support for SSL via the Net::SMTP::SSL module. see --ssl option. + port is no longer a required option. defaults to 25 for regular smtp, 465 for ssl, and 587 for tls. + added port info to the "could not connect" error message + version 0.4.1 Tue Dec 4 07:42:32 PST 2007 + added --usage option because the official nagios plugins have both --help and --usage + added --timeout option to match the official nagios plugins + fixed some minor pod formatting issues for perldoc + version 0.4.2 Mon Feb 11 19:09:37 PST 2008 + fixed a bug for embedded perl version, variable "%status" will not stay shared in load_modules + version 0.4.3 Mon May 26 09:12:14 PDT 2008 + fixed warning and critical messages to use "more than" or "less than" instead of the angle brackets, to make them more web friendly + version 0.4.4 Wed Jul 2 07:12:35 PDT 2008 + added --expect-response option submitted by Christian Kauhaus + added support for authentication via Net::SMTP_auth. see --auth option. + version 0.4.5 Sun Oct 5 15:18:23 PDT 2008 + added error handling for smtp server disconnects ungracefully during QUIT (gmail.com does) + version 0.4.6 Thu Oct 1 12:09:35 PDT 2009 + added --template option to allow arbitrary substitutions for body and headers, and provided one convenience function for trimming strings + added performance data for use with PNP4Nagios! + version 0.5.0 Thu Oct 8 11:17:04 PDT 2009 + added more detailed error messages when using --verbose + version 0.5.1 Tue Feb 9 12:14:49 PST 2010 + added support for combining --auth with --tls using a subclass of Net::SMTP::TLS submitted by Brad Guillory; please note that to use the "PLAIN" authentication type you need to patch your Net::SMTP:TLS because it has a bug in sub auth_PLAIN (sprintf %S instead of %s) + version 0.5.2 Mon Jan 3 10:39:42 PST 2011 + added default Date and Message-ID headers; Date header uses POSIX strftime and Message-ID header uses hostname command to get localhost name + version 0.7.0 Fri May 6 08:35:09 AST 2011 + added --hires option to enable use of Time::Hires if available + version 0.7.1 Wed Jul 6 19:18:26 AST 2011 + the --hostname is now optional; if not provided the plugin will lookup the MX record for the --mailto address (requires Net::DNS) + version 0.7.2 Tue Dec 13 09:24:04 PST 2011 + separated authentication errors from connection errors + version 0.7.3 =head1 AUTHOR Jonathan Buhacoff =head1 COPYRIGHT AND LICENSE Copyright (C) 2005-2011 Jonathan Buhacoff 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . http://www.gnu.org/licenses/gpl.txt =cut ././@LongLink0000644000000000000000000000015512262515411011642 Lustar rootrootnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/check_smtp_send.htmlnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/check_smtp_s0000644000000000000000000003667412262515026030022 0ustar check_smtp_send - connects to an SMTP server and sends a message


NAME

check_smtp_send - connects to an SMTP server and sends a message


SYNOPSIS

 check_smtp_send -vV
 check_smtp_send -?
 check_smtp_send --help


OPTIONS

--warning <seconds>

Warn if it takes longer than <seconds> to connect to the SMTP server. Default is 15 seconds. Also known as: -w <seconds>

--critical <seconds>

Return a critical status if it takes longer than <seconds> to connect to the SMTP server. Default is 30 seconds. Also known as: -c <seconds>

--timeout <seconds>

Abort with critical status if it takes longer than <seconds> to connect to the SMTP server. Default is 60 seconds. The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer than 30 seconds. Also known as: -t <seconds>

--hostname <server>

Address or name of the SMTP server. Examples: mail.server.com, localhost, 192.168.1.100

If not provided, and if there is only one --mailto address, the script will automatically look up the MX record for the --mailto address and use that as the hostname. You can use this to check that your MX records are correct. When omitting the --hostname option, it doesn't really make sense to specify --port, --username, or --password but you can still do so and they will have their normal effect. To look up the MX records you need to have the module Net::DNS and Email::Address installed.

Also known as: -H <server>

--port <number>

Service port on the SMTP server. Default is 25 for regular SMTP, 465 for SSL, and 587 for TLS. Also known as: -p <number>

--tls
--notls

Enable TLS/AUTH protocol. Requires Net::SMTP::TLS, availble on CPAN.

When using this option, the default port is 587. You can specify a port from the command line using the --port option.

Use the notls option to turn off the tls option.

Also, you may need to fix your copy of Net::SMTP::TLS. Here is the diff against version 0.12:

 254c254
 <      $me->_command(sprintf("AUTH PLAIN %S",
 ---
 >      $me->_command(sprintf("AUTH PLAIN %s",
--ssl
--nossl

Enable SSL protocol. Requires Net::SMTP::SSL and Authen::SASL, availble on CPAN.

When using this option, the default port is 465. You can override with the --port option.

Use the nossl option to turn off the ssl option.

--auth <method>

Enable authentication with Net::SMTP_auth (sold separately). For example, try using --auth PLAIN or --auth CRAM-MD5.

--username <username>
--password <password>

Username and password to use when connecting to SMTP server. Also known as: -U <username> -P <password>

--body <message>

Use this option to specify the body of the email message. If you need newlines in your message, you might need to use the --stdin option instead.

--header <header>

Use this option to set an arbitrary header in the message. You can use it multiple times.

--stdin

Grab the body of the email message from stdin.

--mailto recipient@your.net

You can send a message to multiple recipients by repeating this option or by separating the email addresses with commas (no whitespace allowed):

$ check_smtp_send -H mail.server.net --mailto recipient@your.net,recipient2@your.net --mailfrom sender@your.net

SMTP SEND OK - 1 seconds

--mailfrom sender@your.net

Use this option to set the "from" address in the email.

--template
--notemplate

Enable (or disable) processing of message body and headers. Requires Text::Template.

Use this option to apply special processing to your message body and headers that allows you to use the results of arbitrary computations in the text. For example, you can use this feature to send a message containing the hostname of the machine that sent the message without customizing the plugin configuration on each machine.

When you enable the --template option, the message body and headers are parsed by Text::Template. Even a message body provided using the --stdin option will be parsed. See the Text::Template manual for more information, but in general any expression written in Perl will work.

There is one convenience function provided to you, trim, which will remove leading and trailing whitespace from its parameter. Here's an example:

 check_smtp_send -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net 
 --template --body 'hello, this message is from {use Sys::Hostname; hostname}' 
 --header 'Subject: test message from {trim(`whoami`)}'
--expect-response <code>

Use this option to specify which SMTP response code should be expected from the server after the SMTP dialog is complete. The default is 250 (message accepted).

Also known as: -E <code>

--hires

Use the Time::HiRes module to measure time, if available.

--verbose

Display additional information. Useful for troubleshooting.

One --verbose will show extra information for OK, WARNING, and CRITICAL status.

Use one --verbose together with --version to see the default warning and critical timeout values.

Three --verbose (or -vvv) will show debug information, unless you're using --tls because Net::SMTP::TLS does not have a Debug feature.

Also known as: -v

--version

Display plugin version and exit. Also known as: -V

--help

Display this documentation and exit. Does not work in the ePN version. Also known as: -h

--usage

Display a short usage instruction and exit.


EXAMPLES

Send a message with custom headers

$ check_smtp_send -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net --body 'Homeruns 5' --header 'Subject: Hello, world!' --header 'X-Your-Header: Yes'

SMTP SEND OK - 1 seconds


EXIT CODES

Complies with the Nagios plug-in specification:
0OKThe plugin was able to check the service and it appeared to be functioning properly
1WarningThe plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly
2CriticalThe plugin detected that either the service was not running or it was above some "critical" threshold
3UnknownInvalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service


NAGIOS PLUGIN NOTES

Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html

This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because the path to utils.pm must be specified completely in this program and forces users to edit the source code if their install location is different (if they realize this is the problem). You can view the default timeout for this module by using the --verbose and --version options together. The short form is -vV.

Other than that, it attempts to follow published guidelines for Nagios plugins.


CHANGES

 Wed Oct 29 14:05:00 PST 2005
 + version 0.1
 Wed Nov  9 15:01:48 PST 2005
 + now using an inline PluginReport package to generate the report
 + added stdin option
 + copyright notice and GNU GPL
 + version 0.2
 Thu Apr 20 16:00:00 PST 2006 (by Geoff Crompton <geoff.crompton@strategicdata.com.au>)
 + added bailing if the $smtp->to() call fails
 + added support for mailto recipients separated by commas
 + version 0.2.1
 Tue Apr 24 21:17:53 PDT 2007
 + moved POD text to separate file in order to accomodate the new embedded-perl Nagios feature
 + version 0.2.3
 Fri Apr 27 20:26:42 PDT 2007
 + documentation now mentions every command-line option accepted by the plugin, including abbreviations
 + version 0.3
 
 Sun Oct 21 10:34:14 PDT 2007
 + added support for TLS and authentication via the Net::SMTP::TLS module. see --tls option.
 + version 0.4
 Sun Oct 21 13:54:26 PDT 2007
 + added support for SSL via the Net::SMTP::SSL module. see --ssl option.
 + port is no longer a required option. defaults to 25 for regular smtp, 465 for ssl, and 587 for tls.
 + added port info to the "could not connect" error message
 + version 0.4.1
 Tue Dec  4 07:42:32 PST 2007
 + added --usage option because the official nagios plugins have both --help and --usage
 + added --timeout option to match the official nagios plugins
 + fixed some minor pod formatting issues for perldoc
 + version 0.4.2
 Mon Feb 11 19:09:37 PST 2008
 + fixed a bug for embedded perl version, variable "%status" will not stay shared in load_modules
 + version 0.4.3
 Mon May 26 09:12:14 PDT 2008
 + fixed warning and critical messages to use "more than" or "less than" instead of the angle brackets, to make them more web friendly
 + version 0.4.4
 
 Wed Jul  2 07:12:35 PDT 2008
 + added --expect-response option submitted by Christian Kauhaus <kc@gocept.com>
 + added support for authentication via Net::SMTP_auth. see --auth option.
 + version 0.4.5
 Sun Oct  5 15:18:23 PDT 2008
 + added error handling for smtp server disconnects ungracefully during QUIT (gmail.com does)
 + version 0.4.6
 Thu Oct  1 12:09:35 PDT 2009
 + added --template option to allow arbitrary substitutions for body and headers, and provided one convenience function for trimming strings
 + added performance data for use with PNP4Nagios!
 + version 0.5.0
 Thu Oct  8 11:17:04 PDT 2009
 + added more detailed error messages when using --verbose
 + version 0.5.1
 Tue Feb  9 12:14:49 PST 2010
 + added support for combining --auth with --tls using a subclass of Net::SMTP::TLS submitted by Brad Guillory; please note that to use the "PLAIN" authentication type you need to patch your Net::SMTP:TLS because it has a bug in sub auth_PLAIN (sprintf %S instead of %s)
 + version 0.5.2
 Mon Jan  3 10:39:42 PST 2011
 + added default Date and Message-ID headers; Date header uses POSIX strftime and Message-ID header uses hostname command to get localhost name
 + version 0.7.0
 Fri May  6 08:35:09 AST 2011
 + added --hires option to enable use of Time::Hires if available
 + version 0.7.1
 Wed Jul  6 19:18:26 AST 2011
 + the --hostname is now optional; if not provided the plugin will lookup the MX record for the --mailto address (requires Net::DNS)
 + version 0.7.2
 Tue Dec 13 09:24:04 PST 2011
 + separated authentication errors from connection errors
 + version 0.7.3


AUTHOR

Jonathan Buhacoff <jonathan@buhacoff.net>


COPYRIGHT AND LICENSE

 Copyright (C) 2005-2011 Jonathan Buhacoff
 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 3 of the License, or
 (at your option) any later version.
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>;.
 http://www.gnu.org/licenses/gpl.txt
././@LongLink0000644000000000000000000000015512262515411011642 Lustar rootrootnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_quota.podnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_q0000644000000000000000000001364312262515026027752 0ustar =pod =head1 NAME check_imap_quota - connects to an IMAP account and checks the quota =head1 SYNOPSIS check_imap_quota -vV check_imap_quota -? check_imap_quota --help =head1 OPTIONS =over =item --warning Warn if it takes longer than to connect to the IMAP server. Default is 15 seconds. Also known as: -w =item --critical Return a critical status if it takes longer than to connect to the IMAP server. Default is 30 seconds. See also: --capture-critical Also known as: -c =item --timeout Abort with critical status if it takes longer than to connect to the IMAP server. Default is 60 seconds. The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer than 30 seconds. Also known as: -t =item --hostname Address or name of the IMAP server. Examples: mail.server.com, localhost, 192.168.1.100 Also known as: -H =item --port Service port on the IMAP server. Default is 143. If you use SSL, default is 993. Also known as: -p =item --username =item --password Username and password to use when connecting to IMAP server. Also known as: -U -P =item --mailbox Use this option to specify the mailbox to search for messages. Default is INBOX. Also known as: -m =item --ssl =item --nossl Enable SSL protocol. Requires IO::Socket::SSL. Using this option automatically changes the default port from 143 to 993. You can still override this from the command line using the --port option. Use the nossl option to turn off the ssl option. =item --hires Use the Time::HiRes module to measure time, if available. =item --verbose Display additional information. Useful for troubleshooting. Use together with --version to see the default warning and critical timeout values. If the selected mailbox was not found, you can use verbosity level 3 (-vvv) to display a list of all available mailboxes on the server. Also known as: -v =item --version Display plugin version and exit. Also known as: -V =item --help Display this documentation and exit. Does not work in the ePN version. Also known as: -h =item --usage Display a short usage instruction and exit. =back =head1 EXAMPLES =head2 Report how many emails are in the mailbox $ check_imap_receive -H mail.server.net --username mailuser --password mailpass -s ALL --nodelete IMAP RECEIVE OK - 1 seconds, 7 found =head2 Report the email with the highest value Suppose your mailbox has some emails from an automated script and that a message from this script typically looks like this (abbreviated): To: mailuser@server.net From: autoscript@server.net Subject: Results of Autoscript Date: Wed, 09 Nov 2005 08:30:40 -0800 Message-ID: Homeruns 5 And further suppose that you are interested in reporting the message that has the highest number of home runs, and also to leave this message in the mailbox for future checks, but remove the other matching messages with lesser values: $ check_imap_receive -H mail.server.net --username mailuser --password mailpass -s SUBJECT -s "Results of Autoscript" --capture-max "Homeruns (\d+)" --nodelete-captured IMAP RECEIVE OK - 1 seconds, 3 found, 1 captured, 5 max, 2 deleted =head2 Troubleshoot your search parameters Add the --nodelete and --imap-retries=1 parameters to your command line. =head1 EXIT CODES Complies with the Nagios plug-in specification: 0 OK The plugin was able to check the service and it appeared to be functioning properly 1 Warning The plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly 2 Critical The plugin detected that either the service was not running or it was above some "critical" threshold 3 Unknown Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service =head1 NAGIOS PLUGIN NOTES Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because the path to utils.pm must be specified completely in this program and forces users to edit the source code if their install location is different (if they realize this is the problem). You can view the default timeout for this module by using the --verbose and --version options together. The short form is -vV. Other than that, it attempts to follow published guidelines for Nagios plugins. =head1 SEE ALSO http://nagios.org/ http://search.cpan.org/~djkernen/Mail-IMAPClient-2.2.9/IMAPClient.pod http://search.cpan.org/~markov/Mail-IMAPClient-3.00/lib/Mail/IMAPClient.pod =head1 CHANGES Fri Nov 11 04:53:09 AST 2011 + version 0.1 created with quota code contributed by Johan Romme Tue Dec 20 17:38:04 PST 2011 + fixed bug where a quota of 0 was reported as an incorrect response from the server, thanks to Eike Arndt + version 0.2 =head1 AUTHOR Jonathan Buhacoff =head1 COPYRIGHT AND LICENSE Copyright (C) 2011 Jonathan Buhacoff 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . http://www.gnu.org/licenses/gpl.txt =cut ././@LongLink0000644000000000000000000000016212262515411011640 Lustar rootrootnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/check_email_delivery.htmlnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/check_email_0000644000000000000000000006112212262515026027725 0ustar check_email_delivery - sends email and verifies delivery


NAME

check_email_delivery - sends email and verifies delivery


SYNOPSIS

 check_email_delivery -vV
 check_email_delivery --usage
 check_email_delivery --help


OPTIONS

--warning <seconds>[,<smtp_seconds>,<imap_seconds>]

Exit with WARNING if the most recent email found is older than <seconds>. The optional <smtp_seconds> and <imap_seconds> parameters will be passed on to the included plugins that are used for those tasks. If they are not given then they will not be passed on and the default for that plugin will apply. Also known as: -w <seconds>[,<send>[,<recv>]]

When using the --plugin option, only one parameter is supported (-w <seconds>) and it will apply to the entire process. You can specify a warning threshold specific to each plugin in the plugin command line.

When using the --plugin option, no measuring of "most recent email" is done because we would not know how to read this information from receive plugins. This may be addressed in future versions.

--critical <seconds>[,<smtp_seconds>,<imap_seconds>]

Exit with CRITICAL if the most recent email found is older than <seconds>. The optional <smtp_seconds> and <imap_seconds> parameters will be passed on to the included plugins that are used for those tasks. If they are not given then they will not be passed on and the default for that plugin will apply. Also known as: -c <seconds>[,<send>[,<recv>]]

When using the --plugin option, only one parameter is supported (-c <seconds>) and it will apply to the entire process. You can specify a critical threshold specific to each plugin in the plugin command line.

When using the --plugin option, no measuring of "most recent email" is done because we would not know how to read this information from receive plugins. This may be addressed in future versions.

--timeout <seconds>
--timeout <smtp_seconds>,<imap_seconds>
--timeout <plugin1_seconds>,<plugin2_seconds>,...

Exit with CRITICAL if the plugins do not return a status within the specified number of seconds. When only one parameter is used, it applies to each plugin. When multiple parameters are used (separated by commas) they apply to plugins in the same order the plugins were specified on the command line. When using --timeout but not the --plugin option, the first parameter is for check_smtp_send and the second is for check_imap_receive.

--alert <pluginN>

Exit with WARNING or CRITICAL only if a warning or error (--warning, --critical, or --timeout) occurs for specified plugins. If a warning or error occurs for non-specified plugins that run BEFORE the specified plugins, the exit status will be UNKNOWN. If a warning of error occurs for non-specified plugins that run AFTER the specified plugins, the exit status will not be affected.

You would use this option if you are using check_email_delivery with the --plugin option and the plugins you configure each use different servers, for example different SMTP and IMAP servers. By default, if you do not use the --alert option, if anything goes wrong during the email delivery check, a WARNING or CRITICAL alert will be issued. This means that if you define check_email_delivery for the SMTP server only and the IMAP server fails, Nagios will alert you for the SMTP server which would be misleading. If you define it for both the SMTP server and IMAP server and just one of them fails, Nagios will alert you for both servers, which would still be misleading. If you have this situation, you may want to use the --alert option. You define the check_email_delivery check for both servers: for the SMTP server (first plugin) you use --alert 1, and for for the IMAP server (second plugin) you use --alert 2. When check_email_delivery runs with --alert 1 and the SMTP server fails, you will get the appropriate alert. If the IMAP server fails it will not affect the status. When check_email_delivery runs with --alert 2 and the SMTP server fails, you will get the UNKNOWN return code. If the IMAP server generates an alert you will get a WARNING or CRITICAL as appropriate.

You can repeat this option to specify multiple plugins that should cause an alert. Do this if you have multiple plugins on the command line but some of them involve the same server.

See also: --plugin. Also known as: -A <pluginN>

--wait <seconds>[,<seconds>,...]

How long to wait between sending the message and checking that it was received. View default with the -vV option.

When using the --plugin option, you can specify as many wait-between times as you have plugins (minus the last plugin, because it makes no sense to wait after running the last one). For example, if you use the --plugin option twice to specify an SMTP plugin and an IMAP plugin, and you want to wait 5 seconds between sending and receiving, then you would specify --wait 5. A second example, if you are using the --plugin option three times, then specifying -w 5 will wait 5 seconds between the second and third plugins also. You can specify a different wait time of 10 seconds between the second and third plugins, like this: -w 5,10.

--hostname <server>

Address or name of the SMTP and IMAP server. Examples: mail.server.com, localhost, 192.168.1.100. Also known as: -H <server>

--smtp-server <server>

Address or name of the SMTP server. Examples: smtp.server.com, localhost, 192.168.1.100. Using this option overrides the hostname option.

--smtp-port <number>

Service port on the SMTP server. Default is 25.

--smtp-username <username>
--smtp-password <password>

Username and password to use when connecting to the SMTP server with the TLS option. Use these options if the SMTP account has a different username/password than the IMAP account you are testing. These options take precendence over the --username and the --password options.

These are shell-escaped; special characters are ok.

--imap-server <server>

Address or name of the IMAP server. Examples: imap.server.com, localhost, 192.168.1.100. Using this option overrides the hostname option.

--imap-port <number>

Service port on the IMAP server. Default is 143. If you use SSL the default is 993.

--imap-username <username>
--imap-password <password>

Username and password to use when connecting to the IMAP server. Use these options if the IMAP account has a different username/password than the SMTP account you are testing. These options take precendence over the --username and the --password options.

These are shell-escaped; special characters are ok.

--username <username>
--password <password>

Username and password to use when connecting to IMAP server. Also known as: -U <username> -P <password>

Also used as the username and password for SMTP when the TLS option is enabled. To specify a separate set of credentials for SMTP authentication, see the options --smtp-username and --smtp-password.

--imap-check-interval <seconds>

How long to wait between polls of the imap-server for the specified mail. Default is 5 seconds.

--imap-retries <times>

How many times to poll the imap-server for the mail, before we give up. Default is 10.

--body <message>

Use this option to specify the body of the email message.

--header <header>

Use this option to set an arbitrary header in the message. You can use it multiple times.

--mailto recipient@your.net

You can send a message to multiple recipients by repeating this option or by separating the email addresses with commas (no whitespace allowed):

$ check_email_delivery ... --mailto recipient@your.net,recipient2@your.net --mailfrom sender@your.net

This argument is shell-escaped; special characters or angle brackets around the address are ok.

--mailfrom sender@your.net

Use this option to set the "from" address in the email.

--imapssl =item --noimapssl

Use this to enable or disable SSL for the IMAP plugin.

This argument is shell-escaped; special characters or angle brackets around the address are ok.

--smtptls =item --nosmtptls

Use this to enable or disable TLS/AUTH for the SMTP plugin.

--libexec

Use this option to set the path of the Nagios libexec directory. The default is /usr/local/nagios/libexec. This is where this plugin looks for the SMTP and IMAP plugins that it depends on.

--plugin <command>

This is a new option introduced in version 0.5 of the check_email_delivery plugin. It frees the plugin from depending on specific external plugins and generalizes the work done to determine that the email loop is operational. When using the --plugin option, the following options are ignored: libexec, imapssl, smtptls, hostname, username, password, smtp*, imap*, mailto, mailfrom, body, header, search.

Use this option multiple times to specify the complete trip. Typically, you would use this twice to specify plugins for SMTP and IMAP, or SMTP and POP3.

The output will be success if all the plugins return success. Each plugin should be a standard Nagios plugin.

A random token will be automatically generated and passed to each plugin specified on the command line by substituting the string %TOKEN1%.

Example usage:

 command_name check_email_delivery
 command_line check_email_delivery
 --plugin "$USER1$/check_smtp_send -H $ARG1$ --mailto recipient@your.net --mailfrom sender@your.net --header 'Subject: Nagios Test %TOKEN1%.'"
 --plugin "$USER1$/check_imap_receive -H $ARG1$ -U $ARG1$ -P $ARG2$ -s SUBJECT -s 'Nagios Test %TOKEN1%.'"

This technique allows for a lot of flexibility in configuring the plugins that test each part of your email delivery loop.

See also: --token. Also known as: -p <command>

--token <format>

This is a new option introduced in version 0.5 of the check_email_delivery plugin. It can be used in conjunction with --plugin to control the tokens that are generated and passed to the plugins, like %TOKEN1%.

Use this option multiple times to specify formats for different tokens. For example, if you want %TOKEN1% to consist of only alphabetical characters but want %TOKEN2% to consist of only digits, then you might use these options: --token aaaaaa --token nnnnn

Any tokens used in your plugin commands that have not been specified by --token <format> will default to --token U-X-Y

Token formats: a - alpha character (a-z) n - numeric character (0-9) c - alphanumeric character (a-z0-9) h - hexadecimal character (0-9a-f) U - unix time, seconds from epoch. eg 1193012441 X - a word from the pgp even list. eg aardvark Y - a word from the pgp odd list. eg adroitness

Caution: It has been observed that some IMAP servers do not handle underscores well in the search criteria. For best results, avoid using underscores in your tokens. Use hyphens or commas instead.

See also: --plugin. Also known as: -T <format>

The PGP word list was obtained from http://en.wikipedia.org/wiki/PGP_word_list

--file <file>

Save (append) status information into the given tab-delimited file. Format used:

 token  start-time      end-time        status  plugin-num      output

Note: format may change in future versions and may become configurable.

This option available as of version 0.6.2.

Also known as: -F <file>

--hires

Use the Time::HiRes module to measure time, if available.

--verbose

Display additional information. Useful for troubleshooting. Use together with --version to see the default warning and critical timeout values. Also known as: -v

--version

Display plugin version and exit. Also known as: -V

--help

Display this documentation and exit. Does not work in the ePN version. Also known as: -h

--usage

Display a short usage instruction and exit.


EXAMPLES

Send a message with custom headers

$ check_email_delivery -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net --username recipient --password secret

EMAIL DELIVERY OK - 1 seconds

Set warning and critical timeouts for receive plugin only:

$ check_email_delivery -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net --username recipient --password secret -w ,,5 -c ,,15

EMAIL DELIVERY OK - 1 seconds


EXIT CODES

Complies with the Nagios plug-in specification:
0OKThe plugin was able to check the service and it appeared to be functioning properly
1WarningThe plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly
2CriticalThe plugin detected that either the service was not running or it was above some "critical" threshold
3UnknownInvalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service


NAGIOS PLUGIN NOTES

Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html

This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because the path to utils.pm must be specified completely in this program and forces users to edit the source code if their install location is different (if they realize this is the problem). You can view the default timeout for this module by using the --verbose and --version options together. The short form is -vV.

Other than that, it attempts to follow published guidelines for Nagios plugins.


CHANGES

 Wed Oct 29 13:08:00 PST 2005
 + version 0.1
 Wed Nov  9 17:16:09 PST 2005
 + updated arguments to check_smtp_send and check_imap_receive
 + added eval/alarm block to implement -c option
 + added wait option to adjust sleep time between smtp and imap calls
 + added delay-warn and delay-crit options to adjust email delivery warning thresholds
 + now using an inline PluginReport package to generate the report
 + copyright notice and GNU GPL
 + version 0.2
 Thu Apr 20 14:00:00 CET 2006 (by Johan Nilsson <johann (at) axis.com>)
 + version 0.2.1
 + corrected bug in getoptions ($imap_server would never ever be set from command-line...)
 + will not make $smtp_server and $imap_server == $host if they're defined on commandline 
 + added support for multiple polls of imap-server, with specified intervals
 + changed default behaviour in check_imap_server (searches for the specific id in subject and deletes mails found)
 + increased default delay_warn from 65 seconds to 95 seconds
 Thu Apr 20 16:00:00 PST 2006 (by Geoff Crompton <geoff.crompton@strategicdata.com.au>)
 + fixed a bug in getoptions
 + version 0.2.2
 Tue Apr 24 21:17:53 PDT 2007
 + now there is an alternate version (same but without embedded perl POD) that is compatible with the new new embedded-perl Nagios feature
 + version 0.2.3
 Fri Apr 27 20:32:53 PDT 2007 
 + documentation now mentions every command-line option accepted by the plugin, including abbreviations
 + changed connection error to display timeout only if timeout was the error
 + default IMAP plugin is libexec/check_imap_receive (also checking for same but with .pl extension)
 + default SMTP plugin is libexec/check_smtp_send (also checking for same but with .pl extension)
 + removed default values for SMTP port and IMAP port to allow those plugins to set the defaults; so current behavior stays the same and will continue to make sense with SSL
 + version 0.3
 Thu Oct 11 10:00:00 EET 2007 (by Timo Virtaneva <timo (at) virtaneva dot com>
 + Changed the header and the search criteria so that the same email-box can be used for all smtp-servers
 + version 0.3.1
 Sun Oct 21 11:01:03 PDT 2007
 + added support for TLS options to the SMTP plugin
 + version 0.4
 Sun Oct 21 16:17:14 PDT 2007
 + added support for arbitrary plugins to send and receive mail (or anthing else!). see the --plugin option.
 + version 0.5
 Tue Dec  4 07:36:20 PST 2007
 + added --usage option because the official nagios plugins have both --help and --usage
 + added --timeout option to match the official nagios plugins
 + shortcut option for --token is now -T to avoid clash with standard shortcut -t for --timeout
 + fixed some minor pod formatting issues for perldoc
 + version 0.5.1
 Sat Dec 15 07:39:59 PST 2007
 + improved compatibility with Nagios embedded perl (ePN)
 + version 0.5.2
 Thu Jan 17 20:27:36 PST 2008 (by Timo Virtaneva <timo (at) virtaneva dot com> on Thu Oct 11 10:00:00 EET 2007)
 + Changed the header and the search criteria so that the same email-box can be used for all smtp-servers
 + version 0.5.3
 Mon Jan 28 22:11:02 PST 2008
 + fixed a bug, smtp-password and imap-password are now string parameters
 + added --alert option to allow selection of which plugin(s) should cause a WARNING or CRITICAL alert
 + version 0.6
 Mon Feb 11 19:09:37 PST 2008
 + fixed a bug for embedded perl version, variable "%status" will not stay shared in load_modules
 + version 0.6.1
 Mon May 26 10:39:19 PDT 2008
 + added --file option to allow plugin to record status information into a tab-delimited file
 + changed default token from U_X_Y to U-X-Y 
 + version 0.6.2
 Wed Jan 14 08:29:35 PST 2009
 + fixed a bug that the --header parameter was not being passed to the smtp plugin.
 + version 0.6.3
 Mon Jun  8 15:43:48 PDT 2009
 + added performance data for use with PNP4Nagios! (thanks to Ben Ritcey for the patch)
 + version 0.6.4
 Wed Sep 16 07:10:10 PDT 2009
 + added elapsed time in seconds to performance data
 + version 0.6.5
 Fri Oct  8 19:48:44 PDT 2010
 + fixed uniform IMAP and SMTP username and password bug (thanks to Micle Moerenhout for pointing it out)
 + version 0.6.6
 Mon Jan  3 08:24:23 PST 2011
 + added shell escaping for smtp-username, smtp-password, mailto, mailfrom, imap-username, and imap-password arguments
 + version 0.7.0
 Fri May  6 08:35:09 AST 2011
 + added --hires option to enable use of Time::Hires if available
 + version 0.7.1
 Sun Jun 12 17:17:06 AST 2011
 + added --imap-mailbox option to pass through to check_imap_receive --mailbox option
 + added --ssl option to conveniently enable both --smtp-tls and --imap-ssl 
 + version 0.7.2


AUTHOR

Jonathan Buhacoff <jonathan@buhacoff.net>


COPYRIGHT AND LICENSE

 Copyright (C) 2005-2011 Jonathan Buhacoff
 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 3 of the License, or
 (at your option) any later version.
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>;.
 http://www.gnu.org/licenses/gpl.txt
././@LongLink0000644000000000000000000000015212262515411011637 Lustar rootrootnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/imap_ssl_cert.podnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/imap_ssl_cer0000644000000000000000000000551612262515026030007 0ustar =pod =head1 NAME imap_ssl_cert - connects to an IMAP server using SSL and saves the server certificate into a .pem file =head1 SYNOPSIS imap_ssl_cert -H imap.server.com > server_ca_file.pem imap_ssl_cert -? imap_ssl_cert --help =head1 DEPENDENCIES This utility requires the following perl modules to be installed: Getopt::Long Mail::IMAPClient IO::Socket::SSL Net::SSLeay =head1 OPTIONS =over =item --timeout Abort with critical status if it takes longer than to connect to the IMAP server. Default is 60 seconds. The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer than 30 seconds. Also known as: -t =item --hostname Address or name of the IMAP server. Examples: mail.server.com, localhost, 192.168.1.100 Also known as: -H =item --port Service port on the IMAP server. Default is 143. If you use SSL, default is 993. Also known as: -p =item --verbose Display additional information. Useful for troubleshooting. Also known as: -v =item --version Display plugin version and exit. Also known as: -V =item --help Display this documentation and exit. Also known as: -h =item --usage Display a short usage instruction and exit. =back =head1 EXAMPLES =head2 Print the server's SSL certificate chain $ perl imap_ssl_cert.pl -H imap.server.com > ca_file.pem $ cat ca_file.pem -----BEGIN CERTIFICATE----- MIID1zCCAr+gAwIBAgIQPr3bVk0SkuXygjxgA7EVGDANBgkqhkiG9w0BAQUFADA8 [...snip...] 0FF4warjskrfqaVtWeIV58LJheaM4cPJkc2M -----END CERTIFICATE----- $ openssl x509 -in ca_file.pem -text =head1 SEE ALSO http://en.wikipedia.org/wiki/X.509 http://en.wikipedia.org/wiki/Privacy_Enhanced_Mail http://tools.ietf.org/html/rfc1422 http://search.cpan.org/~mikem/Net-SSLeay-1.42/lib/Net/SSLeay.pm http://search.cpan.org/~plobbes/Mail-IMAPClient-3.29/lib/Mail/IMAPClient.pod =head1 CHANGES Fri Nov 11 03:38:13 AST 2011 + version 0.1 =head1 AUTHOR Jonathan Buhacoff =head1 COPYRIGHT AND LICENSE Copyright (C) 2011 Jonathan Buhacoff 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . http://www.gnu.org/licenses/gpl.txt =cut ././@LongLink0000644000000000000000000000015712262515411011644 Lustar rootrootnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_receive.podnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_r0000644000000000000000000005252612262515026027756 0ustar =pod =head1 NAME check_imap_receive - connects to and searches an IMAP account for messages =head1 SYNOPSIS check_imap_receive -vV check_imap_receive -? check_imap_receive --help =head1 OPTIONS =over =item --warning Warn if it takes longer than to connect to the IMAP server. Default is 15 seconds. Also known as: -w =item --critical Return a critical status if it takes longer than to connect to the IMAP server. Default is 30 seconds. See also: --capture-critical Also known as: -c =item --timeout Abort with critical status if it takes longer than to connect to the IMAP server. Default is 60 seconds. The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer than 30 seconds. Also known as: -t =item --imap-check-interval How long to wait after searching for a matching message before searching again. Only takes effect if no messages were found. Default is 5 seconds. =item --imap-retries How many times to try searching for a matching message before giving up. If you set this to 0 then messages will not be searched at all. Setting this to 1 means the plugin only tries once. Etc. Default is 10 times. =item --hostname Address or name of the IMAP server. Examples: mail.server.com, localhost, 192.168.1.100 Also known as: -H =item --port Service port on the IMAP server. Default is 143. If you use SSL, default is 993. Also known as: -p =item --username =item --password Username and password to use when connecting to IMAP server. Also known as: -U -P =item --mailbox Use this option to specify the mailbox to search for messages. Default is INBOX. Also known as: -m =item --search Use this option to filter the messages. Default is not to filter. You may (must) use this option multiple times in order to create any valid IMAP search criteria. See the examples and see also http://www.ietf.org/rfc/rfc2060.txt (look for section 6.4.4, the SEARCH command) This is the way to find messages matching a given subject: -s SUBJECT -s "a given subject" You can use the following technique for any header, including Subject. To find "Header-Name: some value": -s HEADER -s Header-Name -s "some value" Modern IMAP servers that support rfc5032 extensions allow you to search for messages older or younger than a number of seconds. So to find messages received in the past hour, you can do: -s YOUNGER -s 3600 Or to find messages received more than 5 minutes ago, you can do: -s OLDER -s 300 Also known as: -s =item --download =item --nodownload This option causes all messages in the specified mailbox to be downloaded from the server and searched locally. See --download-max if you only want to download a few messages. Currently only the following RFC 2060 search criteria are supported: TEXT, BODY, SUBJECT, HEADER, NOT, OR, SENTBEFORE, SENTON, SENTSINCE. Requires Email::Simple to be installed. It is available on CPAN. This option may be particularly useful to you if your mail server is slow to index messages (like Exchange 2003), causing the plugin not to find them with IMAP SEARCH even though they are in the inbox. It's also useful if you're searching for messages that have been on the server for a specified amount of time, like some minutes or hours, because the standard IMAP search function only allows whole dates. For this, use the standard search keywords but you can specify either just a date like in RFC 2060 or a date and a time. If you use SENTBEFORE, SENTON, or SENTSINCE, you must have Date::Manip installed on your system. =item --download-max Limits the number of messages downloaded from the server when the --download option is used. Default is to download and search all messages. =item --search-critical-min This option will trigger a CRITICAL status if the number of messages found by the search criteria is below the given number. Use in conjunction with --search. This parameter defaults to 1 so that if no messages are found, the plugin will exit with a CRITICAL status. If you want the original behavior where the plugin exits with a WARNING status when no messages are found, set this parameter to 0. =item --search-critical-max This option will trigger a CRITICAL status if the number of messages found by the search criteria is above the given number. Use in conjunction with --search. This parameter defaults to -1 meaning it's disabled. If you set it to 10, the plugin will exit with CRITICAL if it finds 11 messages. If you set it to 1, the plugin will exit with CRITICAL if it finds any more than 1 message. If you set it to 0, the plugin will exit with CRITICAL if it finds any messages at all. If you set it to -1 it will be disabled. =item --search-warning-min This option will trigger a WARNING status if the number of messages found by the search criteria is below the given number. Use in conjunction with --search. This parameter defaults to 1 so that if no messages are found, the plugin will exit with a WARNING status. If you want to suppress the original behavior where the plugin exits with a WARNING status when no messages are found, set this parameter to 0. When this parameter is 0, it means that you expect the mailbox not to have any messages. =item --search-warning-max This option will trigger a WARNING status if the number of messages found by the search criteria is above the given number. Use in conjunction with --search. This parameter defaults to -1 meaning it's disabled. If you set it to 10, the plugin will exit with WARNING if it finds 11 messages. If you set it to 1, the plugin will exit with WARNING if it finds any more than 1 message. If you set it to 0, the plugin will exit with WARNING if it finds any messages at all. If you set it to -1 it will be disabled. =item --capture-max In addition to specifying search arguments to filter the emails in the IMAP account, you can specify a "capture-max" regexp argument and the eligible emails (found with search arguments) will be compared to each other and the OK line will have the highest captured value. The regexp is expected to capture a numeric value. =item --capture-min In addition to specifying search arguments to filter the emails in the IMAP account, you can specify a "capture-min" regexp argument and the eligible emails (found with search arguments) will be compared to each other and the OK line will have the lowest captured value. The regexp is expected to capture a numeric value. =item --delete =item --nodelete Use the delete option to delete messages that matched the search criteria. This is useful for preventing the mailbox from filling up with automated messages (from the check_smtp_send plugin, for example). THE DELETE OPTION IS TURNED *ON* BY DEFAULT, in order to preserve compatibility with an earlier version. Use the nodelete option to turn off the delete option. =item --nodelete-captured If you use both the capture-max and delete arguments, you can also use the nodelete-captured argument to specify that the email with the highest captured value should not be deleted. This leaves it available for comparison the next time this plugin runs. If you do not use the delete option, this option has no effect. =item --ssl =item --nossl Enable SSL protocol. Requires IO::Socket::SSL. Using this option automatically changes the default port from 143 to 993. You can still override this from the command line using the --port option. Use the nossl option to turn off the ssl option. =item --ssl-ca-file Use this to verify the server SSL certificate against a local .pem file. You'll need to specify the path to the .pem file as the parameter. You can use the imap_ssl_cert utility included in this distribution to connect to your IMAP server and save its SSL certificates into your .pem file. Usage is like this: imap_ssl_cert -H imap.server.com > ca_file.pem Only applicable when --ssl option is enabled. =item --template =item --notemplate Enable (or disable) processing of IMAP search parameters. Requires Text::Template and Date::Manip. Use this option to apply special processing to IMAP search parameters that allows you to use the results of arbitrary computations as the parameter values. For example, you can use this feature to search for message received up to 4 hours ago. Modern IMAP servers that support rfc5032 extensions allow searching with the YOUNGER and OLDER criteria so a message received up to 4 hours ago is -s YOUNGER -s 14400. But if your mail server doesn't support that, you could use the --template option to get similar functionality. When you enable the --template option, each parameter you pass to the -s option is parsed by Text::Template. See the Text::Template manual for more information, but in general any expression written in Perl will work. A convenience function called rfc2822dateHeader is provided to you so you can easily compute properly formatted dates for use as search parameters. The rfc2822date function can take one or two parameters itself: the date to format and an optional offset. To use the current time as a search parameter, you can write this: $ check_imap_receive ... --template -s HEADER -s Delivery-Date -s '{rfc2822dateHeader("now")}' The output of {rfc2822dateHeader("now")} looks like this: Wed, 30 Sep 2009 22:44:03 -0700 and is suitable for use with a date header, like HEADER Delivery-Date. To use a time in the past relative to the current time or day, you can use a second convenience function called rfc2822date and write this: $ check_imap_receive ... --template -s SENTSINCE -s '{rfc2822date("now","-1 day")}' The output of {rfc2822date("now","-1 day")} looks like this: 29-Sep-2009 and is suitable for use with BEFORE, ON, SENTBEFORE, SENTON, SENTSINCE, and SINCE. I have seen some email clients use a different format in the Date field, like September 17, 2009 9:46:51 AM PDT. To specify an arbitrary format like this one, write this: $ check_imap_receive ... --template -s HEADER -s Delivery-Date -s '{date("%B %e, %Y %i:%M:%S %p %Z","now","-4 hours")}' You can use BEFORE, ON, SENTBEFORE, SENTON, SENTSINCE, or SINCE to search for messages that arrived on, before, or after a given day but not on, before, or after a specific time on that day. To search for messages that arrived on, before, or after a specific time you have to use the Delivery-Date or another date field, like with -s HEADER -s Delivery-Date in the example above. See the Date::Manip manual for more information on the allowed expressions for date and delta strings. =item --hires Use the Time::HiRes module to measure time, if available. =item --verbose Display additional information. Useful for troubleshooting. Use together with --version to see the default warning and critical timeout values. If the selected mailbox was not found, you can use verbosity level 3 (-vvv) to display a list of all available mailboxes on the server. Also known as: -v =item --version Display plugin version and exit. Also known as: -V =item --help Display this documentation and exit. Does not work in the ePN version. Also known as: -h =item --usage Display a short usage instruction and exit. =back =head1 EXAMPLES =head2 Report how many emails are in the mailbox $ check_imap_receive -H mail.server.net --username mailuser --password mailpass -s ALL --nodelete IMAP RECEIVE OK - 1 seconds, 7 found =head2 Report the email with the highest value Suppose your mailbox has some emails from an automated script and that a message from this script typically looks like this (abbreviated): To: mailuser@server.net From: autoscript@server.net Subject: Results of Autoscript Date: Wed, 09 Nov 2005 08:30:40 -0800 Message-ID: Homeruns 5 And further suppose that you are interested in reporting the message that has the highest number of home runs, and also to leave this message in the mailbox for future checks, but remove the other matching messages with lesser values: $ check_imap_receive -H mail.server.net --username mailuser --password mailpass -s SUBJECT -s "Results of Autoscript" --capture-max "Homeruns (\d+)" --nodelete-captured IMAP RECEIVE OK - 1 seconds, 3 found, 1 captured, 5 max, 2 deleted =head2 Troubleshoot your search parameters Add the --nodelete and --imap-retries=1 parameters to your command line. =head1 EXIT CODES Complies with the Nagios plug-in specification: 0 OK The plugin was able to check the service and it appeared to be functioning properly 1 Warning The plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly 2 Critical The plugin detected that either the service was not running or it was above some "critical" threshold 3 Unknown Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service =head1 NAGIOS PLUGIN NOTES Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because the path to utils.pm must be specified completely in this program and forces users to edit the source code if their install location is different (if they realize this is the problem). You can view the default timeout for this module by using the --verbose and --version options together. The short form is -vV. Other than that, it attempts to follow published guidelines for Nagios plugins. =head1 SEE ALSO http://nagios.org/ http://search.cpan.org/~djkernen/Mail-IMAPClient-2.2.9/IMAPClient.pod http://search.cpan.org/~markov/Mail-IMAPClient-3.00/lib/Mail/IMAPClient.pod =head1 CHANGES Wed Oct 29 11:00:00 PST 2005 + version 0.1 Wed Nov 9 09:53:32 PST 2005 + added delete/nodelete option. deleting found messages is still default behavior. + added capture-max option + added nodelete-captured option + added mailbox option + added eval/alarm block to implement -c option + now using an inline PluginReport package to generate the report + copyright notice and GNU GPL + version 0.2 Thu Apr 20 14:00:00 CET 2006 (by Johan Nilsson ) + version 0.2.1 + added support for multiple polls of imap-server, with specified intervals Tue Apr 24 21:17:53 PDT 2007 + now there is an alternate version (same but without embedded perl POD) that is compatible with the new new embedded-perl Nagios feature + added patch from Benjamin Ritcey for SSL support on machines that have an SSL-enabled + version 0.2.3 Fri Apr 27 18:56:50 PDT 2007 + fixed problem that "Invalid search parameters" was not printed because of missing newline to flush it + warnings and critical errors now try to append error messages received from the IMAP client + changed connection error to display timeout only if timeout was the error + documentation now mentions every command-line option accepted by the plugin, including abbreviations + added abbreviations U for username, P for password, m for mailbox + fixed bug that imap-check-interval applied even after the last try (imap-retries) when it was not necessary + the IMAP expunge command is not sent unless at least one message is deleted + fixed bug that the "no messages" warning was printed even if some messages were found + version 0.3 Sun Oct 21 14:08:07 PDT 2007 + added port info to the "could not connect" error message + fixed bug that occurred when using --ssl --port 143 which caused port to remain at the default 993 imap/ssl port + added clarity shortcuts --search-subject and --search-header + port is no longer a required option. defaults to 143 for regular IMAP and 993 for IMAP/SSL + version 0.3.1 Sun Oct 21 20:41:56 PDT 2007 + reworked ssl support to use IO::Socket::SSL instead of the convenience method Mail::IMAPClient->Ssl (which is not included in the standard Mail::IMAPClient package) + removed clarity shortcuts (bad idea, code bloat) + version 0.4 Tue Dec 4 07:05:27 PST 2007 + added version check to _read_line workaround for SSL-related bug in Mail::IMAPClient version 2.2.9 ; newer versions fixed the bug + added --usage option because the official nagios plugins have both --help and --usage + added --timeout option to match the official nagios plugins + fixed some minor pod formatting issues for perldoc + version 0.4.1 Sat Dec 15 07:39:59 PST 2007 + improved compatibility with Nagios embedded perl (ePN) + version 0.4.2 Mon Jan 7 21:35:23 PST 2008 + changed version check for Mail::IMAPClient version 2.2.9 to use string comparison le "2.2.9" + fixed bug where script was dying on socket->autoflush when socket does not exist because autoflush was being called before checking the socket object + version 0.4.3 Mon Feb 11 19:13:38 PST 2008 + fixed a bug for embedded perl version, variable "%status" will not stay shared in load_modules + version 0.4.4 Mon May 26 08:33:27 PDT 2008 + fixed a bug for number captured, it now reflects number of messages captured instead of always returning "1" + added --capture-min option to complement --capture-max + added --search-critical-min to trigger a CRITICAL alert if number of messages found is less than argument, with default 1. + fixed warning and critical messages to use "more than" or "less than" instead of the angle brackets, to make them more web friendly + version 0.5 Wed Jul 2 14:59:05 PDT 2008 + fixed a bug for not finding a message after the first try, by reselecting the mailbox before each search + version 0.5.1 Sat Dec 13 08:57:29 PST 2008 + added --download option to allow local searching of messages (useful if your server has an index that handles searching but it takes a while before new emails show up and you want immediate results), supports only the TEXT, BODY, SUBJECT, and HEADER search keys + added --download-max option to set a limit on number of messages downloaded with --download + version 0.6.0 Wed Sep 30 23:25:33 PDT 2009 + fixed --download-max option (was incorrectly looking for --download_max). currently both will work, in the future only --download-max will work + added --template option to allow arbitrary substitutions for search parameters, and provided three convenience functions for working with dates + added date search criteria to the --download option: SENTBEFORE, SENTON, and SENTSINCE which check the Date header and allow hours and minutes in addition to dates (whereas the IMAP standard only allows dates) + added --search-critical-max to trigger a CRITICAL alert if number of messages found is more than argument, disabled by default. + fixed a bug in --download --search where messages would match even though they failed the search criteria + changed behavior of --download-max to look at the most recent messages first (hopefully); the IMAP protocol doesn't guarantee the order that the messages are returned but I observed that many mail servers return them in chronological order; so now --download-max reverses the order to look at the newer messages first + added performance data for use with PNP4Nagios! + version 0.7.0 Fri Oct 2 15:22:00 PDT 2009 + added --search-warning-max and --search-warning-min to trigger a WARNING alert if number of messages is more than or less than the specified number. + fixed --download option not to fail with CRITICAL if mailbox is empty; now this can be configured with --search-warning-min or --search-critical-min + version 0.7.1 Sat Nov 21 18:27:17 PST 2009 + fixed problem with using --download option on certain mail servers by turning on the IgnoreSizeErrors feature in IMAPClient + added --peek option to prevent marking messages as seen + version 0.7.2 Tue Jan 5 12:13:53 PST 2010 + added error message and exit with unknown status when an unrecognized IMAP search criteria is encountered by the --download --search option Wed May 5 11:14:51 PDT 2010 + added mailbox list when mailbox is not found and verbose level 3 is on (-vvv) + version 0.7.3 Tue Mar 8 18:58:14 AST 2011 + updated documentation for --search and --template to mention rfc5032 extensions (thanks to Stuart Henderson) Fri May 6 08:35:09 AST 2011 + added --hires option to enable use of Time::Hires if available + version 0.7.4 Fri Nov 11 01:51:40 AST 2011 + added --ssl-ca-file option to allow verifying the server certificate against a local .pem file (thanks to Alexandre Bezroutchko) + added imap_ssl_cert.pl utility (not in this file) to conveniently save the server's SSL certificates into a local .pem file + version 0.7.5 =head1 AUTHOR Jonathan Buhacoff =head1 COPYRIGHT AND LICENSE Copyright (C) 2005-2011 Jonathan Buhacoff 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . http://www.gnu.org/licenses/gpl.txt =cut ././@LongLink0000644000000000000000000000015412262515411011641 Lustar rootrootnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/check_email_delivery_epnnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/check_email_deliv0000644000000000000000000005125312262515026030025 0ustar #!/usr/bin/perl use strict; my $VERSION = '0.7.1'; my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff '; my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt'; my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 ); # look for required modules exit $status{UNKNOWN} unless load_modules(qw/Getopt::Long/); BEGIN { if( grep { /^--hires$/ } @ARGV ) { eval "use Time::HiRes qw(time);"; warn "Time::HiRes not installed\n" if $@; } } # get options from command line Getopt::Long::Configure("bundling"); my $verbose = 0; my $help = ""; my $help_usage = ""; my $show_version = ""; my $host = ""; my $smtp_server = ""; my $smtp_port = ""; my $imap_server = ""; my $smtp_username = ""; my $smtp_password = ""; my $smtp_tls = ""; my $imap_port = ""; my $imap_username = ""; my $imap_password = ""; my $imap_mailbox = ""; my $username = ""; my $password = ""; my $ssl = ""; my $imap_ssl = ""; my $mailto = ""; my $mailfrom = ""; my @header = (); my $body = ""; my $warnstr = ""; my $critstr = ""; my $waitstr = ""; my $delay_warn = 95; my $delay_crit = 300; my $smtp_warn = 15; my $smtp_crit = 30; my $imap_warn = 15; my $imap_crit = 30; my $timeout = ""; my @alert_plugins = (); my $imap_interval = 5; my $imap_retries = 5; my @plugins = (); my @token_formats = (); my $tokenfile = ""; my $default_crit = 30; my $default_warn = 15; my $default_wait = 5; my $default_timeout = 60; my $time_hires = ""; my $libexec = "/usr/local/nagios/libexec"; my $ok; $ok = Getopt::Long::GetOptions( "V|version"=>\$show_version, "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage, "w|warning=s"=>\$warnstr,"c|critical=s"=>\$critstr, "t|timeout=s"=>\$timeout, "libexec=s"=>\$libexec, # plugin settings "p|plugin=s"=>\@plugins, "T|token=s"=>\@token_formats, "A|alert=i"=>\@alert_plugins, "F|file=s"=>\$tokenfile, # common settings "H|hostname=s"=>\$host, "U|username=s"=>\$username,"P|password=s"=>\$password, "ssl!"=>\$ssl, # smtp settings "smtp-server=s"=>\$smtp_server,"smtp-port=i"=>\$smtp_port, "mailto=s"=>\$mailto, "mailfrom=s",\$mailfrom, "header=s"=>\@header, "body=s"=>\$body, # smtp-tls settings "smtptls!"=>\$smtp_tls, "smtp-username=s"=>\$smtp_username,"smtp-password=s"=>\$smtp_password, # delay settings "wait=s"=>\$waitstr, # imap settings "imap-server=s"=>\$imap_server,"imap-port=i"=>\$imap_port, "imap-username=s"=>\$imap_username,"imap-password=s"=>\$imap_password, "imap-mailbox=s"=>\$imap_mailbox, "imap-check-interval=i"=>\$imap_interval,"imap-retries=i"=>\$imap_retries, "imapssl!"=>\$imap_ssl, # Time "hires"=>\$time_hires, ); if( $show_version ) { print "$VERSION\n"; if( $verbose ) { print "Warning threshold: $delay_warn seconds\n"; print "Critical threshold: $delay_crit seconds\n"; print "Default wait: $default_wait seconds\n"; print "Default timeout: $default_timeout seconds\n"; } exit $status{UNKNOWN}; } if( $help ) { exec "perldoc", $0 or print "Try `perldoc $0`\n"; exit $status{UNKNOWN}; } if( $host ) { $smtp_server = $host if $smtp_server eq ""; $imap_server = $host if $imap_server eq ""; } if( $username ) { $smtp_username = $username if $smtp_username eq ""; $imap_username = $username if $imap_username eq ""; } if( $password ) { $smtp_password = $password if $smtp_password eq ""; $imap_password = $password if $imap_password eq ""; } if( $ssl ) { $imap_ssl = $ssl if $imap_ssl eq ""; $smtp_tls = $ssl if $smtp_tls eq ""; } if( $help_usage || ( scalar(@plugins) == 0 && ( $smtp_server eq "" || $mailto eq "" || $mailfrom eq "" || $imap_server eq "" || $username eq "" || $password eq "" ) ) ) { print "Usage 1: $0 -H host \n\t". "--mailto recipient\@your.net --mailfrom sender\@your.net --body 'message' \n\t". "--username username --password password \n\t". "[-w ] [-c ]\n\t" . "[--imap-check-interval ] [--imap-retries ]\n"; print "Usage 2: $0 \n\t". "-p 'first plugin command with %TOKEN1% embedded' \n\t". "-p 'second plugin command with %TOKEN1% embedded' \n\t". "[-w ,] [-c ,] \n"; exit $status{UNKNOWN}; } # determine thresholds my @warning_times = split(",", $warnstr); my @critical_times = split(",", $critstr); my @alarm_times = split(",", $timeout); my @wait_times = split(",", $waitstr); my ($dw,$sw,$rw) = split(",", $warnstr); my ($dc,$sc,$rc) = split(",", $critstr); my ($wait) = split(",", $waitstr); $delay_warn = $dw if defined $dw and $dw ne ""; $smtp_warn = $sw if defined $sw and $sw ne ""; $imap_warn = $rw if defined $rw and $rw ne ""; $delay_crit = $dc if defined $dc and $dc ne ""; $smtp_crit = $sc if defined $sc and $sc ne ""; $imap_crit = $rc if defined $rc and $rc ne ""; my $smtp_thresholds = ""; $smtp_thresholds .= "-w $smtp_warn " if defined $smtp_warn and $smtp_warn ne ""; $smtp_thresholds .= "-c $smtp_crit " if defined $smtp_crit and $smtp_crit ne ""; my $imap_thresholds = ""; $imap_thresholds .= "-w $imap_warn " if defined $imap_warn and $imap_warn ne ""; $imap_thresholds .= "-c $imap_crit " if defined $imap_crit and $imap_crit ne ""; $imap_thresholds .= "--imap-check-interval $imap_interval " if defined $imap_interval and $imap_interval ne ""; $imap_thresholds .= "--imap-retries $imap_retries " if defined $imap_retries and $imap_retries ne ""; if( scalar(@alarm_times) == 1 ) { $default_timeout = shift(@alarm_times); } # determine which other options to include my $smtp_options = ""; $smtp_options .= "-H $smtp_server " if defined $smtp_server and $smtp_server ne ""; $smtp_options .= "-p $smtp_port " if defined $smtp_port and $smtp_port ne ""; $smtp_options .= "--tls " if defined $smtp_tls and $smtp_tls; $smtp_options .= "-U ".shellquote($smtp_username)." " if defined $smtp_username and $smtp_username ne ""; $smtp_options .= "-P ".shellquote($smtp_password)." " if defined $smtp_password and $smtp_password ne ""; $smtp_options .= "--mailto ".shellquote($mailto)." " if defined $mailto and $mailto ne ""; $smtp_options .= "--mailfrom ".shellquote($mailfrom)." " if defined $mailfrom and $mailfrom ne ""; foreach my $h( @header ) { $smtp_options .= "--header ".shellquote($h)." "; } my $imap_options = ""; $imap_options .= "-H $imap_server " if defined $imap_server and $imap_server ne ""; $imap_options .= "-p $imap_port " if defined $imap_port and $imap_port ne ""; $imap_options .= "-U ".shellquote($imap_username)." " if defined $imap_username and $imap_username ne ""; $imap_options .= "-P ".shellquote($imap_password)." " if defined $imap_password and $imap_password ne ""; $imap_options .= "--mailbox ".shellquote($imap_mailbox)." " if defined $imap_mailbox and $imap_mailbox ne ""; $imap_options .= "--ssl " if defined $imap_ssl and $imap_ssl; # create the report object my $report = new PluginReport; my @report_plugins = (); # populated later with either (smtp,imap) or (plugin1,plugin2,...) my $time_start; # initialized later with time the work actually starts # create token formats for use with the plugins my @alpha = qw/a b c d e f g h i j k l m n o p q r s t u v w x y z/; my @numeric = qw/0 1 2 3 4 5 6 7 8 9/; my @hex = qw/0 1 2 3 4 5 6 7 8 9 a b c d e f/; my @pgp_even = qw/aardvark absurd accrue acme adrift adult afflict ahead aimless Algol allow alone ammo ancient apple artist assume Athens atlas Aztec baboon backfield backward banjo beaming bedlamp beehive beeswax befriend Belfast berserk billiard bison blackjack blockade blowtorch bluebird bombast bookshelf brackish breadline breakup brickyard briefcase Burbank button buzzard cement chairlift chatter checkup chisel choking chopper Christmas clamshell classic classroom cleanup clockwork cobra commence concert cowbell crackdown cranky crowfoot crucial crumpled crusade cubic dashboard deadbolt deckhand dogsled dragnet drainage dreadful drifter dropper drumbeat drunken Dupont dwelling eating edict egghead eightball endorse endow enlist erase escape exceed eyeglass eyetooth facial fallout flagpole flatfoot flytrap fracture framework freedom frighten gazelle Geiger glitter glucose goggles goldfish gremlin guidance hamlet highchair hockey indoors indulge inverse involve island jawbone keyboard kickoff kiwi klaxon locale lockup merit minnow miser Mohawk mural music necklace Neptune newborn nightbird Oakland obtuse offload optic orca payday peachy pheasant physique playhouse Pluto preclude prefer preshrunk printer prowler pupil puppy python quadrant quiver quota ragtime ratchet rebirth reform regain reindeer rematch repay retouch revenge reward rhythm ribcage ringbolt robust rocker ruffled sailboat sawdust scallion scenic scorecard Scotland seabird select sentence shadow shamrock showgirl skullcap skydive slingshot slowdown snapline snapshot snowcap snowslide solo southward soybean spaniel spearhead spellbind spheroid spigot spindle spyglass stagehand stagnate stairway standard stapler steamship sterling stockman stopwatch stormy sugar surmount suspense sweatband swelter tactics talon tapeworm tempest tiger tissue tonic topmost tracker transit trauma treadmill Trojan trouble tumor tunnel tycoon uncut unearth unwind uproot upset upshot vapor village virus Vulcan waffle wallet watchword wayside willow woodlark Zulu/; my @pgp_odd = qw/adroitness adviser aftermath aggregate alkali almighty amulet amusement antenna applicant Apollo armistice article asteroid Atlantic atmosphere autopsy Babylon backwater barbecue belowground bifocals bodyguard bookseller borderline bottomless Bradbury bravado Brazilian breakaway Burlington businessman butterfat Camelot candidate cannonball Capricorn caravan caretaker celebrate cellulose certify chambermaid Cherokee Chicago clergyman coherence combustion commando company component concurrent confidence conformist congregate consensus consulting corporate corrosion councilman crossover crucifix cumbersome customer Dakota decadence December decimal designing detector detergent determine dictator dinosaur direction disable disbelief disruptive distortion document embezzle enchanting enrollment enterprise equation equipment escapade Eskimo everyday examine existence exodus fascinate filament finicky forever fortitude frequency gadgetry Galveston getaway glossary gossamer graduate gravity guitarist hamburger Hamilton handiwork hazardous headwaters hemisphere hesitate hideaway holiness hurricane hydraulic impartial impetus inception indigo inertia infancy inferno informant insincere insurgent integrate intention inventive Istanbul Jamaica Jupiter leprosy letterhead liberty maritime matchmaker maverick Medusa megaton microscope microwave midsummer millionaire miracle misnomer molasses molecule Montana monument mosquito narrative nebula newsletter Norwegian October Ohio onlooker opulent Orlando outfielder Pacific pandemic Pandora paperweight paragon paragraph paramount passenger pedigree Pegasus penetrate perceptive performance pharmacy phonetic photograph pioneer pocketful politeness positive potato processor provincial proximate puberty publisher pyramid quantity racketeer rebellion recipe recover repellent replica reproduce resistor responsive retraction retrieval retrospect revenue revival revolver sandalwood sardonic Saturday savagery scavenger sensation sociable souvenir specialist speculate stethoscope stupendous supportive surrender suspicious sympathy tambourine telephone therapist tobacco tolerance tomorrow torpedo tradition travesty trombonist truncated typewriter ultimate undaunted underfoot unicorn unify universe unravel upcoming vacancy vagabond vertigo Virginia visitor vocalist voyager warranty Waterloo whimsical Wichita Wilmington Wyoming yesteryear Yucatan/; my %formats = ( 'a' => sub { pick_random(@alpha) }, 'n' => sub { pick_random(@numeric) }, 'c' => sub { pick_random(@alpha,@numeric) }, 'h' => sub { pick_random(@hex) }, 'U' => sub { time }, 'X' => sub { pick_random(@pgp_even) }, 'Y' => sub { pick_random(@pgp_odd) }, ); if( scalar(@plugins) ) { # scan the plugin commands for use of tokens to count how many we need my $token_count = 0; foreach my $p (@plugins) { my @matches = sort ($p =~ m/%TOKEN(\d+)%/g); my $max = pop @matches; $token_count = $max if defined($max) && $max > $token_count; } # create the tokens my @tokens = (); foreach my $t (1..$token_count) { my $format = shift @token_formats; $format = "U-X-Y" unless $format; my @format_characters = split(//, $format); my $token = ""; foreach my $c (@format_characters) { if( defined $formats{$c} ) { $token .= &{$formats{$c}}; } else { $token .= $c; } } push @tokens, $token; } # substitute the tokens into each plugin command foreach my $p (@plugins) { foreach my $t (1..$token_count) { my $token = $tokens[$t-1]; $p =~ s/%TOKEN$t%/$token/g; } } # mark plugins that are allowed to generate alerts. default behavior is to alert for all plugins. my %alert_plugins = (); if( scalar(@alert_plugins) > 0 ) { %alert_plugins = map { $_ => 1 } @alert_plugins; } else { %alert_plugins = map { $_ => 1 } (1..scalar(@plugins)); } # run each plugin and store its output in a report $time_start = time; my $i = 0; foreach my $p( @plugins ) { $i++; my $plugin_timeout = shift(@alarm_times) || $default_timeout; # run the plugin eval { local $SIG{ALRM} = sub { die "exceeded timeout $plugin_timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm` alarm $plugin_timeout; my $output = `$p`; chomp $output; if( $output !~ m/OK|WARNING|CRITICAL/ ) { print "EMAIL DELIVERY UNKNOWN - plugin $i error: $output\n"; print "Plugin $i: $p\n" if $verbose; # record tokens in a file if option is enabled record_tokens($tokenfile,\@tokens,$time_start,undef,'UNKNOWN',$i,$output) if $tokenfile; exit $status{UNKNOWN}; } if( $output =~ m/CRITICAL/ && $alert_plugins{$i} ) { print "EMAIL DELIVERY CRITICAL - plugin $i failed: $output\n"; print "Plugin $i: $p" if $verbose; # record tokens in a file if option is enabled record_tokens($tokenfile,\@tokens,$time_start,undef,'CRITICAL',$i,$output) if $tokenfile; exit $status{CRITICAL}; } if( $output =~ m/WARNING/ && $alert_plugins{$i} ) { print "EMAIL DELIVERY WARNING - plugin $i warning: $output\n"; print "Plugin $i: $p\n" if $verbose; # record tokens in a file if option is enabled record_tokens($tokenfile,\@tokens,$time_start,undef,'WARNING',$i,$output) if $tokenfile; exit $status{WARNING}; } $report->{"plugin".$i} = $output; alarm 0; }; if( $@ && $alert_plugins{$i} ) { print "EMAIL DELIVERY CRITICAL - Could not run plugin $i: $@\n"; print "Plugin $i: $p\n" if $verbose; exit $status{CRITICAL}; } # if this wasn't the last plugin, wait before continuing if( $i < scalar(@plugins) ) { my $wait = shift(@wait_times) || $default_wait; sleep $wait; } # compatibility with the "not using plugins" method... pretend to calculate the total round trip time (the delay) using data from the plugins ... $report->{max} = 0; $report->{delay} = 0; } # register the list of reports foreach my $r ( 1..scalar(@plugins)) { push @report_plugins, "plugin".$r; } # record tokens in a file if option is enabled my $tmp_long_report = join(", ", map { "$_: $report->{$_}" } @report_plugins ) if $tokenfile; record_tokens($tokenfile,\@tokens,$time_start,time,'OK',scalar(@plugins),$tmp_long_report) if $tokenfile; } else { # not using plugins. $time_start = time; # send email via SMTP my $id = $time_start; # XXX should include localhost name maybe or some random number in case the same mailbox is used for multiple delivery tests my $smtp_plugin = "$libexec/check_smtp_send"; $smtp_plugin = "$libexec/check_smtp_send.pl" unless -e $smtp_plugin; my $smtp_timeout = shift(@alarm_times) || $default_timeout; eval { local $SIG{ALRM} = sub { die "exceeded timeout $smtp_timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm` alarm $smtp_timeout; my $smtp = `$smtp_plugin $smtp_options --header 'Subject: Nagios Message SMTP $smtp_server ID $id.' --body 'Nagios Email Delivery Plugin\n$body' $smtp_thresholds`; if( $smtp !~ m/OK|WARNING|CRITICAL/ ) { print "EMAIL DELIVERY UNKNOWN - smtp unknown: $smtp\n"; exit $status{UNKNOWN}; } if( $smtp =~ m/CRITICAL/ ) { print "EMAIL DELIVERY CRITICAL - smtp failed: $smtp\n"; exit $status{CRITICAL}; } chomp $smtp; $report->{smtp} = $smtp; alarm 0; }; if( $@ ) { print "EMAIL DELIVERY CRITICAL - Could not connect to SMTP server $smtp_server: $@\n"; exit $status{CRITICAL}; } # wait before checking the delivery $wait = shift(@wait_times) || $default_wait; sleep $wait; # check email via IMAP my $imap_plugin = "$libexec/check_imap_receive"; $imap_plugin = "$libexec/check_imap_receive.pl" unless -e $imap_plugin; my $imap_timeout = shift(@alarm_times) || $default_timeout; eval { local $SIG{ALRM} = sub { die "exceeded timeout $imap_timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm` alarm $imap_timeout; my $imap = `$imap_plugin $imap_options -s SUBJECT -s 'Nagios Message SMTP $smtp_server ID' --capture-max 'Nagios Message SMTP $smtp_server ID (\\d+)' --nodelete-captured $imap_thresholds`; if( $imap !~ m/OK|WARNING|CRITICAL/ ) { print "EMAIL DELIVERY UNKNOWN - imap unknown: $imap\n"; exit $status{UNKNOWN}; } if( $imap =~ m/CRITICAL/ ) { print "EMAIL DELIVERY CRITICAL - imap failed: $imap\n"; exit $status{CRITICAL}; } if( $imap =~ m/ (\d+) max/ ) { my $last_received = $1; $report->{max} = $1; my $delay = time - $last_received; $report->{delay} = $delay; } chomp $imap; $report->{imap} = $imap; alarm 0; }; if( $@ ) { print "EMAIL DELIVERY CRITICAL - Could not connect to IMAP server $imap_server: $@\n"; exit $status{CRITICAL}; } # register the list of reports push @report_plugins, ("smtp","imap"); } # calculate elapsed time and issue warnings my $time_end = time; my $elapsedtime = $time_end - $time_start; $report->{seconds} = $elapsedtime; my @warning = (); my @critical = (); push @warning, "most recent received $report->{delay} seconds ago" if( defined($report->{delay}) && $report->{delay} > $delay_warn ); push @critical, "most recent received $report->{delay} seconds ago" if( defined($report->{delay}) && $report->{delay} > $delay_crit ); push @warning, "no emails found" if( !defined($report->{delay}) ); # print report and exit with known status my $perf_data = "delay=".$report->{delay}."s;$delay_warn;$delay_crit;0 elapsed=".$report->{seconds}."s"; # TODO: need a component for safely generating valid perf data format. for notes on the format, see http://www.perfparse.de/tiki-view_faq.php?faqId=6 my $short_report = $report->text(qw/seconds delay/) . " | $perf_data"; my $long_report = join("", map { "$_: $report->{$_}\n" } @report_plugins ); if( scalar @critical ) { my $alerts = join(", ", @critical); print "EMAIL DELIVERY CRITICAL - $alerts; $short_report\n"; print $long_report if $verbose; exit $status{CRITICAL}; } if( scalar @warning ) { my $alerts = join(", ", @warning); print "EMAIL DELIVERY WARNING - $alerts; $short_report\n"; print $long_report if $verbose; exit $status{WARNING}; } print "EMAIL DELIVERY OK - $short_report\n"; print $long_report if $verbose; exit $status{OK}; # utility to load required modules. exits if unable to load one or more of the modules. sub load_modules { my @missing_modules = (); foreach( @_ ) { eval "require $_"; push @missing_modules, $_ if $@; } if( @missing_modules ) { print "Missing perl modules: @missing_modules\n"; return 0; } return 1; } # returns one random character from a set of characters sub pick_random { my @set = @_; my $size = scalar @set; my $string = $set[int(rand($size))]; return $string; } # appens tokens and times to a tab-separated value file sub record_tokens { my ($tokenfile,$tokens,$time_start,$time_end,$status,$plugin_num,$output) = @_; if( $tokenfile ) { my @tokens = @$tokens; $time_end = "" unless defined $time_end; $status = "" unless defined $status; $plugin_num = "" unless defined $plugin_num; $output = "" unless defined $output; print "saving ".scalar(@tokens)." tokens into $tokenfile\n" if $verbose; open(TOKENFILE,">>$tokenfile"); foreach(@tokens) { print TOKENFILE "$_\t$time_start\t$time_end\t$status\t$plugin_num\t$output\n"; } close(TOKENFILE); } } # wraps argument in single-quotes and escapes any single-quotes in the argument sub shellquote { my $str = shift || ""; $str =~ s/\'/\'\\\'\'/g; return "'$str'"; } # NAME # PluginReport # SYNOPSIS # $report = new PluginReport; # $report->{label1} = "value1"; # $report->{label2} = "value2"; # print $report->text(qw/label1 label2/); package PluginReport; sub new { my ($proto,%p) = @_; my $class = ref($proto) || $proto; my $self = bless {}, $class; $self->{$_} = $p{$_} foreach keys %p; return $self; } sub text { my ($self,@labels) = @_; my @report = map { "$self->{$_} $_" } grep { defined $self->{$_} } @labels; my $text = join(", ", @report); return $text; } package main; 1; ././@LongLink0000644000000000000000000000014712262515411011643 Lustar rootrootnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/check_smtp_send_epnnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/check_smtp_send_e0000644000000000000000000003210612262515026030047 0ustar #!/usr/bin/perl use strict; use POSIX qw(strftime); my $VERSION = '0.7.3'; my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff '; my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt'; my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 ); # look for required modules exit $status{UNKNOWN} unless load_modules(qw/Getopt::Long Net::SMTP/); BEGIN { if( grep { /^--hires$/ } @ARGV ) { eval "use Time::HiRes qw(time);"; warn "Time::HiRes not installed\n" if $@; } } Getopt::Long::Configure("bundling"); my $verbose = 0; my $help = ""; my $help_usage = ""; my $show_version = ""; my $smtp_server = ""; my $default_smtp_port = "25"; my $default_smtp_ssl_port = "465"; my $default_smtp_tls_port = "587"; my $smtp_port = ""; my @mailto = (); my $mailfrom = ""; my @header = (); my $body = ""; my $stdin = ""; my $template = ""; my $expect_response = "250"; my $warntime = 15; my $criticaltime = 30; my $timeout = 60; my $tls = 0; my $ssl = 0; my $auth_method = undef; my $username = ""; my $password = ""; my $time_hires = ""; my $mx_lookup = 0; my $ok; $ok = Getopt::Long::GetOptions( "V|version"=>\$show_version, "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage, "w|warning=i"=>\$warntime,"c|critical=i"=>\$criticaltime,"t|timeout=i"=>\$timeout, # smtp settings "H|hostname=s"=>\$smtp_server,"p|port=i"=>\$smtp_port, "mailto=s"=>\@mailto, "mailfrom=s",\$mailfrom, "header=s"=>\@header, "body=s"=>\$body, "stdin"=>\$stdin, "template!"=>\$template, # SSL/TLS/auth options "tls!"=>\$tls, "ssl!"=>\$ssl, "auth=s"=>\$auth_method, "U|username=s"=>\$username,"P|password=s"=>\$password, # Server response "E|expect-response=s"=>\$expect_response, # Time "hires"=>\$time_hires, ); if( $show_version ) { print "$VERSION\n"; if( $verbose ) { print "Default warning threshold: $warntime seconds\n"; print "Default critical threshold: $criticaltime seconds\n"; print "Default timeout: $timeout seconds\n"; } exit $status{UNKNOWN}; } if( $help ) { exec "perldoc", $0 or print "Try `perldoc $0`\n"; exit $status{UNKNOWN}; } if( $smtp_server eq "" && scalar(@mailto) == 1 ) { # no SMTP server specified but one mailto address given means we can look up the MX record $mx_lookup = 1; } my @required_module = (); push @required_module, 'Net::SMTP::SSL' if $ssl; push @required_module, ('MIME::Base64','Authen::SASL') if $ssl && $username; push @required_module, 'Net::SMTP::TLS' if $tls; push @required_module, 'Net::SMTP_auth' if $auth_method and not $tls; # whereas if auth_method and tls we use TLS_auth, which is included in this script! push @required_module, 'Text::Template' if $template; push @required_module, 'Net::DNS' if $mx_lookup; push @required_module, 'Email::Address' if $mx_lookup; exit $status{UNKNOWN} unless load_modules(@required_module); # split up @mailto if commas were used instead of multiple options @mailto = split(/,/,join(',',@mailto)); if( $help_usage || ( ($smtp_server eq "" && !$mx_lookup) || scalar(@mailto)==0 || $mailfrom eq "" ) ) { print "Usage: $0 [-H host [-p port]] --mailto recipient\@your.net [--mailto recipient2\@your.net ...] --mailfrom sender\@your.net --body 'some text' [-w ] [-c ]\n"; exit $status{UNKNOWN}; } # initialize my $report = new PluginReport; my $time_start = time; my $actual_response = undef; my @warning = (); my @critical = (); my $smtp_debug = 0; $smtp_debug = 1 if $verbose >= 3; # default date and message id headers push @header, default_date_header() unless find_header("Date",@header); push @header, default_messageid_header() unless find_header("Message-ID",@header); # look up MX server if necessary if( $mx_lookup ) { my $addr = Email::Address->new( undef, $mailto[0] ); my $mx_domain = $addr->host; print "MX lookup " . $mx_domain . "\n" if $verbose > 1; my $res = Net::DNS::Resolver->new; my @mx = Net::DNS::mx($res, $mx_domain); if( @mx ) { # use the first server foreach my $rr (@mx) { print "pref : " . $rr->preference . " exchange: " . $rr->exchange . "\n" if $verbose > 2; } $smtp_server = $mx[0]->exchange; print "smtp server: $smtp_server\n" if $verbose; } else { print "SMTP SEND CRITICAL - Cannot find MX records for $mx_domain\n"; exit $status{CRITICAL}; } } # connect to SMTP server # create the smtp handle using Net::SMTP, Net::SMTP::SSL, Net::SMTP::TLS, or an authentication variant my $smtp; eval { if( $tls and $auth_method ) { $smtp_port = $default_smtp_tls_port unless $smtp_port; $smtp = TLS_auth->new($smtp_server, Timeout=>$timeout, Port=>$smtp_port, User=>$username, Password=>$password, Auth_Method=>$auth_method); if( $smtp ) { my $message = oneline($smtp->message()); die "cannot connect with TLS/$auth_method: $message" if $smtp->code() =~ m/53\d/; } } elsif( $tls ) { $smtp_port = $default_smtp_tls_port unless $smtp_port; $smtp = Net::SMTP::TLS->new($smtp_server, Timeout=>$timeout, Port=>$smtp_port, User=>$username, Password=>$password); if( $smtp ) { my $message = oneline($smtp->message()); die "cannot connect with TLS: $message" if $smtp->code() =~ m/53\d/; } } elsif( $ssl ) { $smtp_port = $default_smtp_ssl_port unless $smtp_port; $smtp = Net::SMTP::SSL->new($smtp_server, Port => $smtp_port, Timeout=>$timeout,Debug=>$smtp_debug); if( $smtp && $username ) { $smtp->auth($username, $password); my $message = oneline($smtp->message()); die "cannot connect with SSL/password: $message" if $smtp->code() =~ m/53\d/; } } elsif( $auth_method ) { $smtp_port = $default_smtp_port unless $smtp_port; $smtp = Net::SMTP_auth->new($smtp_server, Port=>$smtp_port, Timeout=>$timeout,Debug=>$smtp_debug); if( $smtp ) { $smtp->auth($auth_method, $username, $password); my $message = oneline($smtp->message()); die "cannot connect with SSL/$auth_method: $message" if $smtp->code() =~ m/53\d/; } } else { $smtp_port = $default_smtp_port unless $smtp_port; $smtp = Net::SMTP->new($smtp_server, Port=>$smtp_port, Timeout=>$timeout,Debug=>$smtp_debug); if( $smtp && $username ) { $smtp->auth($username, $password); my $message = oneline($smtp->message()); die "cannot connect with password: $message" if $smtp->code() =~ m/53\d/; } } }; if( $@ ) { $@ =~ s/\n/ /g; # the error message can be multiline but we want our output to be just one line print "SMTP SEND CRITICAL - $@\n"; exit $status{CRITICAL}; } unless( $smtp ) { print "SMTP SEND CRITICAL - Could not connect to $smtp_server port $smtp_port\n"; exit $status{CRITICAL}; } my $time_connected = time; # add the monitored server's banner to the report if( $tls ) { $report->{banner} = ""; } elsif( $ssl ) { $report->{banner} = $smtp->banner || ""; chomp $report->{banner}; } else { $report->{banner} = $smtp->banner || ""; chomp $report->{banner}; } # send email if( $stdin ) { $body = ""; while() { $body .= $_; } } # if user wants to use template substitutions, this is the place to process body and headers if( $template ) { foreach my $item (@header,$body) { my $t = Text::Template->new(TYPE=>'STRING',SOURCE=>$item,PACKAGE=>'SmtpMessageTemplate'); $item = $t->fill_in(PREPEND=>q{package SmtpMessageTemplate;}); # print "item: $item\n"; } } $smtp->mail($mailfrom); foreach( @mailto ) { # the two SMTP modules have different error reporting mechanisms: if( $tls ) { # Net::SMTP::TLS croaks when the recipient is rejected eval { $smtp->to($_); }; if( $@ ) { print "SMTP SEND CRITICAL - Could not send to $_\n"; print "Reason: $@\n" if $verbose; exit $status{CRITICAL}; } } else { # Net::SMTP returns false when the recipient is rejected my $to_returned = $smtp->to($_); if( !$to_returned ) { print "SMTP SEND CRITICAL - Could not send to $_\n"; print "Reason: Recipient rejected or authentication failed\n" if $verbose; exit $status{CRITICAL}; } } } # Net::SMTP::TLS doesn't implement code() so we need to wrap calls in eval to get our error messages # start data transfer (expect response 354) $smtp->data(); # send data $smtp->datasend("To: ".join(", ",@mailto)."\n"); $smtp->datasend("From: $mailfrom\n"); foreach( @header ) { $smtp->datasend("$_\n"); } $smtp->datasend("\n"); $smtp->datasend($body); $smtp->datasend("\n"); eval { # end data transfer (expect response 250) $smtp->dataend(); }; if( $@ ) { $actual_response = $tls ? get_tls_error($@) : $smtp->code(); } else { $actual_response = $tls ? "250" : $smtp->code(); # no error means we got 250 } eval { # disconnect from SMTP server (expect response 221) $smtp->quit(); }; if( $@ ) { push @warning, "Error while disconnecting from $smtp_server"; } # calculate elapsed time and issue warnings my $time_end = time; my $elapsedtime = $time_end - $time_start; $report->{seconds} = $elapsedtime; push @warning, "connection time more than $warntime" if( $time_connected - $time_start > $warntime ); push @critical, "connection time more than $criticaltime" if( $time_connected - $time_start > $criticaltime ); push @critical, "response was $actual_response but expected $expect_response" if ( $actual_response ne $expect_response ); # print report and exit with known status my $perf_data = "elapsed=".$report->{seconds}."s;$warntime;$criticaltime"; # TODO: need a component for safely generating valid perf data format. for notes on the format, see http://www.perfparse.de/tiki-view_faq.php?faqId=6 and http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN185 my $short_report = $report->text(qw/seconds/) . " | $perf_data"; my $long_report = join("", map { "$_: $report->{$_}\n" } qw/banner/ ); if( scalar @critical ) { my $crit_alerts = join(", ", @critical); print "SMTP SEND CRITICAL - $crit_alerts; $short_report\n"; print $long_report if $verbose; exit $status{CRITICAL}; } if( scalar @warning ) { my $warn_alerts = join(", ", @warning); print "SMTP SEND WARNING - $warn_alerts; $short_report\n"; print $long_report if $verbose; exit $status{WARNING}; } print "SMTP SEND OK - $short_report\n"; print $long_report if $verbose; exit $status{OK}; # utility to load required modules. exits if unable to load one or more of the modules. sub load_modules { my @missing_modules = (); foreach( @_ ) { eval "require $_"; push @missing_modules, $_ if $@; } if( @missing_modules ) { print "Missing perl modules: @missing_modules\n"; return 0; } return 1; } # utility to extract error codes out of Net::SMTP::TLS croak messages sub get_tls_error { my ($errormsg) = @_; $errormsg =~ m/: (\d+) (.+)/; my $code = $1; return $code; } # looks for a specific header in a list of headers; returns true if found sub find_header { my ($name, @list) = @_; return scalar grep { m/^$name: /i } @list; } # RFC 2822 date header sub default_date_header { return strftime "Date: %a, %e %b %Y %H:%M:%S %z (%Z)", gmtime; } # RFC 2822 message id header sub default_messageid_header { my $random = randomstring(16,qw/0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z/); my $hostname = `hostname`; chomp $hostname; return "Message-ID: <".time.".".$random.".checksmtpsend@".$hostname.">"; } # returns a random string of specified length using characters from specified set sub randomstring { my ($length,@set) = @_; my $size = scalar @set; my $string = ""; while($length--) { $string .= $set[int(rand($size))]; } return $string; } # replaces all newlines in the input string with spaces sub oneline { my ($input) = @_; $input =~ s/[\r\n]+/ /g; return $input; } # NAME # PluginReport # SYNOPSIS # $report = new PluginReport; # $report->{label1} = "value1"; # $report->{label2} = "value2"; # print $report->text(qw/label1 label2/); package PluginReport; sub new { my ($proto,%p) = @_; my $class = ref($proto) || $proto; my $self = bless {}, $class; $self->{$_} = $p{$_} foreach keys %p; return $self; } sub text { my ($self,@labels) = @_; my @report = map { "$self->{$_} $_" } grep { defined $self->{$_} } @labels; my $text = join(", ", @report); return $text; } package SmtpMessageTemplate; sub trim { my ($text) = @_; $text =~ s/^\s*//; $text =~ s/\s*$//; return $text; } # NAME # TLS_auth # SYNOPSYS # # Based on contribution by Brad Guillory package TLS_auth; #use Net::SMTP::TLS; our @ISA = qw(Net::SMTP::TLS); use Carp; sub new { my ($proto,$server,%p) = @_; my $class = ref($proto) || $proto; #my $self = bless {}, $class; no strict 'refs'; no warnings 'once'; *Net::SMTP::TLS::login = *TLS_auth::login; # override parent's login with ours so when it's called in the constructor, our overriden version will be used my $self = Net::SMTP::TLS->new($server,%p); return $self; } sub login { my ($self) = @_; my $type = $self->{features}->{AUTH}; if(not $type){ die "Server did not return AUTH in capabilities\n"; # croak } # print "Feature: $type\nAuth Method: $self->{Auth_Method}\n"; if($type =~ /CRAM\-MD5/ and $self->{Auth_Method} =~ /CRAM\-MD5/i){ $self->auth_MD5(); }elsif($type =~ /LOGIN/ and $self->{Auth_Method} =~ /LOGIN/i){ $self->auth_LOGIN(); }elsif($type =~ /PLAIN/ and $self->{Auth_Method} =~ /PLAIN/i){ #print "Calling auth_PLAIN\n"; $self->auth_PLAIN(); }else{ die "Unsupported Authentication mechanism: $self->{Auth_Method}\n"; # croak } } package main; 1; ././@LongLink0000644000000000000000000000015012262515411011635 Lustar rootrootnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/check_email_deliverynagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/check_email_deliv0000644000000000000000000011612412262515026030024 0ustar #!/usr/bin/perl use strict; my $VERSION = '0.7.1'; my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff '; my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt'; my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 ); # look for required modules exit $status{UNKNOWN} unless load_modules(qw/Getopt::Long/); BEGIN { if( grep { /^--hires$/ } @ARGV ) { eval "use Time::HiRes qw(time);"; warn "Time::HiRes not installed\n" if $@; } } # get options from command line Getopt::Long::Configure("bundling"); my $verbose = 0; my $help = ""; my $help_usage = ""; my $show_version = ""; my $host = ""; my $smtp_server = ""; my $smtp_port = ""; my $imap_server = ""; my $smtp_username = ""; my $smtp_password = ""; my $smtp_tls = ""; my $imap_port = ""; my $imap_username = ""; my $imap_password = ""; my $imap_mailbox = ""; my $username = ""; my $password = ""; my $ssl = ""; my $imap_ssl = ""; my $mailto = ""; my $mailfrom = ""; my @header = (); my $body = ""; my $warnstr = ""; my $critstr = ""; my $waitstr = ""; my $delay_warn = 95; my $delay_crit = 300; my $smtp_warn = 15; my $smtp_crit = 30; my $imap_warn = 15; my $imap_crit = 30; my $timeout = ""; my @alert_plugins = (); my $imap_interval = 5; my $imap_retries = 5; my @plugins = (); my @token_formats = (); my $tokenfile = ""; my $default_crit = 30; my $default_warn = 15; my $default_wait = 5; my $default_timeout = 60; my $time_hires = ""; my $libexec = "/usr/local/nagios/libexec"; my $ok; $ok = Getopt::Long::GetOptions( "V|version"=>\$show_version, "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage, "w|warning=s"=>\$warnstr,"c|critical=s"=>\$critstr, "t|timeout=s"=>\$timeout, "libexec=s"=>\$libexec, # plugin settings "p|plugin=s"=>\@plugins, "T|token=s"=>\@token_formats, "A|alert=i"=>\@alert_plugins, "F|file=s"=>\$tokenfile, # common settings "H|hostname=s"=>\$host, "U|username=s"=>\$username,"P|password=s"=>\$password, "ssl!"=>\$ssl, # smtp settings "smtp-server=s"=>\$smtp_server,"smtp-port=i"=>\$smtp_port, "mailto=s"=>\$mailto, "mailfrom=s",\$mailfrom, "header=s"=>\@header, "body=s"=>\$body, # smtp-tls settings "smtptls!"=>\$smtp_tls, "smtp-username=s"=>\$smtp_username,"smtp-password=s"=>\$smtp_password, # delay settings "wait=s"=>\$waitstr, # imap settings "imap-server=s"=>\$imap_server,"imap-port=i"=>\$imap_port, "imap-username=s"=>\$imap_username,"imap-password=s"=>\$imap_password, "imap-mailbox=s"=>\$imap_mailbox, "imap-check-interval=i"=>\$imap_interval,"imap-retries=i"=>\$imap_retries, "imapssl!"=>\$imap_ssl, # Time "hires"=>\$time_hires, ); if( $show_version ) { print "$VERSION\n"; if( $verbose ) { print "Warning threshold: $delay_warn seconds\n"; print "Critical threshold: $delay_crit seconds\n"; print "Default wait: $default_wait seconds\n"; print "Default timeout: $default_timeout seconds\n"; } exit $status{UNKNOWN}; } if( $help ) { exec "perldoc", $0 or print "Try `perldoc $0`\n"; exit $status{UNKNOWN}; } if( $host ) { $smtp_server = $host if $smtp_server eq ""; $imap_server = $host if $imap_server eq ""; } if( $username ) { $smtp_username = $username if $smtp_username eq ""; $imap_username = $username if $imap_username eq ""; } if( $password ) { $smtp_password = $password if $smtp_password eq ""; $imap_password = $password if $imap_password eq ""; } if( $ssl ) { $imap_ssl = $ssl if $imap_ssl eq ""; $smtp_tls = $ssl if $smtp_tls eq ""; } if( $help_usage || ( scalar(@plugins) == 0 && ( $smtp_server eq "" || $mailto eq "" || $mailfrom eq "" || $imap_server eq "" || $username eq "" || $password eq "" ) ) ) { print "Usage 1: $0 -H host \n\t". "--mailto recipient\@your.net --mailfrom sender\@your.net --body 'message' \n\t". "--username username --password password \n\t". "[-w ] [-c ]\n\t" . "[--imap-check-interval ] [--imap-retries ]\n"; print "Usage 2: $0 \n\t". "-p 'first plugin command with %TOKEN1% embedded' \n\t". "-p 'second plugin command with %TOKEN1% embedded' \n\t". "[-w ,] [-c ,] \n"; exit $status{UNKNOWN}; } # determine thresholds my @warning_times = split(",", $warnstr); my @critical_times = split(",", $critstr); my @alarm_times = split(",", $timeout); my @wait_times = split(",", $waitstr); my ($dw,$sw,$rw) = split(",", $warnstr); my ($dc,$sc,$rc) = split(",", $critstr); my ($wait) = split(",", $waitstr); $delay_warn = $dw if defined $dw and $dw ne ""; $smtp_warn = $sw if defined $sw and $sw ne ""; $imap_warn = $rw if defined $rw and $rw ne ""; $delay_crit = $dc if defined $dc and $dc ne ""; $smtp_crit = $sc if defined $sc and $sc ne ""; $imap_crit = $rc if defined $rc and $rc ne ""; my $smtp_thresholds = ""; $smtp_thresholds .= "-w $smtp_warn " if defined $smtp_warn and $smtp_warn ne ""; $smtp_thresholds .= "-c $smtp_crit " if defined $smtp_crit and $smtp_crit ne ""; my $imap_thresholds = ""; $imap_thresholds .= "-w $imap_warn " if defined $imap_warn and $imap_warn ne ""; $imap_thresholds .= "-c $imap_crit " if defined $imap_crit and $imap_crit ne ""; $imap_thresholds .= "--imap-check-interval $imap_interval " if defined $imap_interval and $imap_interval ne ""; $imap_thresholds .= "--imap-retries $imap_retries " if defined $imap_retries and $imap_retries ne ""; if( scalar(@alarm_times) == 1 ) { $default_timeout = shift(@alarm_times); } # determine which other options to include my $smtp_options = ""; $smtp_options .= "-H $smtp_server " if defined $smtp_server and $smtp_server ne ""; $smtp_options .= "-p $smtp_port " if defined $smtp_port and $smtp_port ne ""; $smtp_options .= "--tls " if defined $smtp_tls and $smtp_tls; $smtp_options .= "-U ".shellquote($smtp_username)." " if defined $smtp_username and $smtp_username ne ""; $smtp_options .= "-P ".shellquote($smtp_password)." " if defined $smtp_password and $smtp_password ne ""; $smtp_options .= "--mailto ".shellquote($mailto)." " if defined $mailto and $mailto ne ""; $smtp_options .= "--mailfrom ".shellquote($mailfrom)." " if defined $mailfrom and $mailfrom ne ""; foreach my $h( @header ) { $smtp_options .= "--header ".shellquote($h)." "; } my $imap_options = ""; $imap_options .= "-H $imap_server " if defined $imap_server and $imap_server ne ""; $imap_options .= "-p $imap_port " if defined $imap_port and $imap_port ne ""; $imap_options .= "-U ".shellquote($imap_username)." " if defined $imap_username and $imap_username ne ""; $imap_options .= "-P ".shellquote($imap_password)." " if defined $imap_password and $imap_password ne ""; $imap_options .= "--mailbox ".shellquote($imap_mailbox)." " if defined $imap_mailbox and $imap_mailbox ne ""; $imap_options .= "--ssl " if defined $imap_ssl and $imap_ssl; # create the report object my $report = new PluginReport; my @report_plugins = (); # populated later with either (smtp,imap) or (plugin1,plugin2,...) my $time_start; # initialized later with time the work actually starts # create token formats for use with the plugins my @alpha = qw/a b c d e f g h i j k l m n o p q r s t u v w x y z/; my @numeric = qw/0 1 2 3 4 5 6 7 8 9/; my @hex = qw/0 1 2 3 4 5 6 7 8 9 a b c d e f/; my @pgp_even = qw/aardvark absurd accrue acme adrift adult afflict ahead aimless Algol allow alone ammo ancient apple artist assume Athens atlas Aztec baboon backfield backward banjo beaming bedlamp beehive beeswax befriend Belfast berserk billiard bison blackjack blockade blowtorch bluebird bombast bookshelf brackish breadline breakup brickyard briefcase Burbank button buzzard cement chairlift chatter checkup chisel choking chopper Christmas clamshell classic classroom cleanup clockwork cobra commence concert cowbell crackdown cranky crowfoot crucial crumpled crusade cubic dashboard deadbolt deckhand dogsled dragnet drainage dreadful drifter dropper drumbeat drunken Dupont dwelling eating edict egghead eightball endorse endow enlist erase escape exceed eyeglass eyetooth facial fallout flagpole flatfoot flytrap fracture framework freedom frighten gazelle Geiger glitter glucose goggles goldfish gremlin guidance hamlet highchair hockey indoors indulge inverse involve island jawbone keyboard kickoff kiwi klaxon locale lockup merit minnow miser Mohawk mural music necklace Neptune newborn nightbird Oakland obtuse offload optic orca payday peachy pheasant physique playhouse Pluto preclude prefer preshrunk printer prowler pupil puppy python quadrant quiver quota ragtime ratchet rebirth reform regain reindeer rematch repay retouch revenge reward rhythm ribcage ringbolt robust rocker ruffled sailboat sawdust scallion scenic scorecard Scotland seabird select sentence shadow shamrock showgirl skullcap skydive slingshot slowdown snapline snapshot snowcap snowslide solo southward soybean spaniel spearhead spellbind spheroid spigot spindle spyglass stagehand stagnate stairway standard stapler steamship sterling stockman stopwatch stormy sugar surmount suspense sweatband swelter tactics talon tapeworm tempest tiger tissue tonic topmost tracker transit trauma treadmill Trojan trouble tumor tunnel tycoon uncut unearth unwind uproot upset upshot vapor village virus Vulcan waffle wallet watchword wayside willow woodlark Zulu/; my @pgp_odd = qw/adroitness adviser aftermath aggregate alkali almighty amulet amusement antenna applicant Apollo armistice article asteroid Atlantic atmosphere autopsy Babylon backwater barbecue belowground bifocals bodyguard bookseller borderline bottomless Bradbury bravado Brazilian breakaway Burlington businessman butterfat Camelot candidate cannonball Capricorn caravan caretaker celebrate cellulose certify chambermaid Cherokee Chicago clergyman coherence combustion commando company component concurrent confidence conformist congregate consensus consulting corporate corrosion councilman crossover crucifix cumbersome customer Dakota decadence December decimal designing detector detergent determine dictator dinosaur direction disable disbelief disruptive distortion document embezzle enchanting enrollment enterprise equation equipment escapade Eskimo everyday examine existence exodus fascinate filament finicky forever fortitude frequency gadgetry Galveston getaway glossary gossamer graduate gravity guitarist hamburger Hamilton handiwork hazardous headwaters hemisphere hesitate hideaway holiness hurricane hydraulic impartial impetus inception indigo inertia infancy inferno informant insincere insurgent integrate intention inventive Istanbul Jamaica Jupiter leprosy letterhead liberty maritime matchmaker maverick Medusa megaton microscope microwave midsummer millionaire miracle misnomer molasses molecule Montana monument mosquito narrative nebula newsletter Norwegian October Ohio onlooker opulent Orlando outfielder Pacific pandemic Pandora paperweight paragon paragraph paramount passenger pedigree Pegasus penetrate perceptive performance pharmacy phonetic photograph pioneer pocketful politeness positive potato processor provincial proximate puberty publisher pyramid quantity racketeer rebellion recipe recover repellent replica reproduce resistor responsive retraction retrieval retrospect revenue revival revolver sandalwood sardonic Saturday savagery scavenger sensation sociable souvenir specialist speculate stethoscope stupendous supportive surrender suspicious sympathy tambourine telephone therapist tobacco tolerance tomorrow torpedo tradition travesty trombonist truncated typewriter ultimate undaunted underfoot unicorn unify universe unravel upcoming vacancy vagabond vertigo Virginia visitor vocalist voyager warranty Waterloo whimsical Wichita Wilmington Wyoming yesteryear Yucatan/; my %formats = ( 'a' => sub { pick_random(@alpha) }, 'n' => sub { pick_random(@numeric) }, 'c' => sub { pick_random(@alpha,@numeric) }, 'h' => sub { pick_random(@hex) }, 'U' => sub { time }, 'X' => sub { pick_random(@pgp_even) }, 'Y' => sub { pick_random(@pgp_odd) }, ); if( scalar(@plugins) ) { # scan the plugin commands for use of tokens to count how many we need my $token_count = 0; foreach my $p (@plugins) { my @matches = sort ($p =~ m/%TOKEN(\d+)%/g); my $max = pop @matches; $token_count = $max if defined($max) && $max > $token_count; } # create the tokens my @tokens = (); foreach my $t (1..$token_count) { my $format = shift @token_formats; $format = "U-X-Y" unless $format; my @format_characters = split(//, $format); my $token = ""; foreach my $c (@format_characters) { if( defined $formats{$c} ) { $token .= &{$formats{$c}}; } else { $token .= $c; } } push @tokens, $token; } # substitute the tokens into each plugin command foreach my $p (@plugins) { foreach my $t (1..$token_count) { my $token = $tokens[$t-1]; $p =~ s/%TOKEN$t%/$token/g; } } # mark plugins that are allowed to generate alerts. default behavior is to alert for all plugins. my %alert_plugins = (); if( scalar(@alert_plugins) > 0 ) { %alert_plugins = map { $_ => 1 } @alert_plugins; } else { %alert_plugins = map { $_ => 1 } (1..scalar(@plugins)); } # run each plugin and store its output in a report $time_start = time; my $i = 0; foreach my $p( @plugins ) { $i++; my $plugin_timeout = shift(@alarm_times) || $default_timeout; # run the plugin eval { local $SIG{ALRM} = sub { die "exceeded timeout $plugin_timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm` alarm $plugin_timeout; my $output = `$p`; chomp $output; if( $output !~ m/OK|WARNING|CRITICAL/ ) { print "EMAIL DELIVERY UNKNOWN - plugin $i error: $output\n"; print "Plugin $i: $p\n" if $verbose; # record tokens in a file if option is enabled record_tokens($tokenfile,\@tokens,$time_start,undef,'UNKNOWN',$i,$output) if $tokenfile; exit $status{UNKNOWN}; } if( $output =~ m/CRITICAL/ && $alert_plugins{$i} ) { print "EMAIL DELIVERY CRITICAL - plugin $i failed: $output\n"; print "Plugin $i: $p" if $verbose; # record tokens in a file if option is enabled record_tokens($tokenfile,\@tokens,$time_start,undef,'CRITICAL',$i,$output) if $tokenfile; exit $status{CRITICAL}; } if( $output =~ m/WARNING/ && $alert_plugins{$i} ) { print "EMAIL DELIVERY WARNING - plugin $i warning: $output\n"; print "Plugin $i: $p\n" if $verbose; # record tokens in a file if option is enabled record_tokens($tokenfile,\@tokens,$time_start,undef,'WARNING',$i,$output) if $tokenfile; exit $status{WARNING}; } $report->{"plugin".$i} = $output; alarm 0; }; if( $@ && $alert_plugins{$i} ) { print "EMAIL DELIVERY CRITICAL - Could not run plugin $i: $@\n"; print "Plugin $i: $p\n" if $verbose; exit $status{CRITICAL}; } # if this wasn't the last plugin, wait before continuing if( $i < scalar(@plugins) ) { my $wait = shift(@wait_times) || $default_wait; sleep $wait; } # compatibility with the "not using plugins" method... pretend to calculate the total round trip time (the delay) using data from the plugins ... $report->{max} = 0; $report->{delay} = 0; } # register the list of reports foreach my $r ( 1..scalar(@plugins)) { push @report_plugins, "plugin".$r; } # record tokens in a file if option is enabled my $tmp_long_report = join(", ", map { "$_: $report->{$_}" } @report_plugins ) if $tokenfile; record_tokens($tokenfile,\@tokens,$time_start,time,'OK',scalar(@plugins),$tmp_long_report) if $tokenfile; } else { # not using plugins. $time_start = time; # send email via SMTP my $id = $time_start; # XXX should include localhost name maybe or some random number in case the same mailbox is used for multiple delivery tests my $smtp_plugin = "$libexec/check_smtp_send"; $smtp_plugin = "$libexec/check_smtp_send.pl" unless -e $smtp_plugin; my $smtp_timeout = shift(@alarm_times) || $default_timeout; eval { local $SIG{ALRM} = sub { die "exceeded timeout $smtp_timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm` alarm $smtp_timeout; my $smtp = `$smtp_plugin $smtp_options --header 'Subject: Nagios Message SMTP $smtp_server ID $id.' --body 'Nagios Email Delivery Plugin\n$body' $smtp_thresholds`; if( $smtp !~ m/OK|WARNING|CRITICAL/ ) { print "EMAIL DELIVERY UNKNOWN - smtp unknown: $smtp\n"; exit $status{UNKNOWN}; } if( $smtp =~ m/CRITICAL/ ) { print "EMAIL DELIVERY CRITICAL - smtp failed: $smtp\n"; exit $status{CRITICAL}; } chomp $smtp; $report->{smtp} = $smtp; alarm 0; }; if( $@ ) { print "EMAIL DELIVERY CRITICAL - Could not connect to SMTP server $smtp_server: $@\n"; exit $status{CRITICAL}; } # wait before checking the delivery $wait = shift(@wait_times) || $default_wait; sleep $wait; # check email via IMAP my $imap_plugin = "$libexec/check_imap_receive"; $imap_plugin = "$libexec/check_imap_receive.pl" unless -e $imap_plugin; my $imap_timeout = shift(@alarm_times) || $default_timeout; eval { local $SIG{ALRM} = sub { die "exceeded timeout $imap_timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm` alarm $imap_timeout; my $imap = `$imap_plugin $imap_options -s SUBJECT -s 'Nagios Message SMTP $smtp_server ID' --capture-max 'Nagios Message SMTP $smtp_server ID (\\d+)' --nodelete-captured $imap_thresholds`; if( $imap !~ m/OK|WARNING|CRITICAL/ ) { print "EMAIL DELIVERY UNKNOWN - imap unknown: $imap\n"; exit $status{UNKNOWN}; } if( $imap =~ m/CRITICAL/ ) { print "EMAIL DELIVERY CRITICAL - imap failed: $imap\n"; exit $status{CRITICAL}; } if( $imap =~ m/ (\d+) max/ ) { my $last_received = $1; $report->{max} = $1; my $delay = time - $last_received; $report->{delay} = $delay; } chomp $imap; $report->{imap} = $imap; alarm 0; }; if( $@ ) { print "EMAIL DELIVERY CRITICAL - Could not connect to IMAP server $imap_server: $@\n"; exit $status{CRITICAL}; } # register the list of reports push @report_plugins, ("smtp","imap"); } # calculate elapsed time and issue warnings my $time_end = time; my $elapsedtime = $time_end - $time_start; $report->{seconds} = $elapsedtime; my @warning = (); my @critical = (); push @warning, "most recent received $report->{delay} seconds ago" if( defined($report->{delay}) && $report->{delay} > $delay_warn ); push @critical, "most recent received $report->{delay} seconds ago" if( defined($report->{delay}) && $report->{delay} > $delay_crit ); push @warning, "no emails found" if( !defined($report->{delay}) ); # print report and exit with known status my $perf_data = "delay=".$report->{delay}."s;$delay_warn;$delay_crit;0 elapsed=".$report->{seconds}."s"; # TODO: need a component for safely generating valid perf data format. for notes on the format, see http://www.perfparse.de/tiki-view_faq.php?faqId=6 my $short_report = $report->text(qw/seconds delay/) . " | $perf_data"; my $long_report = join("", map { "$_: $report->{$_}\n" } @report_plugins ); if( scalar @critical ) { my $alerts = join(", ", @critical); print "EMAIL DELIVERY CRITICAL - $alerts; $short_report\n"; print $long_report if $verbose; exit $status{CRITICAL}; } if( scalar @warning ) { my $alerts = join(", ", @warning); print "EMAIL DELIVERY WARNING - $alerts; $short_report\n"; print $long_report if $verbose; exit $status{WARNING}; } print "EMAIL DELIVERY OK - $short_report\n"; print $long_report if $verbose; exit $status{OK}; # utility to load required modules. exits if unable to load one or more of the modules. sub load_modules { my @missing_modules = (); foreach( @_ ) { eval "require $_"; push @missing_modules, $_ if $@; } if( @missing_modules ) { print "Missing perl modules: @missing_modules\n"; return 0; } return 1; } # returns one random character from a set of characters sub pick_random { my @set = @_; my $size = scalar @set; my $string = $set[int(rand($size))]; return $string; } # appens tokens and times to a tab-separated value file sub record_tokens { my ($tokenfile,$tokens,$time_start,$time_end,$status,$plugin_num,$output) = @_; if( $tokenfile ) { my @tokens = @$tokens; $time_end = "" unless defined $time_end; $status = "" unless defined $status; $plugin_num = "" unless defined $plugin_num; $output = "" unless defined $output; print "saving ".scalar(@tokens)." tokens into $tokenfile\n" if $verbose; open(TOKENFILE,">>$tokenfile"); foreach(@tokens) { print TOKENFILE "$_\t$time_start\t$time_end\t$status\t$plugin_num\t$output\n"; } close(TOKENFILE); } } # wraps argument in single-quotes and escapes any single-quotes in the argument sub shellquote { my $str = shift || ""; $str =~ s/\'/\'\\\'\'/g; return "'$str'"; } # NAME # PluginReport # SYNOPSIS # $report = new PluginReport; # $report->{label1} = "value1"; # $report->{label2} = "value2"; # print $report->text(qw/label1 label2/); package PluginReport; sub new { my ($proto,%p) = @_; my $class = ref($proto) || $proto; my $self = bless {}, $class; $self->{$_} = $p{$_} foreach keys %p; return $self; } sub text { my ($self,@labels) = @_; my @report = map { "$self->{$_} $_" } grep { defined $self->{$_} } @labels; my $text = join(", ", @report); return $text; } package main; 1; __END__ =pod =head1 NAME check_email_delivery - sends email and verifies delivery =head1 SYNOPSIS check_email_delivery -vV check_email_delivery --usage check_email_delivery --help =head1 OPTIONS =over =item --warning [,,] Exit with WARNING if the most recent email found is older than . The optional and parameters will be passed on to the included plugins that are used for those tasks. If they are not given then they will not be passed on and the default for that plugin will apply. Also known as: -w [,[,]] When using the --plugin option, only one parameter is supported (-w ) and it will apply to the entire process. You can specify a warning threshold specific to each plugin in the plugin command line. When using the --plugin option, no measuring of "most recent email" is done because we would not know how to read this information from receive plugins. This may be addressed in future versions. =item --critical [,,] Exit with CRITICAL if the most recent email found is older than . The optional and parameters will be passed on to the included plugins that are used for those tasks. If they are not given then they will not be passed on and the default for that plugin will apply. Also known as: -c [,[,]] When using the --plugin option, only one parameter is supported (-c ) and it will apply to the entire process. You can specify a critical threshold specific to each plugin in the plugin command line. When using the --plugin option, no measuring of "most recent email" is done because we would not know how to read this information from receive plugins. This may be addressed in future versions. =item --timeout =item --timeout , =item --timeout ,,... Exit with CRITICAL if the plugins do not return a status within the specified number of seconds. When only one parameter is used, it applies to each plugin. When multiple parameters are used (separated by commas) they apply to plugins in the same order the plugins were specified on the command line. When using --timeout but not the --plugin option, the first parameter is for check_smtp_send and the second is for check_imap_receive. =item --alert Exit with WARNING or CRITICAL only if a warning or error (--warning, --critical, or --timeout) occurs for specified plugins. If a warning or error occurs for non-specified plugins that run BEFORE the specified plugins, the exit status will be UNKNOWN. If a warning of error occurs for non-specified plugins that run AFTER the specified plugins, the exit status will not be affected. You would use this option if you are using check_email_delivery with the --plugin option and the plugins you configure each use different servers, for example different SMTP and IMAP servers. By default, if you do not use the --alert option, if anything goes wrong during the email delivery check, a WARNING or CRITICAL alert will be issued. This means that if you define check_email_delivery for the SMTP server only and the IMAP server fails, Nagios will alert you for the SMTP server which would be misleading. If you define it for both the SMTP server and IMAP server and just one of them fails, Nagios will alert you for both servers, which would still be misleading. If you have this situation, you may want to use the --alert option. You define the check_email_delivery check for both servers: for the SMTP server (first plugin) you use --alert 1, and for for the IMAP server (second plugin) you use --alert 2. When check_email_delivery runs with --alert 1 and the SMTP server fails, you will get the appropriate alert. If the IMAP server fails it will not affect the status. When check_email_delivery runs with --alert 2 and the SMTP server fails, you will get the UNKNOWN return code. If the IMAP server generates an alert you will get a WARNING or CRITICAL as appropriate. You can repeat this option to specify multiple plugins that should cause an alert. Do this if you have multiple plugins on the command line but some of them involve the same server. See also: --plugin. Also known as: -A =item --wait [,,...] How long to wait between sending the message and checking that it was received. View default with the -vV option. When using the --plugin option, you can specify as many wait-between times as you have plugins (minus the last plugin, because it makes no sense to wait after running the last one). For example, if you use the --plugin option twice to specify an SMTP plugin and an IMAP plugin, and you want to wait 5 seconds between sending and receiving, then you would specify --wait 5. A second example, if you are using the --plugin option three times, then specifying -w 5 will wait 5 seconds between the second and third plugins also. You can specify a different wait time of 10 seconds between the second and third plugins, like this: -w 5,10. =item --hostname Address or name of the SMTP and IMAP server. Examples: mail.server.com, localhost, 192.168.1.100. Also known as: -H =item --smtp-server Address or name of the SMTP server. Examples: smtp.server.com, localhost, 192.168.1.100. Using this option overrides the hostname option. =item --smtp-port Service port on the SMTP server. Default is 25. =item --smtp-username =item --smtp-password Username and password to use when connecting to the SMTP server with the TLS option. Use these options if the SMTP account has a different username/password than the IMAP account you are testing. These options take precendence over the --username and the --password options. These are shell-escaped; special characters are ok. =item --imap-server Address or name of the IMAP server. Examples: imap.server.com, localhost, 192.168.1.100. Using this option overrides the hostname option. =item --imap-port Service port on the IMAP server. Default is 143. If you use SSL the default is 993. =item --imap-username =item --imap-password Username and password to use when connecting to the IMAP server. Use these options if the IMAP account has a different username/password than the SMTP account you are testing. These options take precendence over the --username and the --password options. These are shell-escaped; special characters are ok. =item --username =item --password Username and password to use when connecting to IMAP server. Also known as: -U -P Also used as the username and password for SMTP when the TLS option is enabled. To specify a separate set of credentials for SMTP authentication, see the options --smtp-username and --smtp-password. =item --imap-check-interval How long to wait between polls of the imap-server for the specified mail. Default is 5 seconds. =item --imap-retries How many times to poll the imap-server for the mail, before we give up. Default is 10. =item --body Use this option to specify the body of the email message. =item --header
Use this option to set an arbitrary header in the message. You can use it multiple times. =item --mailto recipient@your.net You can send a message to multiple recipients by repeating this option or by separating the email addresses with commas (no whitespace allowed): $ check_email_delivery ... --mailto recipient@your.net,recipient2@your.net --mailfrom sender@your.net This argument is shell-escaped; special characters or angle brackets around the address are ok. =item --mailfrom sender@your.net Use this option to set the "from" address in the email. =item --imapssl =item --noimapssl Use this to enable or disable SSL for the IMAP plugin. This argument is shell-escaped; special characters or angle brackets around the address are ok. =item --smtptls =item --nosmtptls Use this to enable or disable TLS/AUTH for the SMTP plugin. =item --libexec Use this option to set the path of the Nagios libexec directory. The default is /usr/local/nagios/libexec. This is where this plugin looks for the SMTP and IMAP plugins that it depends on. =item --plugin This is a new option introduced in version 0.5 of the check_email_delivery plugin. It frees the plugin from depending on specific external plugins and generalizes the work done to determine that the email loop is operational. When using the --plugin option, the following options are ignored: libexec, imapssl, smtptls, hostname, username, password, smtp*, imap*, mailto, mailfrom, body, header, search. Use this option multiple times to specify the complete trip. Typically, you would use this twice to specify plugins for SMTP and IMAP, or SMTP and POP3. The output will be success if all the plugins return success. Each plugin should be a standard Nagios plugin. A random token will be automatically generated and passed to each plugin specified on the command line by substituting the string %TOKEN1%. Example usage: command_name check_email_delivery command_line check_email_delivery --plugin "$USER1$/check_smtp_send -H $ARG1$ --mailto recipient@your.net --mailfrom sender@your.net --header 'Subject: Nagios Test %TOKEN1%.'" --plugin "$USER1$/check_imap_receive -H $ARG1$ -U $ARG1$ -P $ARG2$ -s SUBJECT -s 'Nagios Test %TOKEN1%.'" This technique allows for a lot of flexibility in configuring the plugins that test each part of your email delivery loop. See also: --token. Also known as: -p =item --token This is a new option introduced in version 0.5 of the check_email_delivery plugin. It can be used in conjunction with --plugin to control the tokens that are generated and passed to the plugins, like %TOKEN1%. Use this option multiple times to specify formats for different tokens. For example, if you want %TOKEN1% to consist of only alphabetical characters but want %TOKEN2% to consist of only digits, then you might use these options: --token aaaaaa --token nnnnn Any tokens used in your plugin commands that have not been specified by --token will default to --token U-X-Y Token formats: a - alpha character (a-z) n - numeric character (0-9) c - alphanumeric character (a-z0-9) h - hexadecimal character (0-9a-f) U - unix time, seconds from epoch. eg 1193012441 X - a word from the pgp even list. eg aardvark Y - a word from the pgp odd list. eg adroitness Caution: It has been observed that some IMAP servers do not handle underscores well in the search criteria. For best results, avoid using underscores in your tokens. Use hyphens or commas instead. See also: --plugin. Also known as: -T The PGP word list was obtained from http://en.wikipedia.org/wiki/PGP_word_list =item --file Save (append) status information into the given tab-delimited file. Format used: token start-time end-time status plugin-num output Note: format may change in future versions and may become configurable. This option available as of version 0.6.2. Also known as: -F =item --hires Use the Time::HiRes module to measure time, if available. =item --verbose Display additional information. Useful for troubleshooting. Use together with --version to see the default warning and critical timeout values. Also known as: -v =item --version Display plugin version and exit. Also known as: -V =item --help Display this documentation and exit. Does not work in the ePN version. Also known as: -h =item --usage Display a short usage instruction and exit. =back =head1 EXAMPLES =head2 Send a message with custom headers $ check_email_delivery -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net --username recipient --password secret EMAIL DELIVERY OK - 1 seconds =head2 Set warning and critical timeouts for receive plugin only: $ check_email_delivery -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net --username recipient --password secret -w ,,5 -c ,,15 EMAIL DELIVERY OK - 1 seconds =head1 EXIT CODES Complies with the Nagios plug-in specification: 0 OK The plugin was able to check the service and it appeared to be functioning properly 1 Warning The plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly 2 Critical The plugin detected that either the service was not running or it was above some "critical" threshold 3 Unknown Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service =head1 NAGIOS PLUGIN NOTES Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because the path to utils.pm must be specified completely in this program and forces users to edit the source code if their install location is different (if they realize this is the problem). You can view the default timeout for this module by using the --verbose and --version options together. The short form is -vV. Other than that, it attempts to follow published guidelines for Nagios plugins. =head1 CHANGES Wed Oct 29 13:08:00 PST 2005 + version 0.1 Wed Nov 9 17:16:09 PST 2005 + updated arguments to check_smtp_send and check_imap_receive + added eval/alarm block to implement -c option + added wait option to adjust sleep time between smtp and imap calls + added delay-warn and delay-crit options to adjust email delivery warning thresholds + now using an inline PluginReport package to generate the report + copyright notice and GNU GPL + version 0.2 Thu Apr 20 14:00:00 CET 2006 (by Johan Nilsson ) + version 0.2.1 + corrected bug in getoptions ($imap_server would never ever be set from command-line...) + will not make $smtp_server and $imap_server == $host if they're defined on commandline + added support for multiple polls of imap-server, with specified intervals + changed default behaviour in check_imap_server (searches for the specific id in subject and deletes mails found) + increased default delay_warn from 65 seconds to 95 seconds Thu Apr 20 16:00:00 PST 2006 (by Geoff Crompton ) + fixed a bug in getoptions + version 0.2.2 Tue Apr 24 21:17:53 PDT 2007 + now there is an alternate version (same but without embedded perl POD) that is compatible with the new new embedded-perl Nagios feature + version 0.2.3 Fri Apr 27 20:32:53 PDT 2007 + documentation now mentions every command-line option accepted by the plugin, including abbreviations + changed connection error to display timeout only if timeout was the error + default IMAP plugin is libexec/check_imap_receive (also checking for same but with .pl extension) + default SMTP plugin is libexec/check_smtp_send (also checking for same but with .pl extension) + removed default values for SMTP port and IMAP port to allow those plugins to set the defaults; so current behavior stays the same and will continue to make sense with SSL + version 0.3 Thu Oct 11 10:00:00 EET 2007 (by Timo Virtaneva + Changed the header and the search criteria so that the same email-box can be used for all smtp-servers + version 0.3.1 Sun Oct 21 11:01:03 PDT 2007 + added support for TLS options to the SMTP plugin + version 0.4 Sun Oct 21 16:17:14 PDT 2007 + added support for arbitrary plugins to send and receive mail (or anthing else!). see the --plugin option. + version 0.5 Tue Dec 4 07:36:20 PST 2007 + added --usage option because the official nagios plugins have both --help and --usage + added --timeout option to match the official nagios plugins + shortcut option for --token is now -T to avoid clash with standard shortcut -t for --timeout + fixed some minor pod formatting issues for perldoc + version 0.5.1 Sat Dec 15 07:39:59 PST 2007 + improved compatibility with Nagios embedded perl (ePN) + version 0.5.2 Thu Jan 17 20:27:36 PST 2008 (by Timo Virtaneva on Thu Oct 11 10:00:00 EET 2007) + Changed the header and the search criteria so that the same email-box can be used for all smtp-servers + version 0.5.3 Mon Jan 28 22:11:02 PST 2008 + fixed a bug, smtp-password and imap-password are now string parameters + added --alert option to allow selection of which plugin(s) should cause a WARNING or CRITICAL alert + version 0.6 Mon Feb 11 19:09:37 PST 2008 + fixed a bug for embedded perl version, variable "%status" will not stay shared in load_modules + version 0.6.1 Mon May 26 10:39:19 PDT 2008 + added --file option to allow plugin to record status information into a tab-delimited file + changed default token from U_X_Y to U-X-Y + version 0.6.2 Wed Jan 14 08:29:35 PST 2009 + fixed a bug that the --header parameter was not being passed to the smtp plugin. + version 0.6.3 Mon Jun 8 15:43:48 PDT 2009 + added performance data for use with PNP4Nagios! (thanks to Ben Ritcey for the patch) + version 0.6.4 Wed Sep 16 07:10:10 PDT 2009 + added elapsed time in seconds to performance data + version 0.6.5 Fri Oct 8 19:48:44 PDT 2010 + fixed uniform IMAP and SMTP username and password bug (thanks to Micle Moerenhout for pointing it out) + version 0.6.6 Mon Jan 3 08:24:23 PST 2011 + added shell escaping for smtp-username, smtp-password, mailto, mailfrom, imap-username, and imap-password arguments + version 0.7.0 Fri May 6 08:35:09 AST 2011 + added --hires option to enable use of Time::Hires if available + version 0.7.1 Sun Jun 12 17:17:06 AST 2011 + added --imap-mailbox option to pass through to check_imap_receive --mailbox option + added --ssl option to conveniently enable both --smtp-tls and --imap-ssl + version 0.7.2 =head1 AUTHOR Jonathan Buhacoff =head1 COPYRIGHT AND LICENSE Copyright (C) 2005-2011 Jonathan Buhacoff 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . http://www.gnu.org/licenses/gpl.txt =cut nagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/LICENSE.txt0000644000000000000000000010451312262515026026314 0ustar GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. 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 them 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 prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. 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. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey 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; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If 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 convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU 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 that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. 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. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 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. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. 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 state 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) 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program 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, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU 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 Lesser General Public License instead of this License. But first, please read . ././@LongLink0000644000000000000000000000015012262515411011635 Lustar rootrootnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/check_imap_quota_epnnagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/check_imap_quota_0000644000000000000000000001427012262515026030047 0ustar #!/usr/bin/perl use strict; my $VERSION = '0.2'; my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff '; my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt'; my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 ); #### IDEA AND INITIAL IMPLEMENTATION BASED ON CHECK_IMAP_RECEIVE WAS CONTRIBUTED BY JOHAN ROMME from THE NETHERLANDS 14 Oct 2011 # look for required modules exit $status{UNKNOWN} unless load_modules(qw/Getopt::Long Mail::IMAPClient/); BEGIN { if( grep { /^--hires$/ } @ARGV ) { eval "use Time::HiRes qw(time);"; warn "Time::HiRes not installed\n" if $@; } } # get options from command line Getopt::Long::Configure("bundling"); my $verbose = 0; my $help = ""; my $help_usage = ""; my $show_version = ""; my $imap_server = ""; my $default_imap_port = "143"; my $default_imap_ssl_port = "993"; my $imap_port = ""; my $username = ""; my $password = ""; my $mailbox = "INBOX"; my $warntime = 15; my $criticaltime = 30; my $timeout = 60; my $peek = ""; my $ssl = 0; my $tls = 0; my $time_hires = ""; my $ok; $ok = Getopt::Long::GetOptions( "V|version"=>\$show_version, "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage, "w|warning=i"=>\$warntime,"c|critical=i"=>\$criticaltime,"t|timeout=i"=>\$timeout, # imap settings "H|hostname=s"=>\$imap_server,"p|port=i"=>\$imap_port, "U|username=s"=>\$username,"P|password=s"=>\$password, "m|mailbox=s"=>\$mailbox, "ssl!"=>\$ssl, "tls!"=>\$tls, # search settings "peek!"=>\$peek, # Time "hires"=>\$time_hires, ); if( $show_version ) { print "$VERSION\n"; if( $verbose ) { print "Default warning threshold: $warntime seconds\n"; print "Default critical threshold: $criticaltime seconds\n"; print "Default timeout: $timeout seconds\n"; } exit $status{UNKNOWN}; } if( $help ) { exec "perldoc", $0 or print "Try `perldoc $0`\n"; exit $status{UNKNOWN}; } my @required_module = (); push @required_module, 'IO::Socket::SSL' if $ssl || $tls; exit $status{UNKNOWN} unless load_modules(@required_module); if( $help_usage || ( $imap_server eq "" || $username eq "" || $password eq "" ) ) { print "Usage: $0 -H host [-p port] -U username -P password [--imap-retries ]\n"; exit $status{UNKNOWN}; } # initialize my $report = new PluginReport; my $time_start = time; # connect to IMAP server print "connecting to server $imap_server\n" if $verbose > 2; my $imap; eval { local $SIG{ALRM} = sub { die "exceeded timeout $timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm` alarm $timeout; if( $ssl || $tls ) { $imap_port = $default_imap_ssl_port unless $imap_port; my $socket = IO::Socket::SSL->new("$imap_server:$imap_port"); die IO::Socket::SSL::errstr() unless $socket; $socket->autoflush(1); $imap = Mail::IMAPClient->new(Socket=>$socket, Debug => 0 ); $imap->State(Mail::IMAPClient->Connected); $imap->_read_line() if "$Mail::IMAPClient::VERSION" le "2.2.9"; # necessary to remove the server's "ready" line from the input buffer for old versions of Mail::IMAPClient. Using string comparison for the version check because the numeric didn't work on Darwin and for Mail::IMAPClient the next version is 2.3.0 and then 3.00 so string comparison works $imap->User($username); $imap->Password($password); $imap->login() or die "$@"; } else { $imap_port = $default_imap_port unless $imap_port; $imap = Mail::IMAPClient->new(Debug => 0 ); $imap->Server("$imap_server:$imap_port"); $imap->User($username); $imap->Password($password); $imap->connect() or die "$@"; } $imap->Peek(1) if $peek; $imap->Ignoresizeerrors(1); alarm 0; }; if( $@ ) { chomp $@; print "IMAP QUOTA CRITICAL - Could not connect to $imap_server port $imap_port: $@\n"; exit $status{CRITICAL}; } unless( $imap ) { print "IMAP QUOTA CRITICAL - Could not connect to $imap_server port $imap_port: $@\n"; exit $status{CRITICAL}; } my $time_connected = time; my $quotaUsed; my $quotaLimit; my $quotaPercentage; my $quotaPercentageWarning = 80; my $quotaPercentageCritical = 90; my $quotaMessage; # look for the quota limits my $tries = 0; my @msgs; eval { my $k; my @l = $imap->getquotaroot(); foreach $k (@l) { print "$k\n" if $verbose > 2; if ($k =~ /STORAGE +(\d+) +(\d+)/) { $quotaUsed = $1; $quotaLimit = $2; } } if (!length($quotaUsed) && !length($quotaLimit)) { print "no answer from imap host\n" if $verbose > 2; } elsif (!length($quotaUsed) || !length($quotaLimit) { print "incorrect answer from imap host\n"; $imap->close(); exit $status{UNKNOWN}; } else { $quotaPercentage = sprintf("%.1f", (100 * $quotaUsed) / $quotaLimit); $quotaMessage = "$quotaUsed $quotaLimit - $quotaPercentage%"; } }; if( $@ ) { chomp $@; print "IMAP QUOTA CRITICAL - Could not check quota at $imap_server port $imap_port: $@\n"; exit $status{CRITICAL}; } # disconnect from IMAP server print "disconnecting from server\n" if $verbose > 2; $imap->logout(); # calculate elapsed time and issue warnings my $time_end = time; my $elapsedtime = $time_end - $time_start; $report->{seconds} = $elapsedtime; # print report and exit with known status if($quotaPercentage >= $quotaPercentageCritical) { print "IMAP QUOTA CRITICAL - $quotaMessage\n"; exit $status{CRITICAL}; } if($quotaPercentage >= $quotaPercentageWarning) { print "IMAP QUOTA WARNING - $quotaMessage\n"; exit $status{WARNING}; } print "IMAP QUOTA OK - $quotaMessage\n"; exit $status{OK}; # utility to load required modules. exits if unable to load one or more of the modules. sub load_modules { my @missing_modules = (); foreach( @_ ) { eval "require $_"; push @missing_modules, $_ if $@; } if( @missing_modules ) { print "Missing perl modules: @missing_modules\n"; return 0; } return 1; } # NAME # PluginReport # SYNOPSIS # $report = new PluginReport; # $report->{label1} = "value1"; # $report->{label2} = "value2"; # print $report->text(qw/label1 label2/); package PluginReport; sub new { my ($proto,%p) = @_; my $class = ref($proto) || $proto; my $self = bless {}, $class; $self->{$_} = $p{$_} foreach keys %p; return $self; } sub text { my ($self,@labels) = @_; my @report = map { "$self->{$_} $_" } grep { defined $self->{$_} } @labels; my $text = join(", ", @report); return $text; } package main; 1; nagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/check_imap_quota0000644000000000000000000003014212262515026027704 0ustar #!/usr/bin/perl use strict; my $VERSION = '0.2'; my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff '; my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt'; my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 ); #### IDEA AND INITIAL IMPLEMENTATION BASED ON CHECK_IMAP_RECEIVE WAS CONTRIBUTED BY JOHAN ROMME from THE NETHERLANDS 14 Oct 2011 # look for required modules exit $status{UNKNOWN} unless load_modules(qw/Getopt::Long Mail::IMAPClient/); BEGIN { if( grep { /^--hires$/ } @ARGV ) { eval "use Time::HiRes qw(time);"; warn "Time::HiRes not installed\n" if $@; } } # get options from command line Getopt::Long::Configure("bundling"); my $verbose = 0; my $help = ""; my $help_usage = ""; my $show_version = ""; my $imap_server = ""; my $default_imap_port = "143"; my $default_imap_ssl_port = "993"; my $imap_port = ""; my $username = ""; my $password = ""; my $mailbox = "INBOX"; my $warntime = 15; my $criticaltime = 30; my $timeout = 60; my $peek = ""; my $ssl = 0; my $tls = 0; my $time_hires = ""; my $ok; $ok = Getopt::Long::GetOptions( "V|version"=>\$show_version, "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage, "w|warning=i"=>\$warntime,"c|critical=i"=>\$criticaltime,"t|timeout=i"=>\$timeout, # imap settings "H|hostname=s"=>\$imap_server,"p|port=i"=>\$imap_port, "U|username=s"=>\$username,"P|password=s"=>\$password, "m|mailbox=s"=>\$mailbox, "ssl!"=>\$ssl, "tls!"=>\$tls, # search settings "peek!"=>\$peek, # Time "hires"=>\$time_hires, ); if( $show_version ) { print "$VERSION\n"; if( $verbose ) { print "Default warning threshold: $warntime seconds\n"; print "Default critical threshold: $criticaltime seconds\n"; print "Default timeout: $timeout seconds\n"; } exit $status{UNKNOWN}; } if( $help ) { exec "perldoc", $0 or print "Try `perldoc $0`\n"; exit $status{UNKNOWN}; } my @required_module = (); push @required_module, 'IO::Socket::SSL' if $ssl || $tls; exit $status{UNKNOWN} unless load_modules(@required_module); if( $help_usage || ( $imap_server eq "" || $username eq "" || $password eq "" ) ) { print "Usage: $0 -H host [-p port] -U username -P password [--imap-retries ]\n"; exit $status{UNKNOWN}; } # initialize my $report = new PluginReport; my $time_start = time; # connect to IMAP server print "connecting to server $imap_server\n" if $verbose > 2; my $imap; eval { local $SIG{ALRM} = sub { die "exceeded timeout $timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm` alarm $timeout; if( $ssl || $tls ) { $imap_port = $default_imap_ssl_port unless $imap_port; my $socket = IO::Socket::SSL->new("$imap_server:$imap_port"); die IO::Socket::SSL::errstr() unless $socket; $socket->autoflush(1); $imap = Mail::IMAPClient->new(Socket=>$socket, Debug => 0 ); $imap->State(Mail::IMAPClient->Connected); $imap->_read_line() if "$Mail::IMAPClient::VERSION" le "2.2.9"; # necessary to remove the server's "ready" line from the input buffer for old versions of Mail::IMAPClient. Using string comparison for the version check because the numeric didn't work on Darwin and for Mail::IMAPClient the next version is 2.3.0 and then 3.00 so string comparison works $imap->User($username); $imap->Password($password); $imap->login() or die "$@"; } else { $imap_port = $default_imap_port unless $imap_port; $imap = Mail::IMAPClient->new(Debug => 0 ); $imap->Server("$imap_server:$imap_port"); $imap->User($username); $imap->Password($password); $imap->connect() or die "$@"; } $imap->Peek(1) if $peek; $imap->Ignoresizeerrors(1); alarm 0; }; if( $@ ) { chomp $@; print "IMAP QUOTA CRITICAL - Could not connect to $imap_server port $imap_port: $@\n"; exit $status{CRITICAL}; } unless( $imap ) { print "IMAP QUOTA CRITICAL - Could not connect to $imap_server port $imap_port: $@\n"; exit $status{CRITICAL}; } my $time_connected = time; my $quotaUsed; my $quotaLimit; my $quotaPercentage; my $quotaPercentageWarning = 80; my $quotaPercentageCritical = 90; my $quotaMessage; # look for the quota limits my $tries = 0; my @msgs; eval { my $k; my @l = $imap->getquotaroot(); foreach $k (@l) { print "$k\n" if $verbose > 2; if ($k =~ /STORAGE +(\d+) +(\d+)/) { $quotaUsed = $1; $quotaLimit = $2; } } if (!length($quotaUsed) && !length($quotaLimit)) { print "no answer from imap host\n" if $verbose > 2; } elsif (!length($quotaUsed) || !length($quotaLimit) { print "incorrect answer from imap host\n"; $imap->close(); exit $status{UNKNOWN}; } else { $quotaPercentage = sprintf("%.1f", (100 * $quotaUsed) / $quotaLimit); $quotaMessage = "$quotaUsed $quotaLimit - $quotaPercentage%"; } }; if( $@ ) { chomp $@; print "IMAP QUOTA CRITICAL - Could not check quota at $imap_server port $imap_port: $@\n"; exit $status{CRITICAL}; } # disconnect from IMAP server print "disconnecting from server\n" if $verbose > 2; $imap->logout(); # calculate elapsed time and issue warnings my $time_end = time; my $elapsedtime = $time_end - $time_start; $report->{seconds} = $elapsedtime; # print report and exit with known status if($quotaPercentage >= $quotaPercentageCritical) { print "IMAP QUOTA CRITICAL - $quotaMessage\n"; exit $status{CRITICAL}; } if($quotaPercentage >= $quotaPercentageWarning) { print "IMAP QUOTA WARNING - $quotaMessage\n"; exit $status{WARNING}; } print "IMAP QUOTA OK - $quotaMessage\n"; exit $status{OK}; # utility to load required modules. exits if unable to load one or more of the modules. sub load_modules { my @missing_modules = (); foreach( @_ ) { eval "require $_"; push @missing_modules, $_ if $@; } if( @missing_modules ) { print "Missing perl modules: @missing_modules\n"; return 0; } return 1; } # NAME # PluginReport # SYNOPSIS # $report = new PluginReport; # $report->{label1} = "value1"; # $report->{label2} = "value2"; # print $report->text(qw/label1 label2/); package PluginReport; sub new { my ($proto,%p) = @_; my $class = ref($proto) || $proto; my $self = bless {}, $class; $self->{$_} = $p{$_} foreach keys %p; return $self; } sub text { my ($self,@labels) = @_; my @report = map { "$self->{$_} $_" } grep { defined $self->{$_} } @labels; my $text = join(", ", @report); return $text; } package main; 1; __END__ =pod =head1 NAME check_imap_quota - connects to an IMAP account and checks the quota =head1 SYNOPSIS check_imap_quota -vV check_imap_quota -? check_imap_quota --help =head1 OPTIONS =over =item --warning Warn if it takes longer than to connect to the IMAP server. Default is 15 seconds. Also known as: -w =item --critical Return a critical status if it takes longer than to connect to the IMAP server. Default is 30 seconds. See also: --capture-critical Also known as: -c =item --timeout Abort with critical status if it takes longer than to connect to the IMAP server. Default is 60 seconds. The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer than 30 seconds. Also known as: -t =item --hostname Address or name of the IMAP server. Examples: mail.server.com, localhost, 192.168.1.100 Also known as: -H =item --port Service port on the IMAP server. Default is 143. If you use SSL, default is 993. Also known as: -p =item --username =item --password Username and password to use when connecting to IMAP server. Also known as: -U -P =item --mailbox Use this option to specify the mailbox to search for messages. Default is INBOX. Also known as: -m =item --ssl =item --nossl Enable SSL protocol. Requires IO::Socket::SSL. Using this option automatically changes the default port from 143 to 993. You can still override this from the command line using the --port option. Use the nossl option to turn off the ssl option. =item --hires Use the Time::HiRes module to measure time, if available. =item --verbose Display additional information. Useful for troubleshooting. Use together with --version to see the default warning and critical timeout values. If the selected mailbox was not found, you can use verbosity level 3 (-vvv) to display a list of all available mailboxes on the server. Also known as: -v =item --version Display plugin version and exit. Also known as: -V =item --help Display this documentation and exit. Does not work in the ePN version. Also known as: -h =item --usage Display a short usage instruction and exit. =back =head1 EXAMPLES =head2 Report how many emails are in the mailbox $ check_imap_receive -H mail.server.net --username mailuser --password mailpass -s ALL --nodelete IMAP RECEIVE OK - 1 seconds, 7 found =head2 Report the email with the highest value Suppose your mailbox has some emails from an automated script and that a message from this script typically looks like this (abbreviated): To: mailuser@server.net From: autoscript@server.net Subject: Results of Autoscript Date: Wed, 09 Nov 2005 08:30:40 -0800 Message-ID: Homeruns 5 And further suppose that you are interested in reporting the message that has the highest number of home runs, and also to leave this message in the mailbox for future checks, but remove the other matching messages with lesser values: $ check_imap_receive -H mail.server.net --username mailuser --password mailpass -s SUBJECT -s "Results of Autoscript" --capture-max "Homeruns (\d+)" --nodelete-captured IMAP RECEIVE OK - 1 seconds, 3 found, 1 captured, 5 max, 2 deleted =head2 Troubleshoot your search parameters Add the --nodelete and --imap-retries=1 parameters to your command line. =head1 EXIT CODES Complies with the Nagios plug-in specification: 0 OK The plugin was able to check the service and it appeared to be functioning properly 1 Warning The plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly 2 Critical The plugin detected that either the service was not running or it was above some "critical" threshold 3 Unknown Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service =head1 NAGIOS PLUGIN NOTES Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because the path to utils.pm must be specified completely in this program and forces users to edit the source code if their install location is different (if they realize this is the problem). You can view the default timeout for this module by using the --verbose and --version options together. The short form is -vV. Other than that, it attempts to follow published guidelines for Nagios plugins. =head1 SEE ALSO http://nagios.org/ http://search.cpan.org/~djkernen/Mail-IMAPClient-2.2.9/IMAPClient.pod http://search.cpan.org/~markov/Mail-IMAPClient-3.00/lib/Mail/IMAPClient.pod =head1 CHANGES Fri Nov 11 04:53:09 AST 2011 + version 0.1 created with quota code contributed by Johan Romme Tue Dec 20 17:38:04 PST 2011 + fixed bug where a quota of 0 was reported as an incorrect response from the server, thanks to Eike Arndt + version 0.2 =head1 AUTHOR Jonathan Buhacoff =head1 COPYRIGHT AND LICENSE Copyright (C) 2011 Jonathan Buhacoff 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . http://www.gnu.org/licenses/gpl.txt =cut nagios-plugins-contrib-9.20140106/check_email_delivery/check_email_delivery-0.7.1b/README.txt0000644000000000000000000000567612262515026026201 0ustar This file was updated on Sun Oct 21 21:32:12 PDT 2007. Developer guidelines: http://nagiosplug.sourceforge.net/developer-guidelines.html Nagios Plugins: http://nagiosplugins.org/ Nagios: http://nagios.org and http://nagiosplug.sourceforge.net Perl library: http://search.cpan.org/dist/Nagios-Plugin/lib/Nagios/Plugin.pm The email delivery plugin I wrote uses two other plugins (smtp send and imap receive), also included, to send a message to an email account and then check that account for the message and delete it. The plugin times how long it takes for the message to be delivered and the warning and critical thresholds are for this elapsed time. A few notes: 1. I tried to use the check_smtp plugin for sending mail. I can do it on the command line but I can't get the newlines to happen from the nagios config file (\n doesn't seem to work so smtp server waits for the '.' but doesn't get it like it does when I use single quote and newlines from the command line). So if you know how to get the check_smtp plugin to send a message from the nagios config, that one could be used instead of the check_smtp_send plugin included here (and please let me know) 2. I looked at check_mail.pl by bledi51 and its pretty good, and also conforms better to nagios perl plugin guidelnes than mine does. So I'm going to be revising my plugins to conform more. Finally, usage example from my own nagios config: define command{ command_name check_email_delivery command_line $USER1$/check_email_delivery -H $HOSTADDRESS$ --mailfrom $ARG3$ --mailto $ARG4$ --username $ARG5$ --password $ARG6$ --libexec $USER1$ -w $ARG1$ -c $ARG2$ } define service{ use generic-service host_name mail.your.net service_description EMAIL DELIVERY check_command check_email_delivery!5!120!sender@your.net!recipient@your.net!recipient@your.net!password } A new usage example equivalent to the old one but using the new --plugins and --token options: define command{ command_name check_email_delivery command_line $USER1$/check_email_delivery -p '$USER1$/check_smtp_send -H $HOSTADDRESS$ --mailfrom $ARG3$ --mailto $ARG4$ -U $ARG5$ -P $ARG6$ --subject "Nagios %TOKEN1%" -w $ARG1$ -c $ARG2$' -p '$USER1$/check_imap_receive -H $HOSTADDRESS$ -U $ARG5$ -P $ARG6$ -s SUBJECT -s "Nagios %TOKEN1%" -w $ARG1$ -c $ARG2$' -w $ARG1$,$ARG1$ -c $ARG2$,$ARG2$ } define service{ use generic-service host_name mail.your.net service_description EMAIL DELIVERY check_command check_email_delivery!5!120!sender@your.net!recipient@your.net!recipient@your.net!password } References to similar plugins: pop3(s) email matching plugin by kkvenkit check_mail.pl by bledi51 check_email_loop.pl by ryanwilliams check_pop.pl and check_imap.pl by http://www.jhweiss.de/software/nagios.html nagios-plugins-contrib-9.20140106/check_email_delivery/src0000777000000000000000000000000012262515026025117 2check_email_delivery-0.7.1bustar nagios-plugins-contrib-9.20140106/check_email_delivery/Makefile0000644000000000000000000000047412262515026021200 0ustar #/usr/bin/make -f PLUGIN = $(wildcard src/check_*) $(wildcard src/imap_ssl_*) MANPAGES = $(shell find src/docs -regex '[^ ]*.pod' -printf '%f\n' | sed 's,pod$$,7,') DOCFILES = src/docs/*.html src/docs/*.txt src/README.txt CLEANFILES = $(MANPAGES) include ../common.mk %.7: src/docs/%.pod pod2man -s 7 $< > $@ nagios-plugins-contrib-9.20140106/check_checksums/0000755000000000000000000000000012262515026016526 5ustar nagios-plugins-contrib-9.20140106/check_checksums/update_checksums0000755000000000000000000000256212262515026022010 0ustar #!/bin/bash # # Tool to rebuild all checksums for check_checksums # # # Copyright (C) 2013 Bernd Zeimetz # # 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 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . set -e umask 027 for t in md5 sha1 sha224 sha256 sha384 sha512; do fname="/etc/nagios/check_checksums.${t}" tool="${t}sum" if [ -f ${fname} ]; then tmp=`mktemp` chown root:nagios ${tmp} chmod 640 ${tmp} trap "rm -f ${tmp}" EXIT sed 's,^[^ ]* ,,' ${fname} | while read f; do if [ -f "${f}" ]; then ${tool} ${f} >> ${tmp} else echo "${f} went missing, ignoring!" fi done ln "${fname}" "${fname}_`date '+%s'`" mv "${tmp}" "${fname}" fi done nagios-plugins-contrib-9.20140106/check_checksums/control0000644000000000000000000000031512262515026020130 0ustar Version: 20130611 Uploaders: Bernd Zeimetz Description: plugin to verify file checksums against (local, not 100% secure) lists. Supports md5 sha1 sha224 sha256 sha384 sha512 checksums. nagios-plugins-contrib-9.20140106/check_checksums/copyright0000644000000000000000000000123612262515026020463 0ustar Copyright (C) 2013 Bernd Zeimetz 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . nagios-plugins-contrib-9.20140106/check_checksums/check_checksums0000755000000000000000000000653312262515026021605 0ustar #!/bin/bash # # check_checksums - Nagios plugin to check file checksums # against (local, not 100% secure) lists. # Supports md5 sha1 sha224 sha256 sha384 sha512 checksums. # # # Copyright (C) 2013 Bernd Zeimetz # # 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 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . umask 077 if [ $# -gt 0 ]; then case $1 in -h|--help|help) cat << __EOH__ $0 - Nagios plugin to check file checksums ------------------------------------------ The plugin supports md5 sha1 sha224 sha256 sha384 sha512 checksums. As the lists are stored local it is not 100% secure. Usage: For each file you want to monitor write the current checksum into the stored file list. Use the checksum tool you prefer, probably depending on your CPU power. sha512sum /path/to/the/file >> /etc/nagios/check_checksums.sha512 sha384sum /path/to/the/file >> /etc/nagios/check_checksums.sha384 sha256sum /path/to/the/file >> /etc/nagios/check_checksums.sha256 sha224sum /path/to/the/file >> /etc/nagios/check_checksums.sha224 sha1sum /path/to/the/file >> /etc/nagios/check_checksums.sha1 md5sum /path/to/the/file >> /etc/nagios/check_checksums.md5 Set useful file permissions: chown root:nagios /etc/nagios/check_checksums.* chmod 0640 /etc/nagios/check_checksums.* Run $0 in nrpe or nagios to check if the checksums are still the same. It will return UNKNOWN if there is no checksum file at all. To update *ALL* stored checksums please run /usr/lib/nagios/update_checksums and all checksum files will be updated. A copy of the original file will be stored in /etc/nagios. __EOH__ exit 3 ;; esac fi if dpkg --compare-versions `dpkg-query -W coreutils | awk '{print $2}'` ge 8.13; then STRICT="--strict" else STRICT="" fi RET=3 OUT="UNKNOWN" tmp_out=`mktemp` tmp_err=`mktemp` trap "rm -f ${tmp_out} ${tmp_err}" EXIT for t in md5 sha1 sha224 sha256 sha384 sha512; do fname="/etc/nagios/check_checksums.${t}" tool="${t}sum" if [ -f ${fname} ]; then if [ ${RET} -eq 3 ]; then RET=0 OUT="OK" fi ${tool} --quiet ${STRICT} --check ${fname} 1>>${tmp_out} 2>>${tmp_err} err=$? if [ ${err} -gt 0 ]; then RET=2 OUT="CRITICAL" fi fi done if [ $RET -eq 0 ]; then echo "OK - all checksums verified | failed=0;1;1;0;" else echo -n "${OUT} - " sed 's,WARNING: ,,' ${tmp_err} | tr '\n' '/' | sed 's,/$,,' echo cat ${tmp_out} count=`wc -l ${tmp_out} | awk '{print $1}'` echo "| failed=${count};1;1;0;" /usr/bin/logger -p user.err -t check_checksums -f ${tmp_out} fi rm -f ${tmp_out} ${tmp_err} exit ${RET} nagios-plugins-contrib-9.20140106/check_checksums/Makefile0000644000000000000000000000025512262515026020170 0ustar PLUGIN := check_checksums include ../common.mk install:: install -d $(DESTDIR)/usr/lib/nagios install -m 755 -o root -g root update_checksums $(DESTDIR)/usr/lib/nagios nagios-plugins-contrib-9.20140106/check_ssl_cert/0000755000000000000000000000000012262515026016357 5ustar nagios-plugins-contrib-9.20140106/check_ssl_cert/control0000644000000000000000000000054312262515026017764 0ustar Uploaders: Jan Wagner Recommends: openssl Suggests: expect Version: 1.15.0 Homepage: https://trac.id.ethz.ch/projects/nagios_plugins/wiki/check_ssl_cert Watch: https://trac.id.ethz.ch/projects/nagios_plugins/wiki/check_ssl_cert check_ssl_cert-([0-9.]+)\.tar\.gz Description: plugin to check the CA and validity of an X.509 certificate nagios-plugins-contrib-9.20140106/check_ssl_cert/ssl_cert.cfg0000644000000000000000000000026012262515026020654 0ustar # 'check_ssl_cert' command definition define command{ command_name check_ssl_cert command_line /usr/lib/nagios/plugins/check_ssl_cert -H $HOSTADDRESS$ '$ARG1$' } nagios-plugins-contrib-9.20140106/check_ssl_cert/copyright0000644000000000000000000000061212262515026020311 0ustar Copyright (c) 2007-2011 ETH Zurich Authors: Dan Wallis Lawren Quigley-Jones Marc Fournier Marcus RejÃ¥s Matteo Corti Matthias Fuhrmeister Raphael Thoma Scott Worthington Sven Nierlein Tuomas Haarala Wolfgang Schricker Yannick Gravel This module is free software; you can redistribute it and/or modify it under the terms of GNU general public license (gpl) version 3. nagios-plugins-contrib-9.20140106/check_ssl_cert/src0000777000000000000000000000000012262515026022563 2check_ssl_cert-1.15.0/ustar nagios-plugins-contrib-9.20140106/check_ssl_cert/check_ssl_cert-1.15.0/0000755000000000000000000000000012262515026022052 5ustar nagios-plugins-contrib-9.20140106/check_ssl_cert/check_ssl_cert-1.15.0/INSTALL0000644000000000000000000000100612262515026023100 0ustar Simply copy the plugin to your nagios plugin directory Optional installs: In order to use timeouts the plugin needs 'expect' in the current PATH See: http://en.wikipedia.org/wiki/Expect In order to perform date computations the plugin needs a Perl interpreter and the module Date::Parse # File version information: # $Id: AUTHORS 1103 2009-12-07 07:49:19Z corti $ # $Revision: 1103 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_updates/AUTHORS $ # $Date: 2009-12-07 08:49:19 +0100 (Mon, 07 Dec 2009) $ nagios-plugins-contrib-9.20140106/check_ssl_cert/check_ssl_cert-1.15.0/AUTHORS0000644000000000000000000000342512262515026023126 0ustar Matteo Corti Thanks: * Many thanks to Kenny McCormack for his help on comp.unix.shell on how to implement a timeout * Many thanks to Dan Wallis for several patches and fixes (see the Changelog) * Many thanks to Tuomas Haarala for the -P option patch to check TLS certs using other protocols * Many thanks to Marcus Rejås for the -N and -n patches * Many thanks to Marc Fournier for - the == bashism fix - the mktemp error handling patch * Many thanks to Wolfgang Schricker for - the selfsigned bug report and cleanup fixes - the patch adding the possibility to check local files (-f option) * Many thanks to Yannick Gravel for the patch fixing the plugin output and the fix on the test order * Many thanks to Scott Worthington for the --critical and --warning hints * Many thanks to Lawren Quigley-Jones for - the -A,--noauth patch - the trap fix * Many thanks to Matthias Fuhrmeister for the -servername patch * Many thanks to Raphael Thoma for the patch allowing HTTP to be specified as protocol and the fix on -N with wildcards * Many thanks to Sven Nierlein for the client certificate authentication patch * Many thanks to Rob Yamry for the help in debugging a problem with certain versions of OpenSSL and TLS extensions * Many thanks to Jim Hopp for the "No certificate returned" enhancement patch * Many thanks to Javier Gonel for the TLS servername patch * Many thanks to Christian Ruppert for the XMPP patch * Many thanks to Robin H. Johnson for the 'timeout' patch * Many thanks to Max Winterstein for the SSL version patch # File version information: # $Id: AUTHORS 1103 2009-12-07 07:49:19Z corti $ # $Revision: 1103 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_updates/AUTHORS $ # $Date: 2009-12-07 08:49:19 +0100 (Mon, 07 Dec 2009) $ nagios-plugins-contrib-9.20140106/check_ssl_cert/check_ssl_cert-1.15.0/VERSION0000644000000000000000000000000712262515026023117 0ustar 1.15.0 nagios-plugins-contrib-9.20140106/check_ssl_cert/check_ssl_cert-1.15.0/check_ssl_cert.spec0000644000000000000000000001351612262515026025707 0ustar ################################################################################ # File version information: # $Id: check_updates.spec 1126 2010-02-16 20:06:11Z corti $ # $Revision: 1126 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_updates/check_updates.spec $ # $Date: 2010-02-16 21:06:11 +0100 (Tue, 16 Feb 2010) $ ################################################################################ %define version 1.15.0 %define release 0 %define sourcename check_ssl_cert %define packagename nagios-plugins-check_ssl_cert %define nagiospluginsdir %{_libdir}/nagios/plugins # No binaries in this package %define debug_package %{nil} Summary: A Nagios plugin to check X.509 certificates Name: %{packagename} Version: %{version} Obsoletes: check_ssl_cert Release: %{release}%{?dist} License: GPLv3+ Packager: Matteo Corti Group: Applications/System BuildRoot: %{_tmppath}/%{packagename}-%{version}-%{release}-root-%(%{__id_u} -n) URL: https://trac.id.ethz.ch/projects/nagios_plugins/wiki/check_ssl_cert Source: https://trac.id.ethz.ch/projects/nagios_plugins/downloads/%{sourcename}-%{version}.tar.gz Requires: nagios-plugins %description Checks an X.509 certificate: - checks if the server is running and delivers a valid certificate - checks if the CA matches a given pattern - checks the validity %prep %setup -q -n %{sourcename}-%{version} %build %install make DESTDIR=${RPM_BUILD_ROOT}%{nagiospluginsdir} MANDIR=${RPM_BUILD_ROOT}%{_mandir} install %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc AUTHORS ChangeLog NEWS README INSTALL TODO COPYING VERSION COPYRIGHT %attr(0755, root, root) %{nagiospluginsdir}/check_ssl_cert %{_mandir}/man1/%{sourcename}.1* %changelog * Mon Jul 29 2013 Matteo Corti - 1.15.0-0 - Updated to 1.15.0 (force SSL version) * Sun May 12 2013 Matteo Corti - 1.14.6-0 - Updated to 1.16.6 (timeout and XMPP support) * Sat Mar 2 2013 Matteo Corti - 1.14.5-0 - Updated to 1.14.5 (TLS and multiple names fix) * Fri Dec 7 2012 Matteo Corti - 1.14.4-0 - Updated to 1.14.4 (bug fix release) * Wed Sep 19 2012 Matteo Corti - 1.14.3-0 - Updated to 1.14.3 * Fri Jul 13 2012 Matteo Corti - 1.14.2-0 - Updated to 1.14.2 * Wed Jul 11 2012 Matteo Corti - 1.14.1-0 - Updated to 1.14.1 * Fri Jul 6 2012 Matteo Corti - 1.14.0-0 - updated to 1.14.0 * Thu Apr 5 2012 Matteo Corti - 1.13.0-0 - updated to 1.13.0 * Wed Apr 4 2012 Matteo Corti - 1.12.0-0 - updated to 1.12.0 (bug fix release) * Sat Oct 22 2011 Matteo Corti - 1.11.0-0 - ipdated to 1.10.1 (--altnames option) * Thu Sep 1 2011 Matteo Corti - 1.10.0-0 - apllied patch from Sven Nierlein for client certificate authentication * Thu Mar 10 2011 Matteo Corti - 1.9.1-0 - updated to 1.9.1: allows http as protocol and fixes -N with wildcards * Mon Jan 24 2011 Matteo Corti - 1.9.0-0 - updated to 1.9.0: --openssl option * Thu Dec 16 2010 Dan Wallis - 1.8.1-0 - Fixed bugs with environment bleeding & shell globbing * Thu Dec 9 2010 Matteo Corti - 1.8.0-0 - added support for TLS servername extension * Thu Oct 28 2010 Matteo Corti - 1.7.7-0 - Fixed a bug in the signal specification * Thu Oct 28 2010 Matteo Corti - 1.7.6-0 - better temporary file clean up * Thu Oct 14 2010 Matteo Corti - 1.7.5-0 - updated to 1.7.5 (fixed the check order) * Fri Oct 1 2010 Matteo Corti - 1.7.4-0 - added -A command line option * Wed Sep 15 2010 Matteo Corti - 1.7.3-0 - Fixed a bug in the command line options processing * Thu Aug 26 2010 Dan Wallis - 1.7.2-0 - updated to 1.7.2 (cat and expect fixes) * Thu Aug 26 2010 Dan Wallis - 1.7.1-0 - updated to 1.7.1 ("-verify 6" revert) * Thu Aug 26 2010 Dan Wallis - 1.7.0-0 * Wed Jul 21 2010 Matteo Corti - 1.6.1-0 - updated to 1.6.0 (--temp option) * Fri Jul 9 2010 Matteo Corti - 1.6.0-0 - updated to version 1.6.0 (long options, --critical and --warning, man page) * Wed Jul 7 2010 Matteo Corti - 1.5.2-0 - updated to version 1.5.2 (Wolfgang Schricker patch, see ChangeLog) * Thu Jul 1 2010 Matteo Corti - 1.5.1-0 - updated to version 1.5.1 (Yannick Gravel patch, see ChangeLog) * Tue Jun 8 2010 Matteo Corti - 1.5.0-0 - updated to version 1.5.0 (-s option to allow self signed certificates) * Thu Mar 11 2010 Matteo Corti - 1.4.4-0 - updated to 1.4.4 (bug fix release) * Tue Mar 9 2010 Matteo Corti - 1.4.3-0 - updated to 1.4.3 (-n and -N options) * Wed Dec 2 2009 Matteo Corti - 1.4.2-0 - updated to 1.4.2 * Mon Nov 30 2009 Matteo Corti - 1.4.1-0 - updated to 1.4.1 (-r option) * Mon Nov 30 2009 Matteo Corti - 1.4.0-0 - Updated to 1.4.0: verify the certificate chain * Mon Mar 30 2009 Matteo Corti - 1.3.0-0 - Tuomas Haarala patch: -P option * Tue May 13 2008 Matteo Corti - 1.2.2-0 - Dan Wallis patch to include the CN in the messages * Mon Feb 25 2008 Matteo Corti - 1.2.1-0 - Dan Wallis patches (error checking, see ChangeLog) * Mon Feb 25 2008 Matteo Corti - 1.2.0-0 - Dan Wallis patches (see the ChangeLog) * Mon Sep 24 2007 Matteo Corti - 1.1.0-0 - first RPM package nagios-plugins-contrib-9.20140106/check_ssl_cert/check_ssl_cert-1.15.0/README0000644000000000000000000000733412262515026022741 0ustar (c) Matteo Corti, ETH Zurich, 2007-2012 see AUTHORS for the complete list of contributors check_ssl_cert A Nagios plugin to check an X.509 certificate: - checks if the server is running and delivers a valid certificate - checks if the CA matches a given pattern - checks the validity Usage: ====== check_ssl_cert -H host [OPTIONS] Arguments: -H,--host host server Options: -A,--noauth ignore authority warnings (expiration only) -C,--clientcert path use client certificate to authenticate --clientpass phrase set passphrase for client certificate. -c,--critical days minimum number of days a certificate has to be valid to issue a critical status -e,--email address pattern to match the email address contained in the certificate -f,--file file local file path (works with -H localhost only) -h,--help,-? this help message -i,--issuer issuer pattern to match the issuer of the certificate -n,---cn name pattern to match the CN of the certificate -N,--host-cn match CN with the host name -o,--org org pattern to match the organization of the certificate --openssl path path of the openssl binary to be used -p,--port port TCP port -P,--protocol protocol use the specific protocol {http|smtp|pop3|imap|ftp} http: default smtp,pop3,imap,ftp: switch to TLS -s,--selfsigned allows self-signed certificates -r,--rootcert path root certificate or directory to be used for certficate validation -t,--timeout seconds timeout after the specified time (defaults to 15 seconds) --temp dir directory where to store the temporary files -v,--verbose verbose output -V,--version version -w,--warning days minimum number of days a certificate has to be valid to issue a warning status Deprecated options: -d,--days days minimum number of days a certificate has to be valid (see --critical and --warning) Expect: ======= check_ssl_cert requires 'expect' to enable timouts. If expect is not present on your system timeouts will be disabled. See: http://en.wikipedia.org/wiki/Expect Perl and Date::Parse: ===================== If perl and Date::Parse are available the plugin will also compute for how many days the certificate will be valid and put the information in the performance data. If perl or Date::Parse are not available the information will not be available. Virtual servers: ================ check_ssl_client supports the servername TLS extension in ClientHello if the installed openssl version provides it. This is needed if you are checking a machine with virtual hosts. Notes: ====== the root certificate corresponding to the checked certificate must be available to openssl or specified with the '-r cabundle' or '--rootcert cabundle' option, where cabundle is either a file for -CAfile or a directory for -CApath. On Mac OS X the root certificates bundle is stored in the Keychain and openssl will complain with: verification error: unable to get local issuer certificate The bundle can be extracted with: $ sudo security find-certificate -a \ -p /System/Library/Keychains/SystemRootCertificates.keychain > cabundle.crt Bugs: ===== Report bugs to: Matteo Corti # File version information: # $Id: AUTHORS 1103 2009-12-07 07:49:19Z corti $ # $Revision: 1103 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_updates/AUTHORS $ # $Date: 2009-12-07 08:49:19 +0100 (Mon, 07 Dec 2009) $ nagios-plugins-contrib-9.20140106/check_ssl_cert/check_ssl_cert-1.15.0/test/0000755000000000000000000000000012262515026023031 5ustar nagios-plugins-contrib-9.20140106/check_ssl_cert/check_ssl_cert-1.15.0/test/cacert.crt0000644000000000000000000000506212262515026025007 0ustar -----BEGIN CERTIFICATE----- MIIHWTCCBUGgAwIBAgIDCkGKMA0GCSqGSIb3DQEBCwUAMHkxEDAOBgNVBAoTB1Jv b3QgQ0ExHjAcBgNVBAsTFWh0dHA6Ly93d3cuY2FjZXJ0Lm9yZzEiMCAGA1UEAxMZ Q0EgQ2VydCBTaWduaW5nIEF1dGhvcml0eTEhMB8GCSqGSIb3DQEJARYSc3VwcG9y dEBjYWNlcnQub3JnMB4XDTExMDUyMzE3NDgwMloXDTIxMDUyMDE3NDgwMlowVDEU MBIGA1UEChMLQ0FjZXJ0IEluYy4xHjAcBgNVBAsTFWh0dHA6Ly93d3cuQ0FjZXJ0 Lm9yZzEcMBoGA1UEAxMTQ0FjZXJ0IENsYXNzIDMgUm9vdDCCAiIwDQYJKoZIhvcN AQEBBQADggIPADCCAgoCggIBAKtJNRFIfNImflOUz0Op3SjXQiqL84d4GVh8D57a iX3h++tykA10oZZkq5+gJJlz2uJVdscXe/UErEa4w75/ZI0QbCTzYZzA8pD6Ueb1 aQFjww9W4kpCz+JEjCUoqMV5CX1GuYrz6fM0KQhF5Byfy5QEHIGoFLOYZcRD7E6C jQnRvapbjZLQ7N6QxX8KwuPr5jFaXnQ+lzNZ6MMDPWAzv/fRb0fEze5ig1JuLgia pNkVGJGmhZJHsK5I6223IeyFGmhyNav/8BBdwPSUp2rVO5J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IG93biBjZXJ0aWZpY2F0ZSBmb3IgRlJFRSwgZ28gdG8gaHR0cDovL3d3dy5D QWNlcnQub3JnMA0GCSqGSIb3DQEBCwUAA4ICAQApKIWuRKm5r6R5E/CooyuXYPNc 7uMvwfbiZqARrjY3OnYVBFPqQvX56sAV2KaC2eRhrnILKVyQQ+hBsuF32wITRHhH Va9Y/MyY9kW50SD42CEH/m2qc9SzxgfpCYXMO/K2viwcJdVxjDm1Luq+GIG6sJO4 D+Pm1yaMMVpyA4RS5qb1MyJFCsgLDYq4Nm+QCaGrvdfVTi5xotSu+qdUK+s1jVq3 VIgv7nSf7UgWyg1I0JTTrKSi9iTfkuO960NAkW4cGI5WtIIS86mTn9S8nK2cde5a lxuV53QtHA+wLJef+6kzOXrnAzqSjiL2jA3k2X4Ndhj3AfnvlpaiVXPAPHG0HRpW Q7fDCo1y/OIQCQtBzoyUoPkD/XFzS4pXM+WOdH4VAQDmzEoc53+VGS3FpQyLu7Xt hbNc09+4ufLKxw0BFKxwWMWMjTPUnWajGlCVI/xI4AZDEtnNp4Y5LzZyo4AQ5OHz 0ctbGsDkgJp8E3MGT9ujayQKurMcvEp4u+XjdTilSKeiHq921F73OIZWWonO1sOn ebJSoMbxhbQljPI/lrMQ2Y1sVzufb4Y6GIIiNsiwkTjbKqGTqoQ/9SdlrnPVyNXT d+pLncdBu8fA46A/5H2kjXPmEkvfoXNzczqA6NXLji/L6hOn1kGLrPo8idck9U60 4GGSt/M3mMS+lqO3ig== -----END CERTIFICATE----- nagios-plugins-contrib-9.20140106/check_ssl_cert/check_ssl_cert-1.15.0/test/unit_tests.sh0000755000000000000000000000225712262515026025577 0ustar #!/bin/sh if [ -z "${SHUNIT2}" ] ; then cat < /dev/null assertEquals "wrong exit code" ${NAGIOS_OK} "$?" } testUsage() { ${SCRIPT} > /dev/null 2>&1 assertEquals "wrong exit code" ${NAGIOS_UNKNOWN} "$?" } # source the script. . ${SCRIPT} --source-only # run shUnit: it will execute all the tests in this file # (e.g., functions beginning with 'test' . ${SHUNIT2} nagios-plugins-contrib-9.20140106/check_ssl_cert/check_ssl_cert-1.15.0/test/cabundle.crt0000644000000000000000000076351112262515026025335 0ustar -----BEGIN CERTIFICATE----- MIIEajCCA1KgAwIBAgIBATANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJKUDEN MAsGA1UECgwESlBLSTEpMCcGA1UECwwgUHJlZmVjdHVyYWwgQXNzb2NpYXRpb24g Rm9yIEpQS0kxETAPBgNVBAsMCEJyaWRnZUNBMB4XDTAzMTIyNzA1MDgxNVoXDTEz MTIyNjE0NTk1OVowWjELMAkGA1UEBhMCSlAxDTALBgNVBAoMBEpQS0kxKTAnBgNV BAsMIFByZWZlY3R1cmFsIEFzc29jaWF0aW9uIEZvciBKUEtJMREwDwYDVQQLDAhC cmlkZ2VDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANTnUmg7K3m8 52vd77kwkq156euwoWm5no8E8kmaTSc7x2RABPpqNTlMKdZ6ttsyYrqREeDkcvPL yF7yf/I8+innasNtsytcTAy8xY8Avsbd4JkCGW9dyPjk9pzzc3yLQ64Rx2fujRn2 agcEVdPCr/XpJygX8FD5bbhkZ0CVoiASBmlHOcC3YpFlfbT1QcpOSOb7o+VdKVEi MMfbBuU2IlYIaSr/R1nO7RPNtkqkFWJ1/nKjKHyzZje7j70qSxb+BTGcNgTHa1YA UrogKB+UpBftmb4ds+XlkEJ1dvwokiSbCDaWFKD+YD4B2s0bvjCbw8xuZFYGhNyR /2D5XfN1s2MCAwEAAaOCATkwggE1MA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8E BTADAQH/MG0GA1UdHwRmMGQwYqBgoF6kXDBaMQswCQYDVQQGEwJKUDENMAsGA1UE CgwESlBLSTEpMCcGA1UECwwgUHJlZmVjdHVyYWwgQXNzb2NpYXRpb24gRm9yIEpQ S0kxETAPBgNVBAsMCEJyaWRnZUNBMIGDBgNVHREEfDB6pHgwdjELMAkGA1UEBhMC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EBAgUAA4GBAIobK/o5wXTXXtgZZKJYSi034DNHD6zt96rbHuSLBlxg J8pFUs4W7z8GZOeUaHxgMxURaa+dYo2jA1Rrpr7l7gUYYAS/QoD90KioHgE796Nc r6Pc5iaAIzy4RHT3Cq5Ji2F4zCS/iIqnDupzGUH9TQPwiNHleI2lKk/2lw0Xd8rY -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2 MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBg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U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynp VSJYACPq4xJDKVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEY WQPJIrSPnNVeKtelttQKbfi3QBFGmh95DmK/D5fs4C8fF5Q= -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- MIIDIDCCAgigAwIBAgIBJDANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEP MA0GA1UEChMGU29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MxIENBMB4XDTAx MDQwNjEwNDkxM1oXDTIxMDQwNjEwNDkxM1owOTELMAkGA1UEBhMCRkkxDzANBgNV BAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJhIENsYXNzMSBDQTCCASIwDQYJKoZI hvcNAQEBBQADggEPADCCAQoCggEBALWJHytPZwp5/8Ue+H887dF+2rDNbS82rDTG 29lkFwhjMDMiikzujrsPDUJVyZ0upe/3p4zDq7mXy47vPxVnqIJyY1MPQYx9EJUk oVqlBvqSV536pQHydekfvFYmUk54GWVYVQNYwBSujHxVX3BbdyMGNpfzJLWaRpXk 3w0LBUXl0fIdgrvGE+D+qnr9aTCU89JFhfzyMlsy3uhsXR/LpCJ0sICOXZT3BgBL qdReLjVQCfOAl/QMF6452F/NM8EcyonCIvdFEu1eEpOdY6uCLrnrQkFEy0oaAIIN nvmLVz5MxxftLItyM19yejhW1ebZrgUaHXVFsculJRwSVzb9IjcCAwEAAaMzMDEw DwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQIR+IMi/ZTiFIwCwYDVR0PBAQDAgEG MA0GCSqGSIb3DQEBBQUAA4IBAQCLGrLJXWG04bkruVPRsoWdd44W7hE928Jj2VuX ZfsSZ9gqXLar5V7DtxYvyOirHYr9qxp81V9jz9yw3Xe5qObSIjiHBxT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AQgAFG5Uhpq6zPk3EPbg3oQtnaSFN9OH4xXQwReQfhkhahKpdv0SAulPIV4XAgMB AAGjYTBfMA8GA1UdEwEB/wQFMAMBAf8wTAYDVR0gBEUwQzBBBgtghkgBhvt7hwcB CzAyMDAGCCsGAQUFBwIBFiRodHRwOi8vd3d3LndlbGxzZmFyZ28uY29tL2NlcnRw b2xpY3kwDQYJKoZIhvcNAQEFBQADggEBANIn3ZwKdyu7IvICtUpKkfnRLb7kuxpo 7w6kAOnu5+/u9vnldKTC2FJYxHT7zmu1Oyl5GFrvm+0fazbuSCUlFLZWohDo7qd/ 0D+j0MNdJu4HzMPBJCGHHt8qElNvQRbn7a6U+oxy+hNH8Dx+rn0ROhPs7fpvcmR7 nX1/Jv16+yWt6j4pf0zjAFcysLPp7VMX2YuyFA4w6OXVE8Zkr8QA1dhYJPz1j+zx x32l2w8n0cbyQIjmH/ZhqPRCyLk306m+LFZ4wnKbWV01QIroTmMatukgalHizqSQ 33ZwmVxwQ023tqcZZE6St8WRPH9IFmV7Fv3L/PvZ1dZPIWU7Sn9Ho/s= -----END CERTIFICATE----- nagios-plugins-contrib-9.20140106/check_ssl_cert/check_ssl_cert-1.15.0/check_ssl_cert.10000644000000000000000000000600512262515026025110 0ustar .\" Process this file with .\" groff -man -Tascii foo.1 .\" .TH "check_ssl_cert" 1 "May, 2013" "1.15.0" "USER COMMANDS" .SH NAME check_ssl_cert \- checks the validity of X.509 certificates .SH SYNOPSIS .BR "check_ssl_cert " "-H host [OPTIONS]" .SH DESCRIPTION .B check_ssl_cert A Nagios plugin to check an X.509 certificate: - checks if the server is running and delivers a valid certificate - checks if the CA matches a given pattern - checks the validity .SH ARGUMENTS .TP .BR "-H,--host" " host" server .SH OPTIONS .TP .BR "-A,--noauth" ignore authority warnings (expiration only) .TP .BR " --altnames" matches the pattern specified in -n with alternate names too .TP .BR "-C,--clientcert" " path" use client certificate to authenticate .TP .BR " --clientpass" " phrase" set passphrase for client certificate. .TP .BR "-c,--critical" " days" minimum number of days a certificate has to be valid to issue a critical status .TP .BR "-e,--email" " address" pattern to match the email address contained in the certificate .TP .BR "-f,--file" " file" local file path (works with -H localhost only) .TP .BR "-h,--help,-?" this help message .TP .BR "--long-output" " list" append the specified comma separated (no spaces) list of attributes to the plugin output on additional lines. Valid attributes are: enddate, startdate, subject, issuer, modulus, serial, hash, email, ocsp_uri and fingerprint. 'all' will include all the available attributes. .TP .BR "-i,--issuer" " issuer" pattern to match the issuer of the certificate .TP .BR "-n,---cn" " name" pattern to match the CN of the certificate .TP .BR "-N,--host-cn" match CN with the host name .TP .BR "-o,--org" " org" pattern to match the organization of the certificate .TP .BR " --openssl" " path" path of the openssl binary to be used .TP .BR "-p,--port" " port" TCP port .TP .BR "-P,--protocol" " protocol" use the specific protocol: http (default) or smtp,pop3,imap,ftp (switch to TLS) .TP .BR "-s,--selfsigned" allows self-signed certificates .TP .BR "-S,--ssl" " version" force SSL version (2,3) .TP .BR "-r,--rootcert" " cert" root certificate or directory to be used for certficate validation (passed to openssl's -CAfile or -CApath) .TP .BR "-t,--timeout" seconds timeout after the specified time (defaults to 15 seconds) .TP .BR "--temp" " dir" directory where to store the temporary files .TP .BR "-v,--verbose" verbose output .TP .BR "-V,--version" version .TP .BR "-w,--warning" " days" minimum number of days a certificate has to be valid to issue a warning status .SH DEPRECATED OPTIONS .TP .BR "-d,--days" " days" minimum number of days a certificate has to be valid (see --critical and --warning) .SH "SEE ALSO" x509(1), openssl(1), expect(1), timeout(1) .SH "EXIT STATUS" check_ssl_cert returns a zero exist status if it finds no errors, 1 for warnings, 2 for a critical errors and 3 for unknown problems .SH BUGS Please report bugs to: Matteo Corti (matteo.corti (at) id.ethz.ch) .SH AUTHOR Matteo Corti (matteo.corti (at) id.ethz.ch) See the AUTHORS file for the complete list of contributors nagios-plugins-contrib-9.20140106/check_ssl_cert/check_ssl_cert-1.15.0/TODO0000644000000000000000000000047512262515026022550 0ustar * Nagios performance data (e.g., missing days) * IPv6 support (e.g., through gnutls-cli) # File version information: # $Id: AUTHORS 1103 2009-12-07 07:49:19Z corti $ # $Revision: 1103 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_updates/AUTHORS $ # $Date: 2009-12-07 08:49:19 +0100 (Mon, 07 Dec 2009) $ nagios-plugins-contrib-9.20140106/check_ssl_cert/check_ssl_cert-1.15.0/NEWS0000644000000000000000000001063112262515026022552 0ustar 2013-07-29 Version 1.15.0 Added an option to force a certain SSL version (thanks to Max Winterstein) 2013-05-12 Version 1.14.6 Added XMPP and timeout support (thanks to Christian Ruppert and Robin H. Johnson) 2013-03-02 Version 1.14.5 Fixed a bug occuring with TLS and multiple names in the certificate 2012-12-07 Version 1.14.4 Fixed a bug causing -N to always compare the CN with 'localhost' 2012-09-19 Version 1.14.3 Improved the error message in case of a failure in the certificate download 2012-07-13 Version 1.14.2 Added the name since or to expiration in the plugin output. 2012-07-11 Version 1.14.1 FIxed a bug with Perl date computation on some systems 2012-07-06 Version 1.14.0 The status now includes performance data in days until expiration (requires perl with Date::Parse). It is now possible to print additional information in the plugins long output (multiline, Nagios 3 only) 2012-04-05 Version 1.13.0 The plugin will now try to fetch the certificate without without TLS extensions in case of error 2012-04-04 Version 1.12.0 Fixed a bug in the chain verification (hard coded error number) 2011-10-22 Version 1.11.0 --altname option 2011-09-01 Version 1.10.0 Applied a patch from Sven Nierlein to authenicate using a client certificate 2011-03-10 Version 1.9.1 Allows HTTP as protocol and fixes -N with wildcards 2011-01-24 Version 1.9.0 Added an option to specify the openssl executable 2010-12-16 Version 1.8.1 Fixed bugs with environment bleeding & shell globbing 2010-12-08 Version 1.8.0 Added support for TLS servername extension in ClientHello 2010-10-28 Version 1.7.7 Fixed a bug in the signal specification introduced in 1.7.6 2010-10-28 Version 1.7.6 Better temporary file clean up (thanks to Lawren Quigley-Jones) 2010-10-14 Version 1.7.5 Applied a patch from Yannick Gravel fixing the test order 2010-10-01 Version 1.7.4 Applied a patch from Lawren Quigley-Jones adding the -A option 2010-09-15 Version 1.7.3 Fixed a bug in the option processing 2010-08-26 Version 1.7.2 Removes useless use of cat, better test for expect utility 2010-08-26 Version 1.7.1 Replaces "-verify 6" which was erroneously removed in the previous version 2010-08-26 Version 1.7.0 Overloaded --rootcert option to allow -CApath as well as -CAfile 2010-07-21 Version 1.6.1 Added an option to specify where to temporarily store the certificate 2010-07-09 Version 1.6.0 Added long command line options and substituted -days with --critical and --warning 2010-07-07 Version 1.5.2 Added the -f option to check a local file 2010-07-01 Version 1.5.1 Fixed the plugin output 2010-03-11 Version 1.4.4 Fixed bug #64 (== bashism) 2010-03-09 Version 1.4.3 -N and -n options to compare the CN to an hostname 2009-12-02 Version 1.4.2 the -i ISSUER option now checks if the O= or the CN= fields of the root certificate match 2009-11-30 Version 1.4.1 -r to specify the root cert to be used for verification 2009-11-30 Version 1.4.0 certificate chain verification 2009-03-30 Version 1.3.0 -P option to check TLS certificates (SMTP, FTP, POP3, ...) 2008-05-13 Version 1.2.2 include the CN in the messages (D. Wallis) 2008-02-25 Version 1.2.1 better error handling 2008-02-25 Version 1.2.0 general cleanup (POSIX compliance, removed nmap dependency, ...) from Dan Wallis 2007-08-31 Version 1.1.0 - option to enforce a given email address - option to enforce a given organization - temporary files cleanup upon exit 2007-08-15 Bug fix: openssl did not close the connection cleanly 2007-08-10 First release (1.0) # File version information: # $Id: AUTHORS 1103 2009-12-07 07:49:19Z corti $ # $Revision: 1103 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_updates/AUTHORS $ # $Date: 2009-12-07 08:49:19 +0100 (Mon, 07 Dec 2009) $ nagios-plugins-contrib-9.20140106/check_ssl_cert/check_ssl_cert-1.15.0/COPYRIGHT0000644000000000000000000000173212262515026023350 0ustar Copyright (c) 2007-2012 ETH Zurich with the following individuals added to the list of Contributing Authors Dan Wallis Lawren Quigley-Jones Marc Fournier Marcus Rejås Matteo Corti Matthias Fuhrmeister Raphael Thoma Scott Worthington Sven Nierlein Tuomas Haarala Wolfgang Schricker Yannick Gravel 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 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. nagios-plugins-contrib-9.20140106/check_ssl_cert/check_ssl_cert-1.15.0/ChangeLog0000644000000000000000000001743212262515026023633 0ustar 2013-03-02 Matteo Corti * check_ssl_cert: Fixed a bug occuring with TLS and multiple names in the certificate 2012-12-07 Matteo Corti * check_ssl_cert: removed "test -a/-o" (test has an undefined behavior with more than 4 elements) * check_ssl_cert: fixed #122 (-N was always comparing the CN with 'localhost') 2012-11-16 Matteo Corti * simplified the sourcing of the script file for testing 2012-10-11 Matteo Corti * added some unit tests with shUnit2 2012-09-19 Matteo Corti * check_ssl_cert: improved the "No certificate returned" error message 2012-07-13 Matteo Corti * check_ssl_cert: added the number of days from or to expiration in the plugin output 2012-07-11 Matteo Corti * check_ssl_cert: fixed a bug with Perl date computation on some systems 2012-07-06 Matteo Corti * check_ssl_cert: performance data in days * check_ssl_cert: long output (certificate attributes) 2012-04-05 Matteo Corti * check_ssl_cert: handle broken OpenSSL clients (-servername not working) 2012-04-04 Matteo Corti * check_ssl_cert: removed an hard coded reference to the error number by the SSL chain verification 2011-10-22 Matteo Corti * check_ssl_cert: added a --altnames option to match the CN to alternative names 2011-09-01 Matteo Corti * check_ssl_cert: applied a patch from Sven Nierlein (certificate authentication) 2011-03-10 Matteo Corti * check_ssl_cert: allows http to specified as protocol (thanks to Raphael Thoma) * check_ssl_cert: fixes the -N check for certs with wildcards (thanks to Raphael Thoma) 2011-01-24 Matteo Corti * check_ssl_cert: added an option to specify the openssl executable 2010-12-16 Dan Wallis * check_ssl_cert: Sets $VERBOSE to avoid using value supplied by Nagios * check_ssl_cert: Quotes regular expression for grep to avoid shell globbing 2010-12-09 Matteo Corti * check_ssl_cert.spec: standardized the RPM package name * check_ssl_cert: added support for the TLS servername extension (thanks to Matthias Fuhrmeister) 2010-11-02 Matteo Corti * INSTALL: specifies that expect is needed for timeouts 2010-10-29 Matteo Corti * README: specifies that expect is needed for timeouts 2010-10-28 Matteo Corti * check_ssl_cert: trap on more signals (thanks to Lawren Quigley-Jones) 2010-10-14 Matteo Corti * check_ssl_cert: added a patch from Yannick Gravel putting the chain verification at the end of the tests 2010-10-01 Matteo Corti * check_ssl_cert: added a patch from Lawren Quigley-Jones which implements a new command line argument (-A) to disable the certificate chain check 2010-09-15 Matteo Corti * check_ssl_cert: fixed option processing (bug #78) 2010-08-26 Dan Wallis * check_ssl_cert: overloads --rootcert for use with directories as well as files (-CApath versus -CAfile) 2010-07-21 Matteo Corti * check_ssl_cert: added a patch from Marc Fournier to check the creation of the temporary files * check_ssl_cert: added the --temp option to specify where to store the temporary files 2010-07-10 Matteo Corti * check_ssl_cert: improved the error messages * check_ssl_cert: checks for certificates without email addresses (if -e is specified) 2010-07-09 Matteo Corti * check_ssl_cert: added a "long" version for all the command line options * check_ssl_cert: added a critical and warning option for the certificate validity (in days) * check_ssl_cert: the plugin always issues a critical warning if the certificate is expired * check_ssl_cert: added a man page 2010-07-07 Matteo Corti * check_ssl_cert: [Wolfgang Schricker patch] Add -f to check local files 2010-07-01 Matteo Corti * check_ssl_cert: [Yannick Gravel patch] Restore displaying the CN in every messages: a previous patch changed something and only critical were adjusted. * check_ssl_cert: [Yannick Gravel patch] Adjust what is displayed after the from in the OK message to display the matched ISSUER (CN or O). 2010-06-08 Matteo Corti * check_ssl_cert: added the -s option to allow self signed certificates 2010-03-11 Matteo Corti * check_ssl_cert: fixed the == bashism 2010-03-08 Matteo Corti * check_ssl_cert: applied patch from Marcus Rejås with the -n and -N options 2009-12-02 Matteo Corti * check_ssl_cert: check if the issuer matches the O= or the CN= field of the Root Cert 2009-11-30 Matteo Corti * check_ssl_cert: cleaned up error messages if the CN is not yet known * check_ssl_cert: added certificate chain verification * check_ssl_cert: allow backslashes escaped in the error messages (e.g., for \n used by Nagios 3) * check_ssl_cert: -r can be used to specify a root certificate to be used for the verification 2009-03-31 Matteo Corti * check_ssl_cert: standard timeout of 15 seconds (can be set with the -t option) 2009-03-30 Matteo Corti * check_ssl_cert: -P option to specify the protocol 2008-05-13 Matteo Corti * check_ssl_cert: applied a patch from Dan Wallis to output the CN in all the messages 2008-02-28 Matteo Corti * check_ssl_cert: shortened the error message in case of no connection (only the first line is reported) 2008-02-25 Matteo Corti * check_ssl_cert: [Dan Wallis patch] removed nmap dependency * check_ssl_cert: [Dan Wallis patch] mktemp for the temporaries * check_ssl_cert: [Dan Wallis patch] using trap to cleanup temporaries * check_ssl_cert: [Dan Wallis patch] POSIX compliance and cleanup * check_ssl_cert: [Dan Wallis patch] POSIX compliance and cleanup * check_ssl_cert: [Dan Wallis patch] better handling of missing certificate and non resolvable host * check_ssl_cert: [Dan Wallis patch] stricter check for "notAfter" in the certificate analysis 2007-09-04 Matteo Corti * check_ssl_cert: better error messages (both the actual and the expected values are displayed) 2007-08-31 Matteo Corti * check_ssl_cert: new options to enforce email and organization. Temporary files are now removed before termination 2007-08-15 Matteo Corti * check_ssl_cert: openssl s_client closes the connection cleanly 2007-08-10 Matteo Corti * check_ssl_cert: initial release # File version information: # $Id: AUTHORS 1103 2009-12-07 07:49:19Z corti $ # $Revision: 1103 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_updates/AUTHORS $ # $Date: 2009-12-07 08:49:19 +0100 (Mon, 07 Dec 2009) $ nagios-plugins-contrib-9.20140106/check_ssl_cert/check_ssl_cert-1.15.0/check_ssl_cert0000755000000000000000000006640312262515026024764 0ustar #!/bin/sh # # check_ssl_cert # # Checks an X.509 certificate: # - checks if the server is running and delivers a valid certificate # - checks if the CA matches a given pattern # - checks the validity # # See the INSTALL file for installation instructions # # Copyright (c) 2007-2012 ETH Zurich. # # This module is free software; you can redistribute it and/or modify it # under the terms of GNU general public license (gpl) version 3. # See the LICENSE file for details. # # RCS information # enable substitution with: # $ svn propset svn:keywords "Id Revision HeadURL Source Date" # # $Id: check_ssl_cert 1340 2013-07-29 17:17:11Z corti $ # $Revision: 1340 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_ssl_cert/check_ssl_cert $ # $Date: 2013-07-29 19:17:11 +0200 (Mon, 29 Jul 2013) $ ################################################################################ # Constants VERSION=1.15.0 SHORTNAME="SSL_CERT" VALID_ATTRIBUTES=",startdate,enddate,subject,issuer,modulus,serial,hash,email,ocsp_uri,fingerprint," ################################################################################ # Functions ################################################################################ # Prints usage information # Params # $1 error message (optional) usage() { if [ -n "$1" ] ; then echo "Error: $1" 1>&2 fi #### The following line is 80 characters long (helps to fit the help text in a standard terminal) ######-------------------------------------------------------------------------------- echo echo "Usage: check_ssl_cert -H host [OPTIONS]" echo echo "Arguments:" echo " -H,--host host server" echo echo "Options:" echo " -A,--noauth ignore authority warnings (expiration only)" echo " --altnames matches the pattern specified in -n with alternate" echo " names too" echo " -C,--clientcert path use client certificate to authenticate" echo " --clientpass phrase set passphrase for client certificate." echo " -c,--critical days minimum number of days a certificate has to be valid" echo " to issue a critical status" echo " -e,--email address pattern to match the email address contained in the" echo " certificate" echo " -f,--file file local file path (works with -H localhost only)" echo " -h,--help,-? this help message" echo " --long-output list append the specified comma separated (no spaces) list" echo " of attributes to the plugin output on additional lines." echo " Valid attributes are:" echo " enddate, startdate, subject, issuer, modulus, serial," echo " hash, email, ocsp_uri and fingerprint." echo " 'all' will include all the available attributes." echo " -i,--issuer issuer pattern to match the issuer of the certificate" echo " -n,--cn name pattern to match the CN of the certificate" echo " -N,--host-cn match CN with the host name" echo " -o,--org org pattern to match the organization of the certificate" echo " --openssl path path of the openssl binary to be used" echo " -p,--port port TCP port" echo " -P,--protocol protocol use the specific protocol {http|smtp|pop3|imap|ftp|xmpp}" echo " http: default" echo " smtp,pop3,imap,ftp: switch to TLS" echo " -s,--selfsigned allows self-signed certificates" echo " -S,--ssl version force SSL version (2,3)" echo " -r,--rootcert path root certificate or directory to be used for" echo " certficate validation" echo " -t,--timeout seconds timeout after the specified time" echo " (defaults to 15 seconds)" echo " --temp dir directory where to store the temporary files" echo " -v,--verbose verbose output" echo " -V,--version version" echo " -w,--warning days minimum number of days a certificate has to be valid" echo " to issue a warning status" echo echo "Deprecated options:" echo " -d,--days days minimum number of days a certificate has to be valid" echo " (see --critical and --warning)" echo echo "Report bugs to: Matteo Corti " echo exit 3 } ################################################################################ # Exits with a critical message # Params # $1 error message critical() { if [ -n "${CN}" ] ; then tmp=" ${CN}" fi printf "${SHORTNAME} CRITICAL$tmp: $1${PERFORMANCE_DATA}${LONG_OUTPUT}\n" exit 2 } ################################################################################ # Exits with a warning message # Param # $1 warning message warning() { if [ -n "${CN}" ] ; then tmp=" ${CN}" fi printf "${SHORTNAME} WARN$tmp: $1${PERFORMANCE_DATA}${LONG_OUTPUT}\n" exit 1 } ################################################################################ # Exits with an 'unkown' status # Param # $1 message unknown() { if [ -n "${CN}" ] ; then tmp=" ${CN}" fi printf "${SHORTNAME} UNKNOWN$tmp: $1\n" exit 3 } ################################################################################ # Executes command with a timeout # Params: # $1 timeout in seconds # $2 command # Returns 1 if timed out 0 otherwise exec_with_timeout() { time=$1 # start the command in a subshell to avoid problem with pipes # (spawn accepts one command) command="/bin/sh -c \"$2\"" if [ -n "${TIMEOUT_BIN}" ] ; then eval "${TIMEOUT_BIN} $time $command" elif [ -n "${EXPECT}" ] ; then expect -c "set echo \"-noecho\"; set timeout $time; spawn -noecho $command; expect timeout { exit 1 } eof { exit 0 }" if [ $? = 1 ] ; then critical "Timeout after ${time} seconds" fi else eval ${command} fi } ################################################################################ # Checks if a given program is available and executable # Params # $1 program name # Returns 1 if the program exists and is executable check_required_prog() { PROG=$(which $1 2> /dev/null) if [ -z "$PROG" ] ; then critical "cannot find $1" fi if [ ! -x "$PROG" ] ; then critical "$PROG is not executable" fi } ################################################################################ # Tries to fetch the certificate fetch_certificate() { # check if a protocol was specified (if not HTTP switch to TLS) if [ -n "${PROTOCOL}" ] && [ "${PROTOCOL}" != "http" ] && [ "${PROTOCOL}" != "https" ] ; then case "${PROTOCOL}" in smtp|pop3|imap|ftp|xmpp) exec_with_timeout $TIMEOUT "echo 'Q' | $OPENSSL s_client ${CLIENT} ${CLIENTPASS} -starttls ${PROTOCOL} -connect $HOST:$PORT ${SERVERNAME} -verify 6 ${ROOT_CA} ${SSL_VERSION} 2> ${ERROR} 1> ${CERT}" ;; *) unknown "Error: unsupported protocol ${PROTOCOL}" esac elif [ -n "${FILE}" ] ; then if [ "${HOST}" = "localhost" ] ; then exec_with_timeout $TIMEOUT "/bin/cat '${FILE}' 2> ${ERROR} 1> ${CERT}" else unknown "Error: option 'file' works with -H localhost only" fi else exec_with_timeout $TIMEOUT "echo 'Q' | $OPENSSL s_client ${CLIENT} ${CLIENTPASS} -connect $HOST:$PORT ${SERVERNAME} -verify 6 ${ROOT_CA} ${SSL_VERSION} 2> ${ERROR} 1> ${CERT}" fi if [ $? -ne 0 ] ; then critical "Error: $(head -n 1 ${ERROR})" fi } main() { ################################################################################ # Main ################################################################################ # default values PORT=443 TIMEOUT=15 VERBOSE="" OPENSSL="" SSLVERSION="" # set the default temp dir if not set if [ -z "${TMPDIR}" ] ; then TMPDIR="/tmp" fi ################################################################################ # process command line options # # we do no use getopts since it is unable to process long options while true; do case "$1" in ######################################## # options without arguments -A|--noauth) NOAUTH=1; shift ;; --altnames) ALTNAMES=1; shift ;; -h|--help|-\?) usage; exit 0 ;; -N|--host-cn) COMMON_NAME="__HOST__"; shift ;; -s|--selfsigned) SELFSIGNED=1; shift ;; -v|--verbose) VERBOSE=1; shift ;; -V|--version) echo "check_ssl_cert version ${VERSION}"; exit 3; ;; ######################################## # options with arguments -c|--critical) if [ $# -gt 1 ]; then CRITICAL=$2; shift 2 else unknown "-c,--critical requires an argument" fi ;; # deprecated option: used to be as --warning -d|--days) if [ $# -gt 1 ]; then WARNING=$2; shift 2 else unknown "-d,--days requires an argument" fi ;; -e|--email) if [ $# -gt 1 ]; then ADDR=$2; shift 2 else unknown "-e,--email requires an argument" fi ;; -f|--file) if [ $# -gt 1 ]; then FILE=$2; shift 2 else unknown "-f,--file requires an argument" fi ;; -H|--host) if [ $# -gt 1 ]; then HOST=$2; shift 2 else unknown "-H,--host requires an argument" fi ;; -i|--issuer) if [ $# -gt 1 ]; then ISSUER=$2; shift 2 else unknown "-i,--issuer requires an argument" fi ;; --long-output) if [ $# -gt 1 ]; then LONG_OUTPUT_ATTR=$2; shift 2 else unknown "--long-output requires an argument" fi ;; -n|--cn) if [ $# -gt 1 ]; then COMMON_NAME=$2; shift 2 else unknown "-n,--cn requires an argument" fi ;; -o|--org) if [ $# -gt 1 ]; then ORGANIZATION=$2; shift 2 else unknown "-o,--org requires an argument" fi ;; --openssl) if [ $# -gt 1 ]; then OPENSSL=$2; shift 2 else unknown "--openssl requires an argument" fi ;; -p|--port) if [ $# -gt 1 ]; then PORT=$2; shift 2 else unknown "-p,--port requires an argument" fi ;; -P|--protocol) if [ $# -gt 1 ]; then PROTOCOL=$2; shift 2 else unknown "-P,--protocol requires an argument" fi ;; -r|--rootcert) if [ $# -gt 1 ]; then ROOT_CA=$2; shift 2 else unknown "-r,--rootcert requires an argument" fi ;; -C|--clientcert) if [ $# -gt 1 ]; then CLIENT_CERT=$2; shift 2 else unknown "-c,--clientcert requires an argument" fi ;; --clientpass) if [ $# -gt 1 ]; then CLIENT_PASS=$2; shift 2 else unknown "--clientpass requires an argument" fi ;; -S|--ssl) if [ $# -gt 1 ]; then if [ "$2" = "2" -o "$2" = "3" ] ; then SSL_VERSION="-ssl$2" ; shift 2 else unknown "invalid argument for --ssl" fi else unknown "--ssl requires an argument" fi ;; -t|--timeout) if [ $# -gt 1 ]; then TIMEOUT=$2; shift 2 else unknown "-t,--timeout requires an argument" fi ;; --temp) if [ $# -gt 1 ] ; then # override TMPDIR TMPDIR=$2; shift 2 else unknown "--temp requires an argument" fi ;; -w|--warning) if [ $# -gt 1 ]; then WARNING=$2; shift 2 else unknown "-w,--warning requires an argument" fi ;; ######################################## # special --) shift; break;; -*) unknown "invalid option: $1" ;; *) break;; esac done ################################################################################ # Set COMMON_NAME to hostname if -N was given as argument if [ "$COMMON_NAME" = "__HOST__" ] ; then COMMON_NAME=${HOST} fi ################################################################################ # sanity checks ############### # Check options if [ -z "${HOST}" ] ; then usage "No host specified" fi if [ -n "${ALTNAMES}" ] && [ -z "${COMMON_NAME}" ] ; then unknown "--altnames requires a common name to match (--cn or --host-cn)" fi if [ -n "${ROOT_CA}" ] ; then if [ ! -r ${ROOT_CA} ] ; then unknown "Cannot read root certificate ${ROOT_CA}" fi if [ -d ${ROOT_CA} ] ; then ROOT_CA="-CApath ${ROOT_CA}" elif [ -f ${ROOT_CA} ] ; then ROOT_CA="-CAfile ${ROOT_CA}" else unknown "Root certificate of unknown type $(file ${ROOT_CA} 2> /dev/null)" fi fi if [ -n "${CLIENT_CERT}" ] ; then if [ ! -r ${CLIENT_CERT} ] ; then unknown "Cannot read client certificate ${CLIENT_CERT}" fi fi if [ -n "${CRITICAL}" ] ; then if ! echo "${CRITICAL}" | grep -q '[0-9][0-9]*' ; then unknown "invalid number of days ${CRITICAL}" fi fi if [ -n "${WARNING}" ] ; then if ! echo ${WARNING} | grep -q '[0-9][0-9]*' ; then unknown "invalid number of days ${WARNING}" fi fi if [ -n "${CRITICAL}" ] && [ -n "${WARNING}" ] ; then if [ ${WARNING} -le ${CRITICAL} ] ; then unknown "--warning (${WARNING}) is less than or equal to --critical (${CRITICAL})" fi fi if [ -n "${TMPDIR}" ] ; then if [ ! -d ${TMPDIR} ] ; then unknown "${TMPDIR} is not a directory"; fi if [ ! -w ${TMPDIR} ] ; then unknown "${TMPDIR} is not writable"; fi fi if [ -n "${OPENSSL}" ] ; then if [ ! -x ${OPENSSL} ] ; then unknown "${OPENSSL} ist not an executable" fi if [ $(basename ${OPENSSL}) != 'openssl' ] ; then unknown "${OPENSSL} ist not an openssl executable" fi fi ####################### # Check needed programs # OpenSSL if [ -z "${OPENSSL}" ] ; then check_required_prog openssl OPENSSL=$PROG fi # Expect (optional) EXPECT=$(which expect 2> /dev/null) test -x "${EXPECT}" || EXPECT="" if [ -n "${VERBOSE}" ] ; then if [ -z "${EXPECT}" ] ; then echo "expect not available" else echo "expect available (${EXPECT})" fi fi # Timeout (optional) TIMEOUT_BIN=$(which timeout 2> /dev/null) test -x "${TIMEOUT_BIN}" || TIMEOUT_BIN="" if [ -n "${VERBOSE}" ] ; then if [ -z "${TIMEOUT_BIN}" ] ; then echo "timeout not available" else echo "timeout available (${TIMEOUT_BIN})" fi fi if [ -z "${TIMEOUT_BIN}" ] && [ -z "${EXPECT}" ] && [ -n "${VERBOSE}" ] ; then echo "disabling timeouts" fi # Perl with Date::Parse (optional) PERL=$(which perl 2> /dev/null) test -x "${PERL}" || PERL="" if [ -z "${PERL}" ] && [ -n "${VERBOSE}" ] ; then echo "Perl not found: disabling date computations" fi if ! ${PERL} -e "use Date::Parse;" > /dev/null 2>&1 ; then if [ -n "${VERBOSE}" ] ; then echo "Perl module Date::Parse not installed: disabling date computations" fi PERL= fi ################################################################################ # check if openssl s_client supports the -servername option # # openssl s_client does not have a -help option # => we supply an invalid command line option to get the help # on standard error # SERVERNAME= if ${OPENSSL} s_client not_a_real_option 2>&1 | grep -q -- -servername ; then if [ -n "${COMMON_NAME}" ] ; then SERVERNAME="-servername ${COMMON_NAME}" else SERVERNAME="-servername ${HOST}" fi else if [ -n "${VERBOSE}" ] ; then echo "'${OPENSSL} s_client' does not support '-servername': disabling virtual server support" fi fi ################################################################################ # fetch the X.509 certificate # temporary storage for the certificate and the errors CERT=$( mktemp -t "$( basename $0 )XXXXXX" 2> /dev/null ) if [ -z "${CERT}" ] || [ ! -w "${CERT}" ] ; then unknown 'temporary file creation failure.' fi ERROR=$( mktemp -t "$( basename $0 )XXXXXX" 2> /dev/null ) if [ -z "${ERROR}" ] || [ ! -w "${ERROR}" ] ; then unknown 'temporary file creation failure.' fi if [ -n "${VERBOSE}" ] ; then echo "downloading certificate to ${TMPDIR}" fi CLIENT="" if [ -n "${CLIENT_CERT}" ] ; then CLIENT="-cert ${CLIENT_CERT}" fi CLIENTPASS="" if [ -n "${CLIENT_PASS}" ] ; then CLIENTPASS="-pass pass:${CLIENT_PASS}" fi # cleanup before program termination # using named signals to be POSIX compliant trap "rm -f $CERT $ERROR" EXIT HUP INT QUIT TERM fetch_certificate if grep -q 'sslv3\ alert\ unexpected\ message' ${ERROR} ; then if [ -n "${SERVERNAME}" ] ; then # some OpenSSL versions have problems with the -servername option # we try without if [ -n "${VERBOSE}" ] ; then echo "'${OPENSSL} s_client' returned an error: trying without '-servername'" fi SERVERNAME= fetch_certificate fi if grep -q 'sslv3\ alert\ unexpected\ message' ${ERROR} ; then critical "cannot fetch certificate: OpenSSL got an unexpected message" fi fi if ! grep -q "CERTIFICATE" ${CERT} ; then if [ -n "${FILE}" ] ; then critical "'${FILE}' is not a valid certificate file" else # See # http://stackoverflow.com/questions/1251999/sed-how-can-i-replace-a-newline-n # # - create a branch label via :a # - the N command appends a newline and and the next line of the input # file to the pattern space # - if we are before the last line, branch to the created label $!ba # ($! means not to do it on the last line (as there should be one final newline)) # - finally the substitution replaces every newline with a space on # the pattern space ERROR_MESSAGE=$(sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/; /g' ${ERROR}) if [ -n "${VERBOSE}" ] ; then echo "Error: ${ERROR_MESSAGE}" fi critical "No certificate returned (${ERROR_MESSAGE})" fi fi ################################################################################ # parse the X.509 certificate DATE=$($OPENSSL x509 -in ${CERT} -enddate -noout | sed -e "s/^notAfter=//") CN=$($OPENSSL x509 -in ${CERT} -subject -noout | sed -e "s/^.*\/CN=//" -e "s/\/[A-Za-z][A-Za-z]*=.*$//") CA_O=$($OPENSSL x509 -in ${CERT} -issuer -noout | sed -e "s/^.*\/O=//" -e "s/\/[A-Z][A-Z]*=.*$//") CA_CN=$($OPENSSL x509 -in ${CERT} -issuer -noout | sed -e "s/^.*\/CN=//" -e "s/\/[A-Za-z][A-Za-z]*=.*$//") ################################################################################ # Generate the long output if [ -n "${LONG_OUTPUT_ATTR}" ] ; then check_attr() { ATTR=$1 if ! echo "${VALID_ATTRIBUTES}" | grep -q ",${ATTR}," ; then unknown "Invalid certificate attribute: ${ATTR}" else value=$(${OPENSSL} x509 -in ${CERT} -noout -${ATTR} | sed -e "s/.*=//") LONG_OUTPUT="${LONG_OUTPUT}\n${ATTR}: ${value}" fi } # split on comma if [ "${LONG_OUTPUT_ATTR}" = "all" ] ; then LONG_OUTPUT_ATTR=${VALID_ATTRIBUTES} fi attributes=$( echo ${LONG_OUTPUT_ATTR} | tr ',' "\n" ) for attribute in $attributes ; do check_attr ${attribute} done fi ################################################################################ # compute for how many days the certificate will be valid if [ -n "${PERL}" ] ; then CERT_END_DATE=$($OPENSSL x509 -in ${CERT} -noout -enddate | sed -e "s/.*=//") DAYS_VALID=$( perl - "${CERT_END_DATE}" <<-"EOF" use strict; use warnings; use Date::Parse; my $cert_date = str2time( $ARGV[0] ); my $days = int (( $cert_date - time ) / 86400 + 0.5); print "$days\n"; EOF ) if [ -n "${VERBOSE}" ] ; then if [ ${DAYS_VALID} -ge 0 ] ; then echo "The certificate will expire in ${DAYS_VALID} day(s)" else echo "The certificate expired "$((- DAYS_VALID))" day(s) ago" fi fi PERFORMANCE_DATA="|days=$DAYS_VALID;${WARNING};${CRITICAL};;" fi ################################################################################ # check the CN (this will not work as expected with wildcard certificates) if [ -n "$COMMON_NAME" ] ; then ok='' case $COMMON_NAME in $CN) ok='true' ;; esac # check alterante names if [ -n "${ALTNAMES}" ] ; then for alt_name in $( $OPENSSL x509 -in ${CERT} -text | \ grep --after-context=1 '509v3 Subject Alternative Name:' | \ tail -n 1 | sed -e "s/DNS://g" | sed -e "s/,//g" ) ; do case $COMMON_NAME in $alt_name) ok='true' ;; esac done fi if [ -z "$ok" ] ; then critical "invalid CN ('$CN' does not match '$COMMON_NAME')" fi fi ################################################################################ # check the issuer if [ -n "$ISSUER" ] ; then ok='' CA_ISSUER_MATCHED='' if echo $CA_CN | grep -q "^$ISSUER$" ; then ok='true' CA_ISSUER_MATCHED="${CA_CN}" fi if echo $CA_O | grep -q "^$ISSUER$" ; then ok='true' CA_ISSUER_MATCHED="${CA_O}" fi if [ -z "$ok" ] ; then critical "invalid CA ('$ISSUER' does not match '$CA_O' or '$CA_CN')" fi else CA_ISSUER_MATCHED="${CA_CN}" fi ################################################################################ # check the validity # we always check expired certificates if ! $OPENSSL x509 -in ${CERT} -noout -checkend 0 ; then critical "certificate is expired (was valid until $DATE)" fi if [ -n "${CRITICAL}" ] ; then if ! $OPENSSL x509 -in ${CERT} -noout -checkend $(( ${CRITICAL} * 86400 )) ; then critical "certificate will expire on $DATE" fi fi if [ -n "${WARNING}" ] ; then if ! $OPENSSL x509 -in ${CERT} -noout -checkend $(( ${WARNING} * 86400 )) ; then warning "certificate will expire on $DATE" fi fi ################################################################################ # check the organization if [ -n "$ORGANIZATION" ] ; then ORG=$($OPENSSL x509 -in ${CERT} -subject -noout | sed -e "s/.*\/O=//" -e "s/\/.*//") if ! echo $ORG | grep -q "^$ORGANIZATION" ; then critical "invalid organization ('$ORGANIZATION' does not match '$ORG')" fi fi ################################################################################ # check the organization if [ -n "$ADDR" ] ; then EMAIL=$($OPENSSL x509 -in ${CERT} -email -noout) if [ -n "${VERBOSE}" ] ; then echo "checking email (${ADDR}): ${EMAIL}" fi if [ -z "${EMAIL}" ] ; then critical "the certficate does not contain an email address" fi if ! echo $EMAIL | grep -q "^$ADDR" ; then critical "invalid email ($ADDR does not match $EMAIL)" fi fi ################################################################################ # Check if the certificate was verified if [ -z "${NOAUTH}" ] && grep -q '^verify\ error:' ${ERROR} ; then if grep -q '^verify\ error:num=[0-9][0-9]*:self\ signed\ certificate' ${ERROR} ; then if [ -z "${SELFSIGNED}" ] ; then critical "Cannot verify certificate\nself signed certificate" else SELFSIGNEDCERT="self signed " fi else # process errors details=$(grep '^verify\ error:' ${ERROR} | sed -e "s/verify\ error:num=[0-9]*:/verification error: /" ) critical "Cannot verify certificate\n${details}" fi fi ################################################################################ # If we get this far, assume all is well. :) # if --altnames was specified we show the specified CN instead of # the certificate CN if [ -n "${ALTNAMES}" ] && [ -n "${COMMON_NAME}" ] ; then CN=${COMMON_NAME} fi if [ -n "${DAYS_VALID}" ] ; then # nicer formatting if [ ${DAYS_VALID} -gt 1 ] ; then DAYS_VALID=" (expires in ${DAYS_VALID} days)" elif [ ${DAYS_VALID} -eq 1 ] ; then DAYS_VALID=" (expires tomorrow)" elif [ ${DAYS_VALID} -eq 0 ] ; then DAYS_VALID=" (expires today)" elif [ ${DAYS_VALID} -eq -1 ] ; then DAYS_VALID=" (expired yesterday)" else DAYS_VALID=" (expired ${DAYS_VALID} days ago)" fi fi echo "${SHORTNAME} OK - X.509 ${SELFSIGNEDCERT}certificate for '${CN}' from '${CA_ISSUER_MATCHED}' valid until ${DATE}${DAYS_VALID}${PERFORMANCE_DATA}${LONG_OUTPUT}" exit 0 } if [ "${1}" != "--source-only" ]; then main "${@}" fi nagios-plugins-contrib-9.20140106/check_ssl_cert/check_ssl_cert-1.15.0/COPYING0000644000000000000000000010451312262515026023111 0ustar GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. 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 them 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 prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. 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. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey 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; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If 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 convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU 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 that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. 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. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 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. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. 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 state 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) 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program 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, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU 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 Lesser General Public License instead of this License. But first, please read . nagios-plugins-contrib-9.20140106/check_ssl_cert/check_ssl_cert-1.15.0/Makefile0000644000000000000000000000215412262515026023514 0ustar PLUGIN=check_ssl_cert VERSION=`cat VERSION` DIST_DIR=$(PLUGIN)-$(VERSION) DIST_FILES=AUTHORS COPYING ChangeLog INSTALL Makefile NEWS README TODO VERSION $(PLUGIN) $(PLUGIN).spec COPYRIGHT ${PLUGIN}.1 test dist: version_check rm -rf $(DIST_DIR) $(DIST_DIR).tar.gz mkdir $(DIST_DIR) cp -r $(DIST_FILES) $(DIST_DIR) tar cfz $(DIST_DIR).tar.gz $(DIST_DIR) tar cfj $(DIST_DIR).tar.bz2 $(DIST_DIR) install: mkdir -p $(DESTDIR) install -m 755 $(PLUGIN) $(DESTDIR) mkdir -p ${MANDIR}/man1 install -m 644 ${PLUGIN}.1 ${MANDIR}/man1/ version_check: VERSION=`cat VERSION` grep -q "VERSION\ *=\ *[\'\"]*$(VERSION)" $(PLUGIN) grep -q "^%define\ version\ *$(VERSION)" $(PLUGIN).spec grep -q -- "- $(VERSION)-" $(PLUGIN).spec grep -q "\"$(VERSION)\"" $(PLUGIN).1 grep -q "${VERSION}" NEWS echo "Version check: OK" clean: rm -f *~ test: ( cd test && ./unit_tests.sh ) .PHONY: install clean test # File version information: # $Id: AUTHORS 1103 2009-12-07 07:49:19Z corti $ # $Revision: 1103 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_updates/AUTHORS $ # $Date: 2009-12-07 08:49:19 +0100 (Mon, 07 Dec 2009) $ nagios-plugins-contrib-9.20140106/check_ssl_cert/Makefile0000644000000000000000000000017412262515026020021 0ustar #/usr/bin/make -f PLUGIN = src/check_ssl_cert MANPAGES = src/check_ssl_cert.1 DOCFILES = src/README include ../common.mk nagios-plugins-contrib-9.20140106/dsa/0000755000000000000000000000000012262515026014153 5ustar nagios-plugins-contrib-9.20140106/dsa/checks/0000755000000000000000000000000012262515026015413 5ustar nagios-plugins-contrib-9.20140106/dsa/checks/dsa-check-entropy0000644000000000000000000000533412262515026020663 0ustar #!/usr/bin/python # Copyright 2011 Peter Palfrader # # 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. import sys import os import time import optparse AVAIL = '/proc/sys/kernel/random/entropy_avail' parser = optparse.OptionParser() parser.add_option("-r", "--retries", dest="retries", metavar="NUM", type="int", default=10, help="Max number of retries [10].") parser.add_option("-s", "--sleep", dest="sleep", metavar="MSECS", type="int", default=250, help="Amount of time to wait between reads [250msec].") parser.add_option("-w", "--watermark", dest="watermark", metavar="BYTES", type="int", default=800, help="Minimum number of expected bytes in the entropy pool [800].") (options, args) = parser.parse_args() if len(args) != 0: parser.print_help() sys.exit(4) if not os.path.exists(AVAIL): print "File %s does not exist."%(AVAIL) sys.exit(4) tries = 0 values = [] while tries <= options.retries: f = open('/proc/sys/kernel/random/entropy_avail') avail = f.readline().rstrip() if len(avail) == 0: print "Could not read anything from %s"%(AVAIL) sys.exit(4) try: avail = int(avail) except ValueError: print "Did not read a number from %s, got '%s' instead"%(AVAIL, avail) sys.exit(4) if avail >= options.watermark: if tries > 0: print "OK: %d bytes in the pool after %d attempts."%(avail, tries) else: print "OK: %d bytes in the pool."%(avail) sys.exit(0) values.append(avail) time.sleep(1.0 * options.sleep / 1000) tries += 1 print "WARNING: Too little entropy in the pool (min: %d, max: %d in %d reads)"%(min(values), max(values), tries-1) sys.exit(1) # vim:set et: # vim:set ts=4: # vim:set shiftwidth=4: nagios-plugins-contrib-9.20140106/dsa/checks/dsa-check-dnssec-delegation0000644000000000000000000001541412262515026022553 0ustar #!/usr/bin/perl # Copyright (c) 2010 Peter Palfrader # # 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. use strict; use warnings; use English; use Net::DNS::Resolver; use Getopt::Long; use File::Basename; $SIG{'__DIE__'} = sub { print @_; exit 4; }; my $RES = Net::DNS::Resolver->new; my $DLV = 'dlv.isc.org'; my $params; sub get_tag_generic { my $zone = shift; my $type = shift; my @result; print "Querying $type $zone\n" if $params->{'verbose'}; my $pkt = $RES->send($zone, $type); return () unless $pkt; return () unless $pkt->answer; for my $rr ($pkt->answer) { next unless ($rr->type eq $type); next unless (lc($rr->name) eq lc($zone)); # only handle KSKs, i.e. keys with the SEP flag set next if ($type eq 'DNSKEY' && !($rr->is_sep)); push @result, $rr->keytag; }; my %unique = (); @result = sort {$a <=> $b} grep {!$unique{$_}++} @result; return @result }; sub get_dnskeytags { my $zone = shift; return get_tag_generic($zone, 'DNSKEY'); }; sub get_dstags { my $zone = shift; return get_tag_generic($zone, 'DS'); }; sub get_dlvtags { my $zone = shift; $zone .= ".".$DLV; return get_tag_generic($zone, 'DLV'); }; sub has_dnskey_parent { my $zone = shift; my $potential_parent; if ($zone =~ m/\./) { $potential_parent = $zone; $potential_parent =~ s/^[^.]+\.//; } else { $potential_parent = '.'; } print "Querying DNSKEY $potential_parent\n" if $params->{'verbose'}; my $pkt = $RES->send($potential_parent, 'DNSKEY'); return undef unless $pkt; return undef unless $pkt->header; unless ($pkt->answer) { return undef unless $pkt->authority; for my $rr ($pkt->authority) { next unless ($rr->type eq 'SOA'); $potential_parent = $rr->name; print "Querying DNSKEY $potential_parent\n" if $params->{'verbose'}; $pkt = $RES->send($potential_parent, 'DNSKEY'); return undef unless $pkt; last; }; }; return (0, $potential_parent) unless $pkt->answer; for my $rr ($pkt->answer) { next unless ($rr->type eq 'DNSKEY'); return (1, $potential_parent); }; } sub get_parent_dnssec_status { my $zone = shift; my @result; while (1) { my ($status, $parent) = has_dnskey_parent($zone); last unless defined $status; push @result, ($status ? "yes" : "no") . ("($parent)"); $zone = $parent; last if $zone eq "" || $zone eq '.'; }; return join(', ', @result); }; sub usage { my $fd = shift; my $exit = shift; print $fd "Usage: $PROGRAM_NAME [--dir ] overview|check-dlv|check-ds|check-header zone [zone...]\n"; print $fd " $PROGRAM_NAME --dir overview|check-dlv|check-ds|check-header\n"; print $fd " $PROGRAM_NAME --help\n"; exit $exit; } sub what_to_check { my $zone = shift; my $zonefile = shift; my $do_dlv = 0; my $do_ds = 0; open(F, "<", $zonefile) or die ("Cannot open zonefile $zonefile for $zone: $!\n"); while () { if (/^[#;]\s*dlv-submit\s*=\s*yes\s*$/) { $do_dlv = 1; } if (/^[#;]\s*ds-in-parent\s*=\s*yes\s*$/) { $do_ds = 1; } } close(F); my @keys = (); push @keys, 'dlv' if $do_dlv; push @keys, 'ds' if $do_ds; return @keys; } Getopt::Long::config('bundling'); GetOptions ( '--help' => \$params->{'help'}, '--dir=s@' => \$params->{'dir'}, '--dlv=s' => \$params->{'dlv'}, '--verbose' => \$params->{'verbose'}, ) or usage(\*STDERR, 1); usage(\*STDOUT, 0) if ($params->{'help'}); my $mode = shift @ARGV; usage(\*STDOUT, 0) unless (defined $mode && $mode =~ /^(overview|check-dlv|check-ds|check-header)$/); die ("check-header needs --dir") if ($mode eq 'check-header' && !defined $params->{'dir'}); my %zones; if (scalar @ARGV) { if (defined $params->{'dir'} && $mode ne 'check-header') { warn "--dir option ignored" } %zones = map { $_ => $_} @ARGV; } else { my $dirs = $params->{'dir'}; usage(\*STDOUT, 0) unless (defined $dirs); for my $dir (@$dirs) { chdir $dir or die "chdir $dir failed? $!\n"; opendir DIR, '.' or die ("Cannot opendir $dir\n"); for my $file (readdir DIR) { next if ( -l "$file" ); next unless ( -f "$file" ); next if $file =~ /^(dsset|keyset)-/; my $zone = $file; if ($file =~ /\.zone$/) { # it's one of our yaml things $zone = basename($file, '.zone'); }; $zones{$zone} = "$dir/$file"; } closedir(DIR); }; }; $DLV = $params->{'dlv'} if $params->{'dlv'}; if ($mode eq 'overview') { my %data; for my $zone (keys %zones) { $data{$zone} = { 'dnskey' => join(', ', get_dnskeytags($zone)), 'ds' => join(', ', get_dstags($zone)), 'dlv' => join(', ', get_dlvtags($zone)), 'parent_dnssec' => get_parent_dnssec_status($zone) }; } my $format = "%60s %-10s %-10s %-10s %-10s\n"; printf $format, "zone", "DNSKEY", "DS\@parent", "DLV", "dnssec\@parent"; printf $format, "-"x 60, "-"x 10, "-"x 10, "-"x 10, "-"x 10; for my $zone (sort {$a cmp $b} keys %data) { printf $format, $zone, $data{$zone}->{'dnskey'}, $data{$zone}->{'ds'}, $data{$zone}->{'dlv'}, $data{$zone}->{'parent_dnssec'}; } exit(0); } elsif ($mode eq 'check-dlv' || $mode eq 'check-ds' || $mode eq 'check-header') { my $key; $key = 'dlv' if $mode eq 'check-dlv'; $key = 'ds' if $mode eq 'check-ds'; $key = 'per-zone' if $mode eq 'check-header'; die ("key undefined") unless $key; my @warn; my @ok; for my $zone (sort {$a cmp $b} keys %zones) { my @thiskeys = $key eq 'per-zone' ? what_to_check($zone, $zones{$zone}) : ($key); my $dnskey = join(', ', get_dnskeytags($zone)) || '-'; for my $thiskey (@thiskeys) { my $target = join(', ', $thiskey eq 'ds' ? get_dstags($zone) : get_dlvtags($zone)) || '-'; if ($dnskey ne $target) { push @warn, "$zone ([$dnskey] != [$target])"; } else { push @ok, "$zone ($dnskey)"; }; } } print "WARNING: ", join(", ", @warn), "\n" if (scalar @warn); print "OK: ", join(", ", @ok), "\n" if (scalar @ok); exit (1) if (scalar @warn); exit (0); } else { die ("Invalid mode '$mode'\n"); }; nagios-plugins-contrib-9.20140106/dsa/checks/dsa-check-statusfile0000644000000000000000000000564412262515026021352 0ustar #!/usr/bin/python # Relay the status of a check that was previously run and which stored # its result in a file to nagios. # # Copyright 2008, 2012 Peter Palfrader # # 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. import optparse import os import re import sys import time NAGIOS_STATUS = { "OK": 0, "WARNING": 1, "CRITICAL": 2, "UNKNOWN": 3 } UNITS_TO_SECONDS = { 's': 1, 'm': 60, 'h': 60*60, 'd': 24*60*60 } parser = optparse.OptionParser() parser.set_usage("%prog [options] ") parser.add_option("-a", "--age", dest="age", metavar="AGE", type="string", default="26h", help="maximum age, in seconds (or use Nm, Nh or Nd) - default is 26h.") (options, args) = parser.parse_args() if len(args) != 1: parser.print_help(file=sys.stderr) sys.exit(1) statusfile = args[0] # find out what the max age is that we accept m = re.match('([0-9]+)([smhd])?$', options.age) if not m: print >> sys.stderr, "Invalid age %s"%(options.age) parser.print_help(file=sys.stderr) sys.exit(1) (count, unit) = m.groups() if unit is None: unit = 's' max_age = int(count) * UNITS_TO_SECONDS[unit] # let's see if it exists if not os.path.exists(statusfile): print "UNKNOWN: %s does not exist."%(statusfile) sys.exit(NAGIOS_STATUS['UNKNOWN']) mtime = os.path.getmtime(statusfile) if mtime + max_age < time.time(): print "WARNING: %s is old: %.1f hours."%(statusfile, (time.time() - mtime)/3600) sys.exit(NAGIOS_STATUS['WARNING']) status = open(statusfile, "r") returnvalue = status.readline().strip() if not returnvalue in NAGIOS_STATUS: print "UNKNOWN: %s has invalid return value: %s."%(statusfile, returnvalue) sys.exit(NAGIOS_STATUS['UNKNOWN']) linecnt = 0 for line in status: print line, linecnt += 1 if linecnt == 0: print "Found no output. Something is probably wrong" sys.exit(NAGIOS_STATUS['UNKNOWN']) sys.exit(NAGIOS_STATUS[returnvalue]) # vim:set et: # vim:set ts=4: # vim:set shiftwidth=4: nagios-plugins-contrib-9.20140106/dsa/checks/dsa-check-soas0000644000000000000000000001147612262515026020134 0ustar #!/usr/bin/ruby # Copyright 2006, 2012 Peter Palfrader # 2012 Uli Martens # # 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. require 'ipaddr' require 'resolv' require 'optparse' require 'yaml' NAGIOS_STATUS = { :OK => 0, :WARNING => 1, :CRITICAL => 2, :UNKNOWN => -1 }; @verbose = 0; @additional_nameservers = [] @check_soa_nameservers = true; def show_help(parser, code=0, io=STDOUT) program_name = File.basename($0, '.*') io.puts "Usage: #{program_name} [options] [ ...]" io.puts parser.summarize exit(code) end ARGV.options do |opts| opts.on_tail("-h", "--help" , "Display this help screen") { show_help(opts) } opts.on("-v", "--verbose" , String, "Be verbose") { @verbose += 1 } opts.on("-a", "--add=HOST" , String, "Also check SOA on ") { |val| @additional_nameservers << val } opts.on("-n", "--no-soa-ns" , String, "Don't query SOA record for list of nameservers") { @check_soa_nameservers = false } opts.parse! end show_help(ARGV.options, 1, STDERR) if ARGV.length == 0 if @additional_nameservers.count <= 1 and not @check_soa_nameservers program_name = File.basename($0, '.*') STDERR.puts "#{program_name}: Only know about #{@additional_nameservers.count} nameserver(s) and --no-soa-ns specified. I want at least two." exit(1) end warnings = [] oks = [] def resolve_ns(dns, domain, nameserver) puts "Getting A record for nameserver #{nameserver} for #{domain}" if @verbose > 0 arecords = dns.getresources(nameserver, Resolv::DNS::Resource::IN::A) warnings << "Nameserver #{nameserver} for #{domain} has #{arecords.length} A records" if arecords.length != 1 addresses = arecords.map { |a| a.address.to_s } puts "Addresses for nameserver #{nameserver} for #{domain}: #{addresses.join(', ')}" if @verbose > 0 return addresses end dns = Resolv::DNS.new ARGV.each{ |domain| serial = [] nameserver_addresses = {} if @check_soa_nameservers nameservers = dns.getresources(domain, Resolv::DNS::Resource::IN::NS) nameservernames = nameservers.collect{ |ns| ns.name.to_s } nameservernames.each do |nameserver| addrs = resolve_ns(dns, domain, nameserver) warnings << "Duplicate nameserver #{nameserver} for #{domain}" if nameserver_addresses[nameserver] nameserver_addresses[nameserver] = addrs end end @additional_nameservers.each do |ns| begin ipa = IPAddr.new(ns) # check if it's an address addrs = [ns] rescue ArgumentError addrs = resolve_ns(dns, domain, ns) end warnings << "Duplicate nameserver #{ns} for #{domain}" if nameserver_addresses[ns] nameserver_addresses[ns] = addrs end nameserver_addresses.each_pair do |nameserver, addrs| puts "Testing nameserver #{nameserver} for #{domain}" if @verbose > 0 addrs.each do |a| puts " Nameserver #{nameserver} is at #{a}" if @verbose > 0 begin resolver = Resolv::DNS.new({:nameserver => a}) soas = resolver.getresources(domain, Resolv::DNS::Resource::IN::SOA) rescue SystemCallError => e warnings << "Could not resolve #{domain} on #{nameserver}: #{e.message}" else resolver.close warnings << "Nameserver #{nameserver} for #{domain} returns #{soas.length} SOAs" if soas.length != 1 soas.each do |soa| puts " Nameserver #{nameserver} returns serial #{soa.serial} for #{domain}" if @verbose > 0 serial << soa.serial unless serial.include? soa.serial end end end end case serial.length when 0 warnings << "Found no serials for #{domain}" when 1 oks << "#{domain} is at #{serial.first}" else warnings << "Nameservers disagree on serials for #{domain}: found #{serial.join(', ')}" if serial.length != 1 end } dns.close if warnings.length > 0 puts warnings.join('; ') exit NAGIOS_STATUS[:WARNING] else puts oks.join('; ') exit NAGIOS_STATUS[:OK] end nagios-plugins-contrib-9.20140106/dsa/checks/dsa-check-running-kernel0000644000000000000000000001720112262515026022115 0ustar #!/bin/bash # Check if the running kernel has the same version string as the on-disk # kernel image. # Copyright 2008,2009,2011 Peter Palfrader # Copyright 2009 Stephen Gran # Copyright 2010,2012,2013 Uli Martens # Copyright 2011 Alexander Reichle-Schmehl # # 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. OK=0; WARNING=1; CRITICAL=2; UNKNOWN=3; get_offset() { local file needle file="$1" needle="$2" perl -e ' undef $/; $i = index(<>, "'"$needle"'"); if ($i < 0) { exit 1; }; print $i,"\n"' < "$file" } get_avail() { # This is wrong, but leaves room for when we have to care for machines running # myfirstunix-image-0.1-dsa-arm local prefix="$1"; shift local kervers=$(uname -r) local metavers='' # DSA uses kernel versions of the form 2.6.29.3-dsa-dl380-oldxeon, where # Debian uses versions of the form 2.6.29-2-amd64 if [ "${kervers#3}" != "$kervers" ]; then metavers=$(echo $kervers | sed -r -e 's/^3\.[0-9].[0-9]+-[A-Za-z0-9\.]+-(.*)/\1/') elif [ "${kervers//dsa}" != "$kervers" ]; then metavers=$(echo $kervers | sed -r -e 's/^2\.(4|6)\.[0-9]+([\.0-9]+?)-(.*)/2.\1-\3/') else metavers=$(echo $kervers | sed -r -e 's/^2\.(4|6)\.[0-9]+-[A-Za-z0-9\.]+-(.*)/2.\1-\2/') fi # Attempt to track back to a metapackage failed. bail if [ "$metavers" = "$kervers" ]; then return 2 fi # We're just going to give up if we can't find a matching metapackage # I tried being strict once, and it just caused a lot of headaches. We'll see how # being lax does for us local output=$(apt-cache policy ${prefix}-image-${metavers} 2>/dev/null) local metaavailvers=$(echo "$output" | grep '^ Candidate:' | awk '{print $2}') local metainstavers=$(echo "$output" | grep '^ Installed:' | awk '{print $2}') if [ -z "$metaavailvers" ] || [ "$metaavailvers" = '(none)' ]; then return 2 fi if [ -z "$metainstavers" ] || [ "$metainstavers" = '(none)' ]; then return 2 fi if [ "$metaavailvers" != "$metainstavers" ] ; then echo "${prefix}-image-${metavers} $metaavailvers available but $metainstavers installed" return 1 fi local imagename=0 # --no-all-versions show shows only the candidate for vers in $(apt-cache --no-all-versions show ${prefix}-image-${metavers} | sed -n 's/^Depends: //p' | tr ',' '\n' | tr -d ' ' | grep ${prefix}-image | awk '{print $1}' | sort -u); do if dpkg --compare-versions "1.$vers" gt "1.$imagename"; then imagename=$vers fi done if [ -z "$imagename" ] || [ "$imagename" = 0 ]; then return 2 fi if [ "$imagename" != "${prefix}-image-${kervers}" ]; then if dpkg --compare-versions 1."$imagename" lt 1."${prefix}-image-${kervers}"; then return 2 fi echo "$imagename" != "${prefix}-image-${kervers}" return 1 fi local availvrs=$(apt-cache policy ${imagename} 2>/dev/null | grep '^ Candidate' | awk '{print $2}') local kernelversion=$(apt-cache policy ${prefix}-image-${kervers} 2>/dev/null | grep '^ Installed:' | awk '{print $2}') if [ "$availvrs" = "$kernelversion" ]; then return 0 fi echo "$kernelversion != $availvrs" return 1 } cat_vmlinux() { local image header filter hdroff image="$1" header="$2" filter="$3" hdroff="$4" off=`get_offset "$image" $header` local ret="$?" if [ "$ret" != 0 ]; then # not found, exit return 1 fi (if [ "$off" != 0 ]; then dd ibs="$((off+hdroff))" skip=1 count=0 fi && dd bs=512k) < "$image" 2>/dev/null | $filter 2>/dev/null return 0 } get_image_linux() { local image image="$1" # gzip compressed image if cat_vmlinux "$image" "\x1f\x8b\x08\x00" "zcat" 0; then return; fi if cat_vmlinux "$image" "\x1f\x8b\x08\x08" "zcat" 0; then return; fi # lzma compressed image if cat_vmlinux "$image" "\x00\x00\x00\x02\xff" "xzcat" -1; then return; fi if cat_vmlinux "$image" "\x00\x00\x00\x04\xff" "xzcat" -1; then return; fi # xz compressed image if cat_vmlinux "$image" "\xfd\x37\x7a\x58\x5a " "xzcat" 0; then return; fi echo "ERROR: Unable to extract kernel image." 2>&1 exit 1 } freebsd_check_running_version() { local imagefile="$1"; shift local r="$(uname -r)" local v="$(uname -v| sed -e 's/^#[0-9]*/&:/')" local q='@\(#\)FreeBSD '"$r $v" if zcat "$imagefile" | $STRINGS | egrep -q "$q"; then echo "OK" else echo "not OK" fi } STRINGS=""; if [ -x "$(which strings)" ]; then STRINGS="$(which strings)" elif [ -x "$(which busybox)" -a "$( echo foobar | $(which busybox) strings 2>/dev/null)" = "foobar" ]; then STRINGS="$(which busybox) strings" fi searched="" for on_disk in \ "/boot/vmlinuz-`uname -r`"\ "/boot/vmlinux-`uname -r`"\ "/boot/kfreebsd-`uname -r`.gz"; do if [ -e "$on_disk" ]; then if [ -z "$STRINGS" ]; then echo "UNKNOWN: 'strings' command missing, perhaps install binutils or busybox?" exit $UNKNOWN fi if [ "${on_disk/vmlinu}" != "$on_disk" ]; then on_disk_version="`get_image_linux "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`" if [ -x /usr/bin/lsb_release ] ; then vendor=$(lsb_release -i -s) if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//") fi fi [ -z "$on_disk_version" ] || break on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`" [ -z "$on_disk_version" ] || break echo "UNKNOWN: Failed to get a version string from image $on_disk" exit $UNKNOWN else on_disk_version="$(zcat $on_disk | $STRINGS | grep Debian | head -n 1 | sed -e 's/Debian [[:alnum:]]\+ (\(.*\))/\1/')" fi fi searched="$searched $on_disk" done if ! [ -e "$on_disk" ]; then echo "WARNING: Did not find a kernel image (checked$searched) - I have no idea which kernel I am running" exit $WARNING fi if [ "$(uname -s)" = "Linux" ]; then running_version="`cat /proc/version`" if [ -z "$running_version" ] ; then echo "UNKNOWN: Failed to get a version string from running system" exit $UNKNOWN fi if [ "$running_version" != "$on_disk_version" ]; then echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]" exit $WARNING fi ret="$(get_avail linux)" if [ $? = 1 ]; then echo "WARNING: Kernel needs upgrade [$ret]" exit $WARNING fi else image_current=$(freebsd_check_running_version $on_disk) running_version="`uname -s` `uname -r` `uname -v`" if [ "$image_current" != "OK" ]; then approx_time="$(date -d "@`stat -c '%Y' "$on_disk"`" +"%Y-%m-%d %H:%M:%S")" echo "WARNING: Currently running kernel ($running_version) does not match on disk image (~ $approx_time)" exit $WARNING; fi ret="$(get_avail linux)" if [ $? = 1 ]; then echo "WARNING: Kernel needs upgrade [$ret]" exit $WARNING fi fi echo "OK: Running kernel matches on disk image: [$running_version]" exit $OK nagios-plugins-contrib-9.20140106/dsa/checks/dsa-check-packages0000644000000000000000000002257612262515026020750 0ustar #!/usr/bin/perl # dsa-check-packages # checks for obsolete/local and upgradeable packages. # # packages for the obsolete/local check can be ignored, by # listing their full name in /etc/nagios/obsolete-packages-ignore # or by having a regex (starting a line with "/") that matches # the packagename in said file. # # Takes one optional argument, the location of the ignore file. # Copyright (C) 2008, 2009 Peter Palfrader # # 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. use strict; use warnings; use English; my $IGNORE = "/etc/nagios/obsolete-packages-ignore"; my $IGNORED = "/etc/nagios/obsolete-packages-ignore.d"; my %CODE = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 ); my $EXITCODE = 'OK'; sub record($) { my ($newexit) = @_; die "code $newexit not defined\n" unless defined $CODE{$newexit}; if ($CODE{$newexit} > $CODE{$EXITCODE}) { $EXITCODE = $newexit; }; } sub get_packages { $ENV{'COLUMNS'} = 1000; $ENV{'LC_ALL'} = 'C'; open(F, "dpkg -l|") or die ("Cannot run dpkg: $!\n"); my @lines = ; close(F); chomp(@lines); my $line; my $has_arch = 0; while (defined($line = shift @lines) && ($line !~ /\+\+\+/)) { if ($line =~ /Architecture/) { $has_arch = 1; } } my %pkgs; for $line (@lines) { my ($state, $pkg, $version, $arch, undef) = split(/ */, $line); $arch = '' unless $has_arch; $pkgs{$state}{$pkg} = { 'installed' => $version, arch => $arch } } my $installed = $pkgs{'ii'}; delete $pkgs{'ii'}; my @installed_packages = keys(%$installed); my @cmd = ("apt-cache", "policy", @installed_packages); open my $olderr, ">&STDERR" or die "Can't dup STDERR: $!"; open STDERR, ">/dev/null" or die "Can't dup STDOUT: $!"; open (F, "-|", @cmd) or die ("Cannot run apt-cache policy: $!\n"); @lines = ; close(F); open STDERR, ">&", $olderr or die "Can't dup OLDERR: $!"; chomp(@lines); my $pkgname = undef; while (defined($line = shift @lines)) { if ($line =~ /^([^ ]*):$/) { # when we have multi-arch capable fu, we require that # apt-cache policy output is in the same order as its # arguments. # # We needs thi, because the output block in apt-cache # policy does not show the arch: # # | weasel@stanley:~$ apt-cache policy libedit2:amd64 # | libedit2: # | Installed: 2.11-20080614-5 # | Candidate: 2.11-20080614-5 # # We replace the package name in the output with the # one we asked for ($pkg:$arch) - but to match this up # sanely we need the order to be correct. # # For squeeze systems (no m-a), apt-cache policy output # is all different. $pkgname = $1; if ($has_arch) { my $from_list = shift @installed_packages; next if ($pkgname eq $from_list); # no :$arch in pkgname we asked for my $ma_fix_pkgname = $pkgname.':'.$installed->{$from_list}->{'arch'}; my $ma_fix_from_list = $from_list.':'.$installed->{$from_list}->{'arch'}; if ($pkgname eq $ma_fix_from_list || # e.g. ia32-libs-i386. dpkg -l: ia32-libs-i386, apt-cache policy: ia32-libs-i386:i386 $ma_fix_pkgname eq $from_list) { $pkgname = $from_list; } else { die "Unexpected order mismatch in apt-cache policy output (apt-cache policy name: $pkgname - dpkg -l name: $from_list)\n"; } } } elsif ($line =~ /^ +Installed: (.*)$/) { # etch dpkg -l does not print epochs, so use this info, it's better $installed->{$pkgname}{'installed'} = $1; } elsif ($line =~ /^ +Candidate: (.*)$/) { $installed->{$pkgname}{'candidate'} = $1; } elsif ($line =~ /^ +\*\*\*/) { $line = shift @lines; my @l = split(/ +/, $line); $installed->{$pkgname}{'origin'} = $l[2]; } } my (%current, %obsolete, %outofdate); for my $pkgname (keys %$installed) { my $pkg = $installed->{$pkgname}; unless (defined($pkg->{'candidate'}) && defined($pkg->{'origin'})) { $obsolete{$pkgname} = $pkg; next; } if ($pkg->{'candidate'} ne $pkg->{'installed'}) { $outofdate{$pkgname} = $pkg; next; }; if ($pkg->{'origin'} eq '/var/lib/dpkg/status') { $obsolete{$pkgname} = $pkg; next; } $current{$pkgname} = $pkg; } $pkgs{'current'} = \%current; $pkgs{'outofdate'} = \%outofdate; $pkgs{'obsolete'} = \%obsolete; return \%pkgs; } sub load_ignores { my ($ignorefiles, $require_file) = @_; my @ignores; for my $ignoreitem (@$ignorefiles) { next if (!$require_file and ! -e $ignoreitem); my @filestoopen; if (-d $ignoreitem) { opendir(DIR, $ignoreitem) or die ("Cannot open dir $ignoreitem: $!\n"); @filestoopen = readdir(DIR); closedir(DIR); @filestoopen = grep { -f ($ignoreitem.'/'.$_) } @filestoopen; @filestoopen = grep { /^([a-z0-9_.-]+)+[a-z0-9]+$/i } @filestoopen; @filestoopen = grep { !/dpkg-(old|dist|new|tmp)$/ } @filestoopen; @filestoopen = map { ($ignoreitem.'/'.$_) } @filestoopen; } else { push @filestoopen, $ignoreitem; } for my $f (@filestoopen) { open (F, "< $f") or die ("Cannot open $f: $!\n"); push @ignores, ; close F; } } chomp(@ignores); return \@ignores; } sub check_ignore { my ($pkg, $ignores) = @_; my $ignore_this = 0; for my $ignore (@$ignores) { my $ig = $ignore; return 1 if ($ig eq $pkg); if (substr($ig,0,1) eq '/') { substr($ig, 0, 1, ''); $ig =~ s,/$,,; return 1 if ($pkg =~ /$ig/); } } return 0 } sub filter_ignored { my ($packages, $ignores) = @_; my $obs = $packages->{'obsolete'}; my (%ignored, %bad); for my $pkg (keys %$obs) { if (check_ignore($pkg, $ignores)) { $ignored{$pkg} = $obs->{$pkg}; } else { $bad{$pkg} = $obs->{$pkg}; }; } delete $packages->{'obsolete'}; $packages->{'obsolete'} = \%bad; $packages->{'obsolete-ignored'} = \%ignored; }; sub usage { my ($fd, $exit) = @_; print $fd "Usage: $PROGRAM_NAME [ [ ...]]\n"; exit $exit; } my $ignorefiles = [$IGNORE, $IGNORED]; my $ignorefile_userset = 0; if (@ARGV >= 1) { usage(\*STDOUT, 0) if ($ARGV[0] eq "-h"); usage(\*STDOUT, 0) if ($ARGV[0] eq "--help"); $ignorefile_userset = 1; $ignorefiles = \@ARGV; }; my $ignores = load_ignores($ignorefiles, $ignorefile_userset); my $packages = get_packages(); filter_ignored($packages, $ignores); my @reportform = ( { 'key' => 'obsolete', 'listpackages' => 1, 'long' => "%d local or obsolete packages: %s", 'short' => "%d obs/loc", 'perf' => "obs_loc=%d;1;5;0", 'status' => 'WARNING' }, { 'key' => 'outofdate', 'listpackages' => 1, 'long' => "%d out of date packages: %s", 'short' => "%d updates", 'perf' => "outdated=%d;1;5;0", 'status' => 'WARNING' }, { 'key' => 'current', 'listpackages' => 0, 'long' => "%d packages current.", 'short' => "%d ok", 'perf' => "current=%d;;;0", 'status' => 'OK' }, { 'key' => 'obsolete-ignored', 'listpackages' => 1, 'long' => "%d whitelisted local or obsolete packages: %s", 'short' => "%d obs/loc(ignored)", 'perf' => "obs_ign=%d;;;0", 'status' => 'OK' }, { 'key' => 'rc', 'listpackages' => 1, 'long' => "%d packages removed but not purged: %s", 'short' => "%d rc", 'perf' => "rm_unprg=%d;;;0", 'status' => 'OK' }, { 'key' => 'hi', 'listpackages' => 1, 'long' => "%d packages on hold: %s", 'short' => "%d hi", 'perf' => "hold=%d;;;0", 'status' => 'OK' }, { 'key' => 'pc', 'listpackages' => 1, 'long' => "%d packages requested to be purged but conffiles still installed: %s", 'short' => "%d pc", 'perf' => "prg_conf=%d;1;;0", 'status' => 'WARNING' }, ); my @longout; my @perfout; my @shortout; for my $form (@reportform) { my $pkgs = $packages->{$form->{'key'}}; delete $packages->{$form->{'key'}}; my $num = scalar keys %$pkgs; push @perfout, sprintf($form->{'perf'}, $num); next unless ($num > 0); if ($form->{'listpackages'}) { my $list = join(", ", keys %$pkgs); push @longout, sprintf($form->{'long'}, $num, $list); } else { push @longout, sprintf($form->{'long'}, $num); }; push @shortout, sprintf($form->{'short'}, $num); record($form->{'status'}); }; if (scalar keys %$packages) { record('WARNING'); unshift @shortout, "unk: ".join(", ", keys %$packages); for my $status (sort {$b cmp $a} keys %$packages) { my $pkgs = $packages->{$status}; my $list = join(", ", keys %$pkgs); unshift @longout, "Unknown package status $status: $list"; }; } my $shortout = $EXITCODE.": ".join(", ", @shortout); my $longout = join("\n", @longout); my $perfout = "|".join(" ", @perfout); print $shortout,"\n"; print $longout,"\n"; print $perfout,"\n"; exit $CODE{$EXITCODE}; nagios-plugins-contrib-9.20140106/dsa/checks/dsa-check-cert-expire0000644000000000000000000000327312262515026021412 0ustar #!/bin/sh # Checks if a given cert on disk will expire soon # Copyright 2009 Peter Palfrader # # 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. set -u set -e # warn if expires within 2 weeks, critical if within a day or already is expired warn=1209600 crit=86400 if [ "$#" != 1 ]; then echo "Usage: $0 " >&2 exit 3 fi cert="$1" if ! [ -r "$cert" ] ; then echo "Cert file ($cert) does not exist or is not readable" >&2 exit 3 fi expires=`openssl x509 -enddate -noout < "$cert"` if openssl x509 -checkend "$warn" -noout < "$cert" ; then echo "OK: $expires" exit 0 fi if openssl x509 -checkend "$crit" -noout < "$cert" ; then echo "WARN: $expires" exit 1 fi echo "CRITICAL: $expires" exit 2 nagios-plugins-contrib-9.20140106/dsa/check_apt.cmd0000644000000000000000000000202512262515026016560 0ustar # check_multi command file implementing a # check_apt replacement # # example nrpe.cfg config: # command[check_apt]=/usr/lib/nagios/plugins/check_multi -f /etc/check_multi/check_apt.cmd # # requirements: # - moreutils # - the following sudo permissions: # nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/check_libs # nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/check_running_kernel # - a cronjob running update-apt-status: # @hourly root [ -x /usr/lib/nagios/cronjobs/update-apt-status ] && /usr/lib/nagios/cronjobs/update-apt-status 2>&1 | logger -t update-apt-status command[ packages ] = mispipe "/usr/lib/nagios/plugins/check_statusfile /var/cache/nagios_status/apt" "sed -n '1p;\$p' | paste -s -d ''" command[ libs ] = mispipe "sudo /usr/lib/nagios/plugins/check_libs" "sed 's, ([0-9, ]*),,g'" command[ running_kernel ] = sudo /usr/lib/nagios/plugins/check_running_kernel state [ CRITICAL ] = COUNT(CRITICAL) > 0 state [ WARNING ] = COUNT(WARNING) > 0 state [ UNKNOWN ] = COUNT(UNKNOWN) > 0 nagios-plugins-contrib-9.20140106/dsa/update-files.sh0000755000000000000000000000053612262515026017100 0ustar #!/bin/bash # update all files from the dsa nagios git find checks sbin share etc -type f | while read i; do tmp=`mktemp` if wget -O "${tmp}" "http://anonscm.debian.org/gitweb/?p=mirror/dsa-nagios.git;a=blob_plain;f=dsa-nagios-checks/${i};hb=HEAD"; then mv "${tmp}" "$i" else rm -f "${tmp}" fi done chmod 755 sbin/* nagios-plugins-contrib-9.20140106/dsa/control0000644000000000000000000000145712262515026015565 0ustar Homepage: http://anonscm.debian.org/gitweb/?p=mirror/dsa-nagios.git;a=tree;f=dsa-nagios-checks;hb=HEAD Uploaders: Bernd Zeimetz Description: plugins from the Debian System Administrators nagios plugins repository. * check_cert_expire: check for certificate expiration using openssl on the certificate file * check_dnssec_delegation: check for correct DNSSEC delegation * check_entropy: check if there is enough entropy available. * check_packages: replacement for check_apt; needs a cronjob to update the apt database regularily * check_running_kernel: check if a system was rebooted after a kernel upgrade * check_soas: check SOA records * check_statusfile: deliver the content of a status file as check result Recommends: ruby | ruby-interpreter, openssl, libnet-dns-perl nagios-plugins-contrib-9.20140106/dsa/copyright0000644000000000000000000000350412262515026016110 0ustar checks/dsa-check-cert-expire:# Copyright 2009 Peter Palfrader checks/dsa-check-dnssec-delegation:# Copyright (c) 2010 Peter Palfrader checks/dsa-check-entropy:# Copyright 2011 Peter Palfrader checks/dsa-check-soas:# Copyright 2006, 2012 Peter Palfrader checks/dsa-check-packages:# Copyright (C) 2008, 2009 Peter Palfrader checks/dsa-check-statusfile:# Copyright 2008, 2012 Peter Palfrader checks/dsa-check-running-kernel:# Copyright 2008,2009,2011 Peter Palfrader checks/dsa-check-running-kernel:# Copyright 2009 Stephen Gran checks/dsa-check-running-kernel:# Copyright 2010 Uli Martens checks/dsa-check-running-kernel:# Copyright 2011 Alexander Reichle-Schmehl sbin/dsa-update-apt-status:# Copyright 2009 Peter Palfrader sbin/dsa-update-unowned-file-status:# Copyright 2012 Peter Palfrader 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. nagios-plugins-contrib-9.20140106/dsa/sbin/0000755000000000000000000000000012262515026015106 5ustar nagios-plugins-contrib-9.20140106/dsa/sbin/dsa-update-unowned-file-status0000755000000000000000000000327212262515026023002 0ustar #!/bin/bash # Copyright 2012 Peter Palfrader # # 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. CUTOFF=40 STATUS=/var/cache/dsa/nagios/nouser tmp=`tempfile` trap "rm -f '$tmp'" exit if command -v ionice >/dev/null 2>&1; then prefix="ionice -c 3 -t" # idle priority, ignore errors fi $prefix find / -ignore_readdir_race \( -fstype proc -o -fstype sysfs \) -prune -o -nouser | head -n "$CUTOFF" > "$tmp" if [ -s "$tmp" ]; then echo "WARN" c="$(wc -l < "$tmp")" if [ "$c" -lt "$CUTOFF" ] ; then echo "Warn: $c unowned files on system." cat "$tmp" else echo "Warn: Lots of unowned files on system:" cat "$tmp" echo "..." fi else echo "OK" echo "OK: No unowned files on system." fi > "$STATUS" nagios-plugins-contrib-9.20140106/dsa/sbin/dsa-update-apt-status0000755000000000000000000000547212262515026021176 0ustar #!/bin/bash # Copyright 2009 Peter Palfrader # # 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. UPDATE_RUNS=3 STATUS=/var/cache/dsa/nagios/apt SLEEP_MAX=$(( 15 * 60 )) MAX_AGE=$(( 23 * 60 * 60 )) # we want to run if any of the following things is true # - we have never run before # - var/lib/dpkg/status has been touched since the last run # - var/cache/apt/pkgcache.bin has been touched since the last run # - our last run ended with 'apt-get update failed' # - our last run has been more than MAX_AGE (23hrs) ago run_required() { local run=0 local norun=1 [ -e "$STATUS" ] || return $run [ /var/lib/dpkg/status -nt "$STATUS" ] && return $run [ /var/cache/apt/pkgcache.bin -nt "$STATUS" ] && return $run grep "apt-get update failed" "$STATUS" > /dev/null && return $run local last_mod last_mod=`stat -c "%Y" "$STATUS"` now=`date +%s` age=$(( $now - $last_mod )) [ "$age" -gt "$MAX_AGE" ] && return $run return $norun } # do stuff only when required, or when asked to if [ "${1:-""}" != "-f" ] ; then run_required || exit 0 fi # sleep if called non-interactively if [ -z "$TERM" -o "$TERM" = "dumb" ]; then sleep $(( $RANDOM % $SLEEP_MAX )) fi # run apt-get update, retry a few times if it fails count=0 while [ "$count" -lt "$UPDATE_RUNS" ]; do apt-get update -qq >/dev/null >&2 if [ "$?" = "0" ]; then break; fi sleep $(( $RANDOM % 600 )) count="$(( $count + 1 ))" done if [ "$count" -ge "$UPDATE_RUNS" ]; then (echo "WARNING" echo "apt-get update failed") > "$STATUS" exit 1 fi # run the apt check itself tmp=`tempfile` trap "rm -f '$tmp'" exit #/usr/share/dsa/apt-status-check --noupdate --timeout=600 > "$tmp" /usr/lib/nagios/plugins/dsa-check-packages > "$tmp" result="$?" case "$result" in 0) st="OK" ;; 1) st="WARNING" ;; 2) st="CRITICAL" ;; *) st="UNKNOWN" ;; esac (echo "$st"; cat "$tmp") > "$STATUS" nagios-plugins-contrib-9.20140106/dsa/etc/0000755000000000000000000000000012262515026014726 5ustar nagios-plugins-contrib-9.20140106/dsa/etc/obsolete-packages-ignore0000644000000000000000000000006112262515026021517 0ustar /linux-image-.*/ /kernel-image-.*/ buildd sbuild nagios-plugins-contrib-9.20140106/dsa/Makefile0000644000000000000000000000067612262515026015624 0ustar #!/usr/bin/make -f PLUGIN:=$(shell cd checks; ls -1 | sed 's,^dsa-,,;s,-,_,g') CRONJOBS:=$(shell cd sbin; ls -1 | sed 's,^dsa-,,') INIFILES:=etc/obsolete-packages-ignore DOCFILES:=$(wildcard *.cmd) check_%: cp checks/dsa-`echo $@ | sed 's,_,-,g'` $@ chmod 755 $@ update-%-status: cp sbin/dsa-$@ $@ chmod 755 $@ CLEANFILES=$(PLUGIN) $(CRONJOBS) include ../common.mk install:: install -d $(DESTDIR)$(INIDIR)/obsolete-packages-ignore.d nagios-plugins-contrib-9.20140106/check_lm_sensors/0000755000000000000000000000000012262515026016725 5ustar nagios-plugins-contrib-9.20140106/check_lm_sensors/control0000644000000000000000000000055612262515026020336 0ustar Uploaders: Bernd Zeimetz Recommends: libnagios-plugin-perl (>= 0.31) Version: 3.1.1 Homepage: https://trac.id.ethz.ch/projects/nagios_plugins/wiki/check_lm_sensors Watch: https://trac.id.ethz.ch/projects/nagios_plugins/wiki/check_lm_sensors check_lm_sensors-([0-9.]+)\.tar\.gz Description: plugin to monitor hardware sensors and disk temperatures nagios-plugins-contrib-9.20140106/check_lm_sensors/check_lm_sensors-3.1.1/0000755000000000000000000000000012262515026022704 5ustar nagios-plugins-contrib-9.20140106/check_lm_sensors/check_lm_sensors-3.1.1/Changes0000644000000000000000000000303512262515026024200 0ustar 2008-10-17 Matteo Corti * check_lm_sensors: added 0.2s pause before reading the output of 'sensors' 2007-12-13 Matteo Corti * check_lm_sensors: removed all the reference to the (no more existing) unknown subroutine 2007-10-04 Matteo Corti * check_lm_sensors: fixed a problem in the variable initialization which created a nagios plugin object with the wrong name 2007-10-03 Matteo Corti * check_lm_sensors: several changes to make the plugin compatible with ePN 2007-07-10 Matteo Corti * check_lm_sensors: deprecated the --check option and added separated --low, --high and --range options * check_lm_sensors: added the sensor(s) output to the status string 2007-06-20 Matteo Corti * check_lm_sensors: added the --nosensors and --nodrives options * check_lm_sensors: the path for hddtemp and sensors is dynamic (retrieved with 'which') * check_lm_sensors: fixed a bug that make the checker ignore the --sensors_bin and --hddtemp_bin options 2007-06-19 Matteo Corti * check_lm_sensors: added the --rename option to rename sensors * check_lm_sensors: fixed the program name in --version ouput 2007-06-18 Matteo Corti * check_lm_sensors: output only the checked values * check_lm_sensors: added the --sanitize option to remove spaces in sensor names * check_lm_sensors: initial release nagios-plugins-contrib-9.20140106/check_lm_sensors/check_lm_sensors-3.1.1/check_lm_sensors.pod0000644000000000000000000000715412262515026026740 0ustar =pod =head1 NAME C is a Nagios plugin to monitor the values of on board sensors and hard disk temperatures on Linux systems =head1 DESCRIPTION check_lm_sensors is a Nagios plugin to monitor the values of on board sensors and hard disk temperatures on Linux systems =head1 VERSION Version 3.1.1 =head1 SYNOPSIS check_lm_sensors [--help] [--verbose] [--version] [OPTIONS] Options -?, --help help -l, --low specifies a check for a sensor value which is too low. -h, --high specifies a check for a sensor value which is too high. -r, --range specifies a check for a sensor value which should stay in a given range. --rename renames a sensor in the performance output (useful if you want to have common names for similar sensors across different machines) --sanitize sanitize sensor names (e.g., removing spaces) --nosensors disable checks on check lm_sensors --nodrives disable checks on drive temperatures -d, --drives enable checks on drive temperature --hddtemp_bin manually specifies the location of the hddtemp binary --sensors_bin manually specified the location of the sensors binary -v, --verbose verbose output --version prints $prog_name's version and exits =head1 REQUIRED ARGUMENTS =head1 OPTIONS =head1 EXAMPLE =head1 DIAGNOSTICS You can specify multiple --verbose options to increase the program verbosity. =head1 EXIT STATUS 0 if OK, 1 in case of a warning, 2 in case of a critical status and 3 in case of an unkown problem =head1 DEPENDENCIES check_updates depends on =over 4 =item * Carp =item * English =item * Getopt::Long =item * Nagios::Plugin =item * Nagios::Plugin::Threshold =item * version =back =head1 CONFIGURATION =head1 INCOMPATIBILITIES None reported. =head1 SEE ALSO Nagios documentation =head1 BUGS AND LIMITATIONS No bugs have been reported. Please report any bugs or feature requests to matteo.corti@id.ethz.ch, or through the web interface at https://svn.id.ethz.ch/trac/nagios_plugins/newticket =head1 AUTHOR Matteo Corti =head1 LICENSE AND COPYRIGHT Copyright (c) 2007, ETH Zurich. This module is free software; you can redistribute it and/or modify it under the terms of GNU general public license (gpl) version 3. See the LICENSE file for details. =head1 DISCLAIMER OF WARRANTY BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "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 SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. 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 SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (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 SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. =head1 ACKNOWLEDGMENTS nagios-plugins-contrib-9.20140106/check_lm_sensors/check_lm_sensors-3.1.1/INSTALL0000644000000000000000000000217612262515026023743 0ustar Build and install check_lm_sensors Install to /usr/lib/nagios/plugins/contrib ========================================== In the source directory run: perl Makefile.PL make make install Install to a custom directory (CUSTOM_DIR) ========================================= In the source directory run: perl Makefile.PL INSTALLSITESCRIPT=CUSTOM_DIR make make install You can override the INSTALLSCRIPT, INSTALLNBIN or INSTALLSITESCRIPT variable depending on your perl installation. The man page is installed to /usr/share/man/man1/check_lm_sensors.1 you can customize the path by setting INSTALLMAN1DIR as follows perl Makefile.PL INSTALLSCRIPT=CUSTOM_DIR INSTALLMAN1DIR=CUSTOM_MAN_DIR make make install Manual installation =================== Substitute #!perl at the beginning of the script with the location of your Perl interpreter and copy it to the desired location Generate the man page with pod2man pod2man check_lm_sensors.pod > CUSTOM_MAN_FILE Please report any installation problem to or open a ticket at https://trac.id.ethz.ch/projects/nagios_plugins/newticket nagios-plugins-contrib-9.20140106/check_lm_sensors/check_lm_sensors-3.1.1/META.yml0000644000000000000000000000066412262515026024163 0ustar --- abstract: ~ author: - 'Matteo Corti ' distribution_type: module generated_by: 'Module::Install version 0.68' license: gpl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.3.html version: 1.3 name: check_lm_sensors no_index: directory: - inc - t requires: Carp: 0 English: 0 Getopt::Long: 0 Nagios::Plugin: 0 Nagios::Plugin::Threshold: 0 version: 0 version: 3.1.1 nagios-plugins-contrib-9.20140106/check_lm_sensors/check_lm_sensors-3.1.1/AUTHORS0000644000000000000000000000023212262515026023751 0ustar Matteo Corti Thanks to: - Maarten Bremer for the useful suggestions - Greg Vickers for pointing out incompatibilities with ePN nagios-plugins-contrib-9.20140106/check_lm_sensors/check_lm_sensors-3.1.1/VERSION0000644000000000000000000000000612262515026023750 0ustar 3.1.1 nagios-plugins-contrib-9.20140106/check_lm_sensors/check_lm_sensors-3.1.1/README0000644000000000000000000000621312262515026023566 0ustar check_lm_sensors is a Nagios plugin to monitor the values of on board sensors and hard disk temperatures on Linux systems usage: -?, --help help -l, --low specifies a check for a sensor value which is too low. Example: --low fan1=2000,1000 will give a warning if the value of the fan1 sensor drops below 2000 RPMs and a critical status if it drops below 1000 RPMs -h, --high specifies a check for a sensor value which is too high. Example: --high temp1=50,60 will give a warning if the value of the temp1 sensor reaches 50 degrees and a critical status if it reaches 60 degrees -r, --range specifies a check for a sensor value which should stay in a given range. Example: --range v1=1,2,12 will give a warning if the value of the sensor gets outside the 11-13 range (12+-1) and a critical status if the value is outside the 10-14 range (12+-2) --rename renames a sensor in the performance output (useful if you want to have common names for similar sensors across different machines) Example: --rename cputemp=temp1 --sanitize sanitize sensor names (e.g., removing spaces) --list list all available sensors --nosensors disable checks on check lm_sensors --nodrives disable checks on drive temperatures -d, --drives enable checks on drive temperature --hddtemp_bin manually specifies the location of the hddtemp binary --sensors_bin manually specified the location of the sensors binary -v, --verbose verbose output --version prints $prog_name's version and exits Deprecated options: -c, --check specifies a check on a sensor. This options accepts two or three numerical values: * with two arguments works similarly to the --high option * with three arguments works similarly to the --range option Sensors with a space in the name can be specified * by escaping the space: --high sda\ Temp=50,60 * by quoting the name: --high 'sda Temp'=50,60 * by substituting the space with an underscore: --high sda_Temp=50,60 * by using the --sanitize option to remove the space --sanitize --high sdaTemp=50,60 Example: $ ./check_lm_sensors -v --high 'sda Temp'=30,5,10 --range '+2.5V'=0.2,0.3,2.5 found sensor +3.3V (3.39) found sensor +2.5V (2.39) found sensor VCore (1.19) found sensor +5V (4.61) found sensor +12V (11.96) found sensor +3.3V (3.23) found sensor Case Fan (0) found sensor CPU Fan (0) found sensor CPU Temp (62.1) found sensor Int Temp (66.0) found sensor vid (1.250) found temperature for drive sda (51) LM_SENSORS CRITICAL sda Temp=51|'Case Fan'=0;;;; 'vid'=1.250;;;; '+5V'=4.61;;;; '+2.5V'=2.39;;;; 'Int Temp'=66.0;;;; '+12V'=11.96;;;; '+3.3V'=3.23;;;; 'VCore'=1.19;;;; 'CPU Temp'=62.1;;;; 'CPU Fan'=0;;;; 'sda Temp'=51;;;; nagios-plugins-contrib-9.20140106/check_lm_sensors/check_lm_sensors-3.1.1/Makefile.PL0000644000000000000000000000164212262515026024661 0ustar # Load the Module::Install bundled in ./inc/ use inc::Module::Install; ############################################################################## # Define metadata (we read it from the binary) name 'check_lm_sensors'; version_from 'check_lm_sensors'; all_from 'check_lm_sensors.pod'; ############################################################################## # Specific dependencies include 'version'; requires 'Carp' => 0; requires 'English' => 0; requires 'Getopt::Long' => 0; requires 'Nagios::Plugin' => 0; requires 'Nagios::Plugin::Threshold' => 0; requires 'version' => 0; install_script 'check_lm_sensors'; WriteMakefile( INSTALLSCRIPT => '/usr/lib/nagios/plugins/contrib', INSTALLBIN => '/usr/lib/nagios/plugins/contrib', INSTALLSITESCRIPT => '/usr/lib/nagios/plugins/contrib', ); nagios-plugins-contrib-9.20140106/check_lm_sensors/check_lm_sensors-3.1.1/TODO0000644000000000000000000000012212262515026023367 0ustar * other types of sensors? * other OSes? * mac os X: http://cutup.org/code/sh/tp nagios-plugins-contrib-9.20140106/check_lm_sensors/check_lm_sensors-3.1.1/NEWS0000644000000000000000000000131512262515026023403 0ustar 2008-10-17 (Version 3.1.1) * added a short pause while reading the output of 'sensors' to cope with some systems where a delay caused the plugin to fail 2007-10-03 (Version 3.0.0) * the plugin is now compatible with embedded perl 2007-07-10 (Version 2.0.0) * added --low, --high and --range options * deprecated the --check option * added the sensor(s) output to the status string 2007-06-20 * automatic detection of the path for hddtemp and sensors * --nosensors and --nodrives to disable sensors or drive temperature checks * --rename option to rename sensors * only the checked sensors are included in the performace output * --sanitaze option to remove spaces from sensor names 2007-06-18 * Initial release nagios-plugins-contrib-9.20140106/check_lm_sensors/check_lm_sensors-3.1.1/check_lm_sensors.spec0000644000000000000000000000373712262515026027113 0ustar %define version 3.1.1 %define release 0 %define name check_lm_sensors %define _prefix /usr/lib/nagios/plugins/contrib Summary: A Nagios plugin to monitor sensors values Name: %{name} Version: %{version} Release: %{release} License: GPL Packager: Matteo Corti Group: Applications/System BuildRoot: %{_tmppath}/%{name}-%{version}-root Source: http://www.id.ethz.ch/people/allid_list/corti/%{name}-%{version}.tar.gz BuildArch: noarch Requires: hddtemp Requires: perl Requires: perl-Nagios-Plugin %description check_lm_sensors is a Nagios plugin to monitor the values of on board sensors and hard disk temperatures on Linux systems %prep %setup -q %build %__perl Makefile.PL INSTALLSCRIPT=%{buildroot}%{_prefix} INSTALLSITEMAN3DIR=%{buildroot}/usr/share/man/man3 INSTALLSITESCRIPT=%{buildroot}%{_prefix} %install make install %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-, root, root, 0644) %doc AUTHORS Changes NEWS README INSTALL TODO COPYING VERSION %attr(0755, root, root) %{_prefix}/check_lm_sensors %attr(0755, root, root) /usr/share/man/man3/%{name}.3pm.gz %changelog * Fri Oct 17 2008 Matteo Corti - 3.1.1-0 - short pause before reading the output of 'sensors' * Tue Jun 10 2008 Matteo Corti - 3.1.0-0 - repackaging and cleanup * Thu Oct 4 2007 Matteo Corti - 3.0.1-0 - packaged version 3.0.1 * Wed Oct 3 2007 Matteo Corti - 3.0.0-2 - added the perl-Nagios-Plugin dependency * Wed Oct 3 2007 Matteo Corti - 3.0.0-1 - included the updated ChangeLog and NEWS files * Wed Oct 3 2007 Matteo Corti - 3.0.0-0 - Upgraded to 3.0.0 * Tue Jul 10 2007 Matteo Corti - 2.0-1 - updated to 2.0 * Wed Jun 20 2007 Matteo Corti - 1.1-4 - Requires perl and hddtemp * Mon Jun 18 2007 Matteo Corti - 1.0-0 - Initial release nagios-plugins-contrib-9.20140106/check_lm_sensors/check_lm_sensors-3.1.1/MANIFEST0000644000000000000000000000060712262515026024040 0ustar AUTHORS Changes check_lm_sensors check_lm_sensors.pod check_lm_sensors.spec COPYING inc/Module/Install.pm inc/Module/Install/Base.pm inc/Module/Install/Include.pm inc/Module/Install/Makefile.pm inc/Module/Install/MakeMaker.pm inc/Module/Install/Metadata.pm inc/Module/Install/Scripts.pm inc/version.pm INSTALL Makefile.PL MANIFEST This list of files META.yml NAME NEWS README TODO VERSION nagios-plugins-contrib-9.20140106/check_lm_sensors/check_lm_sensors-3.1.1/COPYING0000644000000000000000000004311012262515026023736 0ustar 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) 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) year 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. nagios-plugins-contrib-9.20140106/check_lm_sensors/check_lm_sensors-3.1.1/NAME0000644000000000000000000000002112262515026023340 0ustar check_lm_sensors nagios-plugins-contrib-9.20140106/check_lm_sensors/check_lm_sensors-3.1.1/check_lm_sensors0000755000000000000000000004053712262515026026164 0ustar #!perl # check_lm_sensors is a Nagios plugin to monitor the values of on board sensors and hard # disk temperatures on Linux systems # # See the INSTALL file for installation instructions # # Copyright (c) 2007, ETH Zurich. # # This module is free software; you can redistribute it and/or modify it # under the terms of GNU general public license (gpl) version 3. # See the LICENSE file for details. # # RCS information (required by Perl::Critic) # $Id: check_lm_sensors 1030 2008-10-17 15:45:06Z corti $ # $Revision: 1030 $ # $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_lm_sensors/check_lm_sensors $ # $Date: 2008-10-17 17:45:06 +0200 (Fri, 17 Oct 2008) $ use strict; use warnings; use Getopt::Long; use Carp; use English qw(-no_match_vars); use Nagios::Plugin; use version; our $VERSION = '3.1.1'; # IMPORTANT: Nagios plugins could be executed using embedded perl in this case # the main routine would be executed as a subroutine and all the # declared subroutines would therefore be inner subroutines # This will cause all the global lexical variables not to stay # shared in the subroutines! # # All variables are therefore declared as package variables... # use vars qw( $verbosity $prog_name $plugin $hddtemp_bin $sensors_bin $drives $help $list $result $sanitize $sensors %rename %sensor_values @drives %highs %lows %ranges $space $status $desc $criticals $warnings $unknowns $name $limits $converted_name %checks ); # initialization $criticals = q{}; $desc = q{}; $drives = 1; $help = q{}; $prog_name = 'LM_SENSORS'; $plugin = Nagios::Plugin->new( shortname => $prog_name ); $sensors = 1; $space = q{}; $status = q{}; $unknowns = q{}; $verbosity = 0; $warnings = q{}; ############################################################################## # subroutines ############################################################################## # Usage : verbose("some message string", $optional_verbosity_level); # Purpose : write a message if the verbosity level is high enough # Returns : n/a # Arguments : message : message string # level : options verbosity level # Throws : n/a # Comments : n/a # See also : n/a sub verbose { # arguments my $message = shift; my $level = shift; if ( !defined $message ) { $plugin->nagios_exit( UNKNOWN, q{Internal error: not enough parameters for 'verbose'} ); } if ( !defined $level ) { $level = 0; } if ( $level < $verbosity ) { print $message; } return; } ############################################################################## # Usage : usage() or usage("error message"); # Purpose : prints the usage of the plugin and exits with unknown status # Returns : n/a # Arguments : message : message string # Throws : n/a # Comments : n/a # See also : n/a sub usage { my $msg = shift; if ( defined $msg ) { print "$msg\n"; } print << 'EOT'; check_lm_sensors [--help] [--verbose] [--version] [OPTIONS] Options: -?, --help help --check, -c specifies a check for a sensor -l, --low specifies a check for a sensor value which is too low. Example: --low fan1=2000,1000 will give a warning if the value of the fan1 sensor drops below 2000 RPMs and a critical status if it drops below 1000 RPMs -h, --high specifies a check for a sensor value which is too high. Example: --high temp1=50,60 will give a warning if the value of the temp1 sensor reaches 50 degrees and a critical status if it reaches 60 degrees -r, --range specifies a check for a sensor value which should stay in a given range. Example: --range v1=1,2,12 will give a warning if the value of the sensor gets outside the 11-13 range (12+-1) and a critical status if the value is outside the 10-14 range (12+-2) --rename renames a sensor in the performance output (useful if you want to have common names for similar sensors across different machines) Example: --rename cputemp=temp1 --sanitize sanitize sensor names (e.g., removing spaces) --list list all available sensors --nosensors disable checks on check lm_sensors --nodrives disable checks on drive temperatures -d, --drives enable checks on drive temperature --hddtemp_bin manually specifies the location of the hddtemp binary --sensors_bin manually specified the location of the sensors binary -v, --verbose verbose output --version prints the version and exits Deprecated options: -c, --check specifies a check on a sensor. This options accepts two or three numerical values: * with two arguments works similarly to the --high option * with three arguments works similarly to the --range option Sensors with a space in the name can be specified * by escaping the space: --high sda\ Temp=50,60 * by quoting the name: --high 'sda Temp'=50,60 * by substituting the space with an underscore: --high sda_Temp=50,60 * by using the --sanitize option to remove the space --sanitize --high sdaTemp=50,60 EOT $plugin->nagios_exit( UNKNOWN, 'Invalid arguments' ); return; } ############################################################################## # Usage : get_path('program_name'); # Purpose : retrieves the path of an executable file using the # 'which' utility # Returns : the path of the program (if found) # Arguments : the program name # Throws : n/a # Comments : n/a # See also : n/a sub get_path { my $prog = shift; my $command = "which $prog"; my $output; my $path; my $pid = open $output, q{-|}, "$command 2>&1" or $plugin->nagios_exit( UNKNOWN, "Cannot execute $command: $OS_ERROR" ); while (<$output>) { chomp; if ( !/^which:/mx ) { $path = $_; } } if ( !( close $output ) && ( $OS_ERROR != 0 ) ) { # close to a piped open return false if the command with non-zero # status. In this case $! is set to 0 $plugin->nagios_exit( UNKNOWN, "Error while closing pipe to $command: $OS_ERROR\n" ); } return $path; } ############################################################################## # Usage : parse_drives() # Purpose : parses /proc/partitions to find available drives and tries to # get their temperature # Returns : n/a # Arguments : n/a # Throws : n/a # Comments : n/a # See also : n/a sub parse_drives { my $IN; if ( -x $hddtemp_bin ) { verbose "Looking for drives in /proc/partitions\n"; open $IN, '<', '/proc/partitions' or $plugin->nagios_exit( UNKNOWN, 'Cannot open /proc/partitions' ); while (<$IN>) { chomp; my ( $major, $minor, $blocs, $name ) = split; if ( !defined $major || $major eq 'major' || $major eq q{} ) { next; } if ( $name =~ /[0-9]$/mx ) { next; } verbose " checking disk /dev/$name\n", 1; my $command = "$hddtemp_bin -n /dev/$name"; my $output; my $pid = open $output, q{-|}, "$command 2>&1" or $plugin->nagios_exit( UNKNOWN, "Cannot execute $command: $OS_ERROR" ); while (<$output>) { chomp; if ( $_ =~ /^[0-9]+$/mx ) { if ($sanitize) { $name = $name . 'Temp'; } else { $name = "$name Temp"; } # check if the sensor has to be renamed if ( $rename{$name} ) { $name = $rename{$name}; } $sensor_values{$name} = $_; if ( $verbosity || $list ) { print "found temperature for drive $name ($name = $_)\n"; } } else { verbose "warning: temperature for /dev/$name not available\n"; } } close $output or $plugin->nagios_exit( UNKNOWN, "Error while executing $command: $OS_ERROR\n" ); } close $IN or $plugin->nagios_exit( UNKNOWN, "Cannot close input: $OS_ERROR\n" ); } else { verbose "warning: $hddtemp_bin not found: HDD temperatures not checked\n"; } return; } ############################################################################## # Usage : parse_sensors() # Purpose : retrieves the values of the available sensors # Returns : n/a # Arguments : n/a # Throws : n/a # Comments : n/a # See also : n/a sub parse_sensors { if ( -x $sensors_bin ) { # check if there are configured sensors my $command = "$sensors_bin"; my $output; my $pid = open $output, q{-|}, "$command 2>&1" or $plugin->nagios_exit( UNKNOWN, "Cannot execute $command: $OS_ERROR" ); select(undef, undef, undef, .2); while (<$output>) { chomp; if ( /^No\ sensors\ found/mx || /^Can\'t/mx ) { verbose "warning: no sensors found\n"; return; } last; } close $output or $plugin->nagios_exit( UNKNOWN, "Error while executing $command: $OS_ERROR\n" ); $command = "$sensors_bin -A | grep \:"; $pid = open $output, q{-|}, "$command 2>&1" or $plugin->nagios_exit( UNKNOWN, "Cannot execute $command: $OS_ERROR" ); while (<$output>) { chomp; if (/(.*):\s+\+?([0-9\-\.]*)\ ?([^\ ]*)\ /mx) { my $name = $1; my $value = $2; if ($sanitize) { $name =~ s/\ //gmx; } if ( $rename{$name} ) { $name = $rename{$name}; } $sensor_values{$name} = $value; if ( $verbosity || $list ) { print "found sensor $name ($value)\n"; } } } close $output or $plugin->nagios_exit( UNKNOWN, "Error while executing $command: $OS_ERROR\n" ); } else { verbose "warning: $sensors_bin not found: HDD temperatures not checked\n"; } return; } ############################################################################## # main # ######################## # Command line arguments Getopt::Long::Configure( 'bundling', 'no_ignore_case' ); $result = GetOptions( 'check|c=s' => \%checks, 'drives!' => \$drives, 'hddtemp_bin=s' => \$hddtemp_bin, 'help|?' => sub { usage() }, 'high|h=s' => \%highs, 'list' => \$list, 'low|l=s' => \%lows, 'range|r=s' => \%ranges, 'rename=s' => \%rename, 'sanitize' => \$sanitize, 'sensors!' => \$sensors, 'sensors_bin=s' => \$sensors_bin, 'verbose|v+' => \$verbosity, 'version' => sub { print "check_lm_sensors version $VERSION\n"; exit 3; } ); if ( !$result ) { usage(); } if ( !( defined $list ) && !(%checks) && !(%highs) && !(%ranges) && !(%lows) ) { $plugin->nagios_exit( UNKNOWN, 'at least one check has to be specified' ); } # convert old options if (%checks) { verbose "warning: the --checks options is deprecated, use the --low, --high and --range options instead\n"; } if ($drives) { if ( !$hddtemp_bin ) { $hddtemp_bin = get_path('hddtemp'); } if ( !$hddtemp_bin ) { verbose "warning: hddtemp not found: HDD temperatures not checked\n"; } else { verbose "hddtemp found at $hddtemp_bin\n"; parse_drives(); } } if ($sensors) { if ( !$sensors_bin ) { $sensors_bin = get_path('sensors'); } if ( !$sensors_bin ) { verbose "warning: sensors not found: lm_sensors not checked\n"; } else { verbose "sensors found at $sensors_bin\n"; parse_sensors(); } } ################ # perform checks # old style checks while ( ( $name, $limits ) = each %checks ) { $converted_name = $name; $converted_name =~ s/_/\ /gmx; if ( !$sensor_values{$name} && $sensor_values{$converted_name} ) { $name = $converted_name; } if ( !$sensor_values{$name} ) { $unknowns = $unknowns . " $name"; next; } my ( $warn, $crit, $ref ) = split /,/mx, $limits; my $value = $sensor_values{$name}; my $diff = $value; if ($ref) { $diff = abs( $value - $ref ); } if ( $diff > $crit ) { $criticals = $criticals . " $name=" . $sensor_values{$name}; } elsif ( $diff > $warn ) { $warnings = $warnings . " $name=" . $sensor_values{$name}; } if ($space) { $status = $status . q{ }; $desc = $desc . q{ }; } $status = $status . "$name=$value;$warn;$crit;;"; $desc = $desc . "$name=$value"; $space = 1; } # lows while ( ( $name, $limits ) = each %lows ) { $converted_name = $name; $converted_name =~ s/_/\ /gmx; if ( !$sensor_values{$name} && $sensor_values{$converted_name} ) { $name = $converted_name; } if ( !$sensor_values{$name} ) { $unknowns = $unknowns . " $name"; next; } my ( $warn, $crit ) = split /,/mx, $limits; my $value = $sensor_values{$name}; if ( $value < $crit ) { $criticals = $criticals . " $name=" . $sensor_values{$name}; } elsif ( $value < $warn ) { $warnings = $warnings . " $name=" . $sensor_values{$name}; } if ($space) { $status = $status . q{ }; } $status = $status . "$name=$value;$warn;$crit;;"; $desc = $desc . "$name=$value"; $space = 1; } # highs while ( ( $name, $limits ) = each %highs ) { $converted_name = $name; $converted_name =~ s/_/\ /gmx; if ( !$sensor_values{$name} && $sensor_values{$converted_name} ) { $name = $converted_name; } if ( !$sensor_values{$name} ) { $unknowns = $unknowns . " $name"; next; } my ( $warn, $crit ) = split /,/mx, $limits; my $value = $sensor_values{$name}; if ( $value > $crit ) { $criticals = $criticals . " $name=" . $sensor_values{$name}; } elsif ( $value > $warn ) { $warnings = $warnings . " $name=" . $sensor_values{$name}; } if ($space) { $status = $status . q{ }; $desc = $desc . q{ }; } $status = $status . "$name=$value;$warn;$crit;;"; $desc = $desc . "$name=$value"; $space = 1; } # ranges while ( ( $name, $limits ) = each %ranges ) { $converted_name = $name; $converted_name =~ s/_/\ /gmx; if ( !$sensor_values{$name} && $sensor_values{$converted_name} ) { $name = $converted_name; } if ( !$sensor_values{$name} ) { $unknowns = $unknowns . " $name"; next; } my ( $warn, $crit, $ref ) = split /,/mx, $limits; my $value = $sensor_values{$name}; my $diff = $value; $diff = abs( $value - $ref ); if ( $diff > $crit ) { $criticals = $criticals . " $name=" . $sensor_values{$name}; } elsif ( $diff > $warn ) { $warnings = $warnings . " $name=" . $sensor_values{$name}; } if ($space) { $status = $status . q{ }; $desc = $desc . q{ }; } $status = $status . "$name=$value;$warn;$crit;;"; $desc = $desc . "$name=$value"; $space = 1; } ######################### # build the status string if ( $criticals ne q{} ) { $plugin->nagios_exit( CRITICAL, "$desc|$status" ); } if ( $warnings ne q{} ) { $plugin->nagios_exit( WARNING, "$desc|$status" ); } if ( $unknowns ne q{} ) { $plugin->nagios_exit( UNKNOWN, "$desc|$status" ); } $plugin->nagios_exit( OK, "$desc|$status" ); 1; nagios-plugins-contrib-9.20140106/check_lm_sensors/lm_sensors.cfg0000644000000000000000000000104312262515026021570 0ustar # 'check_lm_sensors_high' command definition define command{ command_name check_lm_sensors_high command_line /usr/lib/nagios/plugins/check_lm_sensors --high '$ARG1$' } # 'check_lm_sensors_low' command definition define command{ command_name check_lm_sensors_low command_line /usr/lib/nagios/plugins/check_lm_sensors --low '$ARG1$' } # 'check_lm_sensors_range' command definition define command{ command_name check_lm_sensors_range command_line /usr/lib/nagios/plugins/check_lm_sensors --range '$ARG1$' } nagios-plugins-contrib-9.20140106/check_lm_sensors/copyright0000644000000000000000000000032712262515026020662 0ustar Copyright (c) 2007, ETH Zurich. Author: Matteo Corti This module is free software; you can redistribute it and/or modify it under the terms of GNU general public license (gpl) version 3. nagios-plugins-contrib-9.20140106/check_lm_sensors/src0000777000000000000000000000000012262515026023336 2check_lm_sensors-3.1.1ustar nagios-plugins-contrib-9.20140106/check_lm_sensors/Makefile0000644000000000000000000000034212262515026020364 0ustar #/usr/bin/make -f PLUGIN = src/check_lm_sensors MANPAGES = check_lm_sensors.7 DOCFILES = src/README CLEANFILES = check_lm_sensors.7 include ../common.mk check_lm_sensors.7: src/check_lm_sensors.pod pod2man -s 7 $< > $@ nagios-plugins-contrib-9.20140106/.gitignore0000644000000000000000000000023112262515026015370 0ustar debian/files debian/nagios-plugins-contrib/* debian/nagios-plugins-contrib.debhelper.log debian/nagios-plugins-contrib.substvars .*.swp .pc *.rej *.orig nagios-plugins-contrib-9.20140106/common.mk0000644000000000000000000000351612262515026015232 0ustar # import buildflags CFLAGS += $(shell dpkg-buildflags --get CFLAGS) CPPFLAGS += $(shell dpkg-buildflags --get CPPFLAGS) CXXFLAGS += $(shell dpkg-buildflags --get CXXFLAGS) LDFLAGS += $(shell dpkg-buildflags --get LDFLAGS) # define common directories PLUGINDIR := /usr/lib/nagios/plugins CRONJOBDIR := /usr/lib/nagios/cronjobs CONFIGDIR := /etc/nagios-plugins/config INIDIR := /etc/nagios-plugins CONFIGFILES := $(wildcard *.cfg) # guess the name of the plugin to build if not defined PLUGINNAME := $(shell basename $(CURDIR)) ifndef PLUGIN PLUGIN := $(PLUGINNAME) endif DOCDIR := /usr/share/doc/nagios-plugins-contrib/$(PLUGINNAME) # add some default files to clean # we actually need strip here. make is weird sometimes. CLEANEXTRAFILES := $(strip $(wildcard *.o) $(wildcard *.a) $(wildcard *.so)) # build the stuff actually all:: $(PLUGIN) $(MANPAGES) $(INIFILES) $(CRONJOBS) install:: install -d $(DESTDIR)$(PLUGINDIR) install -m 755 -o root -g root $(PLUGIN) $(DESTDIR)$(PLUGINDIR) ifdef CONFIGFILES install -d $(DESTDIR)$(CONFIGDIR) install -m 644 -o root -g root $(CONFIGFILES) $(DESTDIR)$(CONFIGDIR) endif ifdef MANPAGES set -e; for m in $(MANPAGES); do \ section=`echo $$m | sed 's,\.gz$$,,;s,.*\.,,'` ;\ mandir="/usr/share/man/man$${section}" ;\ install -d $(DESTDIR)$${mandir} ;\ install -m 644 -o root -g root $${m} $(DESTDIR)$${mandir} ;\ done endif ifdef INIFILES install -d $(DESTDIR)$(INIDIR) install -m 644 -o root -g root $(INIFILES) $(DESTDIR)$(INIDIR) endif ifdef DOCFILES install -d $(DESTDIR)$(DOCDIR) install -m 644 -o root -g root $(DOCFILES) $(DESTDIR)$(DOCDIR) endif ifdef CRONJOBS install -d $(DESTDIR)$(CRONJOBDIR) install -m 755 -o root -g root $(CRONJOBS) $(DESTDIR)$(CRONJOBDIR) endif clean:: ifdef CLEANFILES rm -f $(CLEANFILES) endif ifneq (,$(CLEANEXTRAFILES)) rm -f $(CLEANEXTRAFILES) endif .PHONY: clean