bwctl_1.5.4+dfsg1.orig/0000775000076500007710000000000012560414557011617 5ustar bwctl_1.5.4+dfsg1.orig/doc/0000775000076500007710000000000012560414557012364 5ustar bwctl_1.5.4+dfsg1.orig/doc/bwctld.conf.man0000664000076500007710000004525412560414557015276 0ustar .lf 1 bwctld.conf.ms .\" The first line of this file must contain the '"[e][r][t][v] line .\" to tell man to run the appropriate filter "t" for table. .\" .\" $Id: bwctld.conf.man 493 2008-10-09 16:27:47Z aaron $ .\" .\"###################################################################### .\"# # .\"# Copyright (C) 2004 # .\"# Internet2 # .\"# All Rights Reserved # .\"# # .\"###################################################################### .\" .\" File: bwctld.8 .\" .\" Author: Jeff Boote .\" Internet2 .\" .\" Date: Thu Feb 12 15:44:09 MST 2004 .\" .\" Description: .\" .TH bwctld.conf 5 "$Date: 2008\-10\-09 12:27:47 \-0400 (Thu, 09 Oct 2008) $" .SH NAME bwctld.conf \- \fBB\fRand\fBw\fRidth \fBC\fRon\fBt\fRro\fBl\fR \fBd\fRaemon configuration file .SH DESCRIPTION The \fBbwctld.conf\fR file is the configuration file for the bwctld(8) program. It is used to configure the basic operation of the server. For example, what addresses and ports it should listen on, where it should send error messages, and where it should save files. .PP The policy rules for \fBbwctld\fR are configured using the \fBbwctld.limits\fR file; the details for configuring those policies are described in the bwctld.limits(5) manual page. .PP .lf 1 bwctld_conf_opts.man .\" The first line of this file must contain the '"[e][r][t][v] line .\" to tell man to run the appropriate filter "t" for table. .\" .\" $Id: bwctlrc.man 493 2008-10-09 16:27:47Z aaron $ .\" .\"###################################################################### .\"# # .\"# Copyright (C) 2004 # .\"# Internet2 # .\"# All Rights Reserved # .\"# # .\"###################################################################### .\" .\" File: bwctlrc.8 .\" .\" Author: Jeff Boote and Aaron Brown .\" Internet2 .\" .\" Date: Tue Jan 06 07:44:09 EST 2009 .\" .\" Description: .\" .PP The format of this file is: .RS .IP \(bu Comment lines are any line where the first non-whitespace character is '#'. These lines are counted for the purposes of returning line numbers in error messages but are otherwise ignored by the spawned \fBbwctld\fR. .IP \(bu Lines may be continued using the semi-standard '\\' character followed immediately by a newline character. This is the only valid place for the '\\' character. If it is found elsewhere, a syntax error is reported. .IP \(bu Blank lines are treated as comment lines. .IP \(bu All other lines are used to set configuration options. The format of these lines is an initial keyword followed by a variable list of arguments, separated by whitespace. .RE .SH CONFIGURATION OPTIONS .TP .BI access_priority " priority" Syslog \fIpriority\fR to log access messages. .RS .IP Default: LOG_INFO .RE .TP .B allow_unsync Directs \fBbwctld\fR to continue accepting valid requests for throughput tests when the system clock is not synchronized. \fBbwctld\fR prefers to have an NTP synchronized system clock to ensure the two endpoints of the test are actually agreeing to the same scheduled time window for test execution. This option is used to bypass this requirement for systems that either do not have the NTP system calls, or prefer not to configure NTP. .RS .PP Note: if the difference between the system clocks on the two endpoints is too great, the eventual throughput test will fail when the endpoints attempt to run the test at different times. The threshold for this difference is controlled using the \fIsync_fuzz\fR option. (If you set allow_unsync, you should set \fIsync_fuzz\fR to a reasonable value for your system.) .PP .IP Default: unset (set if the operating system does have the NTP system calls) .RE .TP .BI auth_mode " authmode" Specify the authentication modes the server is willing to use for communication. \fIauth_mode\fR should be set as a character string, with any or all of the characters "AEO". The modes are: .RS .IP \fBA\fR [\fBA\fR]uthenticated. This mode encrypts the control connection. .IP \fBE\fR [\fBE\fR]ncrypted. This mode encrypts the control connection. If the test supports encryption, this mode will additionally encrypt the test stream. (Encryption of the test stream is not currently supported, so this mode is currently identical to authenticated.) .IP \fBO\fR [\fBO\fR]pen. No encryption of any kind is done. .PP The server can specify all the modes with which it is willing to communicate. The most strict mode that both the server and the client are willing to use will be selected. .IP Default: "AEO" .RE .TP .BI bottleneck_capacity " bottleneckcapacity" This value is used in the algorithm to dynamically set the TCP send/recv window sizes. This option is likely to be removed in the future once a dynamic \fIbottleneck_capacity\fR algorithm is incorporated into the code. (This option only really works when the local NIC is the bottleneck.) If this option is not specified, the dynamic window calculation requested by the \fB\-W\fR option to \fBbwctl\fR is not done and the advisory value is used. .RS .IP Default: unset .RE .TP .BI control_timeout " controltimeout" Number of seconds to wait for protocol messages before timing out. This value should be significantly larger than what typical users specify for the \fB\-I\fR flag of \fBbwctl\fR or \fBbwctl\fR will have to open a new control connection for each new test it requests. .RS .IP Default: 7200 (Picked to be the same as the default for TCP keepalive) .RE .TP .BI die_by " dieby" Number of seconds to wait for child processes to gracefully terminate before killing them with \fBSIGKILL\fR. This is in response to the master process receiving \fBSIGTERM\fR or \fBSIGHUP\fR. .RS .IP Default: 5 .RE .TP .BI disable_iperf Prevent \fBbwctl\fR from executing \fBIperf\fR tests .RS .IP Default: unset .RE .TP .BI disable_iperf3 Prevent \fBbwctl\fR from executing \fBIperf3\fR tests .RS .IP Default: unset .RE .TP .BI disable_nuttcp Prevent \fBbwctl\fR from executing \fBNuttcp\fR tests .RS .IP Default: unset .RE .TP .BI disable_owamp Prevent \fBbwctl\fR from executing \fBOwamp\fR tests .RS .IP Default: unset .RE .TP .BI disable_ping Prevent \fBbwctl\fR from executing \fBPing\fR tests .RS .IP Default: unset .RE .TP .BI disable_tracepath Prevent \fBbwctl\fR from executing \fBTracepath\fR tests .RS .IP Default: unset .RE .TP .BI disable_traceroute Prevent \fBbwctl\fR from executing \fBTraceroute\fR tests .RS .IP Default: unset .RE .TP .BI facility " facility" Syslog \fIfacility\fR to log messages. .RS .IP Default: LOG_DAEMON .RE .TP .BI group " group" Specifies the gid the \fBbwctld\fR process should run as. \fIgroup\fR can be specified using a valid group name on the system or by using \-gid. This option is only used if \fBbwctld\fR is started as root. .RS .IP Default: unset .RE .TP .BI iperf_cmd " iperfcmd" The path to the \fBIperf\fR command on the system. If the \fIiperf_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctld\fR environment will be searched to find the \fBIperf\fR executable. .RS .IP Default: iperf .RE .TP .BI iperf_port " iperfport" The port number(s) that \fBIperf\fR receivers will use. Currently, \fBbwctld\fR simply cycles through this range linearly. \fIiperf_port\fR can be specified as a single valid port number or as a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid port numbers with the '\-' character separating them. Whitespace is not allowed within the \fIiperf_port\fR. For example, \fB"5001\-5004"\fR would be valid, but \fB"5001 \- 5004"\fR would be invalid. .RS .PP This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of nuttcp_port and thrulay_port. .PP .IP Default: unset .RE .TP .BI iperf3_port " iperf3port" The port number(s) that \fBIperf3\fR receivers will use. Currently, \fBbwctld\fR simply cycles through this range linearly. \fIiperf3_port\fR can be specified as a single valid port number or as a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid port numbers with the '\-' character separating them. Whitespace is not allowed within the \fIiperf3_port\fR. For example, \fB"5001\-5004"\fR would be valid, but \fB"5001 \- 5004"\fR would be invalid. .RS .PP This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of nuttcp_port and thrulay_port. .PP .IP Default: unset .RE .TP .B log_location Directs the \fBbwctld\fR process to report source code file and line number information with error messages. This is a particularly useful option to set when sending in messages as part of a bug report. .RS .IP Default: unset .RE .TP .BI nuttcp_cmd " nuttcpcmd" The path to the \fBNuttcp\fR command on the system. If the \fInuttcp_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBNuttcp\fR executable. .RS .IP Default: nuttcp .RE .TP .BI nuttcp_port " nuttcpport" The port number(s) that \fBNuttcp\fR receivers will use. Currently, \fBbwctld\fR simply cycles through this range linearly. \fInuttcp_port\fR can be specified as a single valid port number or as a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid port numbers with the '\-' character separating them. Whitespace is not allowed within the \fInuttcp_port\fR. For example, \fB"5001\-5004"\fR would be valid, but \fB"5001 \- 5004"\fR would be invalid. .RS .PP This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of iperf_port and thrulay_port. .PP .IP Default: unset .RE .TP .BI owamp_cmd " owampcmd" The path to the \fBowping\fR command on the system. If the \fIowamp_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBowping\fR executable. .RS .IP Default: owping .RE .TP .BI owamp_server_cmd " owampservercmd" The path to the \fBowampd\fR command on the system. If the \fIowamp_server_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBowampd\fR executable. .RS .IP Default: owampd .RE .TP .BI owamp_port " owampport" The port number(s) that \fBOwamp\fR receivers will use. Currently, \fBbwctld\fR simply cycles through this range linearly. \fIowamp_port\fR must be specified as a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid port numbers with the '\-' character separating them. Whitespace is not allowed within the \fIowamp_port\fR. For example, \fB"5001\-5004"\fR would be valid, but \fB"5001 \- 5004"\fR would be invalid. .RS .PP This value must be set to a range because it is used for both the \fBOwamp\fR communication and test ports. .PP .IP Default: unset .RE .TP .BI peer_port " 0 | lowport\-highport" Specify the port range that will be used on the local host for peer connections to other .B bwctld servers. These connections are used to verify clock timing between the servers and to exchange test results. This is a required part of the protocol used by .B BWCTL to run tests. However, this option allows system administrators to limit these connections to a specific port range, which should allow .B BWCTL to work in a firewall environment. This option can be specified in two ways. First, as a 0, which would indicate that .B bwctld should allow the system to pick the port (ephemeral). Second, as a range. .I lowport must be a smaller value than .I highport and both numbers must be valid port values. (16-bit unsigned integer values) .RS .IP Default: 0 .RE .TP .BI ping_cmd " pingcmd" The path to the \fBping\fR command on the system. If the \fIping_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBping\fR executable. .RS .IP Default: ping .RE .TP .BI ping6_cmd " ping6cmd" The path to the \fBping6\fR command on the system. If the \fIping6_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBping6\fR executable. .RS .IP Default: ping6 .RE .TP .BI post_hook " /path/to/script" Specifies a script to run after each bwctl session has finished. These hooks can be used to save the results into a database, track usage or any number of other tasks. You can specify as many hooks as you want by including multiple post_hook entries. .TP .BI priority " priority" Syslog \fIpriority\fR to log error messages. .RS .IP Default: LOG_ERR .RE .TP .B root_folly Disables the checks that disable \fBbwctld\fR if it is run with \fIroot\fR permissions. There are legitimate reasons to run \fBbwctld\fR as root, but it is risky. Forcing this additional option will make it less likely root permissions are accidently used. .RS .IP Default: unset .RE .TP .BI src_node " nodename:port" Specify the address and port on which \fBbwctld\fR will listen for requests. \fInodename\fR can be specified using a DNS name or using the textual representation of the address. It is possible to set the source address without setting the \fIport\fR by simply leaving off the ':' and \fIport\fR specification. If an IPv6 address is specified, note that the accepted format contains \fInodename\fR in square brackets as: [fe80::fe9f:62d8]. This ensures the port number is distinct from the address specification. .RS .IP Default: \fInodename\fR is wildcarded as any currently available address .br \fIport\fR is 4823 .RE .TP .BI sync_fuzz " syncfuzz" This value is added to the NTP error estimates to increase the tolerance of \fBbwctld\fR to incomplete NTP configurations, or if the NTP system calls are not available. If NTP is unavailable to \fBbwctld\fR it assumes the clock is accurate to within one second plus the value of \fIsync_fuzz\fR. This option is specified as a floating point number in seconds. For example, to indicate that the system is synchronized within one second, you could specify this option as 1.0. .RS .PP Practically, this option is used to determine the size of the time window buffer before and after each throughput test. .IP Default: 0.0 .RE .TP .BI test_port " testport" The port number(s) that receivers of all test types will use, unless otherwise set using one of the other port variables. Currently, \fBbwctld\fR simply cycles through this range linearly. \fItest_port\fR must be specified as a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid port numbers with the '\-' character separating them. Whitespace is not allowed within the \fItest_port\fR. For example, \fB"5001\-5004"\fR would be valid, but \fB"5001 \- 5004"\fR would be invalid. .RS .PP This value must be set to a range because it is used for both the \fBOwamp\fR communication and test ports. .PP .IP Default: 5001-5900 .RE .TP .BI thrulay_port " thrulayport" The port number(s) that \fBThrulay\fR receivers will use. Currently, \fBbwctld\fR simply cycles through this range linearly. \fIthrulay_port\fR can be specified as a single valid port number or as a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid port numbers with the '\-' character separating them. Whitespace is not allowed within the \fIthrulay_port\fR. For example, \fB"5001\-5004"\fR would be valid, but \fB"5001 \- 5004"\fR would be invalid. .RS .PP This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of iperf_port and nuttcp_port. .PP .IP Default: unset .RE .TP .BI tracepath_cmd " tracepathcmd" The path to the \fBtracepath\fR command on the system. If the \fItracepath_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBtracepath\fR executable. .RS .IP Default: tracepath .RE .TP .BI tracepath6_cmd " tracepath6cmd" The path to the \fBtracepath6\fR command on the system. If the \fItracepath6_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBtracepath6\fR executable. .RS .IP Default: tracepath6 .RE .TP .BI traceroute_cmd " traceroutecmd" The path to the \fBtraceroute\fR command on the system. If the \fItraceroute_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBtraceroute\fR executable. .RS .IP Default: traceroute .RE .TP .BI traceroute6_cmd " traceroute6cmd" The path to the \fBtraceroute6\fR command on the system. If the \fItraceroute6_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBtraceroute6\fR executable. .RS .IP Default: traceroute6 .RE .TP .BI user " user" Specifies the uid the \fBbwctld\fR process should run as. \fIuser\fR can be specified using a valid user name on the system or by using \-uid. This option is only used if \fBbwctld\fR is started as root. If the given \fIuser\fR has \fIroot\fR permissions, the \fIroot_folly\fR option must also be specified. .RS .IP Default: unset .RE .TP .BI var_dir " vardir" Directory path where the bwctld.pid file will be placed. .RS .IP Default: Current directory .RE .lf 38 bwctld.conf.ms .RE .SH SEE ALSO bwctl(1), bwctld(8), bwctld.limits(5), bwctld.keys(5), and the \%http://software.internet2.edu/bwctl/ web site. .PP For details on \fBIperf3\fR, see the \%https://github.com/esnet/iperf web site. .PP For details on \fBIperf\fR, see the \%http://sourceforge.net/projects/iperf web site. .PP For details on \fBNuttcp\fR, see the \%http://www.wcisd.hpc.mil/nuttcp/Nuttcp\-HOWTO.html web site. .PP For details on \fBOwamp\fR, see the \%http://software.internet2.edu/owamp web site. .SH ACKNOWLEDGMENTS This material is based in part on work supported by the National Science Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF. bwctl_1.5.4+dfsg1.orig/doc/bwctld.man.html0000664000076500007710000001721112560414557015305 0ustar Manpage of bwctld

bwctld

Section: Maintenance Commands (8)
Updated: $Date$
Index Return to Main Contents
 

NAME

bwctld - Bandwidth Control server.  

SYNOPSIS

bwctld [ -a auth_mode ] [ -c conf_dir ] [ -e facility ] [ -f ] [ -G group ] [ -h ] [ -R var_dir ] [ -S nodename:port ] [ -U user ] [ -v ] [ -Z ]  

DESCRIPTION

bwctld is a server program designed to schedule and run Iperf, Thrulay or Nuttcp, Ping, Traceroute, Tracepath, and Owamp tests.

Aside from actually running network measurement tests, the main function of bwctld is to determine which tests are allowable based upon the policy restrictions configured by the system administrator.

bwctld was designed to be run as a stand-alone daemon process. It uses the classic accept/fork model of handling new requests.

Most of the command line options for bwctld have analogous options in the bwctld.conf file. The command line takes precedence.  

OPTIONS

-a auth_mode
Specify the authentication modes the server is willing to use for communication. auth_mode should be set as a character string with any or all of the characters "AEO". The modes are:
A
[A]uthenticated. This mode encrypts the control connection.
E
[E]ncrypted. This mode encrypts the control connection. If the test supports encryption, this mode will additionally encrypt the test stream. (Encryption of the test stream is not currently supported, so this mode is currently identical to authenticated.)
O
[O]pen. No encryption of any kind is done.

The server can specify all the modes with which it is willing to communicate. The most strict mode that both the server and the client are willing to use will be selected.

Default:
"AEO".
-c conf_dir
Specify the directory that holds the bwctld configuration files.
Default:
Current working directory.
-e facility
Syslog facility to which messages are logged.
Default:
LOG_DAEMON
-f
Enables the bwctld daemon to run with root permissions. There are legitimate reasons to run bwctld as root, but it is risky. Forcing this additional option will make it less likely root permissions are accidently used.
-G group
Specify the gid for the bwctld process. group can be specified using a valid group name or by using -gid. This option is only used if bwctld is started as root.
-h
Print a help message.
-R var_dir
Specify the directory to hold the bwctld.pid file.
Default:
Current directory
-S nodename:port
Specify the address and port on which bwctld will listen for requests. nodename can be specified using a DNS name or using the textual representation of the address. It is possible to set the source address without setting the port simply by leaving off the ':' and port specification. If an IPv6 address is specified, note that the accepted format contains nodename in square brackets, such as: [fe80::fe9f:62d8]. This ensures the port number is distinct from the address specification.
Default:
nodename is wildcarded as any currently available address. port is 4823.
-U user
Specify the uid for the bwctld process. user can be specified using a valid user name or by using -uid. This option is only used if bwctld is started as root.
-v
Set verbose output. Messages will only go to syslog unless the -Z option is specified.
-Z
Run the master bwctld process in the foreground. In this mode, error messages are printed to stderr as well as being sent to syslog. Also, normal terminal controls are available. (i.e., <Cntr-C> will cause the daemon to kill it's child processes and exit.) This is useful for debugging.

 

REQUIREMENTS

The bwctld daemon prefers a reasonably synchronized clock. It is scheduling tests and needs to be sure it has the same idea of when a test should take place as does the peer test system. Therefore, bwctld attempts to use NTP specific system calls to determine the accuracy of the local clock. If those system calls are unavailable, or the administrator has set the allow_unsync option in the bwctld.conf file, then bwctld will blindly accept tests assuming the clock is synchronized to within the sync_fuzz value that is also defined in the bwctld.conf file. If this assumption does not hold true, then the test will eventually fail. Unfortunately, because the time offset is not detected early, this test will have taken up a schedule slot.  

FILES

bwctld.pid
bwctld.conf
bwctld.limits
bwctld.keys  

SEE ALSO

There are more details on configuring the bwctld daemon in the bwctld.conf(5) manual page. Details on configuring the policy is in the bwctld.limits(5) and bwctld.keys(5) manual pages. Information on the client is in the bwctl(1) manual page. For more of an overview of the full functionality and architecture see the http://software.internet2.edu/bwctl/ web site.

For details on Iperf3, see the https://github.com/esnet/iperf web site.

For details on Iperf, see the http://sourceforge.net/projects/iperf web site.

For details on Nuttcp, see the http://www.wcisd.hpc.mil/nuttcp/Nuttcp-HOWTO.html web site.

For details on Owamp, see the http://software.internet2.edu/owamp web site.  

ACKNOWLEDGMENTS

This material is based in part on work supported by the National Science Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
REQUIREMENTS
FILES
SEE ALSO
ACKNOWLEDGMENTS

This document was created by man2html, using the manual pages.
Time: 15:06:28 GMT, March 20, 2015 bwctl_1.5.4+dfsg1.orig/doc/bwctl.man.html0000664000076500007710000007417112560414557015151 0ustar Manpage of bwctl

bwctl

Section: User Commands (1)
Updated: $Date$
Index Return to Main Contents
 

NAME

bwctl, bwping, bwtraceroute - Client application to request throughput, traceroute, ping and owamp tests.  

SYNOPSIS

bwctl [options] -c recvhost -s sendhost
bwctl [options] -c recvhost
bwctl [options] -s sendhost
bwping [options] -c recvhost -s sendhost
bwping [options] -c recvhost
bwping [options] -s sendhost
bwtraceroute [options] -c recvhost -s sendhost
bwtraceroute [options] -c recvhost
bwtraceroute [options] -s sendhost  

DESCRIPTION

bwctl is a command line client application that is used to initiate throughput tests.
This version of bwctl is capable of initiating Iperf, Nuttcp, Iperf3, Ping, Traceroute, Tracepath and Owamp tests.

bwctl works by contacting a bwctld daemon on both the receiving host and the sending host. bwctld manages and schedules the resources of the host it runs on. In the case where only one of the receiving host or sending host is specified, bwctl assumes the local host is the other endpoint. bwctl will attempt to contact a local bwctld if it can. If there is no local bwctld running, bwctl assumes the local host does not require policy controls and will execute the bwctld functionality required to run the test directly.

If cases where bwctl is directly running the test on the host, there are several configuration options that are shared with bwctld. Those configuration options can be set using the bwctlrc(5) configuration file in a way very similar to the way they are specified in the bwctld.conf(5) file.

The bwctl, bwping and bwtraceroute clients are used to request the desired type of throughput, latency or traceroute test. Furthermore, it requests when the test is wanted. bwctld on each endpoint either responds with a tentative reservation or a test denied message. Once bwctl is able to get a matching reservation from both bwctld processes (one for each host involved in the test), it confirms the reservation. Then, the bwctld processes run the test and return the results. The results are returned to the client from both sides of the test from the respective bwctld processes. Additionally, the bwctld processes share the results from their respective side of the test with each other.

BWCTL (bwctl and bwctld) is used to enable non-specific network measurement tests to hosts without having to give full user accounts on the given systems. Users want the ability to run throughput tests to determine the achievable or available bandwidth between a pair of hosts. It is often useful to test to multiple points along a network path to determine the network characteristics along that path. Typically, users who want to do this path decomposition have to directly contact the network/system administrators who control the hosts along the path. The administrator needs to either run half of the test for the user or give them a user account on the host. Also, network paths of interest are typically controlled by multiple administrators. These hurdles have made this kind of testing difficult in practice.

BWCTL was designed to help with this problem. It allows an administrator to configure a given host as an Iperf, Iperf3, Nuttcp, or Owamp endpoint. The endpoint can be a packet sender (e.g. Iperf client) or a packet receiver (e.g. Iperf server). It can be shared by multiple users without concern that those users will interfere with each other. Specific policy limits can be applied to specific users, and individual tests are scheduled so they will not interfere with each other. Additionally, full user accounts are not required for the users running the tests.

BWCTL allows the administrator to classify incoming connections based upon a user name and AES key combination or, alternatively, based upon an IP/netmask. Once the connection is classified, the bwctld can determine the exact type and intensities of througput tests that will be allowed. More information on the policy controls can be found in the bwctld(8) man page.

BWCTL makes use of a distributed scheduling algorithm. Each host maintains a schedule independently. As a client requests a test, the two endpoints are contacted and each bwctld server responds with the first available open schedule slot. This enables on-demand tests to co-exist with regularly scheduled tests since regularly scheduled tests are implemented by having the client request tests on regular intervals. Different priorities can be implemented using the event_horizon configuration directive to bwctld. (By allowing clients that implement regularly scheduled tests to reserve their time slots further into the future.)  

ARGUMENTS

 

Connection/Authentication Arguments:

-4, --ipv4
Forces bwctl to use IPv4 addresses only.
Default:
Unspecified (IPv6 is preferred).
-6, --ipv6
Forces bwctl to use IPv6 addresses only.
Default:
Unspecified (IPv6 is preferred).
-A authmethod
authmethod is used to specify the authentication method the bwctl client is willing to use for communication with the bwctld on the sendhost and recvhost. The authentication options of bwctl are intended to be extensible. The communication from the bwctl client to each bwctld server may take different options for different types of authentication. If the authmethod option is specified for either the -s, or the -c argument, it overrides the authmethod specified with the -A option for communication with that particular host. (Therefore, the -A argument is really only useful if the same authentication can be used with both hosts.)

Allowing different authentication methods for each connection should allow a client to use different authentication methods with different servers which should in turn allow cross-domain tests to occur more easily.

The format for authmethod is:

authmode [authscheme schemeopts]

authmode
Specifies the authentication mode the client is willing to speak with a server. It must be set as a character string with any or all of the characters "AEO". The modes are:
A
[A]uthenticated. This mode encrypts the control connection.
E
[E]ncrypted. This mode encrypts the control connection. If the test supports encryption, this mode will additionally encrypt the test stream. (Encryption of the test stream is not currently supported, so this mode is currently identical to authenticated.)
O
[O]pen. No encryption of any kind is done.

The client can specify all the modes with which it is willing to communicate. The most strict mode that both the server and the client are willing to use will be selected.

Default:
"AEO"
authscheme schemeopts
authscheme indicates the authentication scheme that should be used to achieve the authenticated or encrypted modes. schemeopts are a list of arguments specific to each particular authentication scheme. Supported authscheme values follow (listed with the schemeopts each scheme requires):
AESKEY userid [keyfile]
This is the initial "simple" shared secret (AES key) model. userid is required to identify which shared secret the server and client should use. keyfile optionally specifies a file to retrieve the AES key from. If keyfile is not specified, the user will be prompted for a passphrase. keyfile can be generated using the aespasswd(1) application.
Default:
Unauthenticated

authscheme and schemeopts are only needed if authenticated communication (A or E modes of authmode) is wanted with sendhost and recvhost.

-B, --local_address srcaddr
Bind the local address of the client socket to srcaddr. srcaddr can be specified using a DNS name or using standard textual notations for the IP addresses.
Default:
Unspecified (wild-card address selection).
-c, --receiver recvhost[:port] [authmethod]
Specifies the host that will run the Iperf, Iperf3 or Nuttcp server. The :port suffix is optional and is only needed if bwctld is being run on a non-default port number. If an IPv6 address is being specified, note that the accepted format contains the recvhost portion of the specification in square brackets as: [fe80::fe9f:62d8]:4823. This ensures the port number is distinct from the address specification, and is not needed if the :port suffix is not being used.

At least one of the -c or -s options must be specified. If one of them is not specified, it is assumed to be the local host.

authmethod is a specifically ordered list of keywords that is only needed if authenticated communication is wanted with recvhost. These keywords are used to describe the type of communication and authentication that should be used to contact the recvhost. If recvhost and sendhost share the same authentication methods and identities, it is possible to specify the authmethod for both recvhost and sendhost using the -A argument. An authmethod specified with the -c option will override an authmethod specified with the -A argument for communication with the recvhost.

The format for authmethod and a description of the currently available authentication methods are described with the -A argument.

-s, --sender sendhost[:port] [authmethod]
Specifies the host that will run the Iperf, Iperf3 or Nuttcp client. The :port suffix is optional and is only needed if bwctld is being run on a non-default port number. If an IPv6 address is being specified, note that the accepted format contains the sendhost portion of the specification in square brackets as: [fe80::fe9f:62d8]:4823. This ensures the port number is distinct from the address specification, and is not needed if the :port suffix is not being used.

At least one of the -c or -s options must be specified. If one of them is not specified, it is assumed to be the local.

authmethod is a specifically ordered list of keywords that is only needed if authenticated communication is wanted with sendhost. These keywords are used to describe the type of communication and authentication that should be used to contact the sendhost. If recvhost and sendhost share the same authentication methods and identities, it is possible to specify the authmethod for both recvhost and sendhost using the -A argument. An authmethod specified with the -s option will override an authmethod specified with the -A argument for communication with the sendhost.

The format for authmethod and a description of the currently available authentication methods are described with the -A argument.

-o, --flip
By default, the sender will connect to the receiver. The --flip option causes the receiver to connect to the sender. This option is not available for all test types (e.g. for iperf tests). This is most useful if the receiver is behind a firewall.
 

bwctl Test Arguments:

The arguments were named to match their counterparts in Iperf as closely as possible.

-T, --tool
Specify which throughput tester to use:
iperf
iperf3
nuttcp
Default:
None. Selects a tool that the client and server have in common
-S, --tos TOS

Set the TOS byte in the sending packets.
Default:
None.
-D, --dscp DSCP

Set an RFC 2474 style DSCP value for the TOS byte in the sending packets. This can be set using a 6-bit numeric value in decimal, hex, or octal. Additionally, the following set of symbolic DSCP name constants are understood. (Example applications are taken from RFC 4594.)
NameValueService ClassExamples
NONE
DEFAULT
DF
CS0

CS1001000Low-Priority DataNo BW assurance

AF11001010High-Throughput DataStore and forward
AF12001100
AF13001110

CS2010000OAMOAM&P

AF21010010Low-Latency DataWeb-based ordering
AF22010100
AF23010110

CS3011000Broadcast VideoTV & live events

AF31011010Multimedia StreamingStreaming video and audio
AF32011100
AF33011110

CS4100000Real-Time InteractiveVideo conf and gaming

AF41100010Multimedia ConferencingH.323 video conferencing
AF42100100
AF43100110

CS5101000SignalingVideo conf and gaming

EF101110TelephonyIP Telephony bearer

CS6110000Network ControlNetwork routing

CS7111000
Default:
Unset.
-b, --bandwidth bandwidth
Limit UDP send rate to bandwidth (bits/sec).
Default:
1 Mb
-i, --report_interval interval
Report interval (seconds).
Default:
unset (no intervals reported)
-l, --buffer_length len
length of read/write buffers (bytes).
Default:
8 KB TCP, 1470 bytes UDP
-O, --omit seconds
Initial period of data to omit from the final statistics. This is so that you can skip past initial conditions such as TCP Slow Start. Currently only implemented by the iperf3 tool.
-P, --parallel nStreams
Number of concurrent streams for the test. See the -P option of Iperf for details.
-t,--test_duration time
Duration of test (seconds).
Default:
10
-u, --udp

UDP test.
Default:
TCP test
-W,--dynamic_window window
Same as the -w option, except that the value is advisory. bwctl will attempt to dynamically determine the appropriate TCP window, based upon RTT information gathered from the control socket. If bwctl is unable to dynamically determine a window, the value window will be used.
Default:
Unset (system defaults)
-w, --window window
Socket buffer sizes (bytes). For TCP, this sets the TCP window size. For UDP, this sets the socket receive buffer size.
Default:
Unset (system defaults)
 

bwping Test Arguments:

-T, --tool
Specify which throughput tester to use:
ping
owamp
Default:
None. Selects a tool that the client and server have in common
-E, --no_endpoint
Allow a ping test to run where the receiver may not have bwctl available.
-l, --packet_length length
The size of the packets to send for the ping or owamp test
Default:
Minimally sized packets
-N, --num_packets nPackets
The number of packets to send in this test
Default:
10
-i, --packet_interval seconds
The time between when each packet is sent for the test
Default:
1.0 seconds
-t, --ttl ttl
The TTL value to tag each packet with. This only applies to ping tests.
Default:
None
 

bwtraceroute Test Arguments:

-T, --tool
Specify which throughput tester to use:
traceroute
tracepath
Default:
None. Selects a tool that the client and server have in common
-E, --no_endpoint
Allow a test to run where the receiver may not have bwctl available.
-l, --packet_length length
The size of the packets to send for the tests
Default:
Minimally sized packets
-F, --first_ttl ttl
The minimum TTL to set for traceroute. This sets the first hop in the route that will be returned. This does not work for tracepath tests.
Default:
None
-M, --max_ttl ttl
The maximum TTL to set for traceroute. This sets the last hop in the route that will be returned. This does not work for tracepath tests.
Default:
None
-t, --test_duration secondsfR
The maximum amount of time to wait for the traceroute test to finish.
Default:
10 seconds
 

Scheduling Arguments:

-a, --allow_ntp_unsync syncfuzz

Allow bwctl to run without a synchronized system clock. Use this to specify how far off the local clock is from UTC. bwctl prefers to have an NTP synchronized system clock to ensure the two endpoints of the test are actually agreeing to the same scheduled time window for test execution.

If two systems do NOT have a close enough notion of time, then the throughput test will eventually fail because one endpoint of the test will attempt to run at a different time than the other.

If the operating system supports the NTP system calls, and the system clock is determined to be unsynchronized, error messages will still be reported depending upon the value of the -e flag.

When calculating the time errors, this value will be aded in to account for the difference. The maximum time offset can be bounded on the server side, using the max_time_error directive, to prevent a denial of service attack. If set, the server will reject any requests to test with a peer that has too high a timestamp error.

Default:
Unset (Defaults to Set for systems without the NTP system calls)
-I, --test_interval interval
Specifies that bwctl should attempt to run a throughput test every interval seconds.
Default:
Unset. If it is unset, bwctl only runs the test once.
-L, --latest_time longest
Specifies the longest amount of time the client is willing to wait for a reservation window. When bwctl requests a test from the bwctld server, it specifies the earliest time and the latest time it is willing to accept. The latest time is determined by adding this longest option to the earliest time. The earliest time is essentially 'now'. The longest time is specified as a number of seconds.
Default:
If interval is set, the default is 50% of interval. Otherwise, the default is twice the test duration time but no smaller than 10 minutes. (See -t.)
-n, --num_tests nIntervals
Number of tests to perform if the -I option is set.
Default:
Continuous
-R, --randomize alpha
Randomize the start time of the test within this alpha percent of the interval. Valid values for alpha are from 0-50. bwctl will attempt to run the test every interval +/- alpha percent. For example, if the interval is 300 seconds and alpha is set to 10 percent, then bwctl will attempt to run a test every 270-330 seconds. This option is only useful with the -I option.
Default:
0 (no randomness)
 

Output Arguments:

-d, --output_dir dir
Specifies directory for results files if the -p option is set.
-e, --facility facility
Syslog facility to log messages to.
Default:
LOG_USER
-f, --units units
Specify the units for the tool to use when displaying the results. The accepted values for units are tool specific.
Iperf:
k
Kilobits per second

K
Kilobytes per second

m
Megabits per second

M
Megabytes per second

-h, --help

Print a help message.
-p, --print

Place test results in files. Print the filenames to stdout when results are complete.
-q, --quiet

Quiet output. Output as little as possible.
-r, --syslog_to_stderr

Send syslog messages to stderr. This is the default unless the -q option is specified so this option is only useful with the -q option.
-V, --version

Print version information and exit.
-v, --verbose

Verbose output. Specifying additional -v's increases the verbosity.
-x, --both

Output both sender and receiver results. By default, only the results from the appropriate side for the given tool are output. If the -p option is specified, the sender results are placed in an additional file.
-y, --format format
Specify the output format of the tool. The accepted values for format are tool specific.
Iperf:
c
[c]omma-separated output

 

ENVIRONMENT VARIABLES

bwctl Environment Variableusedefault



BWCTLRCConfig file~/.bwctlrc
BWCTL_DEBUG_TIMEOFFSETOffset0.0(seconds)
 

EXAMPLES

bwctl -c somehost.example.com

Run a default 10 second TCP test as soon as possible with local as the sender and somehost.example.com as the receiver, using whichever tools they have in common. Return the results from the receive side of the test.

bwctl -x -c somehost.example.com

Like the previous test, but also return the results from the sender side of the test.

bwctl -x -c somehost.example.com -s otherhost.example.com

Like the previous test, but with otherhost.example.com as the sender instead of local.

bwctl -t 30 -T iperf -s somehost.example.com

Run a 30 second TCP Iperf test with somehost.example.com as the sender and local as the receiver.

bwctl -I 3600 -R 10 -t 10 -u -b 10m -s somehost.example.com

Run a 10 second UDP test about every hour (3600 +/- 360 seconds) with the sender rate limited to 10 Mbits per second from somehost.example.com to local.

bwctl -s somehost.example.com AE AESKEY someuser

Run the default 10 second TCP test. Authenticate using the identity someuser. bwctl will prompt for a passphrase that will be used to create an AES key.

bwping --no_endpoint -N 30 -i 0.5 --ttl 150 -c somehost.example.com

Run a ping test that sends 30 pings, one packet per half-second, with a TTL of 150 to somehost.example.com from local. If somehost.example.com does not have bwctl running, the ping test runs anyway.

bwtraceroute -T tracepath -E -c somehost.example.com

Run a tracepath test to somehost.example.com from local. If somehost.example.com does not have bwctl running, the tracepath test runs anyway.
 

SEE ALSO

bwctld(8) and the http://software/bwctl/ web site.

For details on Iperf3, see the https://github.com/esnet/iperf web site.

For details on Iperf, see the http://sourceforge.net/projects/iperf web site.

For details on Nuttcp, see the http://www.wcisd.hpc.mil/nuttcp/Nuttcp-HOWTO.html web site.

For details on Owamp, see the http://software.internet2.edu/owamp web site.  

ACKNOWLEDGMENTS

This material is based in part on work supported by the National Science Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF.


 

Index

NAME
SYNOPSIS
DESCRIPTION
ARGUMENTS
Connection/Authentication Arguments:
bwctl Test Arguments:
bwping Test Arguments:
bwtraceroute Test Arguments:
Scheduling Arguments:
Output Arguments:
ENVIRONMENT VARIABLES
EXAMPLES
SEE ALSO
ACKNOWLEDGMENTS

This document was created by man2html, using the manual pages.
Time: 15:06:28 GMT, March 20, 2015 bwctl_1.5.4+dfsg1.orig/doc/bwctl_firewalls.html0000664000076500007710000001135712560414557016444 0ustar

BWCTL TCP/UDP Port Usage and Firewall Configuration

BWCTL uses three different sets of ports:

  1. Main daemon listening port for control connection (Default: TCP/4823)

  2. Defined using the port portion of the src_node configuration option from bwctld.conf

    For example, to enable this on a typical Red Hat Enterprise Linux system, you would need to add the following line to /etc/sysconfig/iptables:

    -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 4823 -j ACCEPT
    

    This should be added somewhere after the line that allows ESTABLISHED and RELATED connections through.

    This does not use the system-config-securitylevel script from Redhat. I have not been able to get that to do all the things I needed.

  3. bwctld peer connections (Default: TCP/ephemeral range)

  4. Defined using the peer_port configuration option from bwctld.conf

    If you specified peer_port as 9910-9950, you would then need to enable this range in your firewall configuration. (If you do not specify a range, BWCTL will only work reliably if you have open access for the entire ephemeral port range.)

    On a typical Red Hat Enterprise Linux system, you would need to add the following line to /etc/sysconfig/iptables given this range:

    -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9910:9950 -j ACCEPT
    

    This should be added somewhere after the line that allows ESTABLISHED and RELATED connections through.

    This does not use the system-config-securitylevel script from Redhat. I have not been able to get that to do all the things I needed.

  5. Test Connections (Default: Tool Specific)

  6. Each throughput tester can have its own port defined in bwctld.conf. The configuration option for each tester takes the form testername_port. For example, to set the Thrulay port, you would use the option thrulay_port. The following example would apply to any of the testers, just changing the appropriate configuration option.

    If you specified iperf_port as 5001-5004, you would then need to enable this range in your firewall configuration. If you allow UDP tests (in your bwctld.limits file), you will need to open up the UDP ports. Likewise for TCP. The default is 5001 for TCP and UDP tests, and you will only be able to test if you open the ports specified.

    On a typical Red Hat Enterprise Linux system, you would need to add the following lines to /etc/sysconfig/iptables given this range:

    -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5001:5004 -j ACCEPT
    -A RH-Firewall-1-INPUT -m udp -p ucp --dport 5001:5004 -j ACCEPT
    

    This should be added somewhere after the line that allows ESTABLISHED and RELATED connections through.

    This does not use the system-config-securitylevel script from Redhat. I have not been able to get that to do all the things I needed.

Example RHEL 4 /etc/sysconfig/iptables file

*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# ssh
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
# bwctld listen port (src_node)
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 4823 -j ACCEPT
# bwctld peer_ports
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9910:9950 -j ACCEPT
# bwctl/iperf_port
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5001 -j ACCEPT
-A RH-Firewall-1-INPUT -m udp -p ucp --dport 5001 -j ACCEPT
# reject anything that has not matched
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
bwctl_1.5.4+dfsg1.orig/doc/bwctld_conf_opts.man0000664000076500007710000004113212560414557016413 0ustar .\" The first line of this file must contain the '"[e][r][t][v] line .\" to tell man to run the appropriate filter "t" for table. .\" .\" $Id: bwctlrc.man 493 2008-10-09 16:27:47Z aaron $ .\" .\"###################################################################### .\"# # .\"# Copyright (C) 2004 # .\"# Internet2 # .\"# All Rights Reserved # .\"# # .\"###################################################################### .\" .\" File: bwctlrc.8 .\" .\" Author: Jeff Boote and Aaron Brown .\" Internet2 .\" .\" Date: Tue Jan 06 07:44:09 EST 2009 .\" .\" Description: .\" .PP The format of this file is: .RS .IP \(bu Comment lines are any line where the first non-whitespace character is '#'. These lines are counted for the purposes of returning line numbers in error messages but are otherwise ignored by the spawned \fBbwctld\fR. .IP \(bu Lines may be continued using the semi-standard '\\' character followed immediately by a newline character. This is the only valid place for the '\\' character. If it is found elsewhere, a syntax error is reported. .IP \(bu Blank lines are treated as comment lines. .IP \(bu All other lines are used to set configuration options. The format of these lines is an initial keyword followed by a variable list of arguments, separated by whitespace. .RE .SH CONFIGURATION OPTIONS .TP .BI access_priority " priority" Syslog \fIpriority\fR to log access messages. .RS .IP Default: LOG_INFO .RE .TP .B allow_unsync Directs \fBbwctld\fR to continue accepting valid requests for throughput tests when the system clock is not synchronized. \fBbwctld\fR prefers to have an NTP synchronized system clock to ensure the two endpoints of the test are actually agreeing to the same scheduled time window for test execution. This option is used to bypass this requirement for systems that either do not have the NTP system calls, or prefer not to configure NTP. .RS .PP Note: if the difference between the system clocks on the two endpoints is too great, the eventual throughput test will fail when the endpoints attempt to run the test at different times. The threshold for this difference is controlled using the \fIsync_fuzz\fR option. (If you set allow_unsync, you should set \fIsync_fuzz\fR to a reasonable value for your system.) .PP .IP Default: unset (set if the operating system does have the NTP system calls) .RE .TP .BI auth_mode " authmode" Specify the authentication modes the server is willing to use for communication. \fIauth_mode\fR should be set as a character string, with any or all of the characters "AEO". The modes are: .RS .IP \fBA\fR [\fBA\fR]uthenticated. This mode encrypts the control connection. .IP \fBE\fR [\fBE\fR]ncrypted. This mode encrypts the control connection. If the test supports encryption, this mode will additionally encrypt the test stream. (Encryption of the test stream is not currently supported, so this mode is currently identical to authenticated.) .IP \fBO\fR [\fBO\fR]pen. No encryption of any kind is done. .PP The server can specify all the modes with which it is willing to communicate. The most strict mode that both the server and the client are willing to use will be selected. .IP Default: "AEO" .RE .TP .BI bottleneck_capacity " bottleneckcapacity" This value is used in the algorithm to dynamically set the TCP send/recv window sizes. This option is likely to be removed in the future once a dynamic \fIbottleneck_capacity\fR algorithm is incorporated into the code. (This option only really works when the local NIC is the bottleneck.) If this option is not specified, the dynamic window calculation requested by the \fB\-W\fR option to \fBbwctl\fR is not done and the advisory value is used. .RS .IP Default: unset .RE .TP .BI control_timeout " controltimeout" Number of seconds to wait for protocol messages before timing out. This value should be significantly larger than what typical users specify for the \fB\-I\fR flag of \fBbwctl\fR or \fBbwctl\fR will have to open a new control connection for each new test it requests. .RS .IP Default: 7200 (Picked to be the same as the default for TCP keepalive) .RE .TP .BI die_by " dieby" Number of seconds to wait for child processes to gracefully terminate before killing them with \fBSIGKILL\fR. This is in response to the master process receiving \fBSIGTERM\fR or \fBSIGHUP\fR. .RS .IP Default: 5 .RE .TP .BI disable_iperf Prevent \fBbwctl\fR from executing \fBIperf\fR tests .RS .IP Default: unset .RE .TP .BI disable_iperf3 Prevent \fBbwctl\fR from executing \fBIperf3\fR tests .RS .IP Default: unset .RE .TP .BI disable_nuttcp Prevent \fBbwctl\fR from executing \fBNuttcp\fR tests .RS .IP Default: unset .RE .TP .BI disable_owamp Prevent \fBbwctl\fR from executing \fBOwamp\fR tests .RS .IP Default: unset .RE .TP .BI disable_ping Prevent \fBbwctl\fR from executing \fBPing\fR tests .RS .IP Default: unset .RE .TP .BI disable_tracepath Prevent \fBbwctl\fR from executing \fBTracepath\fR tests .RS .IP Default: unset .RE .TP .BI disable_traceroute Prevent \fBbwctl\fR from executing \fBTraceroute\fR tests .RS .IP Default: unset .RE .TP .BI facility " facility" Syslog \fIfacility\fR to log messages. .RS .IP Default: LOG_DAEMON .RE .TP .BI group " group" Specifies the gid the \fBbwctld\fR process should run as. \fIgroup\fR can be specified using a valid group name on the system or by using \-gid. This option is only used if \fBbwctld\fR is started as root. .RS .IP Default: unset .RE .TP .BI iperf_cmd " iperfcmd" The path to the \fBIperf\fR command on the system. If the \fIiperf_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctld\fR environment will be searched to find the \fBIperf\fR executable. .RS .IP Default: iperf .RE .TP .BI iperf_port " iperfport" The port number(s) that \fBIperf\fR receivers will use. Currently, \fBbwctld\fR simply cycles through this range linearly. \fIiperf_port\fR can be specified as a single valid port number or as a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid port numbers with the '\-' character separating them. Whitespace is not allowed within the \fIiperf_port\fR. For example, \fB"5001\-5004"\fR would be valid, but \fB"5001 \- 5004"\fR would be invalid. .RS .PP This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of nuttcp_port and thrulay_port. .PP .IP Default: unset .RE .TP .BI iperf3_port " iperf3port" The port number(s) that \fBIperf3\fR receivers will use. Currently, \fBbwctld\fR simply cycles through this range linearly. \fIiperf3_port\fR can be specified as a single valid port number or as a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid port numbers with the '\-' character separating them. Whitespace is not allowed within the \fIiperf3_port\fR. For example, \fB"5001\-5004"\fR would be valid, but \fB"5001 \- 5004"\fR would be invalid. .RS .PP This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of nuttcp_port and thrulay_port. .PP .IP Default: unset .RE .TP .B log_location Directs the \fBbwctld\fR process to report source code file and line number information with error messages. This is a particularly useful option to set when sending in messages as part of a bug report. .RS .IP Default: unset .RE .TP .BI nuttcp_cmd " nuttcpcmd" The path to the \fBNuttcp\fR command on the system. If the \fInuttcp_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBNuttcp\fR executable. .RS .IP Default: nuttcp .RE .TP .BI nuttcp_port " nuttcpport" The port number(s) that \fBNuttcp\fR receivers will use. Currently, \fBbwctld\fR simply cycles through this range linearly. \fInuttcp_port\fR can be specified as a single valid port number or as a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid port numbers with the '\-' character separating them. Whitespace is not allowed within the \fInuttcp_port\fR. For example, \fB"5001\-5004"\fR would be valid, but \fB"5001 \- 5004"\fR would be invalid. .RS .PP This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of iperf_port and thrulay_port. .PP .IP Default: unset .RE .TP .BI owamp_cmd " owampcmd" The path to the \fBowping\fR command on the system. If the \fIowamp_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBowping\fR executable. .RS .IP Default: owping .RE .TP .BI owamp_server_cmd " owampservercmd" The path to the \fBowampd\fR command on the system. If the \fIowamp_server_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBowampd\fR executable. .RS .IP Default: owampd .RE .TP .BI owamp_port " owampport" The port number(s) that \fBOwamp\fR receivers will use. Currently, \fBbwctld\fR simply cycles through this range linearly. \fIowamp_port\fR must be specified as a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid port numbers with the '\-' character separating them. Whitespace is not allowed within the \fIowamp_port\fR. For example, \fB"5001\-5004"\fR would be valid, but \fB"5001 \- 5004"\fR would be invalid. .RS .PP This value must be set to a range because it is used for both the \fBOwamp\fR communication and test ports. .PP .IP Default: unset .RE .TP .BI peer_port " 0 | lowport\-highport" Specify the port range that will be used on the local host for peer connections to other .B bwctld servers. These connections are used to verify clock timing between the servers and to exchange test results. This is a required part of the protocol used by .B BWCTL to run tests. However, this option allows system administrators to limit these connections to a specific port range, which should allow .B BWCTL to work in a firewall environment. This option can be specified in two ways. First, as a 0, which would indicate that .B bwctld should allow the system to pick the port (ephemeral). Second, as a range. .I lowport must be a smaller value than .I highport and both numbers must be valid port values. (16-bit unsigned integer values) .RS .IP Default: 0 .RE .TP .BI ping_cmd " pingcmd" The path to the \fBping\fR command on the system. If the \fIping_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBping\fR executable. .RS .IP Default: ping .RE .TP .BI ping6_cmd " ping6cmd" The path to the \fBping6\fR command on the system. If the \fIping6_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBping6\fR executable. .RS .IP Default: ping6 .RE .TP .BI post_hook " /path/to/script" Specifies a script to run after each bwctl session has finished. These hooks can be used to save the results into a database, track usage or any number of other tasks. You can specify as many hooks as you want by including multiple post_hook entries. .TP .BI priority " priority" Syslog \fIpriority\fR to log error messages. .RS .IP Default: LOG_ERR .RE .TP .B root_folly Disables the checks that disable \fBbwctld\fR if it is run with \fIroot\fR permissions. There are legitimate reasons to run \fBbwctld\fR as root, but it is risky. Forcing this additional option will make it less likely root permissions are accidently used. .RS .IP Default: unset .RE .TP .BI src_node " nodename:port" Specify the address and port on which \fBbwctld\fR will listen for requests. \fInodename\fR can be specified using a DNS name or using the textual representation of the address. It is possible to set the source address without setting the \fIport\fR by simply leaving off the ':' and \fIport\fR specification. If an IPv6 address is specified, note that the accepted format contains \fInodename\fR in square brackets as: [fe80::fe9f:62d8]. This ensures the port number is distinct from the address specification. .RS .IP Default: \fInodename\fR is wildcarded as any currently available address .br \fIport\fR is 4823 .RE .TP .BI sync_fuzz " syncfuzz" This value is added to the NTP error estimates to increase the tolerance of \fBbwctld\fR to incomplete NTP configurations, or if the NTP system calls are not available. If NTP is unavailable to \fBbwctld\fR it assumes the clock is accurate to within one second plus the value of \fIsync_fuzz\fR. This option is specified as a floating point number in seconds. For example, to indicate that the system is synchronized within one second, you could specify this option as 1.0. .RS .PP Practically, this option is used to determine the size of the time window buffer before and after each throughput test. .IP Default: 0.0 .RE .TP .BI test_port " testport" The port number(s) that receivers of all test types will use, unless otherwise set using one of the other port variables. Currently, \fBbwctld\fR simply cycles through this range linearly. \fItest_port\fR must be specified as a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid port numbers with the '\-' character separating them. Whitespace is not allowed within the \fItest_port\fR. For example, \fB"5001\-5004"\fR would be valid, but \fB"5001 \- 5004"\fR would be invalid. .RS .PP This value must be set to a range because it is used for both the \fBOwamp\fR communication and test ports. .PP .IP Default: 5001-5900 .RE .TP .BI thrulay_port " thrulayport" The port number(s) that \fBThrulay\fR receivers will use. Currently, \fBbwctld\fR simply cycles through this range linearly. \fIthrulay_port\fR can be specified as a single valid port number or as a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid port numbers with the '\-' character separating them. Whitespace is not allowed within the \fIthrulay_port\fR. For example, \fB"5001\-5004"\fR would be valid, but \fB"5001 \- 5004"\fR would be invalid. .RS .PP This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of iperf_port and nuttcp_port. .PP .IP Default: unset .RE .TP .BI tracepath_cmd " tracepathcmd" The path to the \fBtracepath\fR command on the system. If the \fItracepath_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBtracepath\fR executable. .RS .IP Default: tracepath .RE .TP .BI tracepath6_cmd " tracepath6cmd" The path to the \fBtracepath6\fR command on the system. If the \fItracepath6_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBtracepath6\fR executable. .RS .IP Default: tracepath6 .RE .TP .BI traceroute_cmd " traceroutecmd" The path to the \fBtraceroute\fR command on the system. If the \fItraceroute_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBtraceroute\fR executable. .RS .IP Default: traceroute .RE .TP .BI traceroute6_cmd " traceroute6cmd" The path to the \fBtraceroute6\fR command on the system. If the \fItraceroute6_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBtraceroute6\fR executable. .RS .IP Default: traceroute6 .RE .TP .BI user " user" Specifies the uid the \fBbwctld\fR process should run as. \fIuser\fR can be specified using a valid user name on the system or by using \-uid. This option is only used if \fBbwctld\fR is started as root. If the given \fIuser\fR has \fIroot\fR permissions, the \fIroot_folly\fR option must also be specified. .RS .IP Default: unset .RE .TP .BI var_dir " vardir" Directory path where the bwctld.pid file will be placed. .RS .IP Default: Current directory .RE bwctl_1.5.4+dfsg1.orig/doc/bwctl_ntp_conf.html0000664000076500007710000000474712560414557016267 0ustar

Time Synchronization

BWCTL works best when the clocks of the clients and servers are synchronized. If the hosts are not synchronized, they might try to begin tests at different times.

NTP is a protocol used to synchronize a computer's clock to clocks available over a network. The NTP software is available for, and often times, included with many operating systems. Most Unix systems use the reference implementation of the software, and the example included with this howto is geared to that version.

ntp.org has some advice for selecting NTP servers. However, there are some general rules of thumb to follow for NTP configuration. The NTP configuration should include between 4 and 7 NTP clocks with which it will try to synchronize. By including this number of servers, the NTP software can make better decisions about which clocks are accurate and who it should trust for time data. The NTP servers should be in close proximity to the host, though this is not a hard requirement. Ideally, the network paths to the servers should differ as much as possible from each other.

There are a large number of public NTP servers. There's a list available at http://support.ntp.org/bin/view/Servers/WebHome.

Internet2 maintains a set of NTP servers that can be used if the host is connected to the Internet2 network.

Example NTP /etc/ntp.conf file

# /etc/ntp.conf, configuration for ntpd
logfile /var/log/ntpd
driftfile /var/lib/ntp/ntp.drift
statistics loopstats peerstats clockstats
filgen loopstats file loopstats type day enable
filgen peerstats file peerstats type day enable
filgen clockstats file clockstats type day enable

server owamp.chic.net.internet2.edu iburst
server owamp.hous.net.internet2.edu iburst
server owamp.kans.net.internet2.edu iburst
server owamp.losa.net.internet2.edu iburst
server owamp.newy.net.internet2.edu iburst
bwctl_1.5.4+dfsg1.orig/doc/bwctl_arch.png0000664000076500007710000016420312560414557015210 0ustar ‰PNG  IHDRèêCd÷ pHYs.#.#x¥?v IDATxœìw˜]UÕÿ×Úû”Ûïô’ÉÔR¡EPD HQT@õU±¼¾‚]_Q_õ§HGPP¤©IH! éɤOïíÎí휳÷úýq§%™Zfîp>Ož'wÎÝgïuïÝç{öY{íµ‘ˆÀÆÆÆÆ&{`cm€Í;Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,Ãn›,CkŽKš»"w‡6v¥ZR".I޵EÙC¦1G‘£lŠwÅ7ÖÙ¼Ÿô'7š{7w‡Ú£©”%h¬íÉD¦LËóœY–wʤ\…eÙ6 „;j†V÷¾øŸöG;I7d€p¬íÊHešƒ¹ Åg/9¿ôÊBGÙXeó^Ù׿wKÃã»Û»ciô@Hûšxd$Dá>MUè½i^õ’ãʼZèa$×7émÁ·¬ÿùîðFŽ "C[²ßD$Y%ΪOWãüÒ+ÇÚ"›w‰ úÃúº»Öík'€3´¯‰wà™¿:göéeùcmÐQ1®…{Y×SÝû£°Ù§2}¬m™8Xd¨è¸¼â¦ÏÔ|“cÖ 1l2$-ñÝå;þøvϲüq)Js\w/žwé´Ò±6åÈŒ_á^Ùýüow}Ã)[\Þw$IúTåW¯›rûXÛbóH ùµ×¶Þ³±Á–ìI9õáŸ<þµ{œþüM±Ý÷î»3m«öCˆÏ´Þ»²ûù±¶ÅæðHm˽›!ÛfÒ²†¡¤ñ­¥ÛCñ±6åŒÇ Èz¬é÷½éÅVí ,)âÿjþSÄìk[lŽŠÖHâÇ«÷س<$œíë‰ü߆z!Ç©+"Ãxî¡·ßî{]a¶j°hL¯‹n[ÑýÜXbsTü߆úÖþ0[¶?`þ×-Ûû"cmÇáwÂ-I¼Ý÷zÜŠàø³mâÁ‘/ízÒ’æXbszâé—zì±ö±!eXÖ¶Œµ‡c܉cÔ mêÓ#96 ò–øÞæøÞ±6Äælïì Dmïö1‚`YK_ÊcmÇ!wý lÚâõÇa“ÒuÑmcm…ÍØÝµÒ¦=â>F vÅRÍ‘ÄXÛqHÆ>öí„=ÿrl@@KZ½éޱ6Äæ4‡¶wûØ5¬Þ„1Öv’q'ÜIküÞå&$D2e÷à'›˜aµ . )SÖøMˆ4î„›ììQDz¿ól@Ž×…r"·‹a ·Íá±…ÛÆÆÆ&˰…ÛÆÆÆ&˰…ÛÆÆÆ&˰…ÛÆÆÆ&˰…ûpÁÀ̲E–¤¡•Tõ 9\.ıіI™t@66ÙÍPÜÈáØ¤¡Ë†8x3ÄQƒÑ…QÕcêÄÂî)¬U`Èæç-šæ;@rä7Nýá'&ßH@øÙºiÚOP’¸yúOÿkÖïU¦ ²>>ùó7Nû‘Æt ¢Ú3{nîiUbÀ$ÉÁH#»“Úd#ú¬®pD¢ª÷e™­¿,y~Uá¿?yj¥Ï†uÖäü]_<ÿ´²<0¬‹ý;o<÷âšb0EuŽë—ž|vEéՔ󦔔y@€€ã;3ßxÀnIrh÷aw¹¹—ˆtæü”\0éABAí“_ZX°˜ˆˆ¨3ÙÔ—îDzµãñ=Ï"[ÑóüO ²1jCé^ RHq~é§n˜òC9Liœ_zÕÍÓâR<’„‚ÚЮS’Àާ¶— *)CÈuª*c äE5Å_rR™Ç¦8srþgÍ,ti@L™;z#i!€c]üŽ•;BqPXk4ùÓÕ{jû¢À0-d{43, *õ8¼xþÙ• D‰ÛñÈÇOº`J11Ä¡Ñ:ÀˆÑ½MVlüAƒ€>5"fÐÉ]ߟsOClÇýû~"HÒÝq+Š€†LýfÇ×$I†\‚|±ýaÜéomß+¨17–€Æt|y÷3@*Ókú?Ž<%â 2=Y†L_7å{Už¿ÞqKÒŠ» aÊñ»ÊÖæÃ‰ÎYŽ[íOš¦i]6«ìÎ3g~ò©uu=‘`Úl¦,  ðïi¹¡;”6AåºB:C€œwÄ’ßÚ ÆúâéG¶4çÀYG4õe;ÞŠŸòвPÚÆHe,-$Hšìw¼|åß]^ûÜÞNÆ™GS¢¦e«w†¯pH"@DüÂÔÀ];¿nÈô³­÷%­gÜ"㉖ÿ‡€9Ĭ ‡^hÌ1T§¶RC™)³Â@„Ȧ¾Ôþ()LU™¶-øV{¢>%’–4¯ªºÍ§äþqÏí™]}pTw¹Í1‚èÄRÿýô™çßÞÚZ×üÙ[{û(lM[`MKp S–L™itr«Ê(¯Gx\,I]± îxúê§ÖC`,œ6ïßÖTÛ€ ŸóñOœrëkÛÖ·}È3·|¸„;³Í¹Â4‹ÌË&±Ü5õÿíýžIÖÆÀò”Hpä´¶ïÌ䕹ÏþùÁªÓì§òƒ}š£’9ÌQYxU¦)LmŒíÊÓŠ„´ãK*n =˺žbÈ% †Ìκes,238)õ8ÿ²øÄŸ®Þ½¡½¿1œ¸o[ck$ Û#ÉÇ·5Âú3Ñ-GŸv<:Fž;¸f8eÞµz( R¦XÙ¥ ˜^à¹i^õ/×ì퉧އ¦³“‘p‘_+¨pOßÞ`ÈtRÄ»R- j­•=ÏCû ?h†Fè ùò®§ˆ1®¢–§©L“@**ziÐ쵤‰¶vÛ|Àœ^QÐK5ãQk$‘öÄÓ¿_·xàUyË{øRm&’¾µ`ê_ŸèÒ”Cª62` øP¶?u83 ãÀ‡º8î÷."0>\ qàãE® ŸËÕy_™ÖÓâlØŠv`™Ã5p@D)\{6òh® ®œä ¨…?Èhš†ºÂ¿qÚôãKr&€Ã$‹GÜ,-“ɦ¾TÇè“rdAª“¸ Ì~rOaf˜õÄÝàžÆÁŠQ¼ž78+Ó ÕA©6RóÑU€l%ÕŠ­YQÐK1ÕELƒtyŽcÒ€Ä.)’à¬@½Sm”j'½å8¸—  "EáÍ„ ¸§2`î&ÔÀì#GCÑZI¸§¡š‹QF©N"ehÅ)^GŒƒ{:CRÄtHw“gÚèq©‚¬é¾æç½¬ëé ÑËÇ:m–ÍXCm‘GLeVE ‹‘Ç#“#Ý>µ½ž'#fa…ðå‚Joö›EÒíGaj­{Ñ2ŒâJéÉa‰(KF- )áΖJ0#)U‡È+VzÛ•`·t¸ÒjBoÝBeSIt43F\QzÛ”@§Q\!=9˜Nñx˜cfÚ,ªPúÚ•`ðæ™Åå@œc …ÚÕlå‘Ã¥ôµ+¡^+¿ÔÊ-fÉši–ŒK‡KøóG•“WS.VJ™ÛºBÙîSÌbá&A£÷»oWPu• "ˆ4µÜc©à®fŠŸ:ÿ-“!ÕF‰Y¸Xéx\0'iùÌY ‘í²ûEដ‰¥ä™‰¥ŸTÚ3ó?¢œÍ‚oËÐ:Qs›ÚõŒe†HÍaŽRlû»… pp7ú¨o™pU³þU¢ðîÃH Äž—„£ c»¥w6+»Z ,±½R/Á¢‹±ûY‹é€ z߀ª›D@©^j¹ß*¾˜«yÐñ¸PsÀ Cx«œ|­Òù/K¤@ÍCÏôÑŸ“Tæx¥ãot=5ÃfÙ‘Í»„þ¾½`x]ø w4lwíYoù c'_ 7lWûÚ¥Ûïܽ>|ÎUj_»sÇZË_ r¸}ËŸ@’Rw¹·¼úØg•@§kûêÐâëˆÐ·ê™ØÉ#Mó-{5zÊÇÔÞv׎ÕVn±tº¬Ü"÷–å€B:·G>r!b\íltm_ÍÒq÷Æ×B\Ræ½t¿™_’ªžËû»\;×¥U®m+ÓÕ³ãsÎÌŒÇ]ÛVj]MᳯÒë·:ë6åÞÝëb /ÁtÜ»ú9P´è‚Å"§öN"RÆ’§Ö…ÓV¶«6d³«„¦xæ”8*TÔ%R€DŠ<ÓYÉ'yp$ƒüó¸ïxxS=oÞÙ¼è"Ž t=kåÎË?§”,áý«e²ƒ€}Ód ˆ8¨>¬¾E ®—V”ʯW˯U=3XÏ‹ÂQ‚9ó™^Œe’ÌŽAùç³ÉŸV&Vé_-Ó= ˜†åŸW㻥€òëÕŠT ,•¨‚§öG­ÜÓ˜‹l£t7ùOâ¹ xxƒL¶H€–•7ò^‹i™Šš!ÛÍý!'Ç¡R–¯iÊá2²f¢¹…ˆœµD8œží+ŒŠ™©éóPJGý6%ØÂLÌ?Ç,Ÿ¡·ìRûÚC¹2²èráÍuîXR °êr%Ü9ã2«°ÜûöKñÎŽœseì” •@§£iGªæøÔ´ùz뵫9cJ!îØ)„>v9=®Ú·HQ1ŒÏ9#U3×»éÄñ‹bg^[°Ø½}qÇîõzËîÈYŸ$EõlYfUSŽ—sç T"ðÙŸ2ʦ‚=¶Š‚IC ©+œwÿ»"+…[’p+þ¯Ï¼ë¼IWZ‡ €#îÏLFÒÝRšz[$[¥ÿ$ÆÝXvµÒý‚ÕþK$ÉŠ£d\ˆÌ!ŒRa³ß\G÷4 RÍÒWÜ"Afˆ¬V ’àž>,÷L÷FZ*^ ÏL¦¸!ÕIz)2g9¦Sí¨'-!Õ)A@d‹ˆîþ“*À>“ÃA 3ç SxEå-–´C?¬Hy匲^vJá‘àPJ³´Jzr”H CímuîZoyó„7'9ýdáËË}ᥫÅBÂ_šœ›Eå<ÜDºÞs”Ò*(³r‹x¸3Êj@ `L ÷¡”zëGã¶Tål© )Dn‘ôæ¢YXÎ ¿YXÎ’qÂ*(!DN©K%€¤³±ˆ¤ÃÍ–ŒòXȹk-©ºQ\‰Â2 Ë…7ïˆßÍéåùO/9µ:ÇõŽ'9ÇYé*aÈ’"v×ÎÛR2¡°£ˆ$!@Z¢ÅW¸Ò@ðÏg®uß/ÌœLõbª‰ü'Bx3½Qd»$âéNʔπôRŒí“…iΜÀ¨øÐY‰å€@&‚4 Ñ(ÝÓxª‹dTÿÀ½„$è%Ø¿BÊ40âõ”³€‘Iwïø·åªRõ"Lú¨ð|Î}H ¼DLËTØì[‘ ¼pÔæ0öäÞŽ·;ƒ}Iã¨"(HJ·_êÎdÍ\«¸ ¤ÈhnäükÝ«Ÿso_™ªœ­:Á2¹Ö¶Ï(©$‡›Gƒ`¤˜<¾ë|JHƒœåè(c¥—Cç¿­èni è"®bîi¬ý"Ýeî" ygòxU÷kCñaþY¼t o{ÌŠl“L…‚ó¸g&d÷°ÈÙ.Ó=Tt1WóÄ€ã%ïtž¨§†»LT@+À‚ðàZyg°xk}Äš|­¥úßšZêÅ8é å(^9òÇš~—Ùø½~Í6Y A – ÄÓG¡ÚD@RøòsÎÈYöOË_HŠ]x±Þ^§·ìbÉX|öéFå¬tËî¼ï#Udɧ’ª ·?ÿÙ¿˜ù¥¤»@ @"$)=9±yõ­zÊÚ²\úòbóÏM—MÍ}é>á+nô´K2#t®ø—=Î’qRõÄÜ30•È#¾è‚‹Ü[–éM;x4]°X¸¼@B¸¼á³>™ÿÜÝfáäÈ©úÖ<ïÜ·‘¸;åâü¨bE÷õÇ®{f=0Ìê @¤q³²ûù_í¸åð‰!`µgVÄ ö¥:ŽP"Å‹™€ +ÉVI8JQñcªdš“˜âH÷Êth¨—dîýl“d‚VÈ€Hñ¢!T‘»D­Lp”£êG#@©vb*8*w軈 ¥;ˆ»Á1™€%dÈ]€ DÍ\UŒë`%@¦IËEi‚ ½¥ ©v)â ¡^Œfˆ¸ŽÌyTKÜiIË"ãˆÃ SKÊ¿ôÅéw¹R›±ã¦—7ÿuC=(G)$©À­Wù];ú¢Ië!ÒÌH°¤Ó¨»x´_:éö›¥ I tðdTxó¬ÜâL[h$‘$KÄXŸo×ÎÚ––æK>~ÙPÝÝ]KßxeËÖÍùù^¯wË–MË–¾ìTTVJ)wíªÇã«V.ooo­¬¬ÀÝ»vÄc±5kV54ÔUVTqÎ`ãÆ·—-}sVTT ‰DbÙÒ×Ö®]­ªêÆ ë~ô?ßU5µ¸¸¤¨¨x]”vÆÓqǾõjç>ép“ÓË"½<ÜÃC]zãrxÈá΄G§-ÙM™-%ØpÅѸǃÉãÏRº›X2®·ìa±°ðøõÆZ­»I¸ý 9x8àÜ·Iíj.iNP{Z Û ‘%¢þ¥+Ñ é.á+P; ÛÐ4„?Ÿ¥â<Ø­ôwa:)=9@ŒóHÀ¹gKŵÎF+¿ÔÌ/ÕkM;Ñ4„7ÑH;붨]MÒé%Í©ôu°dLkÛÇ£ý“£µîÑ:ê¤ÛGªªÝÍŽú­,Ú/|À¸Ò߉é„ÖÙ¨uÔK·Ÿœ@t4lO—Ï¥+•zÏ^~ÚÞþXKèp“·œ±OÏ*Ÿ’ë>L¿C²U¸ Æ;»Â=­+Ùr@ad`öQÿ:Y°ˆ=Ð|)“”ê žW„%3=/ß\äm"Å7%w€³’µ>d‰$#½Åë(ÙDÎ Ôò°óYŒdoŠœSxÇcV`¥iðÏ2ãåÎ'­Ðz©æ`p‚ü3ybŸ´b`)¸Zæ.à‘ZÙûªpU³àZQ…¦»M#£‡z^f„DºŸž™È]Ðr¯%“»Ÿ®*DgIè~ÁrÕ0½“õdÅÀ;“ìA'wÈÑõé6ÙþD"÷d½í±Dÿš4Ó±÷”¦œ“´®çFTü,¸>]ZVzî)¿üÊ ›7o<õÔÓW®Xæp8ž{ö©þþÀ¼y'=õä?O=õôŒpуüõ‰'+,(L¥SÕÕS¿ýí¯¥Ò)"ºûÏ8eÁÂæ¦Æ¯ßvÖîØöä“/^|IKKó-7Þ0ÓõõuþíÁóÎ_Ü××ó‹Ÿß9ý¸7®ßQ»ý” ïºëÿy鹂‚BËe“Ë_{õ?ÉDbÖ¬9Š¢ÞyÇ÷.ýÄ’×^{ù¾ûþ\S3õ™gþ½g×Î3ÏúÈ7¿~ËŠ•˸¢<ôнº¦Ï{ÂazËÏö#§Ó©ªÚ—¿ô9ÓH×5Ôýý‘Î?q8úáß~ÎGÏ[ñæ²ÞÞÞY³æääæþðßùÈÙçõ÷vïÞiÆ÷ÿõ‚Å—ìÛ·§±±~H¸ëë÷}û¿nUT5™LMŸ~ܺµoÝs÷kj¦<÷ÜÓ»vï\¸ðôýÏwßxãUUï½÷Ïš¢Î=þÄŸÿüŽçž{Òáp>üà½ñD|Á‚Ó^xá™W_~qÚ´é=po~AaAAÁ×o»©««S×u—Û W­zsÊ”isæžðÀ=ZUßÚã-ñ¿zî/š“gª]õ¾å2µ«Á±oQ}©ŽŒv»uõ¼ê¢a%ŒƒR*ŠkûjáË7Kk|o=ïܽ^ªºgóR½³¥åسAíïNO=Aíiå‘~–N¸kßJN=Aékó½õ‚•WœIöälØ&N³°LéiuíZg”¹v­#UÆr_~Xëk·ŠÊEnðp_Ϋƒæäá>GãŽtÕL+·ØY¿•.÷öUÂí¾|ÿÊ'¥pïx+]9Ó³y©»vµÔtÏæåz{=3ÓŽº­Z_[jÚ|½a›gÝËVn‘³±VïhH×ÌuÕ¾å[û‚Ôœ®ºÍjWSjê‰(,gÝÖtùtÒÊØƒˆÅn}}W¨/‘Î^áQGIWU~•3mkð­ƒ H‰»¥K@ØýCÃwÏ9™ïû©ÝAE²ü3Y¢™Cl7ùçƒÑKzœ£pxç°x,¾‡·Èø.™3_}K)^G@à(ÁÊ/*Òd`ôRh¬üŠâδ<ì}Mß<žl’ñ®‘F€ú– 5õbÔ 0°Ê*ý” J.UîúáÉòñôÏÌøn2zÀ胪›î£Gö¾*']ÃQÜÓYÎ|Ö‚ÙJÞY `ºgô ôp}àõ¥\ar Ý ‚ç8uòÕnwÒñtŠ»2½3¥^rrõ”)B)„¦i—|ü²-[6¹\®¥Ë^»þó_Yy[[ëß¾ÿî{ž1c¼ôÒs@ß_î~{º;ŸzòŸ žéñx¾þÍïhš~ù'ïÛ·×ëñhšvó-·_}Õ¥;wl¯­Ý–N¥&O®H%“?tßÙçœûòž¿ÿþ¿WVÕdZ9éä²_xI]Ý^IÒ0Œî¿ûæ›o;ïü NY°ð«·Üð¹ëoD†§væ—oºµ¦zÊ‹/>{ͧ?wÄnÃÓ4ý–¯|½ °èê+/ݱsûqÓg’”……Å=÷|·ÛýÉ%Ÿêéé–R Ëš={.C¶k׎Ɔºúú}l·ìÃß7÷øy·÷ =ôн_þò­gŸsîé§/ºá Ÿ^²äÊt*õñK—\~ÅÕ99¹K—½þ™k?ÇÏ=oñ 7ÜTYYýøcÜòÕo<úȃçœs~Ié$ÇóÒ ÏöÁþþ{î}$ÓDoO÷?ôšO_[ZZfY1MÝû6šFìÌ«@Õ”`‡³v™YTEš#~Úf¦rŸø9 uËR€¤ãòÜ]|Ò¥O¾Õ7Ê>¹È’QcR €e¤ªfÇÏü KëjŠ^|£6yºoÅS“¦¢«½-J ‡<ãɨ1iŠU0„a啤¦Î7*gæ=ñ;³¤Jzó„'ǹg}lÞ¹˜N†/ü¼•_ – Œ»v­‘._dÑå`¦õŽz®äŒSÕ¾6 Òºš@ÕÕ®æTõ\àŠkÇ­»‰Rå3b¹€9šjƒß v·øßø÷º·­HÎ^˜œsFªæ„‚§þ ôµW¬¼’ØÂ‹RÓOÊ}é~í—N/ eÀÁEÓæ+weûÊɬtôdÛ<ØðËûê~Ì‘2?™Yb#/0"CGiÆÃ‹j’ ‰&jyÐJwêGir(ÿ¼šê¤†ßFeÖä@º—!ÝI‰™wSý€*:+Ù@›V P½I‚–¨™Ðñ¸X!i(Ó`‰Ew¦‚GŠ܃€à(EæDÔòQ`ô‘šÌ$@/F+F@ÀtPshùhÅÈ}Rã­1Çp¢’ÁÿõB´BNÈÜㆧwQUÕŽööï÷›Û·mñçä{ GEEUæÏÞÞžÒÒI™¶jj¦vwwY–YZ:YÓTÆXQqi<#¢’’2§Ó¥%eñx¼§§›s^»mK0Øõ5×vwuçå ©6È[¢ 2Ó4ã±hÙär¨¨¨T% ºÝžÒÒ2(,,’âq/ ¥”%¥¥§ JJ'ÅãqDDD€ý"Fc€ð÷Gº÷Þ?›¦áõç$“‰Ffmmóæ”y‹Å¢ÑHyEäæå¹Ýîh$¢éŽ’’R(//7M4MË™T6™Hš†ÑÛÛ‡6oÚ0eê´sÏ» ½½õøãOþ¤ eAD@Æ¢éÍE"á+b‰(J§T]rU:Ü,ü ¸½7úÑÇVmïŽ*O„™9t¦H·ˆ¤'Gøò ³"FÕÐJ»7¾áª]¤êÌH¥«æÄN<;çõ¿»7½È3ãzL%X2–¥µ×IÝ™ª9…%òŠ¥Ó;=Â#A+§¦K§©þåÿb‘€pû˜°X"Š$”þ.µ»99mžðä‚tû@º}—€Rwƒª³dSIá/)HwJÝé$o O0†¦DH£íbHTîs•û\ã/Jò“• yW²¹3Ù,Iü+0 C+F€ò 0b… *Ù,¹K?ÅÕ Ò½«¾ªÊÆö* “@&8&!ÓÁ7•^®”\ª8J‘¬¡¨Ô\ ñ}ÑZ" Ì ÅvËâOpÿÉ,³VÀ1 ¹‹/QJ.W ñ‘ÆÐ«H‚³Sd S›« °h |%³Ps$‚D¹kêÇ?<Ó²)ÒûõNåKd@‚̈â\©­Ý‹Ç¾zë7++«2³‚#5±° ˆ+ÊÆë2Ç««§ìÚYF`éÒ×çÏ?EQU!ÅÀb:¢AÅ4x§N›®jÚU×\{ËW¾~Ýõ7NŸ~\(\¿adv_ÓTµ··{Àp’š®¿½n5,[ö:ç¼lr¹i™:é(b‡Š …6 Ø–ù“1  ‹½øâ³×|úÚO.¹’!fÔsd;3fÌZºôµÌ÷ãóùKJJW®X›6m0LsRÙd!„0oè‡&’Ã+²8ç5ÕSª«k¾ø¥¯Üúµo}ôÜUU×lÙº)è!,Æy*•J§)­Â*µ§°,­}·YT5<<ø9aH­L)wt‡éѦ°IJO®îp þ4C+bOÆœÛãóÎIN7°vQ˜ÉãE^ìÜ·… ˜Š“Ã#½¹Òí‹t^láÅ©©ó€±:™™?Iël3Í‚=J°“s4lâÔ‹¤ÓÒ¿Ôœéš9±…ÅN¹ÀÊ-Fi ÷סu:RsH_¾Þ¼ ¸ªö´¢‘ØÉŒFtnDLÅ€ñQü$ß\0õÞ ç£-ÜÞ-Yé*ÉÀ€+Lý\Íw"fÿ?›ÿ8´u¨¹¨aº‡¸‡S3 2™Z3½s1¸VÔýÆ$T?Èu=/Œ>ÒòÁ=¹¹ oN¾^ÉYÀÿdª~Ô aòõ*êÃЙ•è%—ñÎ'­À dNTsAñƒc26ßm:ÊÓITr™Òú7kßÏM¦CÑ…\õf•€àÍrÏ`M2Qµ /PÈ¢ˆf‘)0Txß?°„ 'Õö¿;¿ÖÛ©2,ÈieÓp8FEGŽayÇ»žøí3ç–_îv¹-Óš3çøx¯iZ٤ɗ~bÉ–ÍÎEöN§“sÎs:•ÔÆØW\³£vÛõ×]™›“wî¹\yõgnºùÖŸÜùƒ¼ÜüÙsæ~ûÛÿ}ú‹¾õ__ýÍÿþüò+®r¹Üª¢|ÿwüâçw®ykU,ûæ·¾ïõútMW8çC- ‡Ã¡(ÊHKºCQDtº\–ip¼¸ûÎ;¾ýõ7ºÝn¯Ï¿hÑ9¿øÙs?‘s.,¡¨ªÃ1ÜÊ _¼ùûßûæç>û)ÇsÛ×oÿÎw~øã;°níêh,ú½ïßQ\T¬iZæKã\ɘçp8Gìâœßöïüô'?|ñùgt§óÖ¯ý×9眷aú/ÞðYNÎÅ]zÙ’+çÏ?å{·ãΟüÊíñ(IU'¦»öù_ø#0nT¤æ,Òê7‘¢ JF-…I™d˜ÀðÔIy·/œöÍ¥µMÁøðÐ[Štùt׎5@DŠŒ1NCÛŒ)ªpzÓeSýK·ò'‘¢€Þº×µkXfò¸¤9SÕs=_G¢Èé—úßü·Þ²‹¸?ù|©;IQ‡G»$³OSûÚ þý;3§Èò`ºj–Ù¿ržÿ+3’–¿Ð,®L×ÌÍyõéôZþ‚èé—’¢e¬Æi0X…•T5zêE¾ÿÎ{ê`$£ /‘Þ<@ ÁÀmRt@¦öw˜™QÿÈHm"@¼gK“šÍ’!²2ÉT"’Ÿ©ùVJÄŸl¾{dx ªÝAÁ5VÙgUÒP«Læ%ÔÀ  æ`F7­‰8hy˜Qv™+BZ3H"ª¹¤ Èö_½ÂÀ “ÌT%U™} øDLi@º—P-Qid•9`9" ´D@€4‡‘ChƒH6Ó¤+”ý$iÌ‘qIRUÕdµ> dšŒÌ[¨”}–aæWšÄ4$k 9Ó2Îѯºí”_2ΈHÓ´p8‹KJHשTJUU>bH8êééÎÏ/ÈËË€ÎÎ˲Ê&•1Î…¦i:Èœˆˆ†a躎ˆétšs®(Š”²½½Õ4Ì’ÒI.— B¡`oOOaaaNnô÷LÓ,,,2Œ´®;1‘ˆwvvú|þL劢(Š2²ÅC‘i—1v€%œót*¥;ˆD"ÑHiI©aºî€––f¿ßŸYÂÊÏ`YVG{;•–NR5-uww ›—ùÒ„°LÓr8étŠó!ƒÌm ‘Htt´¹\îÂÂ"UU‰¨««+™ˆ•––9].!D{{[Iq |åÕ­÷mm…³H o0ÂD)IsðPoþ3BÓ—Q65|ÎU™ôqùÞŸ.šuû²Ú†`ldh ’ô­x25užQ6…¤¦ ´€ˆ¸D(,RT’GÒé®ã(‰%#Äéòe¶,$E%—öW¤;‡Ca‘¢ k7"¡DÂé!ECâ*‹…QZ™ªHQ€%Â,•.¯t¸QX„Li!Iâê€U\ÆÑLñXH:ÜÒé’(Å€åh™ ¥Å“±“εò' 7ÊÑ”B‘#âÇ}’©,n ´¤9T~¤|Ç뤫š¡2øÔuðj[¬ãˆ" îçÖ8Î…á~;ü ËFÔ€‡¶jTK†^3Hµ‘â%gxóxS–}æ”üsÿ´ç»!# ¨<ºSîþž‰J>Á ÎãŽÒá0hÑ”Æå_¾qÚñÁlÆÃÙGú7@@ÐkýËþ¥õµ'«ç®üæðÒ"ò÷Ï| ô£VnÑh‹t»¹ãhøô¡¦Þí­ƒYxÔò8è<Ü56t5~´ƒZA3­:Í’ê)M(Ï©ýuñüg÷u<º½åè”wáÎV÷ H@ Ù$WõõS¾[ —Šñqž™,3Æààþp€æOH(xHÖt:ðà~5ƪQ-B‚³ÕªùºSmm‰†„Ëܺ˜ zxŽÃÀj™h–™’Cµ8ÞnÞ6‡ãàÔN\Ñ:ý+ŸFÄtùtéËßÿä ¿pBÕµs*p¸×‘ðçBµaĬËþøà´S‡zkT³aÿsGOYuøklðÅ¡š#"U7'M9 ë[Ò’;‘¦PbLKfÈbw”@ÅwœoþÊ¿)%%`F¼³©YVs@ì¶“»Ó"¹¥ÕæÀ …©LE`Pñe¥çEÑô{Ë RábØ;H1h“0Rº7¾î_ýtzÒ”ð¢+<[– —w¿€ ˜™ï1‡§F²zã®ÃAbxòGcˆŒ%Mñ£å;€á˜–Ìõ •}Ñ­wn»>-“*Ó¦"y4_³SssNûòôÿjÇ͉&>¸å ÐKpú4½+¿È¿Õú°0ú`ÒU ÓE,›cWX2ê]ýœgÛŠØœ3#‹.'‡+²ðb` öOŸd|ïÍ@@ºÂ ‘µY¨ß!ðð%'mí‰üò­=‡Üê>;™ ,-“Dò8ÿ)Ÿ›òí¿ìùAs|ÏÎF-I" ¤;—w=™‰v˜Ú9Lþ´¢æ`û£Vº‡*oRÚÚå p®ô´ä¾úˆÒßÕÿ±ë’³Kzü9,I@¤qö§óïMß_¾ãi~& ’ŸÝ×Õ—LO¼O:A„BFOctWŠ€!S•ñ˜³û½A ËÝÓ*ÝÓ×õ½Öj}²å¯ ùÁ9[·"(¾˜«¹Ør¯Ùð[³êfU+ƉêGšø rÇž 9o<&]ÞÀå·eSA¦K=ìô )äöÞHÒ’s€BÕ^hÙ†ƒ±Ï(ÝÒÚŒ?^ۘ݋$GeB‰CÞ™jþËÞï3¦pT/+ÿÒÎÈú=áMF» (@ÌöŸzaÙgjCož#o œÙàø ¦ª¿³öþÔ¬ù†âªfô^³¥ŽF‚mî‚H7Äû!„TŒ)b`ù`R:78¼àÊw.øŠÁW ùU eçŽnŒ¡iz×>ãÙðjò¸ᳯnÿH—îá!Ä?¬¯ËxÀO.Í=µ,ïÞ-MF&Bn@‹€]åö…ÓØÚ¼/Ð0Á<$CLE¦ ~-ïÌ¢‹-2vß‚,m¿L¬Ù"Ö¸g†Íþ~£gy÷Ó›ûߌšÁ£½'ÞãØ”ÛÕ¦?u¿4«nUýsÙš:üýb}@×^èÜ =uн‚í`$ÀJ™a€ ö[B8 0ƒiBuPuÐ\3 Šƒ¢)P2Jf€'¼…ï<û±EÑx$àýΖ]á3>Ÿ)êÑ«ö™f¢Ó'ç]1£ìoµ-†`I`,»‡¥ù.½ÂçÜÚîO—=¹6œ¶²û–‰&Ü8ò Ù{ç¶ë-i ²Ïìi¾ãßì~ÖiÈ.ù–$ ˆ!êÌuã´í o|´á×i™ìNµ’ÒöðU™àªÂ©ßךÿbÕÿÒ¬ø’’¿ˆÃøÔîx?Ô­‚º5нzê¡·’ƒ±\#Ò üwä„A$ÁL‚™„ô6ÂÞÕ™wÀá„Â(šEÓ¡æ4˜~&xÇ]ô.**¯ÛR°â_€ØwÙWÓU³¼ë=\ÿ²¹ñ‘­1ÃBƾ4¯ze[`go$+ƒ.$º¨¦øΜñÑÇVµ†âm‘äÄvâOLጚ¡L¡YþSΟtÕÊX ɽ0> K•e®šMý+Ò"uï¾;Ó"‰ÈßÕ5FhyXý5µõA³ùÏ–¡¼ ÇÉÀDXh‚}« ö?в "]pðž2ßãpƒ?«™„ÖдÀí_1”Ÿs.€ã>ùU Œ’òâczóŜ„ÎûŒU0 ¬÷z¿5%“»õ¯Ì¯‰Öήp>à%']âH¨ UÖ‡âMý±ë»ö…â½ñ4à8Üló}f 7 ®¢TPy­óŸû—”bÀ—}:dÖô¼’$"‡÷e’$rS¤Ï/½rAÁy»Â"ÚÛƒQêï¾r T|Qå«ío"•tëXý­P·v¼Û_‚PÏÀr!ÐŽ‰ï(ƒ—‚‡Þèi€ O/æ,†Ù‹aÚ™PP},,p8üÛ_ÿzùýXÇ/Šœuéî÷®Ú @w<ý±®N €'•ø/™Zúàöæ–pbd™q‡ÈiìÕÔ.šÿƒ;›úcýIsmkÆãýþ3‘…{4ÉèJ6#2ŽÊTïñÍñ=$^å™Õ›jKˆf„r ­$ C¤T¦Ðt߉WTÜòHÃÿ6Çw?ÛöÀ«2ÀÞ¯‹ˆp ÊoT´lü[z¥¹ãÚߥŸîãÁH@ÓXýìZ ý­`¨ïqdýž9X‹÷êÀš@^L; ÎüL9 tϱ4gçŽßùÖ·š§_wÛŠÜ€øîÝ#‡¦+–@(t9Î*Ïx{ H*ò:½ºÒJÈeŠc-ˆB(œ!þ𬦔?_³7˜2ÏyleÒ˜„Ÿ·™€ñ=ó>€ yFÿ¸ç;϶Þˆ5÷g'>¶ àY’€\ÜûÑ’%ÅÎ I"-’i™âÈYÄt&[Äû’Y]\òq>íËî7^Xö[o ôõ½¿M3›ž„{®»Î…UC+ ‚väíë)È@cÀ‚í°îqøýbøóX÷¤bǦýW^~åš«®N&ÿãïs?öq°Ä+¹ß78{¹±ûüÇW7…@ô¹9å/}ê4•áÿgï¼ã£(ú?þ™Ùr5½’z Ò«ti" E± >öG~ú¨½>ŠŠ€Š AE:J)Òk€ÐKH ½—ËÕÝ™ùýq¡ˆˆ” Eó~ñâµw·3;Ù»ýîìg¾EVOÝPÏ—î[„¨N /Ð"*p@ÃBˆr·F½™Ôc¥ör×¹j&ü­¹–®“+!„‚º˜ã=cÓÊ6Ðs½×[|Û,°½‡»)‘¬r Wà÷ßĉW;+ 7szsª6!=#ñL0‰ÈwÕ{.Ù¯9"Ëqtâq™öƒ2Q¡R = †Ð¾Ò 7:ïØœzçè;232jä@gâ¶cË·˜ÐŸ ÎŽø’áW B@iõ„.m¦ŽÂ{7bý4¸í5wLÇóæëo<0vl·nÝæ-ZtC«Vºæ¹2öR €,Í>s÷²T·ÎñT»ä™Zy¿!‹*Y 'ŸÔ÷Yèü©?Žqè „¨lP?aŸ ë IDAT ëúJçF!˜¼=ýuª[üÙ/œ¢áöâá®}[K=…‘Ýܹ¡èÇbO¬Y`ûWZ|]ß¿¥‡»Í’_ƒ€Ì’? „àw Ááµx‚ª¼ãuüøã6:?¹?œ‚ ™(7EN´6fBW%ã¿’_mØFngϤÙTô“A2zJ¯Œû¹ÇåiÛ­Õô™_UVTÜuçiii5x°CkðÑ |qoåzûù)„ #_݇aß/5q¬¬¬‡|pÚÔ©O?ûÌÄÉ“‚ƒƒkâ(Iv¥cSV‰÷q5­¨byz$B&ölþF—F^KÙ Ì¿^°_uƒ3ø™I ~·ß½*öž‹jÛËyJtИ”º2%ÐØèÆq¯wmlU%PúeÚ‰î³Ö×ÿ›:h_ ÿÜ?ž€ÈD! ”ÐgÖ¬Œ÷sªdÌsd®È›SìÎã‚%Xý»á»q–dsÆZ’køNœ¥Î5‹äß<¨£¿$À%¢„"Uj‘¢Ì VÙ_€«ÔØ5|`‚µ!Ì"û?ßì‹®g*Uo‰Ó,¨=s½œ6f{ñJ™ªBˆwÁ)£OþÌ¢ÐÜZÓ”&³çÍ 9løª•+}Œò\̸ À¾• ò5<Å>?„T?"ì[‰cÆ}(Éôa÷ë×®:xÈžÝi_Ïúö‘Ç£Ò_w9#õ«×·D,:óÕÎ \`ñ‘Ü_2 @yµK£G[%ñTÇÜH -"›†x; 6Â,ïv¨YM4Kà¢edà°F±F‰Bg÷¦Ä/Ò.Р@ç]bCo]/РB¢§²p‹[ç ¤Ò­WºõÂÂã…ðÏ5ÜgB 5H&J$ šïÊZž3³À•e ÆöÃ_y-Û‘N‰¤5Ä)Q‰ -Ò÷xƒwýšº™+Öœ8¥íŠ6!=<Ülˆü_Ë9BoÒ¹n”̽£o¯ïßB΄ži?`×+)¡.æüïÎá?æ|-Y@ä8ŽUjeää0Α~åœÎcëÔ™>ã«víÛ=0ö¾óø²ë]?`Bü6 [{ü‹\º>A\¢p,SèNü6 ïõ–o/Œ±/>Ÿz÷]w%%'Í™?¯sçΗßçEC(8ýÃÝB¢Þàx±ôHþéù„ã7™žv\$Âl2*B1®MÒ­ëÉ”Bç“{6ûá¶öFY‚ÆžnWÞàv~ªƻĆŽmoQ%96÷þb(Òg;3Úý[‰Ó ‰;ÜÇJ«ªó’+w-\û\ï…jÁ„.™€™È\pn”ÌQÆøW–]·™e¿$¿¦YŽ£ž£dŽ·4(t唺 $*©aNfwè6¯ÇˆDä“áéâ/ƒTEÅN^¼’ÅÜ!ÂIÍ…§kÜ3¤Î÷×ÅûÒáp¼öÊ+ßÎüæù_xðá‡/»w–¾Ž_&Âã¼èg[I9ÎJèîËÆyPŒ0úÁQvÑ!ˆ§`²‚îcÐk0ù_Z%%%o¾þú¼¹ó|è¡qOþŸ·*Йœ.¤PsH²T’°q±½yWwBSœ³JúYðÓNß(ѹhf'*Bˆ&a&™î,¨ @|€9Шì.¬Ð™4)VEΫr1!À8¸€,]+¦ùš/¤ðOp¼t¼rÊ©m]h”€¸˜ã¨mD%J¨“U¥–®ÄuŸ2ÉÖO¿h FJ$.X¡+›€RB ˆA2ý®ãóBeØöóãŸêÎB«ÔR áW(¥ŸÙl~küøððˆ7^{=?/ÿÙ矻t7ÁÊ|óv,ò^Ó×VçˆkŽ/Ã×÷#õ š‚W×4rs´¼ #?ÄÇ·"}ë%E¢à~žŒÜý¸g‚ê\l©©©Ï<õŸÜÜÜ)Ÿ|sõ#ȶ¹îY–zôÌbóµ\µ†ûÚC€šIȔʃD‚»Ð«’N¤wŸÞß|7+77wÔí#öíÝ{¡Í* 1íN¤oõEÀºghÐÃÞÀ°7‡¤¢ý4» œW¯tº º@ç’ŠžÿB\ 8ãˆjˆ~Oá®1øy„& ¦>z<ŽÀh´º ŸFd‡´¨Ù{1íοt59|èÐÝwŽ™?oÞÛï¾ûÆ[oùû_¢8î3(u5jÃMpIv5n/TÃŒ´©åâ¨5ܾ íÖ:÷ª;N÷I…Ó«‘gn_qZµn=sÖ,Béè‘£¶nÙò× 4'f?Žýë|¹Î9ÚÂð÷Ý-ãÉ•hÖNZ݆¡ï€HÐ"“1z ú> Iˆj„“a …t‹ÿ¬F«Û…†=¿Ôm JÝz" Ê÷±ˆ2ÅÑøæ¡?FèlÙ¼åxæq¿þ²âö¡ÃŠŠŠ¾ýnÖè;F_Z¾0ßÃØéǺK^ª='BÄù›çn[?ØŠJÝ´š¥ÖpûkÌCÇ7$%'ÍœõMJJÊ]wܹð/ÝWŒ­ó øÄ ¨fD7ÁÔј8ã»âÄNÜö6LV\ ÿpÄ4†$v@i6¢",Т? Ž"s’[cÄd¬›†wnÄC1¡'Ò7âà:|uÜUXúÞꋽkAk`}^%Hû Ëß:ó=·Ûýæë¯-[ºôƒ‰“î»çžN;Ï]0¿u›6¾?úµ¹²‘òj ·o‰²8û‹9Ç'_/ c/Ѝ¨¨)Ÿ~Ò³W¯'ü£?PTT”º#õìýާbÙ›÷Qp ×°z ò3a¤¨,ÅÏï N Âã±ïgpÉ Múbã T#®%(Aƒ8‘Šò2¤Ü G9–¿ ̓·z@ `¨¹Ÿ?%X1WŸz«¼¼ÜårÍŸ7ï³Ï>ûϳÏLþèÃÈÈÈ:ü5AV¥sÔâíGJ«j5nŸPëè3t®ãA4,Ë„IëÕ{÷íñ.§3"2òËiÓV®Ysú1_wcÉ«°•ù2½ç¨È­v£@EDaϯ(Î@B„|øÖXò*ÌHˆŒ­ŠÆê)P¨úÈ?Ý]m)ªÇy¥&}„ÀQ…e¯#¾•×¹»¢¼þälÓsdöþâco\B`ô¯öý€_”çÀ®%ˆj„”Á(ÏAÞa¤oDtSÄݪàÀJ ¢¡u!]½ ™àào8°ÊûÊ? `Ĩ‘ƒn\ZRºpOS¯}„ˆñ3Mëߪ^¥Vãö µ3nß Ì²ŸI²Š¿µçr¹ »eó–˜:±š¦©ª \Çúép»|™7ŠH :߇K`¯€Ù‚¾OáÈ:”eƒû~F·Ña öý Cæ6ènôx‡ƒ³:°ïgtÝÆÏïUçÝ÷N÷˜º!ñ5ž»—0Ž5S2TŠŒŒ|þŽŸ8Žó7ýÛAdBÂͪR;ãöµ†Û7ÈDYtâsR#7Uˆw‡k‚ª„H:¸&P…\B¨J× támÈ5"„]P¹:}÷"I"ŠéBn·û·5k,Vë¡·ÅÄÆ2v2š³,iË ûô²” (ÏÁS+‘¹ ‰íƒ©£PU (Î@i’»`ÖcPÒGÛÛ1e0˜€L°÷'¬ù_F³›‘³a‰X1 ûV¢²Ùièÿ2¢›aás F¿‹‹4¹p(Á±MÈÙ‹:-Î|Ûô‡ˆö¿D6œŒ_•dH28«®ƒ#« 8«ŽP—dÎ@($ºI…î• +îçdHÊé¶5Á ›cØ÷[=LÔª%>¡Öpû 7w¢r±½’Ûöé\ él(Zå´g0ÿfJP+•{P²ÍUuDj«ú5Pµ ^¼Ú©Uò€j@ …9DÉ:w`KEö“*÷y„GXë+å{<œ p„v3–ïp—¤Ú7&îòD¥ŸÅ:þì}ûöôê}SçÎ7žs0Lùèìý .›/þQ‚â |ó¶ÏE£^ˆo…ÔصY{ª'õ®J|ÿ"ê#k$ "ðóx^£ª43 ³ÅîÅHlS ®Fq$g¾{ ­G@Q!tOÅw¡èXBàr`÷â³ ÷ùq»Ý6¬Ud9;;kذ‘©©Û^¾d¯Ã¿† Š’}Ðp,UKp%·`ܳZ)ÌÔÂâ]:‚Jê±]ÌÈÂâhe‰š}Ð]ï%ó0(•*‹œ»H¥y¦C›ˆæv4ïÁBbÕŒjæãlÔ RÍš!àrë ÿjW†ZÃí˜ÐûF2Jæ²¾ð±í&`v‘5«ÊTG ïeÈ_æò³ ÖjÁÏNÅJ¸¥›ÝAm T&Ì%ŽO³"ds‚”3ßb²Ä+…¿8-I²ˆÊ4M¯ä–D%û;»1F ëe,úÕYü›Û¿£l 6(D>ý³¢¢¢^½ož6õcUUÛ¶ípƒ<º¡zžë+¼ugV|Ø<[çôŒÂf„âÀ:ì]#­Þ?c'Žì„Šê{BŽË±k9$@ä“91² ëe€ÈN?ÝÊçè™; Ä…ßÕtMûnÖ×EE…#Fܱnýo çÏ>rÌö™ßÊÇ xr+Ëöe®ä¶\5릅RY¾»~;ãÁ ’Ófo;À˜¾Ý•Ì"êJ•Åæ´Už„f¦ýë$[‰³iW¥ ÃoÝlWRka ’¬f¦™nr4¹Ñx`ƒÙãt´º¥•#!¢üLO·Kž¼==³6xÒÔ.Nú!„¨cNŠ·4à5áËM‰à$f„Ù¯±RºÞe•P•”§z˜‡kÂ)ù5RìG5O b ëa n¯–¬wsMœN³èµS‚‹èafÿfJᯮð›Œá7[ÜÜP• ̉Œˆdº&ItùK/bxœ¡$Ó÷W=¥0RP •B&PéÙþ* ­¶Ú^ä“ûŸ†@¥ÕÕ ôt– ™B!O–¶9»•O!@E\•ÞB’¥*[åwÜ=bä‹Î5[¬º®ý é©Ôå N›ObKj¯0Kµ·èjÔÉÞv ñðZU*¼CP*¥§³IWg«[Ì{Vk‘‰Žö·:[ôäþ!Æýë˜ÁBaö3Ýß”yú,²Ô96ÄO•¯tꆿ)µ3nŸ@dª|›ñ>!D¡¾×¸jUüˆV)¸ •«[’dK¼lm pŽÏ°‡÷4J&"™)UÔ`jÛ/‡` ädÊÁ QÅŸê•Bè°ÔS„GÛVY©ézNNV—.Ýë7hxãs”ÁQQÃÀ—×û9f»WjÒGGìe0\` Á…ÑhJ¨› ¨°0¹~ýüÜœ jt7½Q­ìv§uó"%ç°«IÂM~à:7X 8tM€¯ÀíuK‚K Œ„ÄQ©Å5`à‚S—]˜ýIy³9Zôç¨9EJŽU8zÎ^o÷°xå_Qk¸}†ƒÙ „LÕéCèP©L%3 íj‚ƒk"´«‘J¤d“;j€ÉS̜ٺ)^.Ûê±$ÉJ`; Éþ´ê°fŒ¼]A ¡J)Yï  {<UQ“ÂÂÂß:Lˆ‹LÒ®¹ {jµË?EwAw]T ιwá·IÓfšÇ}ëaÂü¼é aš‘`ë6:`ù§Î”^P jfš«Eo5sî"üC¹%@Í:àªßNÍÚs2E”·R„Ð"Œé©îä6‚ÊB‰!îF…¬V/NÖäT˜sQiwCºn+]cÔnßÀ„Þ=bˆA2ýœ;Ë÷ë“äJ(ˆŠ˜aæÜyŽ’õnj¤±#ÌîBV´Ê°^Fk²5Èœõ­HD £á½L’‘„÷1å-vTîõ"$ÉB@„@A@dÄŽ´dÏq”îv˜“6Ýþ¿ò§Ÿ}ñ­7_™?o¶Õj}æÙ—ê&Ö»àñý«µ^ ô¢4IBHhh˜Á`ðð#O¼ñÆKw¹ý¨Í£Æw`á–Í‹¨îq6ìÀ#m]GZ¶.6¦§‚J¶ÎÃ…¤¸’Z¬ø"pÉZX %Üì'$Ls´êç·~nà¢÷„b¨êx›½íÿÕ_.zW¨&gã. ¾"Üb|ä†Ä/Ò2³Êµ÷åS[Ç'kÖÃ,ûOØÿ¸â‹I7UQü+ËË’žSLq§+à ®C¯äÔ@$s¢‚ªÄû©îàÂÙßû¤ P0» ¨‘œ%c ΄³Ì=$éþ‡š¿FaŒ•”[,³Ùr™œx·;2wú2fòoãˆn„q¿ 8ö’û())~rÕÞ‡Š KDó@páÕFÓ¨ÛÎVP‚ƒhn¢kÂd=[M& ÄYA„ÑJ!uÚ!Â`¡ ’’›²ôóÊNƒÍ:W»ú.’C¬ nmwçÒ»óÊ®µ¤¶Î?"QeVæûT®ûL¼W«Wñæ4•¬äTÁ (Œg<örHfqŽÅ'ÁAQ‚¨b–¼fZ’¤ððˆ‹“Ñ– +x¤q3ÜK. ÜÕ„Ö`X/«R{HH¨É?(ˆP ©Nj(8¨ÄÍ'+g Ù Ã9Ö…„ðW;Yy›O¾¬Q(ɨpôœ½¾Ü¥]Vûz ö$úRá)-ó‘+cDÎLµöÇ‹Nœ÷åyºº4At“+ôS-ú¢qw œ¬Ux=5žMh]¨qs¿2g}vÖ¾ç;!â÷ŸŠ+tötÆ‹*œ«Iß•µ†Û7pÁ:‡÷ë9”]™Ò>åb¯ÜÝ;wM›úÅ®Ôåå嚦@£^®ÌK ÿ‹è3’ &pÛ›óTÓ%¦Õæzš™¢~·š<Ä¥qeouB„šOvjígªÍUâj ·OL°” .mBzòš0ÜT!T!D&ˆL¨TÁ„‚U ‘ ‘ψˆ "D5j ^'1BAUâ ÷”³ƒK_Ôpòóó–ÿøãè‘#Ûµnýã²eÜÁq5vMŠßM =xœÞ·a°B5Hg¨%œBž|ùÇÉf`4ºÞ kˆÏjtýaàðEÓ›N½QXPpèàÁÓ©.I5T¯Y…¢VǾœú^½Iµª÷1T‡òY¬zw3íþ•:l•êÝN¾_ƒ›”û[$„[Î¥áÔrñÔjÜ>ÈT™•9‰Ö€ÆM´2^¶ÕÃÝ‚ID_Sño®ŠÝS¬ÖÓ(ûSû1­è—d&¦8I2Qk¥d3¤›Qñ#¥›<²…¶R+öxJ7¸Gx“9^vféEk\”"¤«±ð'÷êÔ ¯ÚžôÑq¹¹Ù ̱ZýytœÉdú³!u½±Ûºµëv¦¦:Žêš[æ@´¿‹Þ€Á§ón!Àd ªB€i¿“ê%`þ@x ‚ƒ(…Û!ªÃj¨ ÎÀ9Txœ ¡Mú`Ìgxel¥Þãùrðt–CÃ8ÿü“O6oÚœŸŸo4¿þö›€€?uëv9]?._ ! òïà‘=i»æÎùvGžÆ´åÁQÔ^nÞñqÛµèdÂtWƒÆ´UZt’ž(ŸPïu´ìK6ó®ÔVâNnãN¼8«L{VK¶bg“nJþQ¿óÕܣޖ½™˜iÏ*ê¬r´èÍ‚k298%åö^³7:Ü5ëôO¢ö$úRâÎ/rçø^ã&à.‘»ÐîÈb–D¹è7WÅ.OÌ‹^Å W8=%ìøÔ*Sœdm(ç.p:2uÝÜ-@a; 9NèîB–¿ÄÒÉØZÍúÆÎ>ÁëD|»}»ïŽ6ÜÏj»páÐaÃ7iRýqTct¼Ë—sV] óX<ú=4~xK_CÞPœVEØ »ƒÈàÀÐwÐõ¬ü‹^DtŒ™ ³?¸@rg Ÿ€†Ý±ì ìY†aï¢ýphöý¦aël¬ÿŽ2{£3v#—@–åÖm[§´jYTXôð¿üî›oÏ£–P*yÜî|´g¯¾+Wþ\QY±mÓ†œã™†â,%÷ˆ\š[Õ~§n G‹ÞÂ[wH'¥I–l%†ã{¨­Äx|ñ8•ìÌ/D.L‘„àx¬ù T •þ© 0ÓÕÖ`´¿ÿž†Ç¦aÐëPM©[==ÏNCq.Œ8²!ñPMÙ¨f¨ðåWOöBâN½×±c§—_{µ^R½¦|ôåŒ'23÷0qÂûvûÙÅàhš¦ë:€Î]»åææøF6kÃÂôÐ: ¦ýëie±qÿ:™P Üd<¼E*>a<¸ LçÖA6OLC-"‰„Ѳ|-¦'¡¹\’+$…0]*ËóÐÊwr+-òàCÿ}晾}ûÎÿ~ÑEXm”bÐëèñøeÄRKÀ‰4øƒ^EJ_øG"¸Bëž{ñS6àÈFg`Ô‡ˆKF@0B£“Yú ¿ò|(F$v@@˜ª— ] ó }ò9VwÿH‹””é_}õÜóÏÿúëŠÁ.˜7ßã9w1I–ÁO~yœCp!),0¼ÚÒûé`:®C’«ýd¼vÙû¿÷eu<0½Æ "-†·º5‰ó7×jÜ>¡vÆíˆL•9Ç?” Õt®’jþäÌÚÕpÊjŸÛ^ýyÔô™ü°hÑ›¯¿A(ýäóÏûÝÒïR†'ɸý}ø…`é›àìRdMBáqbÖc¸í-<¼e' ©8´_Œ9#5¨7×8•QY‚/ïÁ°÷ð씞€ÁŠÜ˜~'˜ö»ýO5@€¬Tì]Ž{¦ãÈLƒÒ¬KW`½&²ß“øÊE¸ †û¸¿wŸÞS?ûü‰Ç_¸`þ3ÿýoóg—:;;Óµðx-t$åOÍîùÌñy&Ô”dV8n™»ñX¹£Vãö µ†Û7Gº0Ö€Æ}¡c«ÝK.™²ÒÒ ï¾7óë¯{õéóò«¯ÄÅÅýu›?CV1à˜ƒ±øeTU\Jâ@‰¢(_Þ…°zI„£EÇ PL¿ ‚ƒi(¾}T†æ„B‘‘Š)ƒ^Á±°¡$šød(8«®TI)~| +&ÁY‰ÂQŽ©£wÜ6T\º°Ã8 fô{ýž»´™{|BÂëÿ{³K×.ãßz{ømCyìÑ»ï½÷/V…,]/Þu.íÍ)ƒ"Õætõ µ†Û7pÁ›v©²·l ­éâ?ãR/aB)€U+W¾üâK•••&N2ô¶óÄà\p¿½þ¸–øîß8¾ ÒÅ{nHš9û‘½Õe9ÕÞª`⤶+S¸l8¾™;Nï  4ëô6[Ñé&„ÂQ†+\b[Á¡Ñ 0ê4ésñíOCé{óÍí;vürÚô>øhé’¥Oþç©>}ûž÷èׇՆþµGýеÙ%¥ŽZÛÔ>¶øÁ„Þ'jÄÀرìTæìëI¥ö*ûÄñï»çÞèèè¹óç>ÌVûõ»âñ%¸ñ>PÚÅ» ’“•!éÉr\§6àͺrÆP½/ÏÜù¬ýÿ¬É¥ý½:‡¤¢ã(<¾ä2­ö)žø¿qsæÏ5™MÞÿÀ Ï=WTTà"Ò£_ƒDû>êÓ¢n@­ÆíjgܾA"Ò’ì/eªHÞ¬N×E`/‘àI—¿œµÀy˜<ôðÃþûñó¤(¹t‚bq×T$uÂ/‘•¯»ËuqŠþ ÎÁ膸ùit¼ËçŽt)-[Ξ;wúÔ/¦|ôÑúµëž}þ9A#}°|zµ $«Ò9f鎣eUµÓmŸPk¸}•=T¹S€[d~i)F¯,Ds¡h©ž=×U¿^£é &ßÐꆚ=d§»Ñ¢?Ö|ŠuŸ£( D\—9õB¢Ðíat½þ_wâÂ0?öh¿þýÇ¿ýÖ£ÿz$7—[ߢ‡Å‚±KÌa{õ ”ØÝúªÃy©¢Èã×õ]ûZ Öp_.÷ôeJX[ðé>°Ð•ýSî,éš­¾F@$8sDÎ7zÅÔ‡ ×㆔¶Ú^¬¡èÿÚŽÀÚ©Øúв ]'%+½aâ ŽDëa¸ñ_ˆnr›P7á“Ï>›?þkoŽžóž½CGÓNB5V»ý]„˜Ô7»6ž{0§Ôá 2«£ž¸þ@~¥³v•òr¨5Ü— %4Ï™y{ücýbîàNÝþáÁ§¯ÙŸ$‘!týÂr¿c²ŸHzV6· ŠõÊÎ|Ó0t<º=„]ßã·ÏQt.®Ñ 8çÐUBx]tºmnGØ—QöC‡ý…„ÍüìÓàߘn­ì2Ä[@µg÷µÝ­9u6op[]£Dʵ»´Ú÷eRk¸/‰Èiå›ÞÛÿø Í¿ˆ2aÿiåUzAñW¢À/rçê¥ëxp)v´¤„‡‰«²^š€^O Ë}H]ˆß#}3JóNÖC¿Úsp!ª#×9†ÄvHˆVÃ`¼Z#’üƒ\݆×Oñ_ÿ}èüI¶Ö½í-{pk »Òål.ãO­Ú+Sòh«zÓwø§n~ÙéþñÔn uÅö×ÓîÄÁÊÔkÐj B l#ËúŠ ŽÄ'äÀv!Õ¹«®&+:ŒA‡1(8„£±}.2¶ÂY7dŸæ~úK8 J0ù!î´Žú]ÑઇÆÀ™'¾qID¼eÏ¿-Ë̇vTv¹Õ™”I¾¦•BO¯Þ·âXá¯Ç‹Üœ×Zí˧Öpû…ª‡*wB&¾ˆœ$§«qér6‰O¡È[ÄŠW²ÀÖ4f´lŠ!\¿Æ–¸" ¢:Ý¢LZ…Ã볇PeNgâöÕe/Nå@õäÚlDˆnŠäÎhØáÉל‰aºPMUmû¸ãúoX¼tª£a[‡þzp¤¦Þ§Ü" •@| OàÔØâù WûYêïB­áö¾Z$®Q¸\Wü UaÛËVðè¡25‘‹½0½#ªØÎ³¾Ôu»ˆ+‡öˆ®ùd¤5AX]„E籨*Añ1¦ãøߎÜýpÛÁ<Ð5°“.—§þÁûÿÂé/§ÿ@d’ՌȆHhøÖOBX]ø…_É?ø¢:×Âê” ü—éÐŽ€õßæ¼kkÓ×Þ¼+TØ%}µ„·Ëï·ùzH¤UÉV°bfUË, Ìg·wr­®a\ŸÔîËÄk¼öBàŒÒe—êÍ- àÊe'„È™«µ¡D¹è®ˆ Ý&ò²ÂY@ ‰­šâˆ`¸nÊÐ[C` AB´ÎàªDá1AÑ1EE\pVÂ]U]>XwƒiàüôwB)$² ÅÕ ƒ¦˜ü‰ÐD„'#,a‰0ž*wpÝÀu6nï®ÓÀãë3öÙ:ðD׃à=S²L=NÿMËÀ™eç*-¬ŽP >ÖÑ®“ð†ë‚ëí÷z•Ð…F@$"§¬³LU€èÜ@¡âán”xº™Ð™`.| %ˆÔý·’1I«HEÔmRô(™Ð‹¸ˆ$Øö𬺧@ÄÞ!‡õ‘¨×[PçP æ $´BB«ÓoºípUÂm‡ÇÍU='Ýœ ‘ )ÕõÎ3 ý`ü«”â× B€éÜPÞgŒ£Q»À5óCçM´7íXÙq€0ûŸÎxa}A’+zÆŠo¬ik‰ÍËúÝË~z“ü^ù”ƒDÝŒs!`V%—Ι$J8?9>A¢µÊEQk¸ÿ]h¼šuœ9Yz¾ó¸†Æ=äæ®ï³¦à‰Fª¼±ç~.øc ÇG™þ³c0÷XœµþÿË6Õ0Ʀ•o„.tƵ¿,¶ ”’ðˆR¾…ö”‰ô»âæç‡È`Q¸œå-`æx’ü²bI¢`׳Õþ3 ,W{WÁ!ˆ'®QÑð'-»Vû¥®4?PÑy°+©%¨tþ‚B*Wô©EÄ9“Zr“ß_´õf—)ü JReo‘MÓYrˆõévõ_X·¿ ÒÙ("àçÛ;õ³q_Ayl eß}=ož»iÃñ¢‹aî 6/­?°%«D’¥>õ£vVæÙœ ƒDk]¼ÿ’ZÕéwèBó&‚w½©uHw]h:÷ÜŸüÊí iÜà 6„[e@Ð-Å+6.—‰¢PumÁâs¾¦D¦*õ²J­” ® ­KÄ€GŽ„Æ=Bû>ÚàmB(ªk˜ÿéœH0(Á$â™Èlµ)ˆGº8ú?-o‹"%¿ ZêQ¡]cëµø¦ ÕPÕþ–¢áOj¡QÁ˦-ÿB.Ƀ¤\„[ŽàBVí7ôæÖÀs[m!À8 D¤Åø@ëD³"óæaþ?ßÞ)Új€²DãL! (°»'n;Zèp’r·öÌš}•vPˆ6§[ç5©‹†´ï YéËAmÚÅû ôÝßÚ7pRýZkÜ“^µO€÷ŒZê.ØQ²„Î;>ÅÎ*Uj „~•þ–Tj°¾p©d"ØQºBÈT•ˆ´:‰H1-ÉúrMþ"”Ð@5,ØN&X׈Áq–¤Ù™“¹à:÷€³=RÄE¬" \GÑO,g¶n'IÏ)þÍ)øßq¢]˙ГÅ…ÓõИÒ[0Þá¿þûÐ9ïÚ:t4n/ ¦ öçXÞôjÓB™ÔN±ÁkO”T:Üõ‚,ãÚ$­Ê,:êÒ•UY²½ÐáDÛúÏÛ¤sJ‹ž ›ƒRbsëŸl;êÍÿUîÖï_¾dZìô$~ú‹Í£C’ JŒŸÑªÈà<ÒßôR§†ŸîÌLË/¯•SΤÖpC&ŠA2:Xçl`ìX{><ø4#úÔ#¯êÜãÕµ÷”o&€·&™.ôêjê€÷ÓSýü~í¥z-ÆÅN—*ù§ÜoÍ›# ¡FÉd–ü(À;†õÓ„ggéZ\ð M {òpT†#KäÌÔ+vñ𛤨!²qíºŽœ&;;K×µ„„Ä«=ë!ž`~!Âh©~„c:q6nï‰I¶¦þ°zŽéжŠ.·j1I^j _0!VUÖ¹pº<õ­Ÿõm9jñ¶ß2‹vVÜh¿¿yO çüóÏ>úmíê?ž“SïhÚÙ ÅŸ,SæTV`Ý8Ÿ¸íÀÉoW×À¹»n“âaãlXv¯ ;Áxd‡éè.ãñýÎûâ{Ýð^õ" DÝõÞ–#©yå Ô¥³\›Óí  j:šTçB@¦›rJ/ز« B m³ø¶öþù¤@T£C¸vùgI%:×@ „ˆ5×ÿh¦ýàÑÊ´ŒªýGmi^g>rEMÉÉÀbÓÊA‚ï¯ÜVá)j4H¦J­ì£¢ð”B«DÑJ&™IÂcrP‰HÕm"Á‘¡—nq{JxPƒ3%gÃ]ÀÕ`5ؤÑâ5®’nC˜D Ä\ž ™¯Îxþé^0™L~0¡iÓæÝº÷š;gÖúuk˜`wÝu»v~ùùÇ~XuûíwLýlÊæÍëuýߓφ„„˜òÑ$±ooÚ„÷§,\0góæ ¸ï¾‡SRnX²xÑ?.®S'nÜÿ=óÍÌ/ê&öî}sfƱO>ù`ü;“!Š¢üòó³g³3uÛwÞÛ¥k÷I“Þ)+-½}Ä]ºt»‚_ÇïøöÛ¯JKJ²²Ž?üȸƒ÷-Y¼ÀÈ‘wvîÒíXúÑ÷'¼­3=1±gìÑÇŸünÖ×IÉ ºwïuèÐ3¾xýõwìvû”Þ?‘u",4ì‰qOûùùüÑÄý÷uïÞ;&&væÌéáá‘ÙY'îû/……ù“'½Ï5jÌLÈÏËŠŽý÷ÿQyÊG;ºÛœ€ Æþ«fØ[õcauL©?1gJo€‚3Ë¶ÅÆ#[‰Ûáhu3uT¬‡jªj;ˆ[…jªj{³+¡‰ÿÆÅ¿- —"¸ñx×% ÀÃ7$V¸µÕ™Eãߦ!Õ¢ÇÕÐ(¸@v…”€ÒŽÔ‚r—ÎAH°Qµkºû¹’ùšqsÁS‚;·ìD@ŽUíy÷™¶”H‘Uj¼²&ûl(¡”HÄÅ_{gOùf€õ‰ùb³éÁj«®Ç~Bá)ž"á)†!œHBä3œn 8Cѯ.k}Å¿©’³À¡Òä'ýe+)\áª:¢ç/sÕe ïkªLó0NÇþ}{½Ó½ôô#eee©©Û]ùÓ«¯¿}×]÷ûµÒÒâÏ>ûðî»ïø‘q uûÝ2°Y³”'Æ=ä=àÞ=»×¬þõ‘GžX·võÆMëßüß„aCG¾õæË¥%Å_LòÐCýëÁÇŒFÓ±ô£…쎪½{w{Û2]ïzc”-ï¾ç¾7õÿfæt¦³ÿ½5¡E‹–WêôŸƒâ¢ÂïÍ5ꮼܜ™3¦½úÚÛ÷Ýÿð¤Iïäåå¾ôÒ3Mš4}íõñ¶lÝ$23ލ²UØ·O×õ?šªú`+ý¹¬¬tøí£'Mz7>¡îÄÉŸ¸ÝÎiS?Þ¶mËŽí[ß?¹Aû¡yä¢ãD÷€HRe±TQB*;wÑÂìmêAQÖ­K<Émª:ÜÆMVÁÁ w&µ’$Ù+•Ò|â°ý´%DˆÙ0¢Yœ¿AðįiÏ®ÙÇ„!¥«ôè•b(Y—Uüܪ½ÆüUyÉÐö÷§$\7õÛ|ÊÕþ>®B€KDêsw÷È!„wä93ù…{G_Ad¢PB%¢¦•o\_¸¬J/§„ ñ;Ù„ë0'ÒÄ'åèìÇøÙ¢‡€1F éd,ĶWsœÐ³çT¹r³qû1Ý'Yê)–º’ UpI’¼Å±$IÄÎÔíÅEEÓ¦~²âç9g6[U—.Ý'O~ïÐÁýªªM¦°°péä·ÁhèÝû¦¦ÍZìHÝV\XðÙ'¬^õ«®ëN—³}‡Î&¼™qŒBñE£”žj+³Ùl4™BÃÂM&S»v:ðÍÌ/%éj> ž=û¤´lµkwjYYÙôiŸ.]¼Ða·>t ¤¸hÈm·‡‡Gô0Äl68óï’eÉf«Ü½;õС}ßûDæñÂÂüºuëùYýÆ¿ýºÛí6™Lf³9($Ôjõ;u†m6™wïÞ¹'m×Ä÷Ççæä4lØH’¤ ïýOgìt}zxë±–†…ÑO(*·@1ºã™vþ"dœ®˜Cq»Mé»´ÐØ²^£Ê{Œ²ü;Q! D³Pÿ׺4Žó7È©t_›Å!½sBì›–v<5¿ü´SÍ?É‚ÿý¥a’,LènîšzôUsxç¶W4íÜÅ#)³ê`FÕ~¨†ŒI|f]á’¥k«ewÙŠ vRP;€@pð³ö¨‰xõnª" Eµ&É‚A %ëÝÜ-`P¨ªÁá¨Ð4`©ªªòÖnÔ¸ÉÈQcc÷Þ÷`xxäãžÞ´qý›o¾ôòËÿ“eù,}–RZm€¦ÍSFŽÃ3Œáÿ}î•ßÖ¬zù¥g'ø¹Él®¬¬àv{ÎЈΘà@û>û|Æ«¯<7aÂ[/½ôF Ÿæ?E@X¬~(! uGŽÃ¿÷¾Ýn·Ûívºœªª*uM—eÙ`4°;B¯þÓ½GŸ–7´\˜Í–àà©Ó¾™úùÇO=ùèô/g !ÄïO ,+£AgÌ`0ôéÓ¯aÃÆB‹ÕöÅôYÓ>üÉÇÿ#½îƒDwC’‰ÇýûárRëÏínó$õ[5£ Ä“ØLçÜh.íwd@õ4ü$”£RæÔ¶ä•õš½!ÛëãqíYì³`BLß•éõ1¹7%¡i˜ß‹kØ=úµx³©®iãuùpÁƒÔ°×ZÌlÜ]^èʱiå×Á¯àõ %H€ àt]4o⡟#BGpp—€‘ØF-ÛìqçsOü)žb^¸ÒU²É]±Û#‹ŠŠ¶ZüÞ{ïß?óæ º®wïÞëÈáCkÖ¬,+/+.*bŒ­]»Úl6I²y<3cõª§Œ¯Ëår{Üz÷¹yOÚ®M×——••––xÜžµ¿­ò÷÷ó$ÚªUÛ æ,^¼pá‚9^ÍÄãq»\.AË—/ÍËËݵ+5;;+::FU|‘gñRñxÜn· @Ÿ>7ççç­ZõKYyYYYYBBb³æ-&OzgƵ3¾úB¡(J£FM.˜½té÷ßÍúÚátXýüzõ¾ù‡ïç§§-..Ò™ž™yl×Α‘ÑF£Q–•°°ðU+9v,Ý{,!„ÃáÐuÝÏϯ[·ž ÌÎÌlÚN2ø‰wt;m¥É1‰¸Š>¸í’$AH2;t^ÖÈ;Åãhb•QîOÃàÁ7|ó»GºŸ AË:oY´¾ÛqÓGâˆT5‚„ÉY¿ÿ¤É“vO¬Y;:¹¬õå]+ÓÀÖî…@©¼Þg•^~eÅò@§Žñ‘®9™áðà ƶŽÈëkcÎ@)«Ñ7APQÐw÷¬)“ ³Òx 2Ý„[³›¹ßû—qÙÇ1s:©v/ öË ó`KËp¡ùK‡üêôq¢·ÂdšÁðHá3…%ÓæUb¤‰¡†!)¤€LŸwÀ½1È|¦öî#Ý‹ "ÊóYéì´£+6÷™e`¤ñQ¦›p ’u±­¿]û àCé­ÓˆTZŸ (¨¤Š¥ñšáàÂà[ßÙ< Ãþö¯)¼RvÙnZ:»Óí]É$Ë+Ìú°&‹’{(§€ÓÎ-¯¸:Ù'9%ËT÷Zýq{(vÃfîÿóðY%síNšÌaßà·ŒÃý”'Ú¡@H߯åÖέ{­üè}E<Xõº°ûÞ§ùÚÉ•ó>{bV*`Ú‘V­Y—æÇß•måë½§Iˆ” N&„µûèÉ€°@©”ÔÆ©-{cRz·Ùë£ID7³áž} n'ÚßaVž=v—{µ/, D×jŽlf £g~jƒ]³&AÆî}S’Q·ëßÕ[ÝþVÚ„Íd8´0‡-ó¾ÙS¿:¹òƒµÁRÚ*¯·0¬Ý©_IÀ0! Ù“#¥7Œ».ÙÔ6f¼íÚEˆDܪÛ){¾»í}³y ŒÞíEOHiÀ0Së"õo\Jv$wýnï©Þ iì¥ìD/moúÝ’ÍqG¥å$ø4»ç)âvmêZå~ ä!QǃD=ÇvÐõžfÐh!üÛª“ð%•€·„’Lž"R1$´oˆ ØVl€¯‚¼¥Ä ñjNÔ³¿’ØFÍ=NÖ4‘{’´Šzjã ÉFŽl`+ü•¤$Xp:80\Ø­ÝÄ2€à(Ï.MˆlÔfY…”¬çX›y Ú†ÝÄÒ§ýCÅ®"—í7Ÿ!=B2Ä«›;·wÅö2º‰D2F‰˜HƵåU¹%²m§ÕTãæ9åQ2îÙ¹E›ÎHû‚FG““WFk½öxu(WD»¬ú­lXɲ’’‰ÔG7¿Ôÿþbß–•]']`— eÃÀ†f«zHD’å#Øã‘vr‘ˆjX³­š2Ömç—«ü±4 %%¢f[½]4kÇz‘Œ;Å*”#Û›!¤Œ´»YÚ챯 ëš»Ö5t@¦çXWZMy'¢ºxÕʶ74öªþ%,ÔþÓm{KÙ-/w>îºvZ¹ó]•5Iv®ÐõO*’èX¦[^V¹ÓEÓ<•¨ãìi2VÍ5÷ªü3dë[ºým%}Ôúªòv+Ÿs©8ÚÞÖdÂ[BV¥,î–…ÊéfGÓ Jøá-uº­oj"êTd¢{½î^«³§ÈΕÚÌ"EÃÓ*{ª°ÛPÿ„+ƒÔ±DëÌ\Úög'^Í.öˆÞ#CX–ð|TŠý>¢YÉš:5ï´i$áæù- Ëw¶PQÒÕolkÚÚÝ«)æÚìW¶ê¶¸e2Òz÷eíù6¾«½e/|Èho”±îð’ylyµ7˜ýêcñÇÀ0Ëž!ÖnV~ÖO2‘Õ°ÝjØn^ô´Œv'©B9ÞêµfKÌqóKÙ° ¤wËJOí¼;6z«Ö$†OöV­ /~Æl­w Ê«ßðîØppÕëNn[^_ÕêDå„ð;Ï“ãØå#‚Kæ›-u¤\ÿú%vùߦwCKç‹H»[TѓɶçpÉ2 "èOå)éçSÞÓÊUÀÞ€þp)•€™M•ß0c[ut³Oá‰"²IG6é¦Ý‚3å «Íœ%¡'Ù^o UÖPq´,Pá"@ËkŠ”¿a€„ìjë>åb{ÐèÀ» ÜpŽ]1Î çû×/ñT¯—]mg^ÙuâynVa,öÖ€gÅ€gûû"Öe¨çÛ²R¶7ZÍ5n^ItÊ*·81d¼›[v¦öR³H¹N^I÷ô ;f^at6[5›ãtž1— Ó[õ~×ô »§_˜¨X½ˆ\Ì¡w^Ц7rìYF[½o˪dŸä Ñ²«ÅªÛi°”]3.u³òwwLsQÀ»âªÓ¿6¹òS*wÿ&­„[³ºxÐ5_þCX{å`aH† aÁngm£{­îz_‡'KáŠÂ[Nì°¯œ„/µyª2 @N7«(;­Ü¾XaøSÖdž ¶Ýæv.W»h»~5¬²ò3CÉC'XZ '2`·Â?„Ø™KF˜’­ ²^»6B §•U mï(ã¬) 2„Àñ™2D¢1Q»¾ó]›“%'W†4Gó°œÀ£;½<÷ƒZÆÚÍ/Uá\°6ºZE2î]¿àä Q²»ÝÉ-†4aXnnñ.{–AD‚FG3X{ª×[ ÛãÃaËÛ9cŽoã»Ù ¤D)khca¸…ƒ@¤Y*˜## RÙ:+_F:µ? ý!hv ‰h'”+ºÛ­ú*6=0-騬ßêݶÆ.®T¡\R®SRÉ^ß^sɶÒoÕ¶VuDÓÒU’n>îv»…H¼Ïÿk˜Yd„(ï4i;`d ¶CÇÊÈfЬ3‚ˆW³v9Y¯Ý›!ÈÃEֱ섲+¤™–Wth‚d ™àT’däN¶›´•'ºÖ°•  gš¢•È]8Kƶ±ÓƾAÝ€‚Ï×þÓú-Ó* áåâ a@;è)ù¡)Ž‹[þóNË‹Š]‘^à ‡Nººª3ö‘³%5ƒÈ ç¹Ù…Ñig¥ÔÙ»a©ã»p0› ÛÕðIÚãvÂèjv³‹Œ–údù(Î×­õщ3Ø€ëÐÁì¶ ®Ëÿ÷Ÿ<5›µÇKvˆÀ i×l¬„èj–Ý­n^‰ÑÞZ«@–ìî‘v·0ìÙ±ÎÍ-‚iéPv×I…ßz:¹e•ÎcÃLŒ˜êæ—A+yv¬ßGñI¢¶„ýïi>2åÖ5i%܂ĂúG4«ªóË‚cD`­Þv›cå‘§Å›%—õOº]+4D’äœ ;—¹›oqÌ< ŠÎ3êŸq[ß$a¢øb™lBûb­bœ=MH‚chç#.FÖ€›yhš¯žQn¥W$w¿b_hÔ>ènùµ£¢œ;Cø+‰$PtžQõG§i¾[pެ½ÇÝúG‘=MGï[”¬µ«i $½ÏТ¦+þíßá£K‘QäØ³Â‹ŸµvneÃŒN:-Y9Þ»íý¼gnw³ò…“ ­u(71dlö ÷Ú¥C! Rn|Ìñžêõ¹ÏÝ¡ƒÙNAylì‰Á¥óE2¦‚ÙvIeªvZ΋÷wœ>—-–ÙÉœçî±®ÄЉNI¥ÑVZ»ù¥±ñ'e½ú¨ò…„ì<õRäæ•tnxñsí³®Ž>6gÁn8OùÃÝÇÏúÈŠ(ÌŽâ´Tm¤eZWSX–ðFÜÎÝŠFPÝ  °‹D½Vݰò`H6²aTs¿3ôÛ¦™Ev3Ûì-$f" »•“,ýð– í Ù ¥ž"vØ©°0s;H¥â³[Ø* +—Ø…aé£T`ŸÛD–xKT7 `àÆÀ6›ÙäF¬×Ìð“ ·›e€ö<%޶Çe{nù=Xukc¢V€«ÄÑö%ƒ¾zÍÈ[>u ×Î_yç»[ah’"Êò1GÙ{D’Rdǵ7ò~ˆX·ÑÖÀ†éæ±ÇGvÒh«×Þ@`Í[ÚëwÙq£µA{|ÚгM{#9I••¯ü!ÙÕ&’q••§½A°±.íròKSÑ~"eaÍ`8ù¥‚œ$¹NO˜öF‘Œ»9EÚ סdL{ƒ ’‘Níõ³iÉŽ&éÔþ›U@Ê!­µÇ÷#ýÃÌñ+:x¿æÓ6ý>­kZYÜ»Ú=»ôsÓ fýlõÕÛ=ÚÍ©ò~ h„@ªVƒ5b @`ÄîYô!7%TŒÁIp¥!21˜‹ƒÞçæœðÓ·6<·±®7R›¥dh×[¡Ö¾ ]> 0Ck6-§¨B:UÚ‘ Ë)²{bKj›ÂÁ©º%`VÙ*UUŒ5ÈÒì]UX{œ‚A©.™ ›žÞº‘nnIjKhÍB²?œZ¯BÙ»Ú/R9E`€5K/ãC…o˜»“ÊÕZùJLJ€4nbðÎXÕâæ»{ùöü·~¨¬(k°†™ƒò« é¥ÔöÁ7½Çš´ðá:¥)æ®ù¨Ý?¼ð‘û´=ºá/¾÷ÁÃÌác êJºÏlnØÐº*ï{-à#JGÇŸÌBBë}ÝB)#hïø˜øÐ-±ç§½#\{k÷‚Þû·ðÁí7¿¹^ JKÕFÚ 7La½×¾xUû"‚`h¹?³ …E¡t`QчK2†ÇUG7ºìdT;Ã~uÜŸ/Z×ãùåýs«ì‚ž½ú3Ìåa¿$ªîˆ¦qžù4| Qó™âË÷K¸ñ¡'}?ÄÕÎÀÈmJîŒLøv†Oƒ>˸jÒ±áý‹qæ¿ZöCè'ÓGýú´±>S„Þ~JÒP¸¬¡&åL?§ìJSx´Ô@‚¡%ɺضGªo[Û¹lK2s®×úÁ #Çç‡ÓMÚ˜¾guõí+¶¥k–’ixçH’œ¿ó_¯5>WW;2Ä€OèÁà ‘£Ù©È‚úGMáÉøI2|ˆêºã§>ôf{Ò\)Ò@ã$QaÀÓM.©i>&ä1HÏc#ˆ¤ŽwØ­NÈ?kRîÉ»DSÊÖþòð]Qy#3[›Qí Bc4a;ª4ìûÂäŠ,ïá¨w|hÑ|êà¼çN‘Ò\µ‘–w  Ï*Û–lZÝþ–&MÀT×=RØ:)Iô[M/$u<#ÙD`=:/øãG-ÝÙÞ™°{V84§bþ6¶FþònUc4q4”‰H[á@ †þóúï ò ?CÛ:9°„O’qbÁé]vÛú®w—µ.d Sj2ÃÁAˆ7jZg<ôfKÜ!ÛkuÄí¦ÝÌC²Ç—æ<³¹¾®;þ÷•Û@4ÀáS1ðÌÏý%ªººÝv]P~õwÆÞ&a0x×L›þ C;:©¡ ¸dÐW§ÌƒHdT;ÃAÄÕÜM(¥Fæ†^¼lúéC àª1œ¯4´†âÉEY?;el‘ßb`YeŸžt¶¸S f]ÝØívhhI2Sþ‡#Ý»}Ãà€ —…†nn°uòÖu7Ä܈æÑqMf8¼èH8ó¶Ôï芃Ȕä(ÝÏíÖ1…Y¶Ò[Ûº_ÞÞ|ÊC¯· ¸w…#ý-î‚ÄÛ-/>_{Ÿf•ï)ýù䇯fMsÙѬûO44ƒmkVšUepìMî,ñUhÖmÉÆ„ŽEWe†Ã QS4ñ³7Ömm€pý1Cÿ1{JÏõ¦u? Ô ¥S©?sÚ¸4 Œ¨ã6G“ý§‡‡ô·¸{1ÈYK’Õ‘1aæ°•ã5­‰ú#îÝsÕYÂsBþYu±mÕÑÕÑ¿ZóµºX•LUáËáB”Ê`ED­ {K{”™…ƒr‚mq»ÛîÆ ó˜‚ð¨ÜàüªÆ„£~úÖ†¦h²gòh²µS-w/D¢>^ý×ßßݬ¡Ï*½âÆü1hf)Vø`Æ„CKïoÔSÌ ó’Á×Xp6³îv;6t­P©äß2.xpuõ¯oë5ÿ}Ñq—Ž.Û=Áò°Ý»~Hù !0Ž-Éþå©cs}€å;ÛkºbG¡d§8ê„€ a &™KZü§î¡n§C³{^ù]:ø: ÀѶ£“‡®®vƒ»×Œ¸ù[£¯¡b*ò‹5_~¶æC˜ÊLŒÌpd‚@Ô‘t~óÎæEµ­<ÿ˜üÜ@óÄQ‡Ð…Ò›”ŠyL^põÕ3)ÎøÑõu§ÿkQC$A©ªô{ŽFáîE¬‰n~µá €¥0-òæyŠSµwÏ*¹bVÙ>\‡W±«vÕ£ä}Þè]¯{·ï-9/H¤òŒ;lÏrí5#nšõªöEo4=+É$P§Ó–бCt¼2ì®æ¯«ÙÜÚ "Ÿ!ó}VÈcBóðÜàïΚTö§,ñÝòÉ=>èÝ÷ÉžëUC`. û_¸lú´’07Å’w¬Ú¾³;¢¤ÒÑD;,Õ @0„ €xªæïÿØòsa«28¦ÔW¡¡ 2/òÙe_dh€J|EÞòÔ¾=q).;½m’å> .ñU O$\vÎ/¿úûãþæ•fŽ©HBEMad¾Õ4oQÓ<ê©Í—©h“¡?‘š O´½36çé¥+; Ä ojqVÈc@éËrÿ>ë˜!Y~(嵯fùL † 2ä®™0=‚Έà3 C>CN+ËÍ÷{ uiÈûòÜéŽ,bź!šðJ¢æ˜ýû·7ÖG=öõQleïÉÑ.Ü{ÂЊ]"á¨ä½[ñÈöÛI€]íhv™aãêá?¼xð5 &Ð7~vÈ× ÄÌs_÷¹Êÿ‘$5«Ùe_øâÐï™Â£´{fñe7Œþ­O†TG6¬h{M³k k~ÝCÿØòs['‰H4ÅÀŸsœ!­a@if½ZÝ|îãooj‹@3’®NIóÌ!]tÜÐl?÷¤²ÜG.8vJq65<7xßÓN(˃«†„ý?í´ÁPª8àyðüc/Q ˜£ŸÙT¿½#I ‘äÕÏ.[´£¥G¦Ó"•ÊÁ%ãEÝ‹³—HC'uŒ \vŸª¹ ABi÷‰ê;\vSQÄí°S~p‚),Kz¨5Ù¨¡–$_¬ÿ×kOÆT·AæÊö7U›+ÉHù¯3.ì ¢žÜ{B¼³³mY}»b†)×µ~ëåÕ5]qHJ(ÕM$\@ùMi(áêu-ÝIDõ‘Äœ§Þ©íNÀí ûK·è 9à"méMÖœ<¤NЬR"Àe€A&W;Ú$“H(vœZÏÐÌ8š‡šLÍÉÁÁª9yhIU;»ª4(†¤žâî©=R€­w-2ï²—ú™š“iÁîËjÏ'JJš{–…i ‹@¶NîiJDæ%/ÃÑíáƒ&‚±{Y˜†Ï W+ð^©û2·Ç§¢ÿZ‚ vµsEÅ·¾4üÇŽ¶tg2dègh®Ìò¿tùô1ù!èLTÈA cqD͉: dj®gÈðA W­iéŠ9*3¡ì AÆóu÷÷º¶3dȰ¢ºîĵóV@ˆ£!Yöa #Ü Kxê?)«2dè?Á´ Gë~ 1PÉø¸ŠÝó˯¾lÈ7R¡&2dØ £<äûçySGä÷¯®|† #܇žÄ #}† ‡AgnƒGÆUrp0ÈxrÇØ;F0C† @TÓÿÜÓK{’Ce8`2Â}ÐH…og¬Š ö‰‚ûÛ|¿KÆUrpPìž[þÅ9C®Ëø¸3dø ŒòïžÙÇ Ë d|Ü…ŒÅ}p`°_†¼2x¤;’!C?„¥@žßcdü$‰ŒpZ@ÿÕ‘? YåX…åþá©v˜u&^0C:h€ ˜’`®ÈüüŒ y~ š‡ç^ùÜ)ò6´u›B´Äl€‚ãþKŽŸ\’ ¥Ѥâì iôTÖúO#2½šµf€ÁÂãù{†ožxßu£~‘Pq—ñÙÇ OÖÚe椎'tœIF«ÝØšl$ȳ K}•Š][Û'œû“‰wÈewDxҙŗ¥2[ºìØ:q¤8C†ý!…Í{Ì“†ä‚ ôÉåyõÿ={PȥÖqÑÈ’ e€ÙV:â(Å 3¶vDm¥x¥“Jm“å1Ì>kh!\eIqÝ´aC³=³ã• úþ(2®0ÌD‚ÁEÞrC˜;cÛÔÕÃq:µökz®ö¾ˆÛé^"ºkóÍJ»éèÁªßl €çjîÑ`Kx 2Ù~[Ês"„XÚúJUdƒ>æŒâϾÑô¬«ícsg–†=_w?³Rœ*Í—ùwdè0§êÔ˜‚&g¯kéŽ%쉅y/\vâ ÿ|}]cç–öÈ·^^Ý™p!źÖî½Ñ™t ÅŽÎØ/‚! DKÌþÜK`Hѳ»ÿ5ACÆuù3ËÖµtAŠ<Ÿõõc†6G“UÍ]9aß ÓF?º¾nCSíUí,CF¸È’>['˜ùªá7uÚmÿØòShܽùç11ÈhQÓó½qºHEjïYÝØc™ˆˆD}|[mlKJÐÔ?úJÚ]‚š8$4ò…º* 20Fƒëb[3q„úÌC*f×v§ )x༩Ÿnù;5-ï·tÍxðÍ­íQH±³;~Ïò*D®æö˜Ýã³&‚¹kh‡°×2Cƒ$”~uk¤€MÑäI¼w5 QòÍRøÚŽ– Z‡ýž±y¡m‘ö¸ÑîG©p3X±k¡™g—}qdxâ›nNèè£ÛoKP&Û£ëSÊ‹½ºo•w__{tOêRõrˆŸØñ7ô+VD⿆ßÔžlúëÆô\ÏDý¯~j†£‰]>в°ÿ/Ÿ™øàÚš'×Õ¼ßÜuÕ¼›Ú"¢#uìC >4î¹É® ÈŠ¹+養ǿßÔ9ë±ÅŽÖ S˜ý¯ ¦]úôÒ·w´BàŒ|>n{¥txŠ$“¡›5-‰zÅ.@U‘uU‘µ)³W<è ½ŠL *êvÐÌwmúlÿ3Cûdà;ãþ21û¤Ìf†#Ȉ¼ÐðÜ ˜;’ζÎhs< AÝIgÑö¦¶xPßzÙ£ÖpÔvlWÃKëÛg?¾xEC /UzÇ9ÇøŒ£Q¸öä貸5«T‘šÊðèO¸ûÿ½÷ù-ÝkÞm}eiëË™:œIY ”*PI@}|!å‘§C #5ož‘©¬šápÁ=Ñ{`þýÌñ GÏ}jIÔv¿½`5A`·u|8Ø%âqW½×Ð A u\4†Ðú(­ay 7J|êbUµ±­?[}õÎøv"A #dÝë~‰ª®;7ßL žQtþ)…çß¶á»vK& <á&è1†eù7´E’®úÉëcŽâ”MÝf¨§z"襪ƅۛ³Ï”ÿÃlHá*ZÝÒ5ç©%Uý~>:@ÒU¿\´R€qöТÁYþûWWÛGÍä4W‡Ìœ¯üå䜓ÁØÒµº.ºu€xŸ7¾Ð+'ž?$0Š3uû2\4_9nÐΘà3eGÜ^\ÓsÔ‘îSß êñá0_š3gTi*áQr¤³Åͬ™ ¡\¸¶¶<àf¸¤0[톛ßû|BŲ„'©â—w†ƒ3˜#©´«4UŠ_½³)` ‡‰”/e Èþ¶7ƒ½F@BFÝî¿müáÚÎ%Nµ{!PÄét´ë)¼aôï&çÎÈ î“d2· ® IDAT¹níšÎÎŽ#Ý‘€)ÈcHHñȺšï¾²ÆÈ>bGqGÂáꉃwú8OM=Ĥç2ØÖ·Çüé’Á×*í Ó–ØMê\íÄ݈­ãÄûp"uuµwÞñfŽF£ß¾ñú?ýé·Ûª¶îsK­µÖÀ‹ÿ™÷ ÏÞnö3”>ghႹÓK~> õBÄV]¶£wÉ@5B?f^×ùn]¬ àâÔþ‰ˆÛù×7¥"¾]vgÔy¿Å4ÍÜÜ<"ZµryccÿyÚ4÷}Zî¹û޳Ï9oРÁ`@5£XûFP]$ùJus—í¦ÇÝD®¯M-¥}n“4îTòÕ$ǯ¾]Ø3…È@'åòVìžT0«ÄWñäŽ;ÒÕÙ}ÿ}ÿï¼ O?ý̳Ξ=f̸§ž~å•Wí¨®nooýõ…u55O>ñh"‘X¶ì#}>"têàü3+ þ¸ÏG hK{löc‹_¬jLÏ~®IFC|ÇV]î²k¦‘“äØ:©YYÂK ´Œ0ÉË/7vâ‚ÿÙ¼eãç®üâ¶mU¹9¹S¦ à˜c¦Ž;aÉ’ÅÙÙÙx—·ZkZ7nbaAÑ=÷Üá&3mÏoyo×¶”2å·,iyƒ!­u<3Msò1SÂá¬I“Ž)+týCøÙ[prÉÇÃàî„‚×4’Js:Žg¤›ÅÂÖÉ7A|¬Í:ÏSü½q=©`–£íCÖ§#É9³Î»÷î;ý¾@qqiEÅ0Ó²êëëÆ›0¤¢2'''™LÚ¶ @kL&(å¦Ö!.¸pÎ]wÝ~ÒôS|>_ª5)€5«W%“ ×uÇ`ÛI×u8Ž“ÚW)•L&róòÇŸ´~ýÚ#F ©ZRZv„ÎÁÁG\Í:ø¯\3¹â®s&-™–µÐÒJ¸5«)y§^;òF¨¯yõÂ^«G=I@x <èù# aîúÖ™Øí?'„½Q$wµ`€ €÷hSèYŸZI$j¹õ %ý}RpÅU´&¶%âv~8÷, ¤oÒä©3N=㳟  ¤¤äûßÿÉk¯½rã×ßs÷I;9~üıcÇÈÎÎ9ùä ®˜6í¸Ô¾ãÇOÌÍÉ›1ãôÞÖ„×\sýK/½°bÅ»ãÆM?~"€ãŽ;)%ÊC‡;n<€Ü¼¼Nœî÷ûpÓÍßùöÿþÖ_¶¶´ö£?`¤\ÌAËøã̉(ê³Y#  Âé»Wš½—»€éiõü¢4!$ s÷À ”{mÀ0az Hcmõ|•Ú‘Ý;2Ò£o¯Ñ„ªŽØöΘhö[¡þöñfãs¿Y{ý§ –ЬŽËÿÌÔ¼ÓªºµÛí Oz,ÁnãΕÚ̦Žw•oÈ?SJ/’ ܼPq’³O’á1BÙh{ME«´¨È?C&9²^ƒ ýÈ9ABÃnãæ—•ÓÆ¡±"÷I"uÛJÉ7ˆŒe+âÕÜòŠÒIäÏ”aÔú†D7²J¢ä" ‰ê;ÄÎ;MÌ’ÒG}Wá¤J’ð‘øNÔsα¢/o޶/ôÕkFÞòÉ›¢ÑÈôÝŠŠ¡ßüÖwt_×Î_yç»[ûœU•¼[V¹ù¥n^ TOÁk0gû¬Ÿœ4ú­ÚÖ'××ö)ç‘wË*6½VC•ˆtÄÇœ`—‡R¾ K­ºÍn^YlÂ)lZFKÍ""ŠN<ÅÍ-ñ¯Y¤‚YfSMlÂ)Ú³wÛûÞ-ï±Ç™tšÊ)€ëV¿i´ÕÛ%C‰9>r*¦oÝ;V}•S0(6ñé°ê¶@kO͆ä±ñ±'øÖ¾^ô”S246îÄİI»êcÐ ¥SuyúvÒö€Ù2äó—žø™ÊÂýÞ÷°V· ¹¼õÕ»6Ýq»>Qµ€ Øù˜Ý¢sO–+uã3®CíƒNp”Èš&žví6´¼¢M\t¡Ù¨[^UÚæ¸‰Zö”P*Fœ5#EÁ9²u‘ŠlÒv jîw}•Â_A;u£Uìvbç#nh‚Èž&êrÝ(:—ëÆg•9­\ÿ¤’^ò f…Æ aôEµßŒÐžcLÂ@²^oû«ÓµJ‘áƒð~òŸåK«xðùóŸƒé¤Ú ¯¦§O–†á­Z“óŸ{dGóîÐ¢Ž„óÝWßjÓξfj%aí¬ÊzãßNn‰›Wšõê#¢³Õ·a™U¿=rì,£­!ðÞ«"Ú^ôt|ÔÔdÙˆð[ÏP<â­Zzç••¯M ˜µåL:Õ ç‡ß~@hé<µ›£³ê·—/`!«^3›k#Çžm6×úÖ¿CŽ~óIÙÝæU„—¼`ÕmqòËt(7Y:ÌÉ-F߬häõ™fšÎ¢øoÔ{£¡î“j˜ØÊ£üÏH_¹Ðq4ýGyËU²‰íff»‘Mªk¥²Š©{µÖ6ºß×ÁÒÌEV´V>âµÜþ6Û°›ØnVÞR‘†:Wh2ݬµœ¬gfØ­Û¦…‡Â“©àLi戺‡xKÈn¦ðx¡’}ê¹ËÎÅsŽÉq׿[:íA’â5\u››¨c_Uÿ_Ÿ-5óÓÁW7gGÓ&=O4ñùý?þáûÛÛä°rGKVcõ1o)×h©ËwWû¬/»Ù…Øõò¥µÞ ”!Ã&%F×öl_çݱѳ}­öø¼;Ö“r¬Ú­Ê’Ñ.«¹Žì„ÙT##FbøäøØáÚ`†”nN‘oÓr«~›ÙRG±nïŽ '_lWNІe¶5;áÝúž›Wâ­^OJyk6»ye*œ›8C‡s­º-fÃöèäÓ”?ä”S¹Epû`n3çù=wœ3ùñ u®­íïù÷Ÿ´nÍúì’¹¹ž¢'jîp´ÝÇp'áôŠSîf$«€ØáÒ9Ò[B:IÞB2³‘s‚ð¶!^hÂBó:ºIœ-fv ý `€7Â2HžBÒI.kø °–>h$AЩú#û1ŽÂÌ~òÉàîaXd3Û QÇÜ·,ǫ6ëcÞeª;ô{„ ù†¡”:âêOmÝq+n÷Yr $0Ú›dW››[ ¥¡yP¶ÿ{ǸïýËw¶÷]Ë´/Ø3ýØ´H¹¤•5H²TÅxÎóÔmÖ åµ;O™£Â¹`VÁìžÛƒHD:³_~(9t||ÔTí® ¥Ùò5„`!ȵI9nN¡ò‡Tå8•]f¶¼C¹ìñ‘rÁ Ö@Ÿ­ †$Ê÷ydšÆË¦•pƒØ–%½}P%AÉîX¢sO­‹´o…&жE ÄYS¥N²ô’¯RÛ-œ3]  Äk˜]ì¾€±*íD¾!¯áàH„ÆSËBÕ¹\ ÑuÚW$ÃEó‹Š$²¦ …™í¢G'¬À á%»•–þ>uÞÖ ;x¹á±Þdì"kЍøº¹ãn7kš(¾°Oÿ\GÛ•Ïùꨟ*ÝCæðC$ˆŠï̼yóÆÒ²ò` x°žŸŽ”pý¥U_^Õ779´ä…@¼»ãÌ+“c{=‚ÈgJSì‡÷€Ix×/‰›,"²£)yÂyï6:[âãNЦ7õkÞ-«´×gŽ"ÇfË ­öðf%¢Fw[ÇЉžÚ-²«Mù³œüÒÀÊW"¦å[¿DÄ#Êv ‡ÍñQDz4!¥ÑZ¿Û‹­XC ’m (Ò§~ jŒ%Ï}|±«9ýÌm¤™p Èë XõU»fÅvèö[µU@ÅI3—Š.4Z¨æµ·œJ?+‹/;UÛÿê ŠÎ“F¾Á»›gy3eãÓ*Ù¬‚£„ ¯R],[ßP¾2òUòÀ7ˆŠÎ—óTã<øQù o Y¹` á…o0OË©öAUþÅ> N2똊ÚÂÚ3c »È9Q¨¤Œï`2vÝô i¦’„ì§žîx<æõú³å¤”ºõw¿øæ7¿;ù˜©ÉdÒ4 !ŽäÍ" Òèë\GfÒªóÔKÃ'ÃÝå1´£+vÝK﹩<}ƒÎ/zJ$cÝÓÎr Ê¢PøyÙóïcÃ<#Y1>:é´Ð;óJ–LùŒ›[¢ý¡]W«¬üxå„ì¸ùåÉA#I«®S..{1¸âeÈVá<ÒºûøYá·çåÌ¿—¥9~–òÝü2f7§P³a˜ÑqÓC+Bšñ1ÇCõÁ èꨣÒmNÿ.ÒJ¸(vS–Q ´33™(½Ü" Ö`ÙÓDÖT¡“@Cx0äZC'A¢g4wðW»©’¥`…ð% (¨“DîIÒnáíuüCH;È>VfM•Ú†ô€]”Ì‘`è¼e4ø+&»D×›¬ú¤¶.;ѧ_<¿î_M‰Ú=Ëâhy§Hìz³ìÃ)À÷ôÂÌ©‰ŽZk!€ÖÖæßþößùÎ ú4¾ßÛÂ'¶Ü»À‡wÑZG"×uÛþÅÏrÕÕ_­¬FDµý¡†™Sé³û¸}×)—€h·j÷4ÇÕ=~>VvÙ°È”™Ð BB¹ì tžqœ$H@(7>æ¸øèip&˜»N¹¸§V`ê'¥Ñ}ò…P.¤ "h­ºN¾Ò.{Q³Ù0Ù´:>s%ì„LU%îÞWrSæâ ÷îÙSþ°tË­ ŸìxaÖþöôLbêq[3C¹FOUøÞõ†¹×Ç=Ñ$w IOífÿºwÀD]'_!¡”ÛÓBª‘=]%»éÛí€púàü×jZàjiX’f‡DšU§ÓVÝH}(ÜÎVž|!½´gþÐǹfv}Å  ò+ò+¡7˜Eç{íõ‰W]ß.KƒÌ5í‹¿·â’6»©ï!4ý–D2ñè£1ò´ÓfþúW·ýéÏÿÇzàÞó.¸däÈÑÿ}÷nj÷îò%]]]jjª7mÚà­·ÞXüÖ›W]uMÒ¶Ÿyú‰²²òýäç/¿üâ²eKR-»ŽûÜsO AçÌ:îolløýn:tÄïoýå¶m[þ×ß¿éÿ]ñ¹/Xûþšæ¦Fmm­ë×®f×u/8ÿâ1cÇõ«ß;nÜŸÿôÛK/½â›ßú^ï„ÌQÄQ›Ú"­q}ñtktjlÔ´}h1è~ø;i×·Z%†Nè˜yEçi—µ{›S¼»ñO¶´úv{0ƒùâ'—ümŶ´Tm¤pÞUmo>²ý϶N8ú“ëˆ <;ÛCXð‘Þ×óà`måÂLªX_/åþ 31ò’9— !W­Z±e˦Ûþ|ëÎu Á@Àëó–••û|>‘òrH)S ~ŸÿœsÎ3v<……Eç_pñäÉS&L˜TSSj™„ðXž/ùÚ¢eKÞ®«­ùÛ_ÿ¸aýÚÆ†úüü‚!•¿ùÕÏb±(!zBÈ]Óù˜9//ßçõ‡BYÇwâßnÿÓömU•ò»ÿ±Ý®YÕÐÝ'Ç &s_ûÃ*+$pî¿e„<&3ÛnšÎ›L;W 04@žÒB_ù†Îå}ÙáPtâù+RÞíFÿîþª_­n[¦Å£—™}>?±VRÊSfœ>xÐf.,*r×uwŸÊx"À¶“J)†iúÔWBJå*a ¯Ç«÷0â¼^ŸèÓ£c¦L;õ´™Êu}~8œuÛ_îº÷ž»nüÖu<ø„aÈîîn®ë:{¸†Sus4k"úÁM7ÏÿÏó?úá·ÿü—»Æ›pXÎÍ!AâÄÒÜÍí‘ÆHâºÑøÇ>=9§e¾åä1>CþÏÂÕiœ’%nûÃÐÓ gmÄÏü2ÔFÞ ˆv»yQÓ¼†øÑ·ØþR*‹ºÊ †Â'Ÿ|ê Ï?“H$´Ö–å †B®ëÌŸÿB$Ò=|Ĩûî½ká—.\HÄ$qÇéI5‹ÅR­%ñT©Þõ©ŠeçÌ>ï­E¯ïÜY'¤ðz½õõ;ß{oÅ„‰“,ËðØq{ô¡W¾ôäEcñxL)e˜¦âµWìÜY·bù²!C*óó “‰Ä‘9Sæâ€çžÙSή,DšI3€Wª›noR}ÏÇ2‘·ÜrË‘îÃ^ìˆnz«y^cB>¨%¹óÝÖW[í†æ#pÐa°A&‘HêØúÎwã*zP¼ÛšÕ˜¬©SóN;ð¦>5J¹–i3uš 1uÚquuµóç?¿víšñã'–––ååå¿úêK£G?ýŒ™ï¾»´¾®nÖìóGŽ=jÔ˜X4:f̸ââR¥” š6íx!D<:lx*+kVÊ:í8ËòŒ9ÊuÝçÏ[±|Yyù¿ßÿøã¯~oÕ¾xõˆ£F»£zÛ†MN?íÌ1cÆ=&Oš4%'7·´¤ìµ×^ÉËÏ_µjÅË æÏ>÷‚SO›)ö'úÀy~KÃòí}rL"D1G-ªm]\×–Ô<ðkN¦`øLÃÕzK[tCk7Xø¶âsc Ë ¬Þ\Ò*ÉÔžhÖ -Éš˜Ô‰êÈÆ­Ý –0¾<âÇ1·ûª[¢­~I¦Ò’ýL2Õ´(?à™P^Zßuúåô«¾£yÆüŸŸ2öËÿY±¥µû@Ÿp™$SG AB$®¬üÎŃ®Ñ=c1ýë)ÕG4+f­¡j¢›ëbUGº;Ò!À<µ8û¡ Ž­Èò `Ÿ #ÕùÆhrEcGWÒM“ˆ% '{!b÷ÿ6ý(UÃL@ÐЫd‘ãj{GtÓ¼ºHËBšŽR¼QÓzΣ‹7µE˜‚µ?)¨úŒ\Ÿ5:/¸¼¡cck÷ Þ¥sq÷^ÒÖâNA;ãÛ;tNé•W »Iôò°/˜µfm‘ç¿Gýú3%s+I2£Ú"qG­nlw”®Èñÿë‚c'eïG…#K*Ž\ë³* ¾`ZßâSe߀¤¿ ¤”NCÇTÄÑI"Ò¬B³îÏQ™a+§ËiK¨èm¾q; 2÷¯¾Y† Ÿ$Àìj´%l 7Å÷g$ ÛgJ¢–hâŪ¦ m‘Æè'Å5¦ýW¹.âµÆ'Øv«b7Ï*¹~Ô/†)vÑÏߊ³VìŽÉšöÛ©Oz˼5²¶)Q7 W3ôkˆj»b_›¿jUc'Iú¸Aß>~DËyVRîlfIôÀySvÊh´'ìU;ÛÓ8d{Ÿ¤¿ÅÝ õø¸ÙV®U2r4´E^AÒÕö‘•o§<ï£ÃS:ìæ†DÍŽè¦{¶ü¢Ãi%FÆÐÎp¨I™0––L}²¤PÌG¸$<÷t¬ÀoÌ .­ow\uÛòªö„Ý3£]u7ÈÑbq÷" 5¿|ÿkºV0«Ùe_üÉ„»FX³r´Ý—Yò—I†f2²¯ù³S /`ÖNËëÏDÝÎ5”ša ÃDw®Üþï1#Çk.˜;}î˜rhŽ:Ó™DÐúÒÑe;{ržßÐK[—Õ¶îÎôŽ:áN¡YdnêZ¹´åå¨qÙ=³ä²Ùeÿ•2½+—ûTúk¿èµë™{Â5ëÿúƒÏW~G±Ûå¶ÿeÃ÷_ozZ ƒ@¦°Ò T†šDqW=¾¡nMs€ŸùË™*³=ÎE¥­ˆ§~…yL~èŹ'Ë€ððúÚ/¿°²%–„ êkåÌtä¨=r ÉXÛ¹ôÙÚ»5\“¬¡‰²WÚeð¸¬ã&dŸÒY['÷°Ä÷ïbepoi1GÛ©eÅÎI…³.ü5¹l'T,ævÂ`s÷ê¦D]ÆÊÎЈ;ú/K·¼×ØBiÐ;kXQ¾ß‚Òë³ãåx-0CóYâ½;2Cé”Xçx­[gN“‚樫Ú¶ €¨#n¿[×z„ý6ýƒ£ÈǽOzËÇ0ñ½[é•>)¤IæY¥s a¾ß±Äž Ê¿”ÐñWëŸ$ a)V)ƒ=%ë)‘í ߦÒã–óÉ€O;œfW;³Ë¾0(0âªßÙn¢È;¸Ø;È?Z}3›ÂÈÖ‘8 2ì B¯U»¶¹{ÆCoÚJCÐäÂìß>þ’ö%íµñIey—.ûÛÊmu1Órô.eå= xÕPôFI8¥!߯O÷÷UÛ߬nšrTn¨ÐïY/hGglîï@îŠó;úÜÙû䨵¸?\vºN‚P¬þ¾ù§wlú‰ !ÉœP윚@ÿí1þÚˆŸ¥ÆÏ/ÿÒY¥W`ðÉ…çžQ|‰ ©YŸQ|ég‡ü·),W»—¹þ;ãnó JÙ=Âkaù\í½ÿØò3[' d™Ñë ýBwÒIºB¼QÓ2õÞW×4wAˆA!ïq¥9~CÀU³‡¯ùÊÌña8jJQö­3'ŒÉ ÂÕeAï÷N9&?W—†¼·Ÿ5éäò<8ª2'ðòÜ“ÏZ¥0,„ÚHüÒ§–,ªm@0äQê׎v‹{O” ¹cpLu ['nßt“A¦ ©¡Ô?šÐñÔE!“¬”e]ã“þ7›æ¡çíQ$H¼Ñøìšöw¶ aÎßù/Í®),AÒeÜ÷úQ2ôv©gR餛¤x~KÃKÛ›”Lù~s×-‹Ö×u'@ðHQè·,)Áœå5Oœ¿¤¾}=˜ª¼,¨!’øÎ«ïolí†!þ{÷Wuæ üyÎ-ÓG£ÞeË½ÛØ¸‚1Õ¦·PH¡’a“@H$y Év³dÉ&YX-@B‹ Ä!0¶q•m¹K¶eõ.M¿÷žó¼\ÙÈK`Ùšï|dyÆsf˜û›3Ï=÷-7-iöBIlrÆ=$!ÛÕ³QWœ‰¼ÿ‰$ ì[/íjìˆ WIN2¸‡†‚êÛ-/ÊdaD’Ž„ÐŽýèŸÛ>ZÕ'9=2#b#`IúB°omŸ4dp ²„ùõŠ{nû %†þByIJnDéž¾ºxrŽ_Ö¸‡„,• „^³Ë†œRHÒ'™BÔ£ñ¤ë°“¨dp TQ{±î·v#öáŒ$%ĺžÈå/­–xK¶““,• Aâð~R’$}œ ¤h˜dp ²„ùåòïÞPùYã–¤#* xV\µp|–„œÜ ÜCˆHÖ¸%éSö€·x IDATQß¡!! kÜC€€g÷?rè–ìÅ.I´¿;¼ô¹UöüFf÷±“3îc%Hä»JGyÆÅE4Æ£¥žq®ò„j@,IÃHWج ]a`Z Ó‹² “ÇÇ1’Ãce‘1?{é’üË6w¾‡À¦g.ügó_žÝÿˆ\^"I@”æP;kÚŽŽ`ذüN}R–Ù ì ƒÜâÈà>V:s¼Þðd¾kÔùÅ_€·Ÿ{½þ %‘¶¥•¤aƒØŠÝþ­Ï_8;ßël ǯýÛ††ž0™ÚÇD÷çf÷-³w ·û!ˆ<¶çG‚"üaïq%K••ni¤!¢¾ÅÚÀ9)Ê{Ú¾ôò‡?œ?îkv¿]Ó*.€É-"¾8ù¹7(†ˆÛûµ@ºžг ˆˆF{'Wú§AœGßj~î–Wc<€9ÎÂ÷hû¾‚xŒGýKr)«”rÈî àPYIÀ­1ŸC]\žëu¨ÀpMcçc›ö­oêÄI¹ŸCë;L.×~^2¸?éãÁJ$Î+úêiy—˜"f ãúÊ_Uv{œGã"vmÅ¿}}ô 3ɸ´ä–[ÆþŒ‹èEÅ7Ü1áNܱ¹Ùg}wÂ"2R™C;ÔŠA°'Ĉ*Ò½?]29Í©³ýÿ¸rA¡Ïœ—¥¹ß¾jaeº¸(ô:ÿrñœ™y°D†S{ûªs 3€s—Êþ|éÜ%Ùö&^MýèÊJ!Ïñ&ÜG0…A@$ˆ_[ñýKGÝjЏEÖ”À¼1þ©€ÀV·¿¹®ý*ÓtÅñè®»Þ~‡CqºÏowß}嶺4¦;˜óÍ/>³ïaˆÀ܊߯¥ Sç|ùßg¾¢ B@^--Ó‘7ÜÏX’M ÄÄ,ß«—žœëq.ý¢1ùiCÑßl¨íŠ™ °¡±ÿóVu{Tå`0Vôè«:AS‚†uÛ¶µõ¢[S³ÜºCe (Ë¥o¿~É…•ù`Z ±8àvª2 >,‚ N@ ª‚ÄÕew­îå OPÔ ‡Ìn•iøèî˜ÜЙ€ÿjyìždm±F@d4»‘!*5ÁmvWx õ•Íþ{óóv+÷êîµ=F› A@ç~u¬ÚÏ·Ýx¨Èõ­R"h|¶ÿžyãî{oÇÞö 4…bCPXUkÏÜ'ß 0ÖŒÿçÚ=ö¾Û»;Bv!›5ôFìŸc\¼¼³Ñî5Ü5N{ê]P¨Š!èîw·om ☠ïÓçÍúÞ?·­¬iU¹øûH#=¸ ¨ØS™®gïèÙ ÈPPñ«éöå3/x”@ 0™½ˆ} Éú_\ƒý–4õß›!;ümæðípw尿uæ@ª®÷¢5‚»¦ü{ÞûÂÿ–°¦ÊægÒð#pkʼ¢ìšîð¾ö z55Í©ƒííÁ›ÞÜLv@ï{ó#€ÒošÜÿôcÿŸûo5u¨roÌøÓæý 2P”Öpü?Öï­éÁôÜ´{çûÉû;ªš{ú.áñ‹RFhp‘@d‚øÉYgÎÉ:óÞª«-2ŸÞ÷°=SF@üð,x¨’©L·@Ä=©g½ëíFcÄ  ÆØ´Œ…ûC;zÍ.ÙM6DöýÇ£gL}híž?¶w´/|á`Œy2hHÖ‡ îÜ3žÜRg ôÖ¾îHwÌ¢QéÞl—¾¾¹{.™Ähàd¹Ê0éwÙŽD\ÞðÔCÕ·<†€ Yÿ òqýzÖï±èµƒÿ³å/äUÓnóÀÜìs,29qSÄß$éÓÝ;Ü=óÆ!As8~æó«þ¼³Nhï1{½ ÚŽÐoo=ЀsÊsÿoÙÌ€C"°ˆzúrd͸q$D´ºÔ0ÂCa+8¬Ó[d¨C¶‚¿Þ~{§ÑÂJ<•EîÑë;Þ¶È”•é¸ë·›õ*ŒôDú¦1Ã…úêËØ_v5nhîªÂΩÌÝÝÚÕëÁGÎŒ›€àòQ·]\r#ÕGjþ{×=MÑýÌžh÷ðÀžÝ â;{7vÄ›ˆ™‹¯.¿Ó¯e û êpPJ]‚&dûž:V±ß®Þó_ëk…}JfڀЎ­«ï "—ªüdáøe£óˆúj;#ƈ˜qsâˆÈüZzÈêa¨%F^œÆtÐÐùfÓ3Û»?ì4ZT}ZzÄ ÚëO$i(‘=% §¢¤95]a (Q7(F 7¯xe]oÜ"Cw¨¬39SïDL®¡¥ :)0'ÛQ H‡“5Üã’RMiÀ³hTclcK÷ù/®©é %Gü!în6‡b@ô½“G?ÁIivá{dHñà$üZÆíã=9p²ÁÉbIñ¦TQdA³ûÍÆgö· 'KÖL¤!cñ¦•þrñd§ªôM½“çé;{‰ìÚ¶g«ë{âŒÓ•©\*1…ˆÝFû[¾Þe¶Û‹ü†{PŸÆEôÕú?*¨éÌ95}þÞà–³#Ÿ‹”@ˆ€ PØÃëö>µí`”ódŠìþ~P×öÁVPظ,_À¡ØØ™ò[Ÿ¤òŒ{~öÒJßNæþðΠٙ¼I‡€:s‰LGîc¹ØÆpJJfD£Ò<—L(vjJ[(¾£­7¹k ³¯â¹fbɃ§NpØßRZj7‘Ðç…Å×ÍË^j‘¥ ŠÉÿL¦µÅ~¾õÆÚÞPQ•õné‹#š[˜~ÿ¢ñ‡xäuŒÉì?Ö×|cù¦¨ÅqMY©Y*!€8þ¿m7 Ú¡‹SÕ„ª0ê÷ªiͱƒ²cƒô¹â_÷4½s°½5b$k…ä“[±–Ãò _}0jð”-™$ý<ôSe9ó5Ô{­ÎÕ“¼’Oeϵ¯.»ó¦±87Qʾ5¥ã‚ÀçP³Üޏ)šƒ1‘b%D›á}ãòyKFe§ð6ߩܜ¬gÑϧ=wRÖK¤æ‡ *«Ú–¯hxÚqL™é’t‚Ðç}|Ù UIÑ4ÍáøìªjíIÍ'©W*A`a«÷ÉÚ‡öônQê† 3aE”Hk*ۺנ šD IX·võœ“çxËíÛ«ÓÓÓóó >õokkk±¬¬|¨˜Ôðå=Moîkáεí÷ÕÀSrÄAH'bOÜ|ªjß•T;:lÊ}÷Ý7Üc8B]x÷ª¶¿á¾¦)ÊÃûC;£<ÄŽ^ÿ%°BÀ´7’âa@„„*&#¢KñNK_  Òcv|ñ— @Ÿ6sfæ©C7ºcB$ÞXñúO¸7##3++Ûívo¯ÞºvíN§+-€½{w¯_·VwèÁ`ïß¹¥½½-77/33˾{}ýÁÕ«ß'!8ç?øþí»vn/(,Ò4­½½íÀ}¦iøýi~¸ºjó¦ŒÌL·Û W¯^U½m‹ÇãõûýÝ]M --ÍUU›òó ::Ú?Xõž¦kiia}Uàõ½Í»†`;S¢úžÈ¾îð³QD4bÈ-PšÛ ÎâÒÇ:°¡…86Û7-/ÐŒ üõiÆ®šP\‘îò¡ ‰”*•P¦#¼–ΜÌCb¢þ)Ë  dBß~í$€Gð4>oEjˆ¨ï Ù¡F’È;ByÄ¡ŸíÿŠˆ8* àѾaYÀc@xìhF$œŠûºÑ÷ÎÉ:#Å®ƒ'‚ºº===Û¶VE"á•+ßü¿ÿûCGGÇ÷ÿpçÎꪪM¿þ÷÷ìÙµo_mGGG[[˾}µ--Mö}>øàý»wîܽ{W0ØÛÜÔxð`]sSãŽÕ·ÝzÝC>ÐÜÜôôŸžxsÅëõõu?º÷{m­-M7|¸íÝß¿½¹¹i÷î]×~åòW^yé‰ÇÿíÛnøÝc¿yíÕ¿|çÛ7·¶4ïË2$T†s 3r}®kHä©z×YS…v;Ç­ÃïiDÓ@ËDç¾m¾µ+P𾓠Ñï¬ïpDnÙ[i£e¢8tl0¹‰F ûÖ’Sßόٳ*4ãh™}k™h :§,÷W‹'yu5%—¦T©DŸ™qê¹E_ýqÕ5ñæÏšq#¡¶·DÏ:N‚ ¿¤ˆ¶®°xôlÌ¿Xåah~Å2»)cãèZã"û4%s‘Bµ¢uwæch©^(ºZå1hþ+W} gaÆ"¥åe+ÖD±€¥ÏUÌjþ«o!æÄâkÔX#uüƒ î2Ì=O¤ÖAþùŠ#—5¿bÅDú<%}®r”â C¥×ìúáæ«¢<¬±›ìÆØYg-ýû[+nýæçÎ;¿y޹͞=÷ÃW¿øÂs“§Lmkk½ô²+ssó`Ò¤©\pñÂ…‹íû¶¶´ì¯­¹í¶ÛÇŽ'tòèÊ1KN?kýºµ /¼ô7·Ç}ï=w}÷®{ ‹þöú+Ë—¿víW¯»üò«k÷Õ¼òÊKë>\S\Râr¹nºé¶ŽŽö«¯¼ø–[¿3qÒä«®¸hÇŽêœÜ$ï3'(àÒuÚä×ö6=´jçáöŸ‚1½n—gÛ*Òœ, O=Žõ=½a/†'Ï7FMpm}ÏY·‹»}‘)‹`Éég?8·}óº¥KÏ?÷¼ ׬Y%¸€¾ "ûá )Û"~²D·øÆúv`l€àU'M'‡“œ½y‹G|k–£EÁAQce“ü«^ Í8-^9ƒ4©ºpùÀŒôíš=]øÒ ‡›§ç¨Ým+Ÿjå–:·¯N·QT Š«˜âÚµÞ±»•Y`Ž–DŽ–ý`Y¾U¯²pã&÷ŒüÒ´wžžt¶(®ŒVLólùEÇÎðp¨ÊÜ’Œº`¤¶;2à“NJ7y*ttÖGöˆŽ7â@ s@æB¦g#0¨>¬¸KoxÆlø“Ur½f(b_"‚ˆ“04»ˆé€ Q!@ ¦Ñ¨‘ÙKª™Š"À€PAÕYK˜â@Eñ€êÅò;´ƒÿkµ.ç—©·k-¯ó†?Y¥7k¨-|-aœ‘wù¢Üóþmãűxø£%4@$¢ÀœI7——?jTÙ­·~ãþ~ñÛÿí¡_<ðÊ__t8wÜùýíÕÛþþÖŠÞ`ï¹ç^ó,úýïÿËãõ,]z>ToÛúĈF#gµ ,<åá_ÿ"/· ¸d"‚çå\ýå¯þà{w”””¸=ž»ï¹Á‚S~ÿ?®]ûAWW§aØË+û^·¤^j‰F”4çñMäÖÕqyéûzÂ]Ñ®»!!@ S¬ÌüЌӀ[(îЂ ãw¥¿ý\gZ øø>',@4  “äª ,Ò,E#F^—ì´?€› 8 BQͼ²èø9`™À9œ=§Ù¹wSàç;.¸92ótcÔ¸À›O’ªÅÆÌþÙ Êö9ž¿höƒ«w?¼vOÊ\zXJ· ±¬ðÚ|ר_Vßç‘£xD G¨}%Ï\Ì<£Yë›tæ! ñfjYÎÝeصFdŸÎH€ˆ`HŸÇ:ÞåZ„v’–޾IÌh§Æç-³KA ¼•LÏÆ¶"m&O9ë­âD¨zAñ`¤NÄ 5P}Ÿ6VP]Õ¾¼6T¶ú­ŸA@„úç¸ÙI¥·jƒID`οN,§Óõë‡ÝW[SXX\^>ú÷øÓþýµ>¯¿°°833»´´Üíñ””Œ€ë®»yñâÓýþ4ûŽãÆO¼é¦ÛaEùhXvî…“&OÕT-7/ÂÄI.—®¸âË‹-nl8˜™•í÷û¯ºúÚ3g¹\îÌÌlMU5]ÿíc€ŒŒÌ'ž|>H€ŸýüWN§kØ^@¦cƒ[U‚@"°òY+='8ï|Ñ—Ý‚JÓÜÿ»lÆÝïT/ßÓ4À:9Ƹ/ݵgƒ™W;+ííçÝ;×™yÂáEÑöoÆ„ÓKŠÊ}jg³c÷F£d1û}ˆîí«¹7]k­ºËÌ*ríÞ@ºˆŒürîñ{7¬4óF9öoÏ\bä•»·¯ñ½ÿ²™Slù3£cgyׯ$‡“{ܛަ¡u6àÂå@Çî ¤;Èéºk€o”ˆQãÛ¯ÚÚLÆïKBJ°S®ïµ¼ö‹ê[XÉ÷¨Ø=Ú¡¸÷«ÅÑ €¬áÝ"û 5è^'bBKƒôyªÙ!z· ÍþiLËÀxu®æÞqÌ7žAh¯hxšgŸÁb ä©dþ©Œ‡!´Cø§2Ô‚[EhÐÒ 0KÑÒQ˜Ð»YDj…êƒÌE* êZ+Œrä``¶= B»„#¥Mgf7u¯ãŠÒf)ZX*áÂDµÿru¢ÆyûJžw¡êŸÆ| Àæéy—]Yþ+‘6?aˆÈ˜àœcˆváÑ^/$D_{ÆÙWÚüäßÚ¥ð#nƒD\`ŠBD‡K$ˆÌ^#ϳK% ‘†û8ùÉ{ÛŸÙvP9ÊÅþµ[|ëÿž¾88ûœ¾_xê´œ´]Á¶°1@œ!cÑ kç‡Ü—3Kk9èØ¿-Ã(kä;k¶°pYTiä—‚®½›Y$™8—Tf¼ö?fN±` 0=²õ†½BÓ­¬BdáçžJ</cV‚ÒÕæªÙŒ±H¼l²QP®×ïÒö@¼l²pûµ[ÑŒ¥Ì@®³f‹ÚÝjæ–ÄKÆ ü"êëÄö¾9éªòú¥sÏ(ËùÜ÷=!R*¸À"“ ‹¡2˜Sv¨2°7Úc:€`}ËøìÇ'H*€*²w‰†?ñ±÷kÌ ÀALaôMúûîLëû0Pë[w( `jßäZ€ ìî»ãg# sú´ô^³Óñ¾Vôt®µ¿6™T ƒó†%§âö¨~yõ|"뉛a“>HÓY$ˆ–ÑqÞñÊ}U{+WPÑó¨*öjnÆú:„ ªf7Í{•žªXÃÌ¿þWdìIÑ©‹@pàï[ n1°Oc¾;S@Qì5¶¨‡®­ B€ªÁ¡¿²­Cw<ª\·ÃÔûBûh&|p§T©PGyÇäºJ6t¾3àõîd~ôu«;uÐöIü£…ÕD gbæbFˆØ¡¯ktÄÝ?¾å*ñ" þ7î÷ìÿ@GgòøI§Ý8æþU}¥!RcÎ |“YÆ©¬kµÈ<•¹Kp0QÌÉ:9ká™…W&ÚG¸Ôßc›jßØÛŒƒ,j!ÓZë|ëߊLšo~ø]…n—¾dTö¦–žúžÈ•_`zãr ú¿3Í#ßâVÿ÷7DÆždfæƒû¨¼Þ¿-ÄG ¢ß¿þ±PîÿXÖ`S^ºxöµ­?}gê¸!õ‚Û$cFæ©‹rÎßÖ½&þɵÇŽ@ÏÄì% õ»ààÄS™¾+¸ù™}¿îè¿\@õBÉ×45ã Tø%ØÀƒ4Ÿ\2ú¬’³Ž÷˜¥cñšsGœím0ßDwí\-ŸÒsÊå¤;úÅ"¥éÚ#§O¹ëŸÛê»BÀŽÃÕÀDÑñs†¹{/Ý÷þÎî˜y蚺T“jÁ­ ²¦ý­Í]ïÇEôxý£Á΋ûûjѾ²ù•þO“8(.(¹^3;‰ÌA;B€K ê¶ô©x<–0Øwè¤s,_:iú“YĶhüš×ÖWµö¼"ð öš› XYÛjŸÐæÁ©ÜjK´Ž€TT-Jµ ¿š~jîEkÚßl7|òɨ>ÐÒpx?]¤áDdæ–‰Of¨%hU];0TƇý”ëñ@tÎè+›‡û;4üÿÌ/\Œeº/qfiN*îXK+r/¬,Ðí³©)*ÕfÜ6"²Èì5:8qÀT©sYÂÄá]?®º¦ÛhWí凒ô9Y‚B&)T>ÔþøûïT3ÄXò¶?„Ô n•ivü}mû[ˆ,eJ%49ýä8Õ„¶uÆ[¾ðŠIi¤C艛7¿± ±dÞ¡‚,·caQæ›û[Ãq R8µ!%K%6f§öõ£|yém‚x2w%BEmiá5g\I$djKÇ HÌ)H_~ùܲ€;¹«  Ä̼ÀC§M*KsQj§6¤êŒû0ì6ÛÃVÀ¾4.#8 U“â×üÌF t¬—bÔä¡XÌ‚’rɳÓ {û@ÛÒ?¯®é Ç3 #•Ÿ!гûy½þ VâS韚\ónr(îÛÆ>xNáW¸°:bͽfWRo~$%Ä-­=ßx}CS0æP•³*r½ššTÇ€§•æ¼xÑì §fr±§3˜z'[?U*·ME aIî¥×þ‘Š}æzŒ„!H"ÅxÄqÅ~"©R²—"0$Æeú;{Ú¢âL°xß¥í Ž „Óê[*ëkÍ3ÜÃ:AR¼TbC@x­þñ·šžådi¨—xÇÔ…w'`Ó/BATì½$ï²—þ¡ÛhûcÍœ¸\C"/Œmo^øÒÚ=]!PXIš€êz¢‰8I°·bxÓI=1óé­uk»Öìø‚›I%­ÔŸqÛ°-Þx0²WÏsúñÔ'¦¤Ï3Eœ7?¾·È°dïÀ‰Â¥x&Nòª~@™ÚÒqe QÕÔ1,@¸yzÙ“çÎê‹A{b› Ùû¥ !fä&fùû>Z”A왕ZFJp€‚ŠŠ"ëˆ7?T}ëî`ŽK›qzþå:sØõ“a)¡Xdr² ¯–öíñ¿Zs.ì m¿gÓ• ‘–B+¥„fÇâã[Üùö"p©ìÚ©¥SrÓïè= £:¼£¡ KÆ=¾lfÀ©Á·Wn½ûÝí©zEû€FÜÓFÀïÝÜù^Ðì &fŸ™…†:'+]ÏèÙ'fýëìÞIc|ÓpƒÇ"¼¯—E–)âøÙ3%é8ÙÝÞ»¡¡ €ÜªzóŒ²)9i@ÀKný„-ذ?*Òœú©e9>‡ Ñ8)ˆ€6Ì‘<Ÿ‰¹€À4æ@`æ|½þ‰‡wÜ´ºલ;oóSNô]™Ð÷â ÕLœ·«êäQ}î2AÂñËK¿ù•Š»Ð$ãw»ï}»ùEU”©- »)%bG̸àÅ5Ýݕ鞕W.˜‘›\€ÊÕ&hèf⼯YTfø<š$J|ÎW/9yR¶€Þ9ÐöÕW×wDì]íGplÌàîÏFKì CEõýÖ×Wµ-@†ìúÊßPy?'™Žü G®ÑÃuáIDAT}{CÄ×Äqqh{Ǿÿç‡öó6E<Σö ò\%åÞ hòøÕewÝ4æéˆÊ“5=²ã»vXÛ{cÈW@’Ž¢%  ¶EŒ_®ÙÓŠÁ‚¢ÌM_[5à×2í•ã®ò ï$† '~JîE_)¿KgKgæ_qûø‡=ªŸ1åÍÆ§ŸßÿPPiŠè2Z†ñE¤Ïd¯Ö@茿ßX[×›B±Ç6íïŒ èŒÒœ—.šSð€É'å¤Ýµ`\¾Ïœ.mJnš×¡‘¦`¾ÏéR rkÊœ¢¬8åxœž9õä¢ °Dž×ùÒų/S¡Ø×—o¬n ²¨Å··÷ÆSp3¬c2Òƒ»?Uäd­j]þAÛ  æ›Ï®j{°)éóFû&ûRé·.)¹ ‰ÄWÊﺡòÇ Óñ%ù—^:êé"Ó‘[ᛤ2¡úVÓ³¿Üþ­0ª¨Õ†ª«ºVq²!“CJIÀží"Öt†]··)•mlîþÙêÍá ”ÜçWæûu8Ÿ[ñÔ¹³¦çÀä3ýo}iÁ©%Y`òB¯ë7gL™W”‚ë ›ž›VèuBK8~Á‹k^ÚÕ ‹üï{›ê{"}“ë‘]ùT©Ösòx° Üötæ@dvõ£Â;‘ßÚ cüÓU¦îìÞÀ¸F9w]x· €œ,{×A,Á*צ0..¾áú1÷ ÷@¤£¹éM¿[_ƒl|"ôõä`ˆ^M [œs‘ëqŽÏòmiëí Ç3ÜŽE™Zºz"n‡:9Û¿¯;ÒŽ!Ê;š‰c •ì9™úŠÄE €ì òÎÞM¨2 ª»×ÎX©%"û÷ýwGA`rê ¥š~ûð ¢Þ¸iŸ9l ÇZz# 0`Ø¿º£Þþ9bðµu  9›–‡Ç Éàþ|ððîÅýÉ÷ÿYAµß¬A¾¥‘äpø"~ôýñ£n™ &Ö—Îd$_AI’¤$#ƒ[’$)ÉÈà–$IJ22¸%I’’Œ nI’¤$#ƒ[’$)ÉÈà–$IJ22¸%I’’Lâ·¼`E’>!1®—E·ΜÃ=„‘5Å1Ü£à”WžX*¢Æ÷Ã2áÞ z@bí{•ÒHaê ëû#}ay§<,N®¤»ôo9L.¸Ó¹ézž¹ýî‰@꣼c‡{ ÒÆfz1'€)‡2z‰ß5ÜÃøL ÜiZú¤ô9¦ˆ÷@F" èÙc|Ó†{ Ò&dùón»m˜tÜLÍMKwÊ÷ iÌ1'ót5Y09,aÌÏ>Û£ú†{ Ò*3¼ó 2 ÁvÏOYŒ]=±x¸q4 ÜpRÖ’ ßD»¯®tüp²2¹§å_6Ü‘†ßšUáphr>sÜYâ´Ò¬ÓK´…‚-ƒÛ£ú/u›Îœ$ߤÇ'~NÁ—˼ã‡{ Ò ,,κnj©¬–_‚\NõGóÇ»°ÙP?‰Ü0?{é%%7qa‘0@cpèc2<3ó ‹³’(²mIÜ6SQ²ÈL®a#TPuª‡Ü&u… +bq‹“ îAbˆºÂüUcIY€M²à–$I’’òÓF’$i$“Á-I’”ddpK’$%Ü’$IIF·$IR’‘Á-I’”ddpK’$%Ü’$IIF·$IR’‘Á-I’”ddpK’$%Ü’$IIF·$IR’‘Á-I’”ddpK’$%Ü’$IIF·$IR’‘Á-I’”ddpK’$%Ü’$IIF·$IR’‘Á-I’”ddpK’$%Ü’$IIF·$IR’‘Á-I’”ddpK’$%Ü’$IIF·$IR’‘Á-I’”ddpK’$%Ü’$IIF·$IR’‘Á-I’”ddpK’$%Ü’$IIF·$IR’‘Á-I’”ddpK’$%Ü’$IIF·$IR’ùÿGnKVûAÄæIEND®B`‚bwctl_1.5.4+dfsg1.orig/doc/Makefile.am0000664000076500007710000000333612560414557014425 0ustar # # $Id$ # ######################################################################### # # # Copyright (C) 2004 # # Internet2 # # All Rights Reserved # # # ######################################################################### # # File: Makefile.am # # Author: Jeff Boote # Internet2 # # Date: Tue Feb 17 11:08:20 MST 2004 # # Description: dist_man1_MANS = bwctl.man bwtraceroute.man bwping.man dist_man5_MANS = bwctlrc.man bwctld.conf.man bwctld.limits.man bwctld.keys.man dist_man8_MANS = bwctld.man SOELIM=soelim CLEANFILES = bwctlrc.man bwctld.conf.man SUFFIXES = .man .ms .ms.man: $(SOELIM) $< > $@ # EXTRA_DIST = $(man1_MANS) $(man5_MANS) $(man8_MANS) EXTRA_DIST = index.html architecture.html bwctl_arch.png bwctl_arch_servless.png bwctld.conf.ms bwctlrc.ms bwctl_infosheet.pdf bwctl_ntp_conf.html bwctl_firewalls.html bwctld_conf_opts.man if HAVE_MAN2HTML SUFFIXES += .man.html .man.man.html: man2html -r $< | grep -v Content-type | sed -e 's/..\/man[0-9]\///g' | sed -e 's/\.[0-9]\.html/.man.html/g' > $@ EXTRA_DIST += bwctl.man.html bwctlrc.man.html bwctld.conf.man.html bwctld.limits.man.html bwctld.keys.man.html bwctld.man.html endif # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # bwctl_1.5.4+dfsg1.orig/doc/bwctl.man0000664000076500007710000005754012560414557014207 0ustar .TH bwctl 1 "$Date$" .\" The first line of this file must contain the '"[e][r][t][v] line .\" to tell man to run the appropriate filter "t" for table. .\" .\" $Id$ .\" .\"###################################################################### .\"# # .\"# Copyright (C) 2004 # .\"# Internet2 # .\"# All Rights Reserved # .\"# # .\"###################################################################### .\" .\" File: bwctl.1 .\" .\" Author: Jeff Boote .\" Internet2 .\" .\" Date: Sun Feb 8 16:01:25 MST 2004 .\" .\" Description: .\" .SH NAME bwctl, bwping, bwtraceroute \- Client application to request throughput, traceroute, ping and owamp tests. .SH SYNOPSIS .B bwctl [\fIoptions\fR] \fI\-c recvhost \-s sendhost\fR .br .B bwctl [\fIoptions\fR] \fI\-c recvhost\fR .br .B bwctl [\fIoptions\fR] \fI\-s sendhost\fR .br .B bwping [\fIoptions\fR] \fI\-c recvhost \-s sendhost\fR .br .B bwping [\fIoptions\fR] \fI\-c recvhost\fR .br .B bwping [\fIoptions\fR] \fI\-s sendhost\fR .br .B bwtraceroute [\fIoptions\fR] \fI\-c recvhost \-s sendhost\fR .br .B bwtraceroute [\fIoptions\fR] \fI\-c recvhost\fR .br .B bwtraceroute [\fIoptions\fR] \fI\-s sendhost\fR .SH DESCRIPTION \fBbwctl\fR is a command line client application that is used to initiate throughput tests. .TP This version of \fBbwctl\fR is capable of initiating \fBIperf\fR, \fBNuttcp\fR, \fBIperf3\fR, \fBPing\fR, \fBTraceroute\fR, \fBTracepath\fR and \fBOwamp\fR tests. .PP .B bwctl works by contacting a \fBbwctld\fR daemon on both the receiving host and the sending host. \fBbwctld\fR manages and schedules the resources of the host it runs on. In the case where only one of the receiving host or sending host is specified, \fBbwctl\fR assumes the local host is the other endpoint. \fBbwctl\fR will attempt to contact a local \fBbwctld\fR if it can. If there is no local \fBbwctld\fR running, \fBbwctl\fR assumes the local host does not require policy controls and will execute the \fBbwctld\fR functionality required to run the test directly. .PP If cases where \fBbwctl\fR is directly running the test on the host, there are several configuration options that are shared with \fBbwctld\fR. Those configuration options can be set using the bwctlrc(5) configuration file in a way very similar to the way they are specified in the bwctld.conf(5) file. .PP The \fBbwctl\fR, \fBbwping\fR and \fBbwtraceroute\fB clients are used to request the desired type of throughput, latency or traceroute test. Furthermore, it requests \fIwhen\fR the test is wanted. \fBbwctld\fR on each endpoint either responds with a tentative reservation or a \fBtest denied\fR message. Once \fBbwctl\fR is able to get a matching reservation from both \fBbwctld\fR processes (one for each host involved in the test), it confirms the reservation. Then, the \fBbwctld\fR processes run the test and return the results. The results are returned to the client from both sides of the test from the respective \fBbwctld\fR processes. Additionally, the \fBbwctld\fR processes share the results from their respective side of the test with each other. .PP \fBBWCTL\fR (\fBbwctl\fR and \fBbwctld\fR) is used to enable non-specific network measurement tests to hosts without having to give full user accounts on the given systems. Users want the ability to run throughput tests to determine the achievable or available bandwidth between a pair of hosts. It is often useful to test to multiple points along a network path to determine the network characteristics along that path. Typically, users who want to do this path decomposition have to directly contact the network/system administrators who control the hosts along the path. The administrator needs to either run half of the test for the user or give them a user account on the host. Also, network paths of interest are typically controlled by multiple administrators. These hurdles have made this kind of testing difficult in practice. .PP \fBBWCTL\fR was designed to help with this problem. It allows an administrator to configure a given host as an \fBIperf\fR, \fBIperf3\fR, \fBNuttcp\fR, or \fBOwamp\fR endpoint. The endpoint can be a packet sender (e.g. \fBIperf\fR client) or a packet receiver (e.g. \fBIperf\fR server). It can be shared by multiple users without concern that those users will interfere with each other. Specific policy limits can be applied to specific users, and individual tests are scheduled so they will not interfere with each other. Additionally, full user accounts are not required for the users running the tests. .PP \fBBWCTL\fR allows the administrator to classify incoming connections based upon a user name and AES key combination or, alternatively, based upon an IP/netmask. Once the connection is classified, the \fBbwctld\fR can determine the exact type and intensities of througput tests that will be allowed. More information on the policy controls can be found in the bwctld(8) man page. .PP \fBBWCTL\fR makes use of a distributed scheduling algorithm. Each host maintains a schedule independently. As a client requests a test, the two endpoints are contacted and each \fBbwctld\fR server responds with the first available open schedule slot. This enables on-demand tests to co-exist with regularly scheduled tests since regularly scheduled tests are implemented by having the client request tests on regular intervals. Different priorities can be implemented using the \fIevent_horizon\fR configuration directive to \fBbwctld\fR. (By allowing clients that implement regularly scheduled tests to reserve their time slots further into the future.) .SH ARGUMENTS .SS Connection/Authentication Arguments: .TP \fB\-4, \-\-ipv4\fR Forces bwctl to use IPv4 addresses only. .RS .IP Default: Unspecified (IPv6 is preferred). .RE .TP \fB\-6, \-\-ipv6\fR Forces bwctl to use IPv6 addresses only. .RS .IP Default: Unspecified (IPv6 is preferred). .RE .TP \fB\-A\fR \fIauthmethod\fB \fIauthmethod\fR is used to specify the authentication method the \fBbwctl\fR client is willing to use for communication with the \fBbwctld\fR on the \fIsendhost\fR and \fIrecvhost\fR. The authentication options of \fBbwctl\fR are intended to be extensible. The communication from the \fBbwctl\fR client to each \fBbwctld\fR server may take different options for different types of authentication. If the \fIauthmethod\fR option is specified for either the \fB\-s\fR, or the \fB\-c\fR argument, it overrides the \fIauthmethod\fR specified with the \fB\-A\fR option for communication with that particular host. (Therefore, the \fB\-A\fR argument is really only useful if the same authentication can be used with both hosts.) .RS .PP Allowing different authentication methods for each connection should allow a client to use different authentication methods with different servers which should in turn allow cross-domain tests to occur more easily. .PP The format for \fIauthmethod\fR is: .PP \fIauthmode [authscheme schemeopts]\fR .TP \fIauthmode\fR Specifies the authentication mode the client is willing to speak with a server. It must be set as a character string with any or all of the characters "AEO". The modes are: .RS .IP \fBA\fR [\fBA\fR]uthenticated. This mode encrypts the control connection. .IP \fBE\fR [\fBE\fR]ncrypted. This mode encrypts the control connection. If the test supports encryption, this mode will additionally encrypt the test stream. (Encryption of the test stream is not currently supported, so this mode is currently identical to authenticated.) .IP \fBO\fR [\fBO\fR]pen. No encryption of any kind is done. .PP The client can specify all the modes with which it is willing to communicate. The most strict mode that both the server and the client are willing to use will be selected. .IP Default: "AEO" .RE .TP \fIauthscheme schemeopts\fR \fIauthscheme\fR indicates the authentication scheme that should be used to achieve the \fBauthenticated\fR or \fBencrypted\fR modes. \fIschemeopts\fR are a list of arguments specific to each particular authentication scheme. Supported \fIauthscheme\fR values follow (listed with the \fIschemeopts\fR each scheme requires): .RS .TP \fBAESKEY\fR \fIuserid [keyfile]\fR This is the initial "simple" shared secret (AES key) model. \fIuserid\fR is required to identify which shared secret the server and client should use. \fIkeyfile\fR optionally specifies a file to retrieve the AES key from. If \fIkeyfile\fR is not specified, the user will be prompted for a \fIpassphrase\fR. \fIkeyfile\fR can be generated using the aespasswd(1) application. .IP "Default:" Unauthenticated .RE .PP \fIauthscheme\fR and \fIschemeopts\fR are only needed if authenticated communication (\fBA\fR or \fBE\fR modes of \fIauthmode\fR) is wanted with \fIsendhost\fR and \fIrecvhost\fR. .RE .TP \fB\-B, \-\-local_address\fR \fIsrcaddr\fR Bind the local address of the client socket to \fIsrcaddr\fR. \fIsrcaddr\fR can be specified using a DNS name or using standard textual notations for the IP addresses. .RS .IP Default: Unspecified (wild-card address selection). .RE .TP \fB\-c, \-\-receiver\fR \fIrecvhost[:port] [authmethod]\fR Specifies the host that will run the \fBIperf\fR, \fBIperf3\fR or \fBNuttcp\fR server. The :port suffix is optional and is only needed if \fBbwctld\fR is being run on a non-default port number. If an IPv6 address is being specified, note that the accepted format contains the \fIrecvhost\fR portion of the specification in square brackets as: [fe80::fe9f:62d8]:4823. This ensures the port number is distinct from the address specification, and is not needed if the :port suffix is not being used. .RS .PP At least one of the \fB\-c\fR or \fB\-s\fR options must be specified. If one of them is not specified, it is assumed to be the local host. .PP \fIauthmethod\fR is a specifically ordered list of keywords that is only needed if authenticated communication is wanted with \fIrecvhost\fR. These keywords are used to describe the type of communication and authentication that should be used to contact the \fIrecvhost\fR. If \fIrecvhost\fR and \fIsendhost\fR share the same authentication methods and identities, it is possible to specify the authmethod for both \fIrecvhost\fR and \fIsendhost\fR using the \fB\-A\fR argument. An \fIauthmethod\fR specified with the \fB\-c\fR option will override an \fIauthmethod\fR specified with the \fB\-A\fR argument for communication with the \fIrecvhost\fR. .PP The format for \fIauthmethod\fR and a description of the currently available authentication methods are described with the \fB\-A\fR argument. .RE .TP \fB\-s, \-\-sender\fR \fIsendhost[:port] [authmethod]\fR Specifies the host that will run the \fBIperf\fR, \fBIperf3\fR or \fBNuttcp\fR client. The :port suffix is optional and is only needed if \fBbwctld\fR is being run on a non-default port number. If an IPv6 address is being specified, note that the accepted format contains the \fIsendhost\fR portion of the specification in square brackets as: [fe80::fe9f:62d8]:4823. This ensures the port number is distinct from the address specification, and is not needed if the :port suffix is not being used. .RS .PP At least one of the \fB\-c\fR or \fB\-s\fR options must be specified. If one of them is not specified, it is assumed to be the \fIlocal\fR. .PP \fIauthmethod\fR is a specifically ordered list of keywords that is only needed if authenticated communication is wanted with \fIsendhost\fR. These keywords are used to describe the type of communication and authentication that should be used to contact the \fIsendhost\fR. If \fIrecvhost\fR and \fIsendhost\fR share the same authentication methods and identities, it is possible to specify the authmethod for both \fIrecvhost\fR and \fIsendhost\fR using the \fB\-A\fR argument. An \fIauthmethod\fR specified with the \fB\-s\fR option will override an \fIauthmethod\fR specified with the \fB\-A\fR argument for communication with the \fIsendhost\fR. .PP The format for \fIauthmethod\fR and a description of the currently available authentication methods are described with the \fB\-A\fR argument. .RE .TP \fB\-o, \-\-flip\fR By default, the sender will connect to the receiver. The --flip option causes the receiver to connect to the sender. This option is not available for all test types (e.g. for iperf tests). This is most useful if the receiver is behind a firewall. .RE .SS bwctl Test Arguments: The arguments were named to match their counterparts in \fBIperf\fR as closely as possible. .PP .TP \fB\-T, \-\-tool\fR Specify which throughput tester to use: .RS .IP \fBiperf\fR .IP \fBiperf3\fR .IP \fBnuttcp\fR .IP Default: None. Selects a tool that the client and server have in common .RE .TP \fB\-S, \-\-tos\fR \fITOS\fR .br Set the TOS byte in the sending packets. .IP Default: None. .RE .TP \fB\-D, \-\-dscp\fR \fIDSCP\fR .br Set an RFC 2474 style DSCP value for the TOS byte in the sending packets. This can be set using a 6-bit numeric value in decimal, hex, or octal. Additionally, the following set of symbolic \fBDSCP\fR name constants are understood. (Example applications are taken from RFC 4594.) .RE .RE .TS box; cb | cb | cb | cb = | = | = | = lb | l | c | c . Name Value Service Class Examples NONE 000000 Standard Undifferentiated DEFAULT \^ \^ \^ DF \^ \^ \^ CS0 \^ \^ \^ _ CS1 001000 Low-Priority Data No BW assurance _ AF11 001010 High-Throughput Data Store and forward AF12 001100 \^ \^ AF13 001110 \^ \^ _ CS2 010000 OAM OAM&P _ AF21 010010 Low-Latency Data Web-based ordering AF22 010100 \^ \^ AF23 010110 \^ \^ _ CS3 011000 Broadcast Video TV & live events _ AF31 011010 Multimedia Streaming Streaming video and audio AF32 011100 \^ \^ AF33 011110 \^ \^ _ CS4 100000 Real-Time Interactive Video conf and gaming _ AF41 100010 Multimedia Conferencing H.323 video conferencing AF42 100100 \^ \^ AF43 100110 \^ \^ _ CS5 101000 Signaling Video conf and gaming _ EF 101110 Telephony IP Telephony bearer _ CS6 110000 Network Control Network routing _ CS7 111000 .TE .RS .IP Default: Unset. .RE .TP \fB\-b, \-\-bandwidth\fR \fIbandwidth\fR Limit UDP send rate to \fIbandwidth\fR (bits/sec). .RS .IP Default: 1 Mb .RE .TP \fB\-i, \-\-report_interval\fR \fIinterval\fR Report interval (seconds). .RS .IP Default: unset (no intervals reported) .RE .TP \fB\-l, \-\-buffer_length\fR \fIlen\fR length of read/write buffers (bytes). .RS .IP Default: 8 KB TCP, 1470 bytes UDP .RE .TP \fB\-O, \-\-omit\fR \fIseconds\fR Initial period of data to omit from the final statistics. This is so that you can skip past initial conditions such as TCP Slow Start. Currently only implemented by the \fBiperf3\fR tool. .TP \fB\-P, \-\-parallel\fR \fInStreams\fR Number of concurrent streams for the test. See the \fB\-P\fR option of \fBIperf\fR for details. .RE .TP \fB\-t,\-\-test_duration\fR \fItime\fR Duration of test (seconds). .RS .IP Default: 10 .RE .TP \fB\-u, \-\-udp\fR .br UDP test. .RS .IP Default: TCP test .RE .TP \fB\-W,\-\-dynamic_window\fR \fIwindow\fR Same as the \fB\-w\fR option, except that the value is advisory. \fBbwctl\fR will attempt to dynamically determine the appropriate TCP window, based upon RTT information gathered from the control socket. If \fBbwctl\fR is unable to dynamically determine a window, the value \fIwindow\fR will be used. .RS .IP Default: Unset (system defaults) .RE .TP \fB\-w, \-\-window\fR \fIwindow\fR Socket buffer sizes (bytes). For TCP, this sets the TCP window size. For UDP, this sets the socket receive buffer size. .RS .IP Default: Unset (system defaults) .RE .SS bwping Test Arguments: .PP .TP \fB\-T, \-\-tool\fR Specify which throughput tester to use: .RS .IP \fBping\fR .IP \fBowamp\fR .IP Default: None. Selects a tool that the client and server have in common .RE .TP \fB\-E, \-\-no_endpoint\fR Allow a ping test to run where the receiver may not have bwctl available. .RS .RE .TP \fB\-l, \-\-packet_length\fR \fIlength\fR The size of the packets to send for the ping or owamp test .RS .IP Default: Minimally sized packets .RE .TP \fB\-N, \-\-num_packets\fR \fInPackets\fR The number of packets to send in this test .RS .IP Default: 10 .RE .TP \fB\-i, \-\-packet_interval\fR \fIseconds\fR The time between when each packet is sent for the test .RS .IP Default: 1.0 seconds .RE .TP \fB\-t, \-\-ttl\fR \fIttl\fR The TTL value to tag each packet with. This only applies to ping tests. .RS .IP Default: None .RE .SS bwtraceroute Test Arguments: .PP .TP \fB\-T, \-\-tool\fR Specify which throughput tester to use: .RS .IP \fBtraceroute\fR .IP \fBtracepath\fR .IP Default: None. Selects a tool that the client and server have in common .RE .TP \fB\-E, \-\-no_endpoint\fR Allow a test to run where the receiver may not have bwctl available. .RS .RE .TP \fB\-l, \-\-packet_length\fR \fIlength\fR The size of the packets to send for the tests .RS .IP Default: Minimally sized packets .RE .TP \fB\-F, \-\-first_ttl\fR \fIttl\fR The minimum TTL to set for traceroute. This sets the first hop in the route that will be returned. This does not work for tracepath tests. .RS .IP Default: None .RE .TP \fB\-M, \-\-max_ttl\fR \fIttl\fR The maximum TTL to set for traceroute. This sets the last hop in the route that will be returned. This does not work for tracepath tests. .RS .IP Default: None .RE .TP \fB\-t, \-\-test_duration\fR \fIsecondsfR The maximum amount of time to wait for the traceroute test to finish. .RS .IP Default: 10 seconds .RE .SS Scheduling Arguments: .TP \fB\-a, \-\-allow_ntp_unsync\fR \fIsyncfuzz\fR .br Allow \fBbwctl\fR to run without a synchronized system clock. Use this to specify how far off the local clock is from \fBUTC\fR. \fBbwctl\fR prefers to have an \fBNTP\fR synchronized system clock to ensure the two endpoints of the test are actually agreeing to the same scheduled time window for test execution. .RS .PP If two systems do NOT have a close enough notion of time, then the throughput test will eventually fail because one endpoint of the test will attempt to run at a different time than the other. .PP If the operating system supports the \fBNTP\fR system calls, and the system clock is determined to be unsynchronized, error messages will still be reported depending upon the value of the \fI\-e\fR flag. .PP When calculating the time errors, this value will be aded in to account for the difference. The maximum time offset can be bounded on the server side, using the max_time_error directive, to prevent a denial of service attack. If set, the server will reject any requests to test with a peer that has too high a timestamp error. .IP Default: Unset (Defaults to Set for systems without the \fBNTP\fR system calls) .RE .TP \fB\-I, \-\-test_interval\fR \fIinterval\fR Specifies that \fBbwctl\fR should attempt to run a throughput test every \fIinterval\fR seconds. .RS .IP Default: Unset. If it is unset, \fBbwctl\fR only runs the test once. .RE .TP \fB\-L, \-\-latest_time\fR \fIlongest\fR Specifies the longest amount of time the client is willing to wait for a reservation window. When \fBbwctl\fR requests a test from the \fBbwctld\fR server, it specifies the earliest time and the latest time it is willing to accept. The latest time is determined by adding this \fIlongest\fR option to the earliest time. The earliest time is essentially 'now'. The \fIlongest\fR time is specified as a number of seconds. .RS .IP Default: If \fIinterval\fR is set, the default is 50% of \fIinterval\fR. Otherwise, the default is twice the test duration \fItime\fR but no smaller than 10 minutes. (See \fB\-t\fR.) .RE .TP \fB\-n, \-\-num_tests\fR \fInIntervals\fR Number of tests to perform if the \fB\-I\fR option is set. .RS .IP Default: Continuous .RE .TP \fB\-R, \-\-randomize\fR \fIalpha\fR Randomize the start time of the test within this \fIalpha\fR percent of the \fIinterval\fR. Valid values for \fIalpha\fR are from 0\-50. \fBbwctl\fR will attempt to run the test every \fIinterval\fR +/\- \fIalpha\fR percent. For example, if the \fIinterval\fR is 300 seconds and \fIalpha\fR is set to 10 percent, then \fBbwctl\fR will attempt to run a test every 270\-330 seconds. This option is only useful with the \fB\-I\fR option. .RS .IP Default: 0 (no randomness) .RE .SS Output Arguments: .TP \fB\-d, \-\-output_dir\fR \fIdir\fR Specifies directory for results files if the \fB\-p\fR option is set. .TP \fB\-e, \-\-facility\fR \fIfacility\fR Syslog \fIfacility\fR to log messages to. .RS .IP Default: LOG_USER .RE .TP \fB\-f, \-\-units\fR \fIunits\fR Specify the units for the tool to use when displaying the results. The accepted values for \fIunits\fR are tool specific. .RS .IP Iperf: .RS .IP \fBk\fR Kilobits per second .PP .IP \fBK\fR Kilobytes per second .PP .IP \fBm\fR Megabits per second .PP .IP \fBM\fR Megabytes per second .PP .RE .RE .TP \fB\-h, \-\-help\fR .br Print a help message. .TP \fB\-p, \-\-print\fR .br Place test results in files. Print the filenames to stdout when results are complete. .TP \fB\-q, \-\-quiet\fR .br Quiet output. Output as little as possible. .TP \fB\-r, \-\-syslog_to_stderr\fR .br Send syslog messages to stderr. This is the default unless the \fB\-q\fR option is specified so this option is only useful with the \fB\-q\fR option. .TP \fB\-V, \-\-version\fR .br Print version information and exit. .TP \fB\-v, \-\-verbose\fR .br Verbose output. Specifying additional \fB\-v\fR's increases the verbosity. .TP \fB\-x, \-\-both\fR .br Output both sender and receiver results. By default, only the results from the appropriate side for the given tool are output. If the \fB\-p\fR option is specified, the sender results are placed in an additional file. .TP \fB\-y, \-\-format\fR \fIformat\fR Specify the output format of the tool. The accepted values for \fIformat\fR are tool specific. .RS .IP Iperf: .RS .IP \fBc\fR [\fBc\fR]omma-separated output .PP .RE .SH ENVIRONMENT VARIABLES .TS lb lb lb _ _ _ lb li li . bwctl Environment Variable use default BWCTLRC Config file ~/.bwctlrc BWCTL_DEBUG_TIMEOFFSET Offset 0.0(seconds) .TE .SH EXAMPLES .LP \fBbwctl \-c somehost.example.com\fR .IP Run a default 10 second TCP test as soon as possible with \fIlocal\fR as the sender and somehost.example.com as the receiver, using whichever tools they have in common. Return the results from the receive side of the test. .LP \fBbwctl \-x \-c somehost.example.com\fR .IP Like the previous test, but also return the results from the sender side of the test. .LP \fBbwctl \-x \-c somehost.example.com \-s otherhost.example.com\fR .IP Like the previous test, but with otherhost.example.com as the sender instead of \fIlocal\fR. .LP \fBbwctl \-t 30 \-T iperf \-s somehost.example.com\fR .IP Run a 30 second TCP \fBIperf\fR test with somehost.example.com as the sender and \fIlocal\fR as the receiver. .LP \fBbwctl \-I 3600 \-R 10 \-t 10 \-u \-b 10m \-s somehost.example.com\fR .IP Run a 10 second UDP test about every hour (3600 +/\- 360 seconds) with the sender rate limited to 10 Mbits per second from somehost.example.com to \fIlocal\fR. .LP \fBbwctl \-s somehost.example.com AE AESKEY someuser\fR .IP Run the default 10 second TCP test. Authenticate using the identity \fIsomeuser\fR. \fBbwctl\fR will prompt for a passphrase that will be used to create an AES key. .LP \fBbwping \--no_endpoint \-N 30 \-i 0.5 --ttl 150 \-c somehost.example.com\fR .IP Run a ping test that sends 30 pings, one packet per half-second, with a TTL of 150 to somehost.example.com from \fIlocal\fR. If somehost.example.com does not have bwctl running, the ping test runs anyway. .LP \fBbwtraceroute \-T tracepath \-E \-c somehost.example.com\fR .IP Run a tracepath test to somehost.example.com from \fIlocal\fR. If somehost.example.com does not have bwctl running, the tracepath test runs anyway. .SH SEE ALSO bwctld(8) and the \%http://software/bwctl/ web site. .PP For details on \fBIperf3\fR, see the \%https://github.com/esnet/iperf web site. .PP For details on \fBIperf\fR, see the \%http://sourceforge.net/projects/iperf web site. .PP For details on \fBNuttcp\fR, see the \%http://www.wcisd.hpc.mil/nuttcp/Nuttcp\-HOWTO.html web site. .PP For details on \fBOwamp\fR, see the \%http://software.internet2.edu/owamp web site. .SH ACKNOWLEDGMENTS This material is based in part on work supported by the National Science Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF. bwctl_1.5.4+dfsg1.orig/doc/bwctld.man0000664000076500007710000001446612560414557014353 0ustar '\"t .\" The first line of this file must contain the '"[e][r][t][v] line .\" to tell man to run the appropriate filter "t" for table. .\" .\" $Id$ .\" .\"###################################################################### .\"# # .\"# Copyright (C) 2004 # .\"# Internet2 # .\"# All Rights Reserved # .\"# # .\"###################################################################### .\" .\" File: bwctld.8 .\" .\" Author: Jeff Boote .\" Internet2 .\" .\" Date: Tue Feb 10 22:23:30 MST 2004 .\" .\" Description: .\" .TH bwctld 8 "$Date$" .SH NAME bwctld \- \fBB\fRand\fBw\fRidth \fBC\fRon\fBt\fRro\fBl\fR server. .SH SYNOPSIS .B bwctld [ .BI \-a " auth_mode" ] [ .BI \-c " conf_dir" ] [ .BI \-e " facility" ] [ .BI \-f ] [ .BI \-G " group" ] [ .B \-h ] [ .BI \-R " var_dir" ] [ .BI \-S " nodename:port" ] [ .BI \-U " user" ] [ .B \-v ] [ .B \-Z ] .SH DESCRIPTION .B bwctld is a server program designed to schedule and run \fBIperf\fR, \fBThrulay\fR or \fBNuttcp\fR, \fBPing\fR, \fBTraceroute\fR, \fBTracepath\fR, and \fBOwamp\fR tests. .PP Aside from actually running network measurement tests, the main function of \fBbwctld\fR is to determine which tests are allowable based upon the policy restrictions configured by the system administrator. .PP \fBbwctld\fR was designed to be run as a stand-alone daemon process. It uses the classic accept/fork model of handling new requests. .PP Most of the command line options for \fBbwctld\fR have analogous options in the \fBbwctld.conf\fR file. The command line takes precedence. .SH OPTIONS .TP .BI \-a " auth_mode" Specify the authentication modes the server is willing to use for communication. \fIauth_mode\fR should be set as a character string with any or all of the characters "AEO". The modes are: .RS .IP \fBA\fR [\fBA\fR]uthenticated. This mode encrypts the control connection. .IP \fBE\fR [\fBE\fR]ncrypted. This mode encrypts the control connection. If the test supports encryption, this mode will additionally encrypt the test stream. (Encryption of the test stream is not currently supported, so this mode is currently identical to authenticated.) .IP \fBO\fR [\fBO\fR]pen. No encryption of any kind is done. .PP The server can specify all the modes with which it is willing to communicate. The most strict mode that both the server and the client are willing to use will be selected. .IP Default: "AEO". .RE .TP .BI \-c " conf_dir" Specify the directory that holds the \fBbwctld\fR configuration files. .RS .IP Default: Current working directory. .RE .TP .BI \-e " facility" Syslog \fIfacility\fR to which messages are logged. .RS .IP Default: LOG_DAEMON .RE .TP .B \-f Enables the \fBbwctld\fR daemon to run with \fIroot\fR permissions. There are legitimate reasons to run \fBbwctld\fR as root, but it is risky. Forcing this additional option will make it less likely root permissions are accidently used. .TP .BI \-G " group" Specify the gid for the \fBbwctld\fR process. \fIgroup\fR can be specified using a valid group name or by using \-gid. This option is only used if \fBbwctld\fR is started as root. .TP .B \-h Print a help message. .TP .BI \-R " var_dir" Specify the directory to hold the bwctld.pid file. .RS .IP Default: Current directory .RE .TP .BI \-S " nodename:port" Specify the address and port on which \fBbwctld\fR will listen for requests. \fInodename\fR can be specified using a DNS name or using the textual representation of the address. It is possible to set the source address without setting the \fIport\fR simply by leaving off the ':' and \fIport\fR specification. If an IPv6 address is specified, note that the accepted format contains \fInodename\fR in square brackets, such as: [fe80::fe9f:62d8]. This ensures the port number is distinct from the address specification. .RS .IP Default: \fInodename\fR is wildcarded as any currently available address. \fIport\fR is 4823. .RE .TP .BI \-U " user" Specify the uid for the \fBbwctld\fR process. \fIuser\fR can be specified using a valid user name or by using \-uid. This option is only used if \fBbwctld\fR is started as root. .TP .B \-v Set verbose output. Messages will only go to syslog unless the \fB\-Z\fR option is specified. .TP .B \-Z Run the master \fBbwctld\fR process in the foreground. In this mode, error messages are printed to stderr as well as being sent to syslog. Also, normal terminal controls are available. (i.e., will cause the daemon to kill it's child processes and exit.) This is useful for debugging. .SH REQUIREMENTS The \fBbwctld\fR daemon prefers a reasonably synchronized clock. It is scheduling tests and needs to be sure it has the same idea of when a test should take place as does the peer test system. Therefore, \fBbwctld\fR attempts to use NTP specific system calls to determine the accuracy of the local clock. If those system calls are unavailable, or the administrator has set the \fIallow_unsync\fR option in the \fBbwctld.conf\fR file, then \fBbwctld\fR will blindly accept tests assuming the clock is synchronized to within the \fIsync_fuzz\fR value that is also defined in the \fBbwctld.conf\fR file. If this assumption does not hold true, then the test will eventually fail. Unfortunately, because the time offset is not detected early, this test will have taken up a schedule slot. .SH FILES bwctld.pid .br bwctld.conf .br bwctld.limits .br bwctld.keys .SH SEE ALSO There are more details on configuring the \fBbwctld\fR daemon in the bwctld.conf(5) manual page. Details on configuring the policy is in the bwctld.limits(5) and bwctld.keys(5) manual pages. Information on the client is in the bwctl(1) manual page. For more of an overview of the full functionality and architecture see the \%http://software.internet2.edu/bwctl/ web site. .PP For details on \fBIperf3\fR, see the \%https://github.com/esnet/iperf web site. .PP For details on \fBIperf\fR, see the \%http://sourceforge.net/projects/iperf web site. .PP For details on \fBNuttcp\fR, see the \%http://www.wcisd.hpc.mil/nuttcp/Nuttcp\-HOWTO.html web site. .PP For details on \fBOwamp\fR, see the \%http://software.internet2.edu/owamp web site. .SH ACKNOWLEDGMENTS This material is based in part on work supported by the National Science Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF. bwctl_1.5.4+dfsg1.orig/doc/index.html0000664000076500007710000004170012560414557014363 0ustar BWCTL

BWCTL Version 1.4.2rc3

(Bandwidth Control)
http://e2epi.internet2.edu/bwctl/
$Date$
BWCTL is a command line client application and a scheduling and policy daemon that wraps the throughput testing tools Iperf, Thrulay, and Nuttcp. These tests can measure maximum TCP bandwidth, with various tuning options available, or, by doing a UDP test, the delay, jitter, and datagram loss of a network.

The bwctl client application works by contacting a bwctld process on the two test endpoint systems. BWCTL will work as a 3-party application. The client can arrange a test between two servers on two different systems. If the local system is intended to be one of the endpoints of the test, bwctl will detect whether a local bwctld is running and will handle the required server functionality if needed. bwctld manages and schedules the resources of the host on which it runs. A more detailed description of the architecture is available in the architecture documentation.

The bwctl client is used to request the type of throughput test wanted. Furthermore, it requests when the test should be executed. bwctld either responds with a tentative reservation or a test denied message. Once bwctl is able to get a matching reservation from both bwctld processes (one for each host involved in the test), it confirms the reservation. Then, the bwctld processes run the test and return the results. The results are returned to the client from both sides of the test. Additionally, the bwctld processes share the results from their respective sides of the test with each other.

BWCTL is used to enable non-specific throughput tests to a host without having to give full user accounts on the given system. Users want the ability to run throughput tests to determine the achievable or available bandwidth between a pair of hosts. It is often useful to test to multiple points along a network path to determine the network characteristics along that path. Typically, users who want to do this path decomposition have to contact the network/system administrators that control the hosts along the path directly. The administrator needs to either run half of the test for the user or provide a user account on the host. Also, network paths of interest usually are controlled by multiple administrators. These hurdles have made this kind of testing difficult in practice.

BWCTL was designed to help with this problem. It allows an administrator to configure a given host as an Iperf, Thrulay or Nuttcp endpoint that can be shared by multiple users without concern that those users will interfere with each other. Specific policy limits can be applied to specific users, and individual tests are scheduled so they will not interfere with each other. BWCTL allows the administrator to classify incoming connections based upon a user name and AES key (generated by a pass phrase) combination or, alternatively, based upon an IP/netmask. Once the connection is classified, the bwctld can determine the exact type and intensities of throughput tests that will be allowed. (More details on the policy controls can be found in the bwctld.limits(8) manual page.)


What's Changed Since Version 1.2a

  • Allows for different throughput testing tools. Currently supported are Iperf, Thrulay and Nuttcp. Use the -T option on bwctl to specify which throughput testing tool to use. Use bwctl -h to see which are supported.
    • NOTE: Some of the throughput test options are not available for some of the testers. BWCTL does not support UDP tests, changing the output format or changing the output units with either Nuttcp or Thrulay.
  • Allows throughput tests to use multiple, parallel streams. This can be specified with the -P option in the bwctl client.
  • Allows for UDP tests with bandwidth limits of higher than 4.3Gbps. This only works with 1.3 clients and servers.
  • Allows for comma-separated value output for Iperf. Add "-y c" to the bwctl command line client to use it.
  • Allows administrators to define scripts to run at the completion of each test, allowing for results to be stored in a database, accounting tracking or any number of other tasks.
  • Improves robustness of time/scheduling.
  • Improves error handling of Iperf children processes.
  • Improves error messages for failure conditions.

What's Changed Since Version 1.1b
  • Added -f option to bwctld to allow it to run with root permissions.
  • Added better usage() messages and more information to several user prompts.
  • Fixed bug that caused all server side errors to be reported incorrectly be the client.
  • Fixed bwctld bug that disabled srcnode option.
  • Ported to Solaris.
  • Ported to OS X.
  • Removed NTP system call dependency. Added allow_unsync options.
  • Increased default -L value for bwctl.
  • Added messages to data output to indicate if Iperf was killed.
  • Modified all config options to have '_' between words.


Features

  • Supports version 2.0.x of Iperf.
  • Supports version 5.3.1 of Nuttcp.
    • NOTE: BWCTL does not support UDP tests, changing the output format or changing the output units with Nuttcp.
  • Includes built-in support for Thrulay.
    • NOTE: BWCTL does not support UDP tests, changing the output format or changing the output units with Thrulay.
  • Full IPv6 support. No options needed. If the target of a test is specified by a DNS hostname, and that name has both an IPv4 and an IPv6 address defined, the bwctl command line application prefers the IPv6 address.
  • Data from both sides of the test is returned so that sending rate can be compared with receiving rate.
  • 3-Party communication is supported. The client does not have to be on one of the test endpoint hosts.
  • A local bwctld is not required. bwctl will detect if there is a local bwctld and use it if it is there; bwctl will mimic the missing functionality if needed.
  • Port ranges for the bwctld peer connections can be specified to allow bwctld to work in firewall environments.
  • Port ranges for the throughput tests can be specified to allow passive monitoring to characterize the test streams more easily.
  • Limits the types of throughput tests that can be run. Sending a set amount of data is not supported because BWCTL needs to know how long the test will take before the test is started.
  • Supports dynamic TCP window size determination. (Currently, this is limited because the bottleneck capacity is specified as a constant in the config file. In the future, bottleneck capacity could potentially be dynamically determined using techniques such as packet dispersion.)


Requirements

  • BWCTL includes the Thrulay tester, but it would be best if Iperf 2.0.x is installed on the system.
  • The bwctld daemon prefers an NTP synchronized system clock to ensure the two endpoints of the test are actually agreeing to the same scheduled time window for test execution. Therefore, BWCTL requires that NTP be running to synchronize the system clock. (See the allow_unsync configuration option described in the bwctld.conf(8) manual page to see how to by-pass this requirement.) NTP should be setup correctly on the system so that bwctld can actually fetch reasonable estimates of the time error from NTP. For the NTP algorithms to work correctly, NTP MUST be configured with no fewer than 4 clocks. (See http://twiki.ntp.org/bin/view/Support/SelectingOffsiteNTPServers  for more details.)
  • gnumake may be required for the build process (see Building the Application).
  • To get good results, the endpoints will need to be well tuned. See http://www.psc.edu/networking/projects/tcptune/ and http://www-didc.lbl.gov/TCP-tuning/buffers.html for some excellent tips in that regard.


Supported Systems

BWCTL has been tested most extensively on Red Hat Linux 4 and 5 systems, but most recent versions of UNIX should work. The code cleanly compiles on FreeBSD, Linux, and OS X.

BWCTL compiles on Solaris. However, Thrulay does not work on that platform so is not compiled in. If anyone has any interest in updating thrulay to work on Solaris, let us know.


Recommended Hardware

BWCTL does not have any strict hardware requirements. The limits imposed by the specific throughput tests are more taxing to hardware than the scheduling and policy functions added by BWCTL. The hardware requirements are therefore a function of the specific throughput tests that are desired. Internet2 had good luck using the following hardware to perform 1Gbps tests on the Abilene network:
Intel SCB2 motherboard
2 x 1.266 GHz PIII, 512 KB L2 cache, 133 MHz FSB
2 x 512 MB ECC registered RAM (one/slot to enable interleaving)
2 x Seagate 18 GB SCSI (ST318406LC)
SysConnect Gigabit Ethernet SK-9843 SX


Building the Application

The BWCTL software uses the gnu autoconf tools to configure the build process. BWCTL is distributed with a pre-built configure script so the actual autoconf tools should not be needed on the target system. (Although, gnumake may be required.) The configure script can be run with the --help option to determine the full set of configurable options.

A basic build procedure would be:

% gzip -cd bwctl-$VERS.tar.gz | tar xf -
% cd bwctl-$VERS
  # --prefix is only needed if you don't like the default
  #   (/usr/local on most systems)
% ./configure --prefix=/install/root
% make
% make install
Please report any build problems to bwctl-users@internet2.edu.


Configuring bwctld

The basic procedure to configure bwctld is to create a bwctld.conf and, optionally, a bwctld.limits file and a bwctld.keys file. These files need to be installed in the same directory that is specified with the -c option to bwctld. The recommended directory is /install/root/etc. (The etc directory below your install root.) There are examples of these files in the bwctl-$VERS/conf  sub directory of the distribution.

bwctld.conf:
Used to configure basic operation of the daemon, such as server listening port, the path for Iperf, and error logging. For a detailed description of the options available, see the bwctld.conf(8) manual page.

bwctld.limits:
Used to configure the policy limits for the daemon. There are two parts to this policy: 1) authentication and 2) authorization. The authentication is done by assigning a class to each new connection. Each class has a set of limits associated with it. The classes are hierarchical, so a connection must pass the limit restrictions of the assigned class as well as all parent classes. For a detailed description of the options available, see the bwctld.limits(8) manual page.

bwctl.keys:
Used to associate identities with AES keys. These identities are then mapped to a class by the bwctld.limits file. For a more detailed description, see the bwctld.keys(8) manual page.


Configuring firewalls

If a firewall is enabled on the machine running bwctld, it will need to be configured to allow incoming clients and tests. Use this set of directions to configure the firewall.

Configuring NTP

To ensure that tests can be run, the machine running bwctld should have its clock synchronized using NTP. Use this set of directions to configure NTP.

Running bwctld

The normal command line to start the daemon is:
 % bwctld -c /install/root/etc
It is possible to run the daemon without a config file directory if enough command line options are specified, but it is easier to use a config file.

To see all the available options:

 % bwctld -h
More details on running the daemon, as well as a complete description of the command line options, is available from the bwctld manual page.


Running bwctl

The basic command line for the client is:
% bwctl [options] [-c catchhost] [-s sendhost]
The -c option indicates that the catchhost should be an Iperf server (think packet catcher). The -s option indicates the sendhost should be an Iperf client (think packet sender). At least one of the -c/-s options must be specified. If only one of these options is specified, the local host is assumed to be the other test endpoint.

To see a list of available options:

% bwctl -h
More details on running the client application, with a complete description of all command line options, is available from the bwctl manual page.


Caveats

Thrulay support is deprecated. If there is enough desire, or if someone is willing to maintain thrulay, the functionality could be undeprecated.
Mailing Lists There are two email lists to support this software:
bwctl-users
This is a general discussion list for users to discuss problems. This list is monitored as bug reports should be sent here.
bwctl-announce
This list is used to announce new versions or significant developments with regard to the software.
Information about these lists, including links to subscribe, is at https://mail.internet2.edu/wws/lists/engineering.


Author

Jeff Boote
boote@internet2.edu
Internet2

Aaron Brown
aaron@internet2.edu
Internet2


Acknowledgments

The following individuals have greatly aided in the development, testing, or debugging of BWCTL:
  • Shumon Huque (UPenn)
  • Paul Hyder (NOAA)
  • Warren Matthews (GaTech)
  • Sean Peisert (SDSC)
  • Chris Tracy (MAX)

$Id$
bwctl_1.5.4+dfsg1.orig/doc/bwtraceroute.man0000664000076500007710000000002112560414557015560 0ustar .so man1/bwctl.1 bwctl_1.5.4+dfsg1.orig/doc/bwctld.keys.man.html0000664000076500007710000000545412560414557016265 0ustar Manpage of bwctld.keys

bwctld.keys

Section: File Formats (5)
Updated: $Date$
Index Return to Main Contents
 

NAME

bwctld.keys - Bandwidth Control Daemon AES keyfile database  

DESCRIPTION

The bwctld.keys file is used to hold the identity/AES keys pairs needed for bwctld to authenticate users. The format of this file is described in the aespasswd(1) manual page. The location of this file is controlled by the -c option to bwctld but it must be named bwctld.keys.

bwctld uses symmetric AES keys for authentication. Therefore, the bwctl client will have to have access to the exact same AES key for authentication by AES to work. Most likely, the user will simply know the passphrase that generated the AES key in the first place. Additionally, it is important that the system administrator and end user ensure the key is not compromised.

If the bwctl client is able to authenticate using the identity and AES key presented, bwctld will use the directives found in the bwctld.limits file to map policy restrictions to this connection.  

SECURITY CONSIDERATIONS

The keys in the bwctld.keys file are not encrypted in any way. The security of these keys is completely dependent upon the security of the system and the discretion of the system administrator.  

RESTRICTIONS

Identity names are restricted to 16 characters.  

SEE ALSO

aespasswd(1), bwctl(1), bwctld(8), bwctld.limits(5), and the http://software/bwctl/ web site.  

ACKNOWLEDGMENTS

This material is based in part on work supported by the National Science Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF.


 

Index

NAME
DESCRIPTION
SECURITY CONSIDERATIONS
RESTRICTIONS
SEE ALSO
ACKNOWLEDGMENTS

This document was created by man2html, using the manual pages.
Time: 15:06:28 GMT, March 20, 2015 bwctl_1.5.4+dfsg1.orig/doc/bwctld.limits.man.html0000664000076500007710000003270512560414557016612 0ustar Manpage of bwctld.limits

bwctld.limits

Section: File Formats (5)
Updated: $Date$
Index Return to Main Contents
 

NAME

bwctld.limits - Bandwidth Control daemon policy configuration file  

DESCRIPTION

The bwctld.limits file is used to define the policy configuration for the bwctld program. It allows the system administrator to allocate the resources in a variety of ways.

There are two parts to the policy configuration:

Authentication
Who is making the request? This can be very specific to an individual user or it can be more general in that the connection is coming from some particular network.
Authorization
Now that the connection has been generally identified, what will bwctld allow it to do?

The authentication is done by assigning a userclass to each new connection as it comes in. Each userclass has a set of limits associated with it. The userclasses are hierarchical, so a connection must pass the limit restrictions of the given userclass as well as all parent classes.

Within the bwcltd.limits file, assign lines are used to assign a userclass to a given connection. limit lines are used to define a userclass and set the limits associated with that userclass. The file is read sequentially, and it is not permitted to use a classname before it is defined using a limit line.

The format of this file is:

*
Comment lines are any line where the first non-whitespace character is '#'. These lines are counted to return line numbers in error messages but are otherwise ignored by bwctld.
*
Lines may be continued using the semi-standard '\' character followed immediately by a newline. This is the only valid place for the '\' character. If it is found elsewhere a syntax error is reported.
*
Blank lines are treated as comment lines.
*
All other lines must conform to the syntax of a limit line or an assign line.
 

CONFIGURATION OPTIONS

limit
This directive is used to define the userclass hierarchy. It defines the classname as well as the limits associated with that class. A classname may only be defined once. The format of the limit directive is:

limit classname with limtype=value[,limtype=value]*

classname defines the name of the class with the given limits. Whitespace is used as a separator but is otherwise ignored. classname may be used as a directory name component within bwctld, so take care not to use characters that would be invalid. (i.e. '*' or '/' would be particularly bad.)

limtype and value indicate the particular type of limit and value to apply to this userclass. The available settings for limtype are:




allow_open_modeon/offon
allow_tcpon/offon
allow_udpon/offoff
bandwidthinteger (b/s)0 (unlimited)
durationinteger (seconds)0 (unlimited)
event_horizoninteger (seconds)0 (unlimited)
max_time_errorinteger (seconds)0 (unlimited)
parentpreviously defined classnamenull
pendinginteger0 (unlimited)

allow_open_mode
This limit is only useful if the class is assigned to a netmask. It is used to limit specific IP/netmask identities to only encrypted or authenticated mode transactions or to allow open mode.
allow_tcp
Allow TCP Iperf tests for userclass.
allow_udp
Allow UDP Iperf tests for userclass.
bandwidth
Maximum amount of bandwidth to allow userclass to use in a UDP Iperf test. 0 indicates unlimited by policy, but remember this is checked all the way to the root of the hierarchy. (If you want an unlimited userclass, your root must be unlimited, and the whole path down to the given userclass.)
duration
Maximum duration of a single Iperf test for this userclass.
event_horizon
Maximum window into the future to look when trying to schedule a test for this userclass.
max_time_error
Maximum amount of time error to allow for tests in this class. The time error is the sum of the errors reported by NTP on the two involved systems. The larger the time error, the larger the duration of the reservation because the time error is used to ensure tests don't overlap. There is a limit on this to defend against DOS attacks where a client could report large errors to ensure other clients can not allocate test reservations.
parent
The first limit line cannot have a parent since none have been defined yet. As such, the first line defines the root of your class hierarchy. All remaining limit lines MUST assign a parent. (It is hierarchical, after all.)
pending
Maximum number of pending reservations for this userclass.
assign
The assign directive is used to assign a userclass to a given connection. Basically, it authenticates the connection. The format of the assign directive is:

assign authtype [args] classname

authtype identifies the type of authentication being used. Whitespace is used as a separator but is otherwise ignored. classname must have been previously defined with the limit directive earlier in the file.

The available settings for authtype are:

default
Used if no other assignment matches. It takes no args.
net subnet
Assign a specific subnet to a given userclass. subnet must be specified using VLSM notation (IP/nbits). The only arg is the subnet. For example:
127.0.0.1/32
would match only the loopback IPv4 address.
::1/128
would match only the loopback IPv6 address.
192.168.1.0/24
would match all hosts on the 192.168.1.XXX network.

There must be no set bits in the non-masked portion of the address part of the subnet specification. i.e., 192.168.1.1/24 would be an invalid subnet due to the bit set in the fourth octet.

user user
Assign a specific user to a given userclass. The user must be defined in the bwctld.keys file.
 

AUTHENTICATION PROCESS

bwctld determines if it should allow a connection from the client based upon the authentication mode of the request and the source IP address of the connection. If the client connection is in authenticated or encrypted mode, the daemon does not do any filtering based upon the source address of the connection. (See the -A option to bwctl and the authmode option in bwctld.conf.) In these modes, bwctld simply uses the identity of the connection to determine the userclass limits. If the connection is made in open mode, then bwctld first uses the source address to determine if bwctld should allow an open mode connection from that subnet at all. (This is the purpose of the allow_open_mode limtype described above.) If open mode is allowed from this subnet, then the userclass is determined by the closest subnet match defined by the assign net lines in the bwctld.limits file.  

EXAMPLES

An initial limit line might look like:
limit root with \
bandwidth=900m, \
duration=0, \
allow_udp=on, \
allow_tcp=on, \
allow_open_mode=off

This would create a userclass named root. Because no parent is specified, this must be the first userclass defined in the file. This userclass has very liberal limits (UDP enabled with 900m limit). However, open mode authentication is not enabled for this userclass, so the connections that get these limits must successfully authenticate using an AES key.

If an administrator also wants to create a userclass that is used to deny all requests, they might add:

limit jail with \
parent=root, \
allow_udp=off, \
allow_tcp=off, \
allow_open_mode=off

This would create a userclass named jail. Because UDP and TCP tests have both been denied, no tests will be allowed. Also, allow_open_mode is off, so initial connections that are not in authenticated or encrypted mode would be dropped immediately anyway. (It would not make much sense to assign a user identity to this userclass. If you don't want connections from a particular user, the best thing to do is to remove that user from the bwctld.keys file.

If the administrator wanted to allow a limited amount of open tests, they could define a userclass like:

limit open with \
parent=root, \
allow_open_mode=on, \
allow_udp=off, \
allow_tcp=on, \
duration=30, \
event_horizon=300, \
pending=5

This could be used to allow TCP throughput tests by random connections. It limits those tests to 30 seconds in duration, and only allows them to be scheduled within the next 5 minutes (event_horizon=300). Additionally, it only allows this userclass to have 5 currently pending reservations. This ensures that this userclass can only schedule 50% of the next 5 minutes. The advantage of this kind of setup is that the administrator can define other userclasses with a larger event_horizon allowing then to have priority over this class. (Suggestions for other methods of priority scheduling should be sent to bwctl-users@internet2.edu.)

Now, these three userclasses might be assigned to specific connections in the following ways:

# default open
assign default open

# badguys subnet
assign net 192.168.1.0/24 jail

# network admins
assign user joe root
assign user jim root
assign user bob root

This set of assign lines specifically denies access from any open mode connection from the badguys subnet. It specifically allows access to authenticated or encrypted mode transactions that can authenticate as the identities joe jim or bob (even from the badguys subnet). All other connections would match the assign default rule and get the limits associated with the open userclass.  

SEE ALSO

bwctl(1), bwctld(8), bwctld.limits(5), bwctld.keys(5), and the http://software.internet2.edu/bwctl/ web site.

For details on Iperf3, see the https://github.com/esnet/iperf web site.

For details on Iperf, see the http://sourceforge.net/projects/iperf web site.

For details on Nuttcp, see the http://www.wcisd.hpc.mil/nuttcp/Nuttcp-HOWTO.html web site.

For details on Owamp, see the http://software.internet2.edu/owamp web site.  

ACKNOWLEDGMENTS

This material is based in part on work supported by the National Science Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF.


 

Index

NAME
DESCRIPTION
CONFIGURATION OPTIONS
AUTHENTICATION PROCESS
EXAMPLES
SEE ALSO
ACKNOWLEDGMENTS

This document was created by man2html, using the manual pages.
Time: 15:06:28 GMT, March 20, 2015 bwctl_1.5.4+dfsg1.orig/doc/bwctld.keys.man0000664000076500007710000000445112560414557015316 0ustar .\" The first line of this file must contain the '"[e][r][t][v] line .\" to tell man to run the appropriate filter "t" for table. .\" .\" $Id$ .\" .\"###################################################################### .\"# # .\"# Copyright (C) 2004 # .\"# Internet2 # .\"# All Rights Reserved # .\"# # .\"###################################################################### .\" .\" File: bwctld.keys.man .\" .\" Author: Jeff Boote .\" Internet2 .\" .\" Date: Fri Feb 13 11:53:48 MST 2004 .\" .\" Description: .\" .TH bwctld.keys 5 "$Date$" .SH NAME bwctld.keys \- \fBB\fRand\fBw\fRidth \fBC\fRon\fBt\fRro\fBl\fR \fBD\fRaemon AES keyfile database .SH DESCRIPTION The \fBbwctld.keys\fR file is used to hold the identity/AES keys pairs needed for \fBbwctld\fR to authenticate users. The format of this file is described in the aespasswd(1) manual page. The location of this file is controlled by the \fB\-c\fR option to \fBbwctld\fR but it must be named \fBbwctld.keys\fR. .PP \fBbwctld\fR uses symmetric AES keys for authentication. Therefore, the \fBbwctl\fR client will have to have access to the exact same AES key for authentication by AES to work. Most likely, the user will simply know the passphrase that generated the AES key in the first place. Additionally, it is important that the system administrator and end user ensure the key is not compromised. .PP If the \fBbwctl\fR client is able to authenticate using the identity and AES key presented, \fBbwctld\fR will use the directives found in the \fBbwctld.limits\fR file to map policy restrictions to this connection. .SH SECURITY CONSIDERATIONS The keys in the \fBbwctld.keys\fR file are not encrypted in any way. The security of these keys is completely dependent upon the security of the system and the discretion of the system administrator. .SH RESTRICTIONS \fBIdentity\fR names are restricted to 16 characters. .SH SEE ALSO aespasswd(1), bwctl(1), bwctld(8), bwctld.limits(5), and the \%http://software/bwctl/ web site. .SH ACKNOWLEDGMENTS This material is based in part on work supported by the National Science Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF. bwctl_1.5.4+dfsg1.orig/doc/Makefile.in0000664000076500007710000004300212560414557014430 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$ # ######################################################################### # # # Copyright (C) 2004 # # Internet2 # # All Rights Reserved # # # ######################################################################### # # File: Makefile.am # # Author: Jeff Boote # Internet2 # # Date: Tue Feb 17 11:08:20 MST 2004 # # Description: 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@ @HAVE_MAN2HTML_TRUE@am__append_1 = .man.html @HAVE_MAN2HTML_TRUE@am__append_2 = bwctl.man.html bwctlrc.man.html bwctld.conf.man.html bwctld.limits.man.html bwctld.keys.man.html bwctld.man.html subdir = doc DIST_COMMON = $(dist_man1_MANS) $(dist_man5_MANS) $(dist_man8_MANS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/c-attribute.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/bwlib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" \ "$(DESTDIR)$(man8dir)" man5dir = $(mandir)/man5 man8dir = $(mandir)/man8 NROFF = nroff MANS = $(dist_man1_MANS) $(dist_man5_MANS) $(dist_man8_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 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@ 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@ MAN2HTML = @MAN2HTML@ 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_VERSION = @PACKAGE_VERSION@ PATCH_LEVEL = @PATCH_LEVEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TOP_BUILD_DIRS = @TOP_BUILD_DIRS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_aux_dir = @ac_aux_dir@ 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@ lt_ECHO = @lt_ECHO@ 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@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dist_man1_MANS = bwctl.man bwtraceroute.man bwping.man dist_man5_MANS = bwctlrc.man bwctld.conf.man bwctld.limits.man bwctld.keys.man dist_man8_MANS = bwctld.man SOELIM = soelim CLEANFILES = bwctlrc.man bwctld.conf.man SUFFIXES = .man .ms $(am__append_1) # EXTRA_DIST = $(man1_MANS) $(man5_MANS) $(man8_MANS) EXTRA_DIST = index.html architecture.html bwctl_arch.png \ bwctl_arch_servless.png bwctld.conf.ms bwctlrc.ms \ bwctl_infosheet.pdf bwctl_ntp_conf.html bwctl_firewalls.html \ bwctld_conf_opts.man $(am__append_2) all: all-am .SUFFIXES: .SUFFIXES: .man .ms .man.html $(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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(dist_man1_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } install-man5: $(dist_man5_MANS) @$(NORMAL_INSTALL) test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)" @list='$(dist_man5_MANS)'; test -n "$(man5dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \ done; } uninstall-man5: @$(NORMAL_UNINSTALL) @list='$(dist_man5_MANS)'; test -n "$(man5dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man5dir)" && rm -f $$files; } install-man8: $(dist_man8_MANS) @$(NORMAL_INSTALL) test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" @list='$(dist_man8_MANS)'; test -n "$(man8dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ done; } uninstall-man8: @$(NORMAL_UNINSTALL) @list='$(dist_man8_MANS)'; test -n "$(man8dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @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 check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; 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) -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-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-man5 install-man8 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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 uninstall-man5 uninstall-man8 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man1 \ install-man5 install-man8 install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-man uninstall-man1 uninstall-man5 uninstall-man8 .ms.man: $(SOELIM) $< > $@ @HAVE_MAN2HTML_TRUE@.man.man.html: @HAVE_MAN2HTML_TRUE@ man2html -r $< | grep -v Content-type | sed -e 's/..\/man[0-9]\///g' | sed -e 's/\.[0-9]\.html/.man.html/g' > $@ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # 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: bwctl_1.5.4+dfsg1.orig/doc/bwctlrc.ms0000664000076500007710000000437312560414557014374 0ustar .\" The first line of this file must contain the '"[e][r][t][v] line .\" to tell man to run the appropriate filter "t" for table. .\" .\" $Id: bwctlrc.man 493 2008-10-09 16:27:47Z aaron $ .\" .\"###################################################################### .\"# # .\"# Copyright (C) 2004 # .\"# Internet2 # .\"# All Rights Reserved # .\"# # .\"###################################################################### .\" .\" File: bwctlrc.8 .\" .\" Author: Jeff Boote and Aaron Brown .\" Internet2 .\" .\" Date: Tue Jan 06 07:44:09 EST 2009 .\" .\" Description: .\" .TH bwctlrc 5 "$Date: 2008\-10\-09 12:27:47 \-0400 (Thu, 09 Oct 2008) $" .SH NAME bwctlrc \- \fBB\fRand\fBw\fRidth \fBC\fRon\fBt\fRro\fBl\fR configuration file .SH DESCRIPTION The \fBbwctlrc\fR file is a configuration file for the bwctl(8) program. If a test is requested using bwctl, and there is not a local bwctld(8) running, bwctl will spawn its own copy of bwctld. This configuration file is used to configure the basic operation of the automatically spawned server. For example, it can be used to configure whether to allow the local clock to be unsynchroznied, or where the iperf command is located. .PP This file can be placed in ~/.bwctlrc, where it will be automatically read by bwctl when it spawns off a bwctld. If the file is put elsewhere, the BWCTLRC environmental variable can be set to the path to the file and bwctl will read it. .PP .so bwctld_conf_opts.man .SH SEE ALSO bwctl(1), bwctld(8), bwctld.limits(5), bwctld.keys(5), and the \%http://software.internet2.edu/bwctl/ web site. .PP For details on \fBIperf3\fR, see the \%https://github.com/esnet/iperf web site. .PP For details on \fBIperf\fR, see the \%http://sourceforge.net/projects/iperf web site. .PP For details on \fBNuttcp\fR, see the \%http://www.wcisd.hpc.mil/nuttcp/Nuttcp\-HOWTO.html web site. .PP For details on \fBOwamp\fR, see the \%http://software.internet2.edu/owamp web site. .SH ACKNOWLEDGMENTS This material is based in part on work supported by the National Science Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF. bwctl_1.5.4+dfsg1.orig/doc/bwctld.conf.ms0000664000076500007710000000404512560414557015133 0ustar .\" The first line of this file must contain the '"[e][r][t][v] line .\" to tell man to run the appropriate filter "t" for table. .\" .\" $Id: bwctld.conf.man 493 2008-10-09 16:27:47Z aaron $ .\" .\"###################################################################### .\"# # .\"# Copyright (C) 2004 # .\"# Internet2 # .\"# All Rights Reserved # .\"# # .\"###################################################################### .\" .\" File: bwctld.8 .\" .\" Author: Jeff Boote .\" Internet2 .\" .\" Date: Thu Feb 12 15:44:09 MST 2004 .\" .\" Description: .\" .TH bwctld.conf 5 "$Date: 2008\-10\-09 12:27:47 \-0400 (Thu, 09 Oct 2008) $" .SH NAME bwctld.conf \- \fBB\fRand\fBw\fRidth \fBC\fRon\fBt\fRro\fBl\fR \fBd\fRaemon configuration file .SH DESCRIPTION The \fBbwctld.conf\fR file is the configuration file for the bwctld(8) program. It is used to configure the basic operation of the server. For example, what addresses and ports it should listen on, where it should send error messages, and where it should save files. .PP The policy rules for \fBbwctld\fR are configured using the \fBbwctld.limits\fR file; the details for configuring those policies are described in the bwctld.limits(5) manual page. .PP .so bwctld_conf_opts.man .RE .SH SEE ALSO bwctl(1), bwctld(8), bwctld.limits(5), bwctld.keys(5), and the \%http://software.internet2.edu/bwctl/ web site. .PP For details on \fBIperf3\fR, see the \%https://github.com/esnet/iperf web site. .PP For details on \fBIperf\fR, see the \%http://sourceforge.net/projects/iperf web site. .PP For details on \fBNuttcp\fR, see the \%http://www.wcisd.hpc.mil/nuttcp/Nuttcp\-HOWTO.html web site. .PP For details on \fBOwamp\fR, see the \%http://software.internet2.edu/owamp web site. .SH ACKNOWLEDGMENTS This material is based in part on work supported by the National Science Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF. bwctl_1.5.4+dfsg1.orig/doc/bwping.man0000664000076500007710000000002112560414557014340 0ustar .so man1/bwctl.1 bwctl_1.5.4+dfsg1.orig/doc/bwctl_arch_servless.png0000664000076500007710000015207312560414557017140 0ustar ‰PNG  IHDRáVO= pHYs.#.#x¥?v IDATxœìwxÅùÇ¿3»{ýtê½Ù’‹p/`ãnÜèB‹ÐKB€@Ú/„ !!! PSLÓqýɽ5«÷ëmwgæ÷ÇI¶ll°eìý<~ôÜííξwÞýλï¼óBÀÀÀÀÀ .¡=m€Á114ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~14ÚÀÀÀ ~‘{Ú€4 ³ Î5ÞÓ¶ô>ˆDd³dµJöž¶ÅàtÑY@cªÎ¹¢§éuP…R«"9Mñ"€_AÏ›Xî߱ݳn··´*°Ç­6«< W݉!Å!'æØú tšxþ Äódªô´Q݆÷ÊÚ¶5­Û[| hDgÆÝr¢(”¤ØLý“rS&å§ËI¶)ROuLHvõÁ²yþ±¡mIK´I&2!”€ô”=½!„à‚éBuȉ%®Q³óï2Õø1Ï$vµúžX³ï“òÆ6„‚Pãÿ÷d\€q“E9/'ù'cú_ZœÙÓ6ÓèeMó_,{´9R+Y"ñÛ‰õ:¸àLhÙqaÖ·¿Sô#úqfðúΚ‡¿ØÞà Ò|Š\(ŠtïȾ¿tNF?zF£çøÇÜÊ?«\5Ô¹›:×&f\vßÀ?8åÄž6Çàñ‡5û~µ|§Êˆ¡Î݃àbvIÎKJ²ÄWœ°ò:–5¾ÿZåŸ îVˆL•eóÿ½ï]h=mŽÁÉóêŽêÿ[¶Se†@w'„@¢ïï®}`ÑV•ÅWÚÂéÖèý¾mÿ.û­ÎuC »b’LKÿ÷iÝë=m‹ÁI²¡Ñó£ÅÛ™F|ãt@éÜmÕÿÞZÕÓvÆiÕh!ø¼o6}z  €øßg[£ =m‹Á Äøýê=­°áAŸ&aO¬ÙWã ÷´)‡8­½Í½z³{¥Lâ+ÜsfC‰Ô­[PÿFObp”ֻWµ€ÍN#”Özƒ/m«êi;qZÿû—7èÓÚ)1®¹Ó |}뢀æíiC NŒO+šüˆáDŸvÈ;{ë=‘xÅ9}ré×<•]Æåvú‘ˆÜ©® —÷´!'€;¢.¯i5œè€ ÚZ[ßÞÓvtpú®·Úˆ>mg4ˆA u«­ÍáÚž6ÄàpG´íÍ>H†WsÚ!ÄÖ¶5ûzÚŽNŸF‡Y0 y¨1ZØp¡{´Öž¶Âà¨z[Ðtô BcÁHO[ÑÁéÓhÆ5kÆìä€FõPO[ap5ÖÓ&œÕ„õxùýOŸF aKê9Œ¿waÔ³ëYâçç7F$ âC£ âC£ âC£ âC£ âcFÉa –x<ƒº¤ó#Ðàì…w©ÉÇ:rº»¾Ž¥tÑ/¿Œ’~_ÇY­Ñ‚€  P&d&d.d‰ *@ éÜ_€pNÁÑ%¢Sh”D%Â)¡"¶¿ ÜPmƒ3Î!‰°+RŽÃZU=Óiýþˆ>‹ªZ–V69læÎ¶¹Éû—5{!KO”l5ßýéf@L-H—“üTiYDgv“”a3×"*ã€Î QC²àìÒ蘛ÓeA`QyZHO ³¤0K óäs…™+ÂQnW¹U&]˜˜ˆ‰µ à:%ªL¢ ™hÀLƒfê±Hn›ä¶J›ä±Òv«ä³HªDbzM`8Ú½.€ ÉHœÕ7ã…-Už:¶ ù“kÇMž»bmU³Y"cs’w¶ú!À…h «U‹=múU]¦4–£ß'Ñ69?å™Må‘(¿âœÜç/qÞ+Kw7{3¬³ûg\ÖXã 0n¬ ãÌ×hAÀá2fMØTžïÖ¶D‹ÚÔ4¿îPyL‘© !Œ®Òhç߃/(T šiÀDƒfZíRö¥›ÊRÍ ²*“°B H:@;3Yȱ}䓿KmJ)A6®"4n(j!õ.¥2YYWhÛ’c š('!lƒF!Æä$÷Kv¼¹»V×D²Õ$S¢ÈTø´¢éÓ}õ%@;ø8HÈa•ùާÔÚÝy8"ÂH´¬=pÕ»k ! Ô*KßêŸSå m¬w[yBnÚÆF;¬‚ëLçŒÒhNåÓKš"*BC"Î(ïfÒCß5&Üf]ôiQû´¨“ÊC­i]um­"Õä¶J&f(µAÏ!`Sä0c‚‹©©³úf~^ÙÜ¢óg7Uw§È§±b%!ŒD€’Ú@xÚ›+CAªUyåÒÑ-ÞþÆŽêg‹‰ØèåÌ™ Ñ‚€Ø™±70¼6’åÕN}Œ“¯H d!2}ú[ý—ïôïM5o̳.`ovÊ9$§‡˜ïÌÅìÙßÑgÎZCÑç·T½¾«¶%%¬gk u:ÈB Õci|­!õ[ï­ÛßAQ’ýWãKþµµrÕVHô ö©ãDÀNU"fŸÓ½t—X]$!È4âH £›¢3öù¿(v,à¨OTˆR|­op"’f77‡¢¢5¤–{‚q‡UwH»Ñ¹Ns"Œ¯=ÐsœÓlæ|—•‚B@"DpÎÏÈrÛ½X£cùs%M‘‹v¦–MÄ‘×|мø@3L2ypt¿5õíË«[Ï„¯ ^åí˜hÉñj7•º'T„$vR¾³É¨áSoÜXìà Ú ®ŠFàüÊÐ9M‘÷‡$¼?4A•‰¡68y xÌ_>à ‡´Øpú¢_‡A :¥ ͯéË«Z@qf8Ô½I£U‰Œ¬ oU{n›v2ƒ0›ñÀÿ à©kNlÒÊñ‹L€v~¾åëñü÷a>ñ¦$¸Âüæõž>íê‹c“ZŠlLP48 „°*òÔ‚ŒÒOK0ò̆2½ è|²„uvÕ»ëtÎAˆË¢˜$©%íi£¾)½#ˆ«•qÅßÏ´ä¶kN:φÀ–«óÔš°:asv*5-ÇÉ7HŠIûC¿ù¬¹KTëýî€AÀE¦ÝüìÌá³ú¤ƒ‹^}>NÂ:Ó˜ éÿÎìó¬2íí yö¸r›÷ÎÕnG”S“Eçâ·Ž @x—·Ú—Þ\)˜w8 é}ñ«åè;‘Σb'ú†HèÓ¢ýtQËÐú°nÈ´Áñ+#GH/<ûk?,k<ãçz‚@|VÑôÜæJ• @ 7?†Æ{¬C@àŠ¾[Öy$qŠúÁ`6¡h’sÑZòRÀáBÁTmFÈ fŠ£© þv0™Q< Þ&4€ìNäAb6´ª6Cc6 ¹ƒÐo,t { Ÿ`ú+éÕøEÛã3Òöf˜dƒ¯GÀªHÌ^S×^ïonòœÁñ£"YYÓ ’h5Ùe©Îî¥QøxïZuBfìõß¶Ö-ªyD‚ÖˆÛžÁ=¯âú?à'Ÿâ¦§@)Òqï\Œ¹¦ÃG.‹Ÿ-¤[¡P0÷½ü¡PãðóE¸w.®þný'Æ^‡s&àòŸÊ˜þ=Üý"Œ?¥Ã|>ý'‹[Š›£šÔ+¯3ƒÓ ç….ÛÓÓ‡žŸÓ©³J ;ˆv„øÃ”A/_2ʦȧ๶'ˆk?Z“ȘªÐkN@ý'`ï üjÔfÿWþ{WaãGh­Â¨Ë±è(Cf€ë4 = ¡ÏhXìØ½Ù¹øþ\4îÃ?oAÓ~˜­0YÑÞ O~ú9^½¥€ë°'œ"s;‘åÑXÑöèÌô»$õÊ‹Íà´ Jö´ù§¾¾¢!‰CçѶm¹–S¬¥æ§hÚ¶¯Ô2 ´ŒüY¼µ»Îi’Ú‡?Åñ¿~´NIa›zךv›zJ‹äSõ{ñÎïàoƒÅû¢zÆ^‹¨Š½«P0ŽXí2>‰ä\äÁLQ2[?…Û‹i÷@±á¥{Q½BGØo3Ó€éÐUˆîÉ•“Pܨ޾¶]áà½òb3è~„H±™2Qæ5v”{‡P©ãB!Éä?ˆÃßv~J:ßÒÎâJT!@¬5zdk±ý©I¥‡N Øöo–<­•.Í’Žír”ó…me›ewc‡ÙähVQzÈ€# dIeÓü=u"¶k/t¥ãT£ÂÅM<Ùíú©·±¹¡PGrˆ®¢b2úÁ,aÇBPŠ¢s‘;&+Ö½ BQ8Îd”LÆÚyà@ßÑh¯AsyGê^wÔ8ý dL,M,òÞé|-Œ±P(ÔÓVôn>¯ßÜËεHÇH~"„hQÉÓ,»›”æjH ûÍåÛLõå¡DSMÕ{Lµûˆ®‚J4ì7Wî0Uí"š *ÑOv7Åbr{#Q#DW%O‹äm“[ë@)ÍU;ÍÛI$I’Ûê-e›%ok‡ø„¤ÂT½Ç\½›¨P‰F‚’ß-·ÔJ¾6HŠÜÞ`)Û¬´ÔÄú!É „Ê-µRÀI:d3gBò´Ò€Wiª"ìhÎ2¥ ¤8ÙþÚe£Çæ$Ÿâ8d÷§±FÈØÊàyUaœò‚ˆ‡zõXлŠTž•ˆQ<²5;QW…]KP2jšŠªM Ó!+°èQnÓÒKÏÙäÙ–mi·K$ž|‚Úښ͛J/½ìJò¥›¤¼|õª)S§üÈëõ,[ºø‚i³ŽÃÒ++ÊþýÂs=ö'I:•0»ÐÚÚRº~íÔ fX,–1à›BÈü²†Ï«š¢ü«j"ùÚÏŠ9Òg0·'8—¿«§dÉîf9»(<è|ûÆERÈÇœ‰Ì•Šhصä Ý•F´ˆ}Ç*÷Ì›,ÛÍ5{Ý—ÞE´ såûÁ‘0»+qéÛà<Ü8OX5Ÿ9“A‰ž"7UY÷nГ3m;×FNSs‹;oaß¶RMÏUÚ­f‹wæw”¦jGéÆ\dj:`ÛµFM/°m_)2 BVLÕ{œ¥Ÿ{¦^/{Z«?ˆÙlJJŸâ\ÿ‰äsëiÙ¾1—@>úĉY"%½./Nýh³Æ®Úæ“y7,(€ÜÁHJFP„4 š†ŠR¨Â!ì[…¾çbÀxlýšÀ–Ñ<λekÑ^ ì_‹Ì~è?@T@[ˆSÀlƒz|‹ŠŸ4YýÂ=þx<ôz=û÷ïGë¥Üíí••å„Í›6lÚX @F÷îÝ£ªê{úýþm[7µ‘neݺ5Û·o …ÊÊöézï,ÍÃt¶¦ºõ‹Šæ¯ú )•<-ÁaS‚£¦Û7-•ƒÆEú±í\-·5˜ëö«¹ýc.föDû–%,!Ù7õï´9²ßmÛS*!,vŃ0 B€RÙÝ<>4x\ÂÚO˜3É;ãïäk¸3ѱq‘š]:‰[íömËy0œk©Yþ‰Wz/¸Ni®QšI–Û|“®ÖRs¥ŸKÆú§\1Õ±i ¥¦ú ÇÆE¾ó/cé¹¶­ËÚlÝ»‰}RЯ¥çûÆ]!L–£ûI”ìmóßüÑÆU5m½næa<úÑšDÆTEúµªÝ°T 8dæ<‰o‚Eq郰z.˜JߎsámÄÖO`jv€J~!Þù T°ìELº7ýÎߣ¹ö$Z±o3‚íy0þ´7 j# @hwQŒ¯ }Râl·Kñ3M<==cܸ‰”Ò­[69ÎÝ»w„B¡Y^âr%æäæšÍæššêßþæçI))·Þz÷СÃ&Nšb·Û›››–~±( Lœ4µ¸¸?¥Ôd2umVÓ´¥_,ª®>PܯÿäÉx=žE‹> “&MíÓ§H×µÒÒu¹¹y+V,MII6m–bÇö­Î„„-[6Y-–3/Ž5¸cûÖõë×÷?a²$IŒ±•+–VV–çæõ{äW?-ì[tÓM· ,9gìØq&“ÀÖ­›·lÞ˜”œ<}ú,›Í¾gÏ.ÁECC]CCýÌ™¥¥gôÌ},¸(H´'ÙWÔ¶©úW^œ3Wª–ž I–Ûê çŽÒÐU–˜Æ-öÀð)Î eOKpÄÉÓ-I‘Ô´\ÙÓ¬¥dwÄ A>r³MÍÉ×|~GpYã²§ÅÔP©´5@ט3éPJÕ¼ ”Ù],%“ú=ÜjÓ2òµ”,¥µjN14UKÉ¥4ìˆ}×5%GO͆r{ÃA›µ”,!(æ´#{ýCÑ8€³âWõ^äLÇ-ÊÅ”² |j‡ cP A>~ 7î~÷¾‚”<üy6l‡ ¼Í娹î&È@K=ö,G  [>îØ¡­O^„æ Üü7|.îøJ¦@°ð0ß}ùƒÁtx›twK´ZBn›6¸!ÂâÉ#ضmËã?à…?ûо_YYñÖ[¯ÿéÉß !6”®.Ó㬩©ñ±Gåv··¶¶ø~³Ùò³Ÿ<ØÐPOqèºþ“‡øìÓ´µµºÝí÷ßwWUUÓõûï»kÓ¦RÆØo~ý³Ç{¤¹©ñ±ßÿúý÷çqÎþúô“þö õuOýéñ=ÿwŸ}öѳÿük^~Áóß÷ö\]×ù‹‡_ý!D[k 8¸®ëâÀÊ?=ùX$Y¼èóÇ~ÿk³Ù¼rÅÒ‡~tcúóß¹ÿþ»víÚñÙgÿô'F£q6ɘ‹Ë‹3Ÿ½p¸B#ÓŽØ+nqªù¾ ³½S®õL›ÃlÎè€sÛ.¿Ç\µËT³;’äÖz ¥½ž9“„b¦¸¦Joç…à àf‹ìi¤@R@³%„ŒôNºÊ3ã&ÿØK=` !·7B’©‘JHpxõ•5MýÑC?PYQñòKÿþó_þ®ÈÊÅ—\~饳32³–.]2cÆEáH覛n¿ô²Ùiiéï½;ïû÷ý𿯾4hÐä¤ä‚‚Â>z¯°Oß•+–½ýÎG™™Y±S2dØð‘ãÆMܱ}+•$¯×ýê^˜3çæ+fëŠ+¾ué¥lÚX*éׯÿ÷ïûáe—WÝ|Ó5mm­ÙÙ9§ýg>6ùÏŽêe5­á¯v¢AtB€éÁ!\+ß…ø„9ôä,-#϶m¹ ³Úug²>dBâ⹎Õ5ÌeS¸ÿ(¢kT¸¾ÆmNÉï&œu´BƒÃ§8×FÔˆM‘âaáAç;J(-õ‚hA‰ž’‚S-jªÞã DnmÐSµÌBÓ]D× OHõíØ´Hò·[ªv„†Œç¶ªE™Ýé?*ù½¿[·¯ ŸìZ6/f3s$©ùˆ®W2!5Þð§MŠLO¼.ew[0Ý× é1ïHÆzð¥6Ó—{cq¸GÛ?èAÀs(¯#ö×Ótèu7eàÅ0´>bÑxÐLãgä0¦Ñ²$çääp:f³9‰Òñ‘â`¬9¦èo½ùÚªUËÏs¾3!!ü¥ŒŽªÊò‚ü>1P[[›{]ЧϥK8Т俿ÈË+ø>VUÕl¶Ä´>''—qÆ9ojjì[T\º~ ãüÒKg·¶´ôéÓ7--íà‰Ž0, {¼ž‚‚>¬6[Zjz{{»,Ëié™\.—Ãá Ýô3ž4þPt[Dûšx«,!Ù;åZnu€éZN_ÏôMµûgÜj’¢»R¥ /0öb=5”z¦Í1Õ• {BpøTnup_x‹ÒP©§d…ûâV‡0Y0ýÍà`LËî ÎË+¢D²(f‰†uÖ[R¥ãN£%.2ýGK¼78*é׫“MoWB¡„d!¤‡F:%L±åà‹‰“¦>ñøoÒ32'N˜,‡ÃqÞ˜qüãC‡ðxÚci]Ÿ8qê¬Y—Üyû陃 ¹ëžïoݺù¶[çØm6»ÝùÝï=ÐÕÿý xðáG÷«ukWY,Öë¾}Óĉ“¯¼êÚðÝü¼‚윜_þê÷“'_ð·¿>™œœçßY<2+ñ…Ûü_ûÌÓvµíô¬xã•2ýš²ÍDàe­ì žúÌè3Ž?OI]Üß!q€*VŠÏi97È®aT~EXè®~¿þVî½ÝgŒÎt¿Ï—””ì÷ûE±X¬Üîö¤¤dMÓÂáP,dQ]]!òò =wRR2ç|ÇŽ­ÉÉ) .³Ùb2™bÛ»¶\QQÖÒÒ\_˜™• `Ï–” RSì.W"¥”1ø]®D¯×ãt:)•c~Ÿ71)€ßïÛ·o"+EÅýív;€êšª¦††¬¬œÜ¼|••劢dgçú|ÞÄÄ$^¯§¼|JJZAA!€`0ÀnwhooKNNé¾ÀºFïØ—¿øR±:Á?û0[¼S®ëpx©VSºÍ\î FYÜäúÄ!\|ghþ° ×#+÷ø"Ú1;³¨~÷˜~Ï]8üôwtâÎ&À©¬ÎqFC;;XB: <« É‚H½Àá÷i”£ÅÜ^+j»¯K&„Ѐ¿†R"D‡§I) økbñh¯ÇIR P[[KIì#’š’!„ z=º IDATðû>á±í]›µ˜­y¹…Œ‰šêBHBB"@š›"DGmdêóú)¥~Ÿ_tnñûkPJ²2s¸ÛÝímí„@¢JNN±fa6Y„uuu”P¿/k93#G@ÔÖÔB €ö6w죚`M÷…•ACƒ›zšÉ— Šª§ç:×}Ê-ÿØ‹Þ*­¡hk0rh~ÖW4}úbézÝ:BsðD_ï jŒsÐÞ3S7î4ZDäÞ7¨GˆJ„„B÷‹ÏiÝšO*ŸÖÅ‘q]Ðȯ½,ájƒ¯ƒDtžŒÐ£y+BV DÂÊ÷¹Å5=j°™d‡"·GTý˜µ’ ˜FÃnw|4Ò.ŒN¨äk“ÝÍÑü'yÒã>õµ ‹M(_µô‘DˆÜ«fÆF3‚vûi·Šè,#Ó+ÒrA›]„àœ$i W3%‰çR|i¡Z³±içHž$zѵyC *Ü¡§KËÈ—¦„HAŸmûJ5·_´Ï p¸¸¬8󙿼¾bW‹÷èÞ4¥Ö=[¤70zFgÍŠƒCÌGŒ5y虄РO(&¡˜;eú8©%Yi®¶o^ÍëßÙ7|íé¾tê¯Ù™T2וɞfÿ¸ËŽY”ƒ’·w×½½»¶£rio þ4š’Z—|Z•D¦ÝŠÁÓñÚái‚,ÁžŒ`û‘#'Dw«¼@X! 2ýP—ÈTAã»ÌÖ‡ºF|9-¦÷eæÝi“Á©dCkð1±äh‹§ˆÄ_`®ÔöËîb É` YS×þ½Ï·Ôø5`HH$h-ßâ|MÌ&\cÂlgT sÙ I‚D׈® YébB:¶(pݵì¡’óÔ¼þBRÀu Å$d3ç ”0MÈ“(%ÑHÇÜñX·Á9Õ¢¸Ùڱ쀑„Ù Á g‚JD@’…b&jœ “5ÖC@ B„Ùk-–LB5•+fî7"iÑërk½žšsÌû— ¸`]ˆ;PïRBVjS¿2…èœ ™³ `⥸÷uüå*lYp’ã–±kC‘¾‘Ê5婦©K-1©ÓeS µä9ÒÕà Z¤wÖ 8[Q#è*ÄQ<âÐЉÌîbÎN@Pí U»ƒ‡• ë ¥¦¦jpÆ’3,{7X÷n`—©¶,8xU£ÖŠ­Ì™ä¹`(u”~¦4ׂÒÀèjþ@¥®Ü¶} BC'ÑÏR¹Möµú£a5¯¿}ã"ÅÓÂM–À¹³„Ùâ(ýœ Yñ»\È 1Wí²oZ"LfDpH’eßfëîu„ëZN‘ô,páØ²L©ßO@‚ƒÆEû JXö·:åö¢FƒCÆ[j÷™jË#§…O´ˆcÃB¥¹œG ‡O–=ÍÎõŸ3‡Ki¨à¶ï´os«Sw&›«ôŒ‚£Ü}Œ§&Ü?ªïKÛliôôФÄá\p‰‹ºDù@²‚n`àë q`´„€ÔíÆÇO¡iÿ¡ß†wî)o€èlçàG ÈŒû^GZ!´n ÿ2lȵ†”.XÀàAå„Þk38 ÔœbæJ=Rƒ!í›ì”ŽêG"¹›™+5–Ùfª/sQÂÚ…ÉâžùÉÝb®Ý+L–Ðà í—ß-<Ǿy)8·íX)LfÏ…·¨Ù}#ECµ´¼À¨iÑâáÎ Ÿ‚öÙßÓ2 @×͵û„$G^ $ zV¾<ÎsáÍÂd&Ñ0„P³ûxfÜà½àÛ–ý›åöFKÙsÍÏÅwFNs®ÿ„„ƒrÀ#{›}S®åΤ„µ‡Lœ7˱m‰„¬»×+MUž™ßñM¾Ú¶}…¹fŸdsÍn--ÏsÑrÀcÝS If É’¯ýX7žDë´ö¢CÄ¡FS¯EÚšmé.':¶z¬Ý…¬¾Èé„Ã3¨$ ¥ þŽÖê4ÀáBî¤æ’i–MHLÅŒœbdõ=ô‘Í…’‰?éEHÊ„b:õŠ)´‘íÙ–/O¬Ûzƒø!VdñtvAAÚ²9‡¦»Ž²Ä*!DW™Õ"¸ž’­eæ«Y}¹Ý-(aÉ™Zz ú@%¥©:qÉ›–}iØ-í3ÄÔP娏 B±*s‹](fSm™ämw-ûŸÒXE#!™ RhÈD–;ÒR'¨),¬ÎhŸ!±è„œ¥ V¾GÃAš«H$ä\ó¡ußF¢iTB"ƒXbZ4·˜9“õ¬¾jN±‘B^SCe¤h8·'èÉYZf¡Ò\C8×)Ѽþ,%#šS,{[@)·:‰®â¨ ˆ”îmÜðá†ÍM½Æ‰F|Æ:&õwÌÜëOžêp‡d3ïÂä[‘˜ *¡j#»øÐ0tæ<…ÿÜ‹½k@©7aÖ} &;ö­ÂÜÃÛŽü¸ái¬x£¯Ààéà k߯›?C»×ÿ Ü!pÏ+ˆðü-ع _“~‚pl˶îO3ÖŸ5è‚D·µø~¸d{}àhëc !ÌV¥±„v –Ä„žPÎc ¯˜*w8¶,q_t»änrn\Dt-Òo„–Yè\5ß¹æ#ß„Ù@¬{àBV¢ù¢ç€é0™;Z ¤Ã»DH2áŒèš¡Ñ'‘pâ’7æD /NúäE@€-5;8l2´(F\ÀœI±88é(­Cˆ,KA„€`4èY}é܇é‚R¢BÈÞVa±C’:FS»`–iTgᣮMÇÄ € Ô»ä/ЧÞ%d?ˆþ„í ñä%xb&>ùóag€Å‰œXÐð§±j.ž¾/ƒ§á’‚ (ŽkÚxt*>}ÓîÆ˜«! ŸÇG„®â‡ñ·9¨Ù~ÊûAM!Ÿ–8ô£?Óœ­ÒŒÌÛ^Ýä ±#ïεÔlê÷€sF: dwWÓ ×‰à„é4¶Tî A/¥¡‚DÃzb +Âd¶”m¡á@¤h˜µ|«äwS]¢ÃOï2ï‘iéyÂdvl[j:°Û\¶•DB ºÀT»ßÔRK˜)®´Ô˜*ˆ„i ”èZ‡ÊóN#… º I÷b®ØnªÙgÝ·Q û£¹ý Ó³Ÿé A¯æJýòã$øÏ%£~;©èeÉMñèG ŸãœTLó²S6áP²û`æýXù^ûÙaáæ®Ä'2péÃØº< (/Cæc¸þ ¼ÿ(Ô0ÌV¬ž‹·c¨Ý‰©wàœ)Xö2+Ѱ‚£j ÊvÀ|ªÇVÙ6çÙ 'ÚàHL3–)¹i•7´.ޤàzZް:äÆ*=9+Òg0„’.«‹Í.âW4·_4·Ÿ£ô3-=?tÎX¢´Ô›ìäöDÿÈ 5ñi±©v`Ä4A%ÇÆ… R`è$-#?\RÓ¾&|AO$Åc‘˜éT¬Ê#†ÿ s½;Ì?ý â‰'¦ zé’‘¦8[›øô!ØØä™òÆŠ Èq-wÇ"~ýè2Í Ê“ÓÒ~°´uP}ô= FðÊý¸öQ<øÚªÁ9¼ øÍTP ²Òá* ÙBA€e¯"!7ýW4#ìƒ+ý Ÿü M‡Mè¢r‡ïL€êmØün{SnÇ¿nEåŽoú3 ¼7,áµÑ‰:%´·T&7èAa\{Ë_§`÷Rüb4Z« Ñ Þ}«ç"kÌv´U£~$ ¥ÿ7îzÄ l ·ÙŒh¨cÕÄçnF¿ó¡©hªüFý '˜72áÍ‘‰šC  ŽJÖÖ¶AHÒ€gšÍ¼¦¶­ÛJÄà"/Ázÿè"wT}}[ðheOz ½@£(L4&ÈONK¿sMÛ¤²ð ò%d@ |Ê7u´CöF´5v${„|ìíüHuûQ·¿ãðØv-ŠûÄh©@‡À׎ Úÿäàšé›#]ó‡$pzT}>X¨ÏÀàbÂÄøƒç ÏHœþÆÊ@TïEóëN’Ø ‰îi \ùîÚ}í^-Ðè- @âh·IOMI«Hö]»Åc‹ˆ“÷O Ž<–ûÓ/ïÜaб[øòÛE R•çÇ%mγÊì(M$€‚G y„)™œ|O`pfCÉï×ìK±šªJJµcÕí<àââ~™· )¸wᶦ@xg³ï è“zS#qÁ(Þ‘ðȬŒ9fœ©µ)8¢2ù|ã×elεÉǘ¹ª¶ ÷jVöG­ü)MC£ Ž!5žÐ–7Ff&~zíùCÒœ=°Kw£3pOX i¬C×z¿@£ùÑ1¨Ø–cùmJú…»Wn÷%Ù7]á;~à°7Ý4wtâÆ<+åhkj EÍ+¬}³ä#wŽ"Ù‘Œ‚JÇ€€€ ODÝÛˆ2ÃR§{5BXùÞs‹·µøV4­®o_]Ûr挑ö2Ž¡02Ñy#ÖX¯ÝâS²‡¤Þ¬ÔhJ”?èø¼ÄéµJ2ÇJ³’ J"$ „Šê—µÄRêÉZ@$¸j(µÁÑ ¤Â¼wÁVâû£‹r,¿^±'ªs wÞ;ŒÇ摈i…iN³¼°¬”œîóAz¥F#æP3Ô&*OMI-iŠÎØëŸR2k¢÷ùÔhJ?9DZ¢¯½Á¥È\|m-Á:zÖ²ŒËd!DëbÞ¶˜9JhâX’|¾$»HGy2C¬ ºÒŵdf*Å–vZ”€Ú{fF‰Ž5YîU”lUžX»/¬²?Ú諽4ú«é­#6’¶#ËR–fúl sƾÀ¸ªpb#ÞÝj00.eaûŠ"{C‚àx+%qXs¨s(U’:UNž |›yËç¬î5ÞôK™"%£æ JÍàݷ΀Aï…’g7VX)¢3Y–^ºxd?òƒ…[@)tBâ6Â*Kf™z"€L‡yXºË,Ka®·‡¢gLpãz·FÇ01Á(Ù—aÞ›aþ`°6¹<8¢6RÜ•µo–úÖMp@Ào£»3Ìë ¬k ìn;¥ò1—s>&wÉD", S"I½@JžD}[EûJÖü)kšÏ’ÆÓäq’c •¬§zVºÁ!ƒ…ÒžZ€"‘)…™ Á莀x‰Ys. S0þ­AyŒ.šöÆJŸª?ºz/4Fvg‚F ’€š$å?ç%ÍÂòÝÚ¨êð¸ªP¦OW˜h¥±ˆN‰”QȾTóò"ÛîLK­K‰(ÄÄ„|²S Hç4_‹(’x.IE#u³‰·.bîUš9‡¤L”¬c•zY¹/ƒn‡ a=±b7$ Bœ&å™ÃþµµjG“”ôI´7£!ÁßÓêå  Œ_Ô/뢾?^º#ÂøÞvÿ+Û«#ŒÐOÜ­éœ!}‰Câ"`¢Û³,»2ÌóF¸6E‡Ö‡û7«9^-Íωuw_l¼Cu3ê’•:—²+ü)ÏZïR4‰@Â|ªc€B,¹$3GJ›.y7±¶e¬až®Íã ¯_]tíù#FŒ8µg48P:úowXþæÊÆA`‘é²&þmCùŸVï…Dû¥&øU½1îXúݠ׌CÈ„™•4(5á½õaMÏrXŠ“ì6ó•Ö{JëÜgبàWs¦it *@™•Èæ\ki¾Õ¤‹–ëÓòÛ´â6µ¸UM êTt ÙuÌMBá>žk@|éEì@U"5ÉJyš©<ÅT›¤Ô¸”f§ @æ‚ HÝÚÿ ¨)¥¤qR¨œ{7JŸÿoɲ·Ö3úò+®¸øÒKG7Ú`Ð;@­/[§Š Üóù–ýíb•¥/±®Þýð‚­¥©…éQ&V×¶dBtÔ±\€ÒŽ[‰qPÒ±—ú!”J s!®œ××ezCy8ªM-H»f`΢ª–°ªÏÝUóúΚh,PŽ3'©î8935ú ¸8Au²©2Õ$ ³.̺H °·šãÕ²|z¦_wD¹Uãf]˜™PtAº.Þõ’ˆm¡“ I$*“ˆBC õZiƒS©O”ëäÉ&¿…ªÊ„ȦӿlŠ×G*õ‰ÞsçlÛ þûßWñóŸÿñ‰'n¹í¶ /¾¨¸¸øt[eçt* Êø'{ëA)$ª ñ‡uû}Q”˜$úÝ‘}UÆW×´â®á}¥9Z²Cc¼(É> ÅùÅ–°Æ,J¡ËVá ¢ºU‘¤»ƒÑÆ@Ø$KßêŸÝVT6QJÿ4up¡Ëvõûë8GºÍ2*3É$‘0%ßXñÂÖ~U%u5ìlã ×èƒY™€F‰f&~3­L5 V Ãa f ›Æ­·hÂĄ„‰ ÊA…œF‰*‘i–iD!A ˜©Ç*M”DÄê|Á@%(¼§Oà IÎknšsõõ×lذaá‚ÏþóŸÏüíoS¦N¹|ö왳f)òÙr%œK–hï­‡ÓkþËwAˆXÀ!¤3_T'„@`VߌŸŽí?éõUmþ ¹©¯]6êòwÖ®,oÌOq~vݸ¿n(|Ù.Ù$_S’³»Õ¿ ¼‰ñiEc’Õ$@És›+ŸÙX¨Œ2Õ;—œ>[Õ9§kVèNÏú‡7^)ÓS»Dö)ƒpB'€ $ÿ B@€‘Aˆ&tNDì™e*@Å¡)'D úÍZH2.“ãaú_„…î(þåµ…÷ÜR[S3ÿý÷_íµÖ–Ö¾EE7ÜxÃŒY³233{ÐHƒ®¬®mÿÊҸȓM–}l;×z¦^Ç])`::j6QB$ .³â2ËõˆÎD’U˜ìÜÕæ©ºY– mÍÁhs0BI¶št.¼Q q7YXQýî1ýž»pxOÛœ=~ô×ÓÙ.“U]è³ónq*IoxFçêWU0"`ÔþGoYÄ%;¨iÓeE!sóòî½ï¾[o»í£>šÿîû¿ùå¯þüÔSsn¸aÆÌ™ÃqEƒƒPɼsÒ¢×%_QÃî‹oçö„®Ÿs!xçŠ£Þˆê « î°¶¦¶ L,©ñ…_ØR›Ÿ-€¶ØšU1ïX¢‡Ê“ʼn@ÇqÐK÷@A)¡_〣æEÝ¿“[2‰) óXëRFâ5íÍf·_{Ýu¯¼þß?ýäºë¿ýê^™sÝõ×~ëêÞŸzÚ:ƒžF’ÍÛ¿x“YÜb§‘`Ò§/5rdðáÐH{—d‚Ø !%TŽÍÏ>x!gyøâ„0üèãB"òüÚc¯¿Ê‰  #hò$Z÷ºnë+9‡só)$²,Ÿ3hÐ9ƒÝó½ï¾ûÎ;óçÏà¾ûróòn¼éÆÉS§8°§ 4è!g‰é¾ ³‰¦&~ñ–ç‚9Ч T:¡²y¿\±«û <0üèãE@ñõZ+’'PÇ@"t€#uªdïKzK%ÈÄÄÄÛî¸ãíwÞ™ûö[çŸ?öÉ?üñÚ«¾u×w|±x‰®i_üÑëÖ®Öuý´|œ28ד2Âæ€Rp¦'e„†LôŸ …8K¡žF >.˜`S2f_œû‰H_›¨!t @ Ç!ìñ…Ùl>ÿüóÿð§?-_µòö»îÜ·wß·ÝvÉ…½9wn]]݉¶VZºö—¿xøñÇ~ýáïu‡µÝ‹à`Z—×'¼öówGö¹j@Î)¶êlˆu<×VœhJ%gM¯FÉÎÉyà?¸ýŽ;Ö®^=ÿý÷ú㟤g¤Ož2õÊ«®7~üq¶3÷µW²²sÆŽPا履|¸¡tí„IS§NÞ­ÆÄÃÒ«¼¡ž¶¢chôq!åÕÏ]hgÛ²T‡cúÌ™S¦N½÷¾û_{õÕ?úèÃùó‡ zËm·?.))é+ŽÝ¾}KEeùK/ÏÍÏ/|é¥ç׬^yã·|ðÁ»Mõ×û;§í+ô ±ƒ±ŽoÀÙâ~s‚ºÏ¯{zÚŠCV”%}ü±Ï/zèá‡Õhôž;ï¼îêkþýüó•Ç:êí·æ>2?¿°©±áùgŸINJ6[,3f\ôÅ’EvïÞùÖ[¯m(]w¿‡ÁéÆVCÑŽÄÐèã‚ >,iü˜Ô™”Оž8ØÃ¤§§ßq÷]oÌ{ûï½7°¤äøã•W̾ëöÛׯ[‰Dºî©išªª7Þt€­[7÷-*¾áÆ[V­\ö¿ÿ%-=cù²/|à»åeÿ}õ¥_xvû¶-œs!„1´x†qq¿¬ósSzÚŠ^Œë8.¸Ð'¤]šlIßê^¥sœõÙ6›í¼±cÎ;¦¦æÇ¯¿öÚ¢ ®ºböÈQ#çÜpãÄÉ“rrr(Šòø¦”ÈÏ/ôû}É©©?zèç×]wc»»ýÑßþâÞû~pÙeWù|ÞÓÆ×ÕÕö}ñÅg¯»îÆìlcˆéLAˆÛ‡îwÖÖ·‹ø™FØ«0üèãB¢Ê¼ê¼°ÿwŒk”?Ú!òòò~ú³Ÿ½óî»ÿ~ñÅÔÔÔŸ<üðÕW^ùã‡Þ±}»"&ЖœsóÍw<øÀ=xâ·f‹Åáp44Ö;!Äf³]~ùU[·nþü³mV+€M›J++B1è5ò£%Ûÿº¡\Àè“ěむ4„Ô„ÊÎò@DZHLJºè’‹ÿõâ‹ /šzÁË—.½ìâKn¸þÛ‹,hkk‹ís͵sþú·çGŸ;V–e“Éd³Ú[Zš¸¯ý÷嬬œá#Fý÷Õfμ(1)YU£O<þÈ®Û{öKœªÚü F^Ç7ÀˆuBˆ"Ç …š*ƒ»¹à'šÚ󼿅`£¡]¨cŸò./ÐÎe\È¡Ck­Ëá @—ÆO3²,8ð±'žhnjZ¾lÙ;oÏ»å;7÷ë7}Æôë¿ýíâ~ý²³s³³s$$¸î¼ë{}úÉ´´ŒO>™ÿÈoÿP[[]UYñÐÃÿ`íšUáPxê3‚ÁàÛo½ÞÜÜtÑÅ— nzBcS©:«0s©sK—ËèЧ üȪͱ !‡ŽE—i&›:ìÒ.t¡_š{K²9ã;ïòÈñÇ£ %š—µ,Ž@€«"ë [늈§&'ÐÌK­Ö\ɳImY5%’ì«l²ƒ6|ìÑ@‘:Ù’tž9T¥µ,‰äͱKVZ7/hÍ•-¹Rûª(ׄ9•¦L²4}ì×A³Ý”L?«tÅE3¯°šS¥žrúÓ32®¾öÚ‹/¹dË–-ÿ}åÕ7ç¾1÷µ×'Nžtëí·2Än·K’tõ5ß>ÜÄ•+––®[3}ú…[·nRU-%%5¿ùæk—^6Ûl6}ÿÞ;³²rÆŸôÏüåÖ[ï3v\Ï|ŸG’•ú2SõvÉÛªæãXûžäkÕSr‚ç]&(µm^h®ÛÍy! ùlë?”=z­u IDATÜ–u‘žÑDZâM5³H->Wn©¶ìXwµR»Gn­Qš*C#g1gнô#ÙÝ ¥ÇÌ–[jlÛ—h8ÒLdàØo:EPˆ_O¸¯=ðÓ¥;xôÉaÄ:Ž ‰H_4¾÷Qí+Lœà€!àðlTCÕzò8sÛšH°\ï{¿ÓV(7|Ž6ñ¦ÿgï¼ã´¨®ÿν3óôg{ß…–Þ‘^UDŠ‚]ÑØ[ŠI¾&šÄŸIŒÆD£‰ÆX°+‚JQQºH¤H‡eé[X¶ï>}fî=¿?žÝ¥Y–"[˜÷k_¼žgŸ;wî,w>Ï™sÏ=çóPÊ({ÊXw`éòpÍ6=ëfWÒ%ö‚÷Á†S`¿ `<,ôr! *_aòö²Í ˜™×;3¯qª1ìèÂá§¶?÷ª±¬è£`£»Í.×à!Cþûòÿæ~úÉM7ß¼'wÏU'ÝqÛÏ>þðÃ’’ÈÈÈܺõÛÑcÇ9Ž®]»÷ìÙûÉ¿ý¿gŸyrÃúuãÇO\³fåÚµ«<wVVV÷n=—.]hÆŒ/½øÂ¿ŠŠ  ¤ä躵kù"ψ"âÜ´H¸bõ´vž•ï oBõ¸{Y Ê±kµRzØ–¿³føõ‘¶}€¤kÕ,@¨{·ðÄ{–¿zX)-à¾J` zô±PkÓzFáIð.™!mߥÓÃ]†1¥{íÇÁž#k.¾Ñ¹y‘Zràl“!þgãþs‹,ôÓØ÷q3!ÛZµú›²Ågæè éSœÞ.jåzCFèè§¡P¾.$ÉžÊ. IcÕúH⻳•7ÀfÏä•u¦`½ÔFŸ\‘i,ó—-Um0R¯p¸sTgj¶¦Oý$)á|!uj"wENNÎï}ä£9ÏxóM úío~sÅØËûЯ7nÜ %Mv=x<Þ§ž~îÖ[ïìÒ¥Û„+'gfµZµò«[n¹}Рao¾ùÚœ9³ZµÎ~çíëÖ®IHLœ=ë½¹s>¼ùÆ«ßy{†®ë}}ç›è?¥Ð s™¿Òµá3 (%‡ÉæBSwn[F7‹µ#yáî—Hw|°Ï8 ù”âýÄ•Z`Ý 0R²C}ÇóêRî¯ öoƧ›I­•²Ã¼ªÄvp›s×*4#Ji>œõWýÒ½ÅëóËβ“ Ë×Ñ  Á–Ê€Õ§ýìGÀ4d*J@3[õtQɤÄhK`Y7»K¾xÉ—}‡’" A$  dˆZŸafCT@ ˜ II Dàj§¸Ú*îö ³#0lR œñ cÆŽ3vÌ·7}ðÁ+W¬xïÝwÇŒ³{g®×k·Û»tíÞ¥k÷I“§@»œöË—-ºûžŸ4dßÞ=IÉ)_|ñ™i˜“&MU¾uëæ£%G“’’׬YyñÅ#ûâ~zˆÈîF"0t⊞ÙT›žÑA¸ãD|zÕØ{Üëæz¿xÉ7âF hQm BGbÑㄲ6•ŒtxA˜hê¤j¤hÑEfèÒiÝ M=’ÑQÄ¥ž½K:)ÆaªŠœaN. ËŽnBS[ß{û?q¦ÉÓµdÖNõ˜^j`Ÿ©x™£•bKáÒ€ÈQ?ئz™ŒPÜE¶²¯Â‘bQµQ׊ØÞšÇŒY±.R½E÷å€u%e ˜ =•£Ÿ†ÂEf¤T og5°×T¼ÜÑZÕ’x“áî}QŸ'ÿþÔ‡s>~öùçJJJïøÙϦLœô¿?ŸŸ|³ &ef¶ºmúuo¾ñjFF–Ûí™6íúÔ´ô—þûçÊêU+ üŸ_ëÖ­Gc]Èy…M¤ñ©f|ºV˜kƧ›ñÒǂՀê~1Óä¨fJ¶c×* ù[–Jg¬™’-b’ìû6òâ½öÝkY8X—‰¤‘Ò\›¾`j^]b¤¶!^]f$·‘Þ$²{ÎÞýìÈî¿èסñ«5Søc=v~ÎT.\|äÖdÓÝÿÅ]9rÀ¿‹€~ÄÝ@Ê—I-ãp†ÈQáé¢*t¶Qô2Y²(\õ®¸¹–À‹æ+ÖD<]Õ¸¾š3[Ñ+dÉÂp(ßLŸäôtT¹ŠŠË–‡E\mG׸Q.czªLAw{Å—'J—…}; og5¦»}úí]ºts:]ÑW¯^‘·'×ép2ÎUµ‰–dk8ù5¡[Ö¦ÌG†‘‹õ¬Î hFJ[Û¡mŽ+l·™É­1t¯ùP-Úê:ÂÌìd¤¶µÚæØö% ú‡L#gŒ—¦î±Øb&dˆØ#½=‹ÈHošÝHζïùƱc% VGÚö1ãÓÛ–;v¯QÊòõ¬. ¨Àõè!ûþ­þ‹FªÞe º55¯ÒŸWh"ž·!dßÌ„+ršDé8«žaC1É "•5`Ž"Hr5\9,û~EêÀT”Fmh5ªHEƒ$9’$dH&Õ~jRmt]´2€ "I" LE©Gû¦ Ô©¶ÚSPÖw~\®Së65öæå­øòËYÌÚ¹}{ï>Ÿ0~ÊUW%%'×7ؼyÓÇ}øïºûP(ø§?<üÆ[ÄÆËètݵ“B¡`NN‡Ûo¿·Sç.DÔ¬·ƒž\Ï0^›&˜f¸ Dѧ«ÚÅ=)j?:p ¤¨ ‹†Ü1€ ` Õ&öíMJ`ÈÀÔAÑjhvç–±‹ß9rÇ“ätŸ¶e}\ñÃfƒUϰ9bçN4äé¯PÔJjôQ»”ÕP2 ¢]ÿéñòJ¢ ê»8ÖÕz¥j$å‰7#rÚ·ÏißþêiÓÖ¬^ýÆŒ×ÿõ̳/þç…ÉWM™víµ;väœ÷êÕ§K—nB‡Ã±oß^S˜k×®;v|ôðÍ›7ä?õôs99í<ø›‡Ð ý²Ë.7þÊú½ŽÍ’µbD `¼Ö¹õó#ú)²ò>Gã*ê³?GÖÇ÷\ß›$ ŒŸAªèïĦ)D Ëæ–F½ÉÐ"¦ïO s|Æ-×fÿœ£r¶Ò‰¾9:åÓSÛŸVoÍÖñsù¸q|8{Æ›oŒ¹|ìü¹óÆû›‡Z´p¡ßï×4Íáp@»v9?þ”Ãn¯?pÖÌw/¾dÔ ACÃáð#¿hàà¡¿ý¿GgÏ~ï›u_€0MÙò4â‡íÙïøôtÚŸ»Çë?éxkV窷 ËŽn(‚LSM4È3zC5É¡ƒ4xpaaáʯ¾zù¥ÿ}2o~jZêä)S¦]sMfVô¹¨_}ãüüÃëׯ}áÅ×`îÜ`Íê¯Ðåtåæîr¹\O=ù8W”{ïýÅ€ƒ…0Y 1®Ï-µ[Ï1A¦l¶VCÀš© ‚£òIÁëï|VœQަ"r`F=Å̆Ìv,ð™©Èlˆ 2µ¶*Çȳ!ÓêÞ2`2 ‘ƒQñ‚ˆ*L;¡ófMFFƵ×]·hé’ÿ½òJî=ßxmƈaÃyø÷_¯YcšÇžÄÃÛ︯MÛvPèši7üéOO”——–”qÒ¤‰“&&$&fdd]sí ÑÆ#Gyî_O4äŽ;ï»é¦ÛìÇø+&͘ñ¿k®½iêÔë—/_²rå—÷?ðKزySll\ëì6}43oOîߟ~¾Q¯òa\)ËWJñš23¹u$»‡ó›ùjéa=£c¨ÛPT5—cÇWdsÉÙî<ĵn~¸}?‘¡å©G÷‡º^ ›—hE{Ì„Œ`ÏQ¤ÙÕC[»×š‰Y‘VÝâ•GÕ²‚@ßñJåûî5¤Úý¯$Íþcƒk-è ïüÓ"Ì­ŸAbdêÕWfÞÖš³Çƒ€PµÉ(š´¥r½TͦŒµ{ºª3ƒ†_–, ×ì0/±… Dñ'! P¡Y³ËŒNëÊõºQ)kvêG¿¥Mt8²”ü÷F•,štfòø6¦¡»ƒ¢Å3o/Õž¦~D†Ø¸“µ}>ö:Üy÷]˾üò™=k³iê©áC†>ñ׿Fó FÛŒ=îî»|êÉ?ÿûßÿRäç=f\½ŸîRÊys?š2eª×cšæO<–——kÆgŸÌ»âŠÉ°{÷Î&ºk ÕxV}À|eflŠ{õ,4"¾!Wk…»í{Ö±êRÏŠwÌäl=³‹kÝ|íÐ6@´å}ÂÕÀU^uÔv` pîÚø¹RQàr5 T¹¿™Ç‚5žµsém¥+ÖHÎ6ãÓ"mû îU³"­{DZw<Û ìÛvj'+!ø™cÙÑ ‚@¦:ZŨ §[s–rˆë¯¥Œs¼ã3ƒÒ¿Ï4ý:`öU#éS]1=5g¶Z³Ývü~]ˆzHÊ×DÈ š†é“¡")Š «wÞªÇY¤x˜§“ªÆ1Å…þ]F\?͖Ĩ…Ö'rº\'Ož8yòæÍß.]¼ôÝ·ßšñÊ«ƒž8iÒø û„+'?¡¼¼ÿ÷Ò¿ãã<кM›ªªÊ­[6Ýwÿ/`Å—K~ß¡Ã~ñ™¢(iéé<òëþøÒëšvnžñÏ5(nÿ°ëÐÛöo·ïg?¸ ¥Ðòw²p@Ä¥{ŽÍ¡ÉcÁÆë|H\ÁHж“‘ÜÖ~` “ïÇî—¢V˜èwÙœ".#A#³êAâªíжÀ É¤9ê÷%ž1<6¥¹îŠh XvtƒPPýðЋ3öþõŒkΪ‰œL2 Å2Å…Z,f\çTb˜ˆw!Ibj­€Yã  ü¤Æ2Å ¶–qµÓ–Ä3¯sÙÓøÞç|ý&ã$ ʘêŒëgÛÿ¢¿rƒÞ2\Ò?@¯^½úͯ-[ö§Ç;Z\üÈÃ_vÉ%/<ÿïûp®$'§¸\®|(!!aàà¡?ÿÅoËÊÊ‘ˆÍf…‚ï¼5c䨱‡söì÷F—ݺ͖͛öïÏûø£û²¾"éŽÆY8D›$U-ܦg°ÛÅ,T#]1À‚TG]îZ"`š0u›(5»žÖ.0`¢ð&ÖŒ¾“W—Æ,xC¾Ú˜M)Hµ×Œ½ cæý‹W—žmN%€_/ÛþïûÎúú/\,;º¡„D8žÑ_Œ³-æ›îŽš–ÀdD‚D-‰UoÒ]ÙJõè–ˆ %qÿ‚pøˆ!Š”$p¶SyfLOMñ0` #”y3R,‚ù¦·›*t)‚D¤©¡BáßmÄ]Ô4íÁsLbbâM7ßríµ×}ñÅÂùsç>÷¯½øâ‹S¯™6f̘¦¤¤Þ2ýŽhËÌ̬Aƒ†ü÷…g.÷öÛþúä37|s´¸xâÄ«ËÊË€àŸÏ¼¨(Ê×_¯Z¶táE}^vÙXΛ’(%H!b’¤;ÆDŸÓŒ°ßõõVu”ì-‡ð$ãRs¨EyfJ[µpÓÃÒ#bSÁáö€+`ê ¥pÆÔŒ¼%˜¯‚4;÷•£©¢´9}ß?ë/¼òˆˆI<ËQuj7LZœ>–F7I²OüÅîü¦|‰ qº¦´âeÌŽ$(~ =rTîýg5³£»ƒš>Å™9ÕuèuÍŽjg+Eq1äÉQì©lï35Þîš³•"MHm/¨îyÚÇTðtQSÇ9 ÞèRgÞ.ªâa1ݵC3|Ó\¾]F`¯É4̘æl † DÕ´ WN˜på„û÷ñù篿6ãýwßkÛ¶í7Ýtù¸ËãÀét>ùÔ¿öïß»gOnLLLZZúߟúó€ƒRRRÿù¿å´ï0pÐ’’’;o¿ñÆ›nݸa]zzz½ûÊ¢qE:½€H6‡oÈ4Ïš»VWýƒ¯ÒÛöV wÇ.xAÄ$KÕF\ƃ}ÆxWÎT s¥'ÑŒK$ÿà«=«>°}üwâ<Ôu„™Òƽzšz¤uŸN6§sóbïÂÿùNvmZÈ‚ÕFJ[#µœuØÜ¤Žiaã«üòsò‡¸±4ºAH2&ŽŽ·%o¨øòôj΄6w¹€ ‡ô«œ)c2BЇ!‚=ƒ·Ø+C„ ú󪉀ÙX»û=¦Ÿ7«ÝCˆu“ˬ‘$Aq!rlu³[èRqÔ6ȼÎeú$w¢;G!É ù±}dmÚ¶½ç¾ûn¹õÖOçÏŸ;gîÿð‡=ó̵×_wéÈ‘½ûôQUµcÇÎ;v€ÒÒ’ƒöÿõ‰D"‘•+¿|è׿Eá‡Ãë‰yäÑÇ›P4ž0´œê´!ÌÔv•“bÁjRm¤:€¤è5ö“ætmøŒW—I½MÏòÔvĨv—VuŃ,XML!›k.»H’æ 銫šø+0u²9j.¹ 9Ü@p¶¢ˆnìÖ*¯"°2¿ÜÊñfXÝ 8Sgú7GålkÎw"wÖ­˜0ŽÌ‹"XàL€¨xñØŽA P<¬ö5* ¨ìøЇE_×¾h2òÒ(8Îi×^{ÕÔ©Û·m›7gîŒW_{õåWz÷é}Ýõ7Œ¼l”Óé¯7æÏü';»­®G8c{óöôë70>>á·ÿáÿýé÷íÚwh×.§±¯ã{ ˆÒW«¡D@vwí:a4€ZJ²»NØ.H¤+ v!©¶ÚàÐ诸\ à )ê¹Ùjˆø‹%Ût!­ÿgŒ¥Ñ K¤±s.zêä—ÀmØænËHÐw·ùá-ãô=¿¿€áœ÷ìÕ«g¯^÷ÿüÁysç~8kö/|0-=ýæé·Œ9ª]N»œœ (Ê_ŸøÇ¦Më-ü¬´´¤oßB˜G‹4]Žrêîm!B]G€4ÁÔ¿£Áwõ}ÓèÜ=CTú±™åTjJX¸AD9ž]bú#âOUÁ–̙ڴó· âãão½í¶9óç½õî;ƒ‡ yúɧ¦Lœxï]w¯Z¹2šÇ£Sç®×ß0ý’KG+Šúúë/Ož<í¢¾ý~´Û¦I§Gºãў=}3:%Ç4ö(š1–Ý L2ÇeÜoK>Ýš³§Gº³Z š¦ :tð!÷?pÿïÏœ;gÎâŋڵ˙~ë­_zIjjªÇã¹eúíWO½Öår7ö`Ï”¦¤ÎDî˜kÕœ= ,nù§…o¨¨šÒhÖY‰-±UëÖ¿yøÿî}àþ_~ùùg yøw±ñq£.»lÊUW 8  tñ±U»ƒ¦°üÑgŒ¥Ñ?Ž$ÁçÕl•iÍ·”ŒÅñ¸\®qãÇ_6zôÝ÷Þóþ{ïÍ›3÷Óùó»õèq×]wõíßÏëõ6ö›?D°¹°1+Dṵ́üÑ?˜4vrÖ©ŽVÉöŒÉ¯È˜~Ú% -š*ªªvíÖí/O<±ì«÷Þ_(¸ùƧLœôÚ+¯ìßgíŽ;sà¦î­oêÖ*-Æ™àvÜÑ»Í-Ý[}´õˆeGÿ’ˆHNjuLjÔI`K›}è…ŸjÙТñHJJºï¦ßvÛ¦ gÏšõä{áßÿ0pàôÛnësQŸP ñ|#ÉÆð©Kº¬2ÄLýW˶å“>},þ8òÕ¥ $ˆßu{IcöWóŸ›ÿ*·Ü-—Ë5lÄð¡Ã‡ý:ÿ·ï¾ý΢…_L2¥WŸÞ·ÞvÛÀÓÒÓ{€Íbøê·ì þ²žÓ¼û‹oßÝ–oEà–Fÿ8³­+[ü·í÷$ÙÒ?/zÛZ3lñ b«V­~÷Èïï½ïÞÕ«WÏž5ûç÷=™•1|ÄÅ7Ütc÷={€ÍÎþ³a_EXæ¼Ü#–?ṵ́4ºA(¨®+[Ä€#â&ë`ê±’¯L2›_X‹(1±±ãÆuÙe»wï~÷­·—,^üчöëßïgwÜÙç¢>qqq?ÞEs‡1PÔ^§“b›á{Û¢%ÐgŒ¥Ñ EÁ†y$*V Å ¨p(ÿJªqàjˬUÆæ‹¦i=zôèñ§ËJK—-]6wo¸¡CÇ—?iò¤;6ö2S*Žª¥DŒóªRõÀöp‡ÞÄÔÓæ·JGžÖŸïCUëåáW…QþâÐËFè0Yæ–AbRÒ´k¯yùÕWgüq‡f¼öÚU“§ÜuûÖ¯ƒ=ºŸdJe‰wåG®o¿D ¸å3;Ö€Ö²ßùÄ(ÇŒA‚êRÆ™RuåLL2 Yû”'IšdÖGwæÁ²¦+¶4ŒQø$å ùåëhI¸ÝîÁCÿïÕWçΟ͵×îÝ›wåø+n>ýã>*))iìÑS„nÛ½fÐJU @ˆêQ7ÍùÝ»åq÷ÇÂì„Q÷Id…ß.¨F Q?§*H@ *Ýb¤Ø[›ÜꮡÉ@9*uÚõÙ¿°1‡)6î.§Ltr·$ÉÙ˜#º±…€t¡3µ¹OMÆÒ§ñÔÉʱÌb-‹N;=úÇ?Ìþøã×Þxúù/&]qÅÿð‡ÜÜ\yÖ%¦š $C݆Uº!Ô®WÅw˜q)PW‘”¨—™À©òKÚ$¥ºm@dWØï‡v›“­s¿œŸõn£0RöOŸÔ1Ý¡p R:΢+ðD d“ÛÈÞ4¸@5ZA%NKRQd&Û3~Þùbú2]JÌíÿÔ7áRIÚzºf8Ú%Ù32ÝíÑ$£“·÷ä¬;]Š7"C½}ž¾hN{ww“Lst޹(†'2'e? $] DV,u '>>þòqãÞùþœOæ:lá‚ÏG_ré}wß»dñ⪪ªÆݹ@˜¡Ž}˯¼GÄ&kHI.G!»$zÞwQ×D/‘åq¼zyŸ!™ IAì——ãŒÝ>ÎÝ&Ö…@ é²6ÉömçPâ–î­WÜ0¬Cœ „ôÚÔ¾ñ1öºÊAÒZ½9ì±ÇÎÏ™JÃ…‹|Ј©±nuÙz¸!÷tüKAp_Qð€W‹ïäé³?°³,\$ÉÜ]óí~ÿöhe¬­•krk6 2ò<ßæ åË#"ÌQ) lªøª,r„82ØY³!`TfºÚ?Ñûƒ½¾-‡ýyšbïÛ?l""Œˆ’4 &ä'Â$£Oüˆ®±å수š–vÙ˜1cÇ]Þ±S§/—/ù¥ÿ-_º¬´´$+++&æ´¿åׄfl9ØÂ!0Zh™10ÅÄéO]ÒmUAye œäv\”ûMQeI04åŠÃe[Kk‚¦4$}¾¿dcq¥Iˆ_æ—}•_® ˆ{*ý‹”"ÈMsuAy(bj•¸`êàûÕ„Ü6ePFbEH×…Dtö5O!ûf&\‘“z¾Ïû]´p$ áL‘$ºÇ þm×ÿäù6—†‹lŠSc¶<ß¿YMËËÂEˆ(@”†‹‚ÂMä¯Ë° Ú$J‚LCꈈˆa¨2Ê€#÷Õ;ª×…D€#™þ=5›ó|[#"äVcÿÒë½²pažo CgKÒ”TÅÒèóFLLL·îÝ'_5eè°¡‡úôÓOߘñúþ}û¥¡‘T¬Ñ’À”ÀHººSæ+—÷^z°´*±kŠÂpmQeÀ”eaýóýG"€h *ªMÕÓˆ)Ì:m5…4¥D@ DÌŠ`„ᑚК‚ŠÀXYH_{¤âÛâj]ÈìXç‚iC6Wî+÷÷=lžw¶¥Ñ?5„€’d†£ÍU­ï) î 8¸kgÕú° úÌÊ­UküfuT‹ë¥9òúJ+QE®ÿèØkd yÔ(FD† P‚( Ðe˜!#¹5›÷ø¶„„?ÕÑú‘n/›ÙU³‰#—$g}±4ú<£iZ«Ö­'Lœ8z̘´´´åK—ýû¹çÖ­ý¦ºª*33ÓíþñÔz£ÑÑ­ÚD=Scîë—³¡¸Z‚!ªWå—‡„,ö‡W* ÕßcÚ‰ ¼øý¯Ù)¿GÐ¥ÜWá׉1"hMaù¦£UaStOŽ;eÀ–’šüÊ /›º)it ôGIÙ€@:÷ÈÔ«l©X)|çÀ?J"… 9SP­WÉs(—¼N»uù¶bEE¤˜£¡¯K¿(å# Wï—p©W·Õ999wÜu×ÌÙ³_~m†aÿxúãÆ^þØÿ¸'7׬3[If IDAT[|k*Ù£ؤLqÙoîÖ*É©ÀöÒêÇ¿ÚUÔkUõ'ÚÏ]§Ýþˆñåþ£•!U†õÙ¹…e¡¤yì£Û¥x5åB»oZ˜F“ 3ΖrÇ'{Æ €üàÞÖÍómŽJ'CÎñëжU}€)ö̇º<×ÁÛK’$ëcû,Z0 ‰ ã¯?ÿ³Oß|ûí‘£F~2oþe—Žüõ/µtÉ’P(ÔØ£IÝ“c^×§oZ,®*(ï1céþ¨õÕåófÑ#‚ |¡?¯Ü[î¢nIÞw'ôí”àŽ†‹\81|-gŸ!qä‚„$S—º$€†Œè2òSØË§"rP˜z8÷Ç-7òç"°lWÇÖîN«J>£ ³ˆ÷…Ç Áƒ ”8åʯ^{ù•ùóæµm×n•W^=ujFfF£tAaS "@šHŠºèwƒÂ¿.¬óÁšÍ%Õ€Ð?=>Ö®.9Pr!Ü6-ÄŽ–$'eÝy}ö¯8*Uzù ¹o­ZÑG^=ºc `D†r«¿5H þ‰£¦eß«%Jdí¿`Èj•uý 7,\ºä•¯µjÝúÕ—_1lØïÿïáuk׆q>GÂþ2¼óí=Z3ÀÜòš[lú¶¸ºv÷vºoücSQ…$BÄë»dþf@{—¦ÔÚÔ-šæmG$]âS™ ˆ,Z´µIIóñ  ÂTdŸ½ûuÙ•z ‹·§øôJ“Îë-jш(Š2rÔ¨‘£FíÞ½û«å_¾þúŒ÷ß{¯wŸ>WNœ8uêÕ\Q€ñè Þ¹?7dÀÐÆ9«]ó®]Ák¢ G ‚¿}½GS˜O71Ýc?ꈖ«ÔHçëÚvT}ó›“kåé\@@ ª¼½òƒ{}FeÔÝ,Èl²ê|*’¤€I¶ôÇz¾õiÁŸ¾¥2íÇž7ïÝ™3§L›¶mÙç‰3ŸJ˜ÿ¢sëW¨G€)€ìÜX¹RvˆwÍœØÿâVI e³Ü Ë0úSÔŸY¿wcqp­“ÎÏ3hPdwÍ·>£BeZ¶«3Éà9ü¾±â£›iéiÆË8âõüˆóðNGîçîõhêÂCv'(œÍÒ…)€±êˆXw¤â›âª°Íó¦Äan(¬¨‰˜šÊ{¦ÄM1ÏÅYñÑg CÖ5¶¢-Íú¶ª¯+õ’æe>Ÿ ‹Vwr÷o»½0$i¼–cú‚&>9Mï9¼ä†GªFßl$¦{Ö}–ôîßbV|¨åï)+g°›CãlD›äX‡6Í/–V…ôf~ß@m\ BºÛþéÔA£Û$h)Ù¬êh~k†’d‚-õ—Ÿý´àù3Î[¼óyƒÂÿß= TP&ÕkìAY4R ¸êÜ?Ô¾RQäÈÛäںʹ}µŸè6$”Ó‹œ^@)ä­–²S’wæ¤þ,Úòá®Â¦ äœXˆÜüÉÆme5ÀÙùÛŽx^h~Ç•GŽ>½ãþJ½”5Ïç€@’Ø\±™‹»ƒÂ‡-î-NÓD31Ó—˜áï=Ò™»Þ±gcìŠÙÞ¯? vÊée$gW@Ôm†BdpjrTÆv”ù®þxÝŽr_K’°(aS,9p4š™ÁÎYÈ-曟FG=ïõmCDl‰f&GE’¸4õªaÉžßýÛòH±U†üB‡(Z“4G ÷¥nCµ£‡ì{6º¶,wm^Ikì>4’Ý•T 2_…R~ÄÈlOÇÝѵA´:¿¼‰í8w0D¿ê—Ó5ÉûóÅ[}£eÈtsÒ8“Œ.1}ïõv¢=½>cb „•GŽ˜d´„YfqÎ 0 `LÏh_3âê£7ÿ±¦ÿ势2þóÉoÿÙ½a¯)SËÄ/z‹ù«Ž)”;¤ÍŸ:(ή¶X®cO…¿Ø6[P¸ts²£ò€é;ìß+¥Ù²çC¶³jý¶ª¯9ðf¬bñBÂéŠ ôèu±=}ï·ž¯?õ¬_ÎÌa:v­óšPëa¬4ÙSá7%5òlBvzA)§Ý?Ùsä“Ü¢–ämoN€ûý;^Þû'lyžè“`Èh5jŒòýÐ`q¦0AQÃí{…³;ûûŽvìúƽy Ô8w¯ôEª]N\_¾º°â|±c{µ1ä·ì ·í¬¾;D mù¹‘6]‰ŸÎÆ7† Y¢C3¤¬ é-ÀÝÑlî|Ò˜ÖDŒÊÓuƒŸÛœ€$É»Ûÿù¾3¥•Ïâû!CäfL¢tº…Ãc&¤FÚtCÓˆÞ/šÂ¿§¤&Ö–'ª}‡'*ZôíqÛŽ}z\³“Ž:î-óU¡Q§’Œó@{ãB4Ázƺ“2ÆC>φE¨G¾+õñ‡Ÿ8aö¤þÞÌ–‡×lìh]†ïÈùSŒÿôÎð\m¸jÈ€¨n’#Èøó„;‡3{ŠÉ"Hü{„«-ãNlø>(” ¾*™þs¸Þ¢ÅBˆÜ_¸hT¸mwáM)€$ùÖ•ýŠü¡_-ÚÊñ,¡©ãLH›ç* N/0€hê,ä—6' cˆÂ ÕhD€1RT àþj.oT(Y8€¦!í. b–Í ö¾DOkK¼Ng)¹¯’T›´»€$š:qÎ"aRm¤¨,P”)¨ßZÉB©ÙAQ1d‘ t¸H³ƒi¢„”vWÁº —68PÞÛ›‡Fж’p߬’ œ×?½é#àÈÈÀôÑ‘D›˜æøqÍE #³Dë;™â:½¤ •¯K?' –nñ“AP3dRmÖº¨'š€),·ÂWÒOlŒhèžu P¡Õî²Üaß·HšIY¾þc0ˆýê#¨2ãR¹¿2ÐmˆpÅx6.®}3hvï—³”VÁ.ƒ\[Wh…y ¥žÙ>Ðû­ ϵå+bè9ÂV¸×žŸËL3ÐcX¸}mâ 4 ÷¦¥jy!Ó#5C'é9îõ 1äçjßÀ+Ô’CŽ=›€¤t¸k†_]ûøÉ¹së*µäPͰ«xåQ÷¦¥`ê h5C&²HȽn’4ÒüC&©»8x{>´ ¯tóðu CöááßÜ÷”‚'•ÑE2ƒ4@†k‹ZÛ2RûiTR-BDó6#©ƒŒÔ‚@dH™Pø¾ðm—'Ë1ÖvH$È’€È®Õôc°º H‚ ˆf´‰þœšóŽ£¢1{ _‰·8—D7¿DAZ¾ã?ëòN0¢€¡ZQÌôˆoð•JU‰kˊꋯ®¾xšvx§V´Ïýí—P1áîPÇ>Ji3 &÷W#²@ C-ÚkÛ·¥zÄÔšáSœ»Ö)%Îk͸äª1ÓͤÌ`—Azb†oÀØp»µu¾01I•ãïåôò¬ž‘˜†­pŸoЬñlX\=üªÊ+ïEs³€ˆ1ÛmöC;}G“Íî]=/’Ù¾jÜϤÃåÚ²í‡wE²:{]æ _BÈQUZ„B7;jK2åÔÕ % LÓF%¥]ÍJ(],ÈgL™ Aчfp¯´g ÔÁÛ“¹rXÑ,3kº¢Æ`É"!uHÇ+¿‘•_ ÒÁÓ“Æ(áb*ùÄ!HÉ#%T±Z„Kä #޽l…å“PêD%¦+[(ô22Ê)i,'Ž.0¥Žjf\­LƒÀnY²Dd\¯ Bñ<¡—w@êDEqCÑ,"‡V·)²n²I9Þžvz꿹n«Z-faqzP]¢“Auè+3í{73=ìÙ°H¢”,èÓJº%§GÏê$â’è„Í{ˆÀµüˆ¨ölXD¤¨L…:ôõ¬ýŒ-Ðs8©6`Œ4;(*˜Ft$Òé uìCª=’ÝÕ¹ãk¬€p»îfjk×êùfl²HÌÄpv7×·KAzWÏóõc¦´beEJU‰­ø VZÈ|"&õˆéM ·í!ín8~ÍFÒeíRž¼¸Ûuó¾É-«©}°h¶4&’6î˜Þîá’pá'o(Ç?û3^ ™7räX4ÓÈš®hÉxà߆c›5>LÙ÷ªF xÞt¶2!RD@ Ì*’&„ó©ô ³Õ­ªâ}Ïö,éÛ!™³nãRg;¬X͆±øÁj¨A²ïTª6È·LW[UP¹F´¾GE¿l¦_Ë=]Yáû¢h¦H›Ê‘Að•¯)ã¹-¾`ÚÒ ófõè'¢è3ë6¥j£L¼˜'â'eé@¿QcÖÕ&·°8=ˆbìÚ_†wY]P6s[þ‰Ù; † LbŠé‰ó÷¹@ Ôì®í«X8ˆ`訇€4;ê!0u°ÙQÈø4ŸK£«vÒî$›ËHL]úšºoàx<ŵ‡¦z„ ©I®€ j,ÓÍÆUµ¯¨^#\;×ê9Òé%E vè+bHÚJup OŽÏC¢ÊnÈ&RKæ¬h&ß0‚D‚-5FM8Õ§Kâ0o)&ÓG«eñ!ü`V’o§ŒéË™èéÌœÙuÿ[õÍ€)."½œÊ¾ÅŸ ’)&owØ+KI䨸i ¸‘;ëNGÀí0‚«±{C"%„žî<¦7  怘>\qbÜ<,EHBÁ{†–±1£‚)\…CRD@@‹Å¸Á\K9ÁÁÍôïþÛö»úw«§xx,,‚$Êö:bíê© Ühê %HnÓ™†c÷:æ¯æ¾JRÔP‡¾Îm«l¹Ý+5€(bÑ4Ý—8¶­ÖŠ¢iD²Úó`}Ï·ÌWŪˉ)¶Û¸¿R¸cHQ£ kß»…ù*ê|Ž‚Ežõ mû·¹7,·í&Ýqh(Lf¸]O0 ç–ÚÞ-ŽÝ‚]"Jì< ܦ{̲™ÉìèÚò%¯:Ê«ËÐ4 ý;y¿Ì/¿jκCÕÁà’nv4d>½ãA85È0 H(ŒÀ nÓ’±f›Q»“6ú0„* Òd@&"IÒ0vC„¸L‹G-Õ85ÿuÓðQæ œRއdíé¤ ©¸#j…™(u`N!@È€Äõãþ<éßCZ" #ownK’ ¸UˆÖ(§“#…("Cº sTZ€9`Ñ útsÂì¯áÄ dáv½DL"Sºc«F\íÞú•ºq‰Ÿf$¤;÷G=ìܱ:Ò¶‡— $Éîª~•kDz»jO0cE\J͉Îk´#Œ”,#5›W•8Ššñ©Á®ƒÀ×ÿr×¶ÕjIA$»+$»Ó7p8·­4Òý½G‚¤HF©*H)BŽ,$ ̆™×+ÁýT³M&_Îí™hKÆôë”@¼e–/—R‡Ð!Yø®)B<^!)Wp³’ª¿•ˆ¨@ÒhîhÍŠf  ¬[TÀ‘‰ÎvÔ8hu‡*€Âw„«#OËQoo††sOgÌ“iW+Ž Vô‘(œi†w`LoÆ'È´áQãG¤Ljíì ­r´gÆØãÃ:OjŸV[bªS?"&Ô{ LŒˆžÖFxbk÷4šFí}³º0x€€Üjì£Ý_’›:¨C‚$!‚r|ȹò‡¨­é¬0ŒÑg dNœû­ jD¹•þñ³¾Þ]æ«Í”tÁ4´D®u.îÕe„£Re”í¨ÞP. Û¸;ý¹×;éÎ6‚&ÚÒT£ÓÍQ—ÂŽê ‰ŸÕÇH"’`cŽVÎî6¤ždKú¢y§L’$«ŠíúÕšÒÏòès#Çf¿TkÑ‚ èæ¾ Ÿ!%0Ì« ¬*¨(ô…@Ê‘­’]3$Ùe…ašÇÁ±¶êE­S"ÊHw}I`ŠhK·Míäu¨„ìŸ÷ím—^Þ.V®Ÿ¿~ùáRà¬ö¸–îzþNZ°FFÍUŽJqðàK{­ÖËòÈì‹È0€L²gü¹×»½½ VQ•6-ÇÓ=*ÓNîVðäRÜdcŽ[*CN$SÙ×d?oK5¤žbÏz´Ç«]cú 2«ò>Ÿ[³IAE—¡íUßÔQËÝŠ}¶hê ÖÖÒflM~ÙÃK¶  ËÃz^…?bJ Ù39fÉuC:Ä{@HM™Þ«M–×µµ½6Eãß1É]*OuÛˆº§Ä<8 CŒ]){%Ç,˜:¨gr í©ðÿiå®m%5ÀYuÄ\}¸Ü§×-#]¨÷MKÖèãAd³# v$|è¥=–…0ä†Ô×”|á3ªÐ£ÅOκ£GÜ`]„UÔ~×í÷t|\—aIâÚìŸÿµ×LdM÷·Þ³ÜŠW€ˆQ.ϸ1VK€²È‘YŸßïߥ1[X—ÏÞçÖ¸Bn倶h¦0¬-„ÈØ·ÅÕw/Ü\1±&b|œ{ħá¶ÿ~pÇ.‰0EŒ¦®¸aø£ƒ;n2„&õ{ÿÊ~ $yOï¶ ¦VIÙ1Î;zf{m äVø[µ{O¥8+ FÞÞrp_…¿Ö›qAÎ'q!>t# ]Ϯоuà)ŽŠÆl5zÅßwÜ~;$È…o„£ŠÈvV­/‹C¾«zã»þAŽÊÿŽßmº¦Ê(S™¾¥ÅÕEÑÊN¶Á-,š7õ9Mó*X±gk‚W~´öˆ?  ùÔÚ=ªQÅœÜ#µR»ðÀÑÕ! 8[r°tý‘U%A+ FÞÙvXÝ&Å s: Q£á8‡CÔ}m~8˜Ç€qä‚ÌGç!¢Æì°©âK“LÙ²‚à¾þ]6î@@ƒôÒH!¯ mFËÑlq¡€u+ÞaCî.©†À0lŠ™[cÀÌÜv@ူ­¸j[Q%¨B†éæ13Ù²—¿KSŽq¼^€;ê_+Ls2Ot’£Â¹Rˆ¥Ë:xb¾fõ¸;BáN…  ˆ)G“5Ôr!Åfœ Š?ú,1ɸ.û—÷tü‹‚5‡d M¢ÿŒîù›þíZ`ÖÐóƒe6,î«2ÊZfþC ‹ŸÜZR]ˆ\¸g‰¥Ñ ‚£òEÑ»2ÒØÃ±°h& ükí@l¾)ªK£ŠUZÐÂâL°â4ÎëË­A2'gÝys»ÿ㨶ˆÒ\碿èrOï6–?úŒ±4ºAÆæB@k®YX4t©Š3jJ[>Â3Âòu4Õ™ŸD†Ö›…EAxpñ+Òî̱䦡Q“*`aÑ<°nš³ÃÒè!I LsIê”hîºÆŽ…E³á†nY£Û¦4ö(š1–F7¢Wü°AIc9pË0°°h(Û§ÈJ´<gŒåþqˆƒòæþ'£ :{8͸mÁ&AuÁP–TŸ>–Fÿ¤¢fSÕz jÌngî€ðY;Y,,~"‡ª ‚?¬¢Måg¾ˆa-ž.–FÿDòЬé½â†~xøESš—¦MÂÿìùY2mañ} ÂcÃ:%ص··Ö%ý²_ÎÞJÿï—m‡ïJÿoñXý£àúòeÓ¯|¬Ç›œ)e‘#/æþžH0+Ý…Å÷Cæä™=¹ÿu]²8ýþgÖåYVÍŽEO IDAT`­žŒIF}¹B]F$ˆƒþ]Ol¿ë wI¨àÙ¿\W¶ ©×xX‘ ä±r…¦¢µùe“?Z{¸&¸©¸êÚyë×” +mäéaƒ@ #"¢2#çÈÓÙ~³ªÆ¨dÀzÇ ˆšƒþÝGBç俜åÊÙ^õ G5Á–§%å÷ê2Œ€‚LÆ‘Y>‹ "0%( 5…µ‰wñ‡k"¦òÿÙ;ïð8ªëïŸsïÌlÕjW½Krï  Á`›Þkè=$ð’„J€@è5„Ð $¡šf0`Œ±Á6îÝ–%Y½®¶ïÎ̽çýc%a`™Ø–´ÞÏÃËjÊÙ™ïœ9÷އ—åÔ¢[Ú+ë;^±#*䆿N`¬(Õ›Û‚†”B~Ó~…’3ŠßÏÁeGïnðÆ•TH×r1øöŠ”Q‚ ‡âúCÿ:=ëxI/.ÿ¿ãó/ˆ/?Ú3ubú‘)ª[—‘é™ÇþvøÃn-#&#%Ž¡7Ž|z°kŒ ¡ âT\¬»?… 3ib'I0º„TPEZʽ³G—yœ daŠíõS&UšRÚUþ·9cÏY@À𘲜£J²,LyåØÒ§Žç²( ‹ãËrþ}ê!é) É¢0—Ee=Ó‰2yß|ÃA¤Ñ‚L"‰€&ƒ]ãnù·Á)cL©[¸mˆk\¦5£"üNݳ›:W0d’ämë.zfÇ 2õ¹Ê»oY{~Ø X˜ý˶ùOl»±SocÀÑÆm¦Ô%™™Ö‚¿M^8%ãhA&"æØŠlÜÑ×Ç$Éÿ†@„ åì’¬WO™\œj!\š25?=×i„öˆ~çÒmk›}À03§½´è/˶" žÿÞʫ毉™öÜúšß.ØàÀ@ahWÝ ä¸,wå/fMÏOI*Ãb·Ã¦&«åu‘àM@‚IÃR'ýzØ9¶bAfT„›£µ1U˜Ú­½eí_µ}™¢ËØ’–÷ªƒ›ãV¶ßð†E0"‚AÓG@ Yk¬a½w©!c³T6þßšsªC[¦úŽ—«îÛê_€.%íîq¯O;<î¹–$’ž¸$@ttyÎ?ŽŸí°‚¿nVw† !Aák[}³þýÅ’ºvà¬3fü{cm¥7ˆ - "¾%Ô ÄLÄÁ/jÛ I ð¹[Nü÷’_8«ò…n\¼qC›Ê=ÎÏÏ;lr®¤ìÆÁmS'¶F“§LÎ8*EuIF®­Xa*¾+´õ¹Ê¿T·pT$™QîY‡£Òã¬@ÀÝ»Óîþ9Þü2Y o×=Ó­çÈ#"øjõ£µ¡€àRÒnóâ´Ìc # s·ùÆ$Iú!é6íØŠ›Â@”{œ0üª¡ãŸmhD¡))b˜ß¬ÓãY†oWPÂÝ͈ßê3«p@†ÍèSË+½6£w-ÝZí `Iª}ÁÏgŒÏqwMH”ó ¨ÑdH]’$9‡ÿ~øcÙÖB¨ ¬ÿêÓw…¶Å«õKØu%a(ÿ 2+wÄå[—±y /í oãÀmŠÓotI"²0[©s„†–}²Ç$Iöq$SY’ùÏã'fØ4@øxgó/^ˆCòÛš»O`šßZgÌxrÕÎ_œ¥5# rZÔaY©ÊÁ—“h-I¸Ôô_¾sˆkl¬ýêSëÃ;9rdÈv·…÷÷`8*q‹»)RýÀæ_Õö –:‡ýiô³£7$<ˆlêÄÑhSê†4@A%Ï^’k/ ˜ŒV7DD¨oãzâ–µ¡ ZÚö¯ê‡¶ù× ²T-cXêLÖiJÒg ’Юò¡é)Å.bÆúæÎ¨)úxl €€³åÞ?±e}‹ò]¶áY©}<¶E‚h4‘œ•wö‰—PG¬é¯¯ù¬i.GTûCÀrÜaÈ""8¿á_³ˆŽË¿ðºa¹ÔtI²'q&I’\3¹âøŠ\ZÝÔyê›_ίlÎúQ—Øø½Ë°=¬¿¸¶:bJD¼yúÐGf¶«ˆ Ñ{× øA‚## ò”Q©jú'MÿÑE,dúzæôúØÕ¾ñӦ׶ú¾˜^r()!3Àûë°“$’€!Gœ’çÉvhT6 ÌøfN¯¿lÁÃ++Ý%j pZÕ`TÖ?ž(û­Ñ’D¡½¼%VgJýùÊ»9ò˜ˆ2d@éXs´¶1² €2-ùW½{QóÛ š^SPíë¡%Itˆ†f¦lkšD—°Z‰®4¿þ*лƒ°¹Í@48ÝõÄœ1,ß1o{c1ü÷5ø¨LiäÙKoõÔáY' iê26ƒû*BãÀÏ GÀ˜ŒtÄšÛcML’HFæ%Ù9.ÇýÎéS.Ë!Æ3å€çoèšÆÄ€nÖ¢ Á( &j$õ@µ£‰$CÞkú áåmþ5ˆ а†÷D»ÕŒ[F?wDö©‚Ìd°ÇwR†Ã]ÙFÕÕUÏ=ûÔêÕ_ÿø*D‡eÂÝ·? †8ÈãpXÔ@Ì|`é¶Zx t  Ìm_xΡ' ÎI¼˜¼'m’¤[K¿eôs‡f/IjÌÚo§÷D0¼‹šçn¬ÑÇêgTíÜñçÛn4 Ãçóýþw׬^µ"~ï’Ñh´££:;½·ÞrCccÃi¿DÊ cѹ3Ž,Î"Py"tÄÆPìÅ »Ö6ûç ºx¾D —«¨ íÀo> ò]ç¨pTà ¨t*¥$’œw]‡¦i(Š ¡PˆsfµÚ@Á9×õXzFæ™gËÛ°a-Ýq×}))®žM !‘1&„xãõ睊úõu7Øíö³Î>ÏãI‹7Ô“Rêºn³Ù  [,VÖ Çb†iØíL¸›¼ ÄÆ`ô 7®jîLÿìÝwÞ¼ëî_ýÏ?.\gŸsÞG̺ãö›SÝʓO9ã“O>,,*~î™§*+·ÿå®[mvÇÐ!ÃÏ<ëç‘Hø¿¿öškWQ1dÇŽm/¼ð´×Ûa˜æ¥—]õÊ+/ÝpßjwÕ¼ðÂÓ.—kù—Ë~vÄ‘9yùï¾ó–Õj¹ãÎ{³³sW¯^ùܳÿˆF#ƒ¯¾æ:›ÍÞ×'f? ¤?j¼²~×ÀöAÿ I§Ë“•zײmC$†R¤›_Yh¯¸vè}ÙÖB%A:Y™Ý¥¦s¦$æ\u7yy``á§ÀÛo¿Q\RºléçóÞçþû»úšëyè¾öö¶†Æº…Ÿ~tå/®q»Ýë×®q8gœùó#ÇÜpÃ-“'OyýµW`ÙÒ%-­ÍEE%PVV1kÖ1Ó§ÍøÍoo` 7m\§ë1݈-üô£É“§ÞvÇ=O=õxscÃwÞëíèxóÍW;;½wÝyë\úȣ߾}ëGÍëÛs²ïrZ~úcÇŒK³k +ÐݤX” »…÷Û(ï½g€É\š–9(eGžØÊůh_ðàæßxc­ ü(UUgÏ9nÁ‚‚ÁàÎÊ'|ÆçŸæóùžxâ¡·ÞxÕçë ø} Ù±Ç4|øHUQ‘!c,55ÕjµºRSgÌøYL×·nÙôé§Ïœ9Ûb±€¢(N§Óîp¤8SY·7sróg9{Ô¨1cÆŽ3nBqqÉ”©‡6Ô×WUílmi~ÿý¹÷ß÷—ö¶¶¶ÖÖ¾='ûÄ‚ë˜,·$^Æzû\aøÂú]×~².3öó˜É×ÁQYÓ¹dãªå’dÂÌþ1 Y ·Vï˜5ûè?x÷¥Ÿ:lD~~iååƒO<ñTÃ0N?ãì‚Âb)¤Ó™Ôõ+¥$"ÝÐçôé3ž{î©ÖÖÖK.½²g›BˆÿŽåP8BH)lVI ªª!¢”ÒårwÜIš¦üÉù…êÐ _Ý\7w{£!z½»W·'ÙºG(¿óM×ÿb׿vOÎîéƒô_ßtÿç;Ëôì:þ " t’ª‘ÅÖ›´oI ›, ‹%DŒÇ@²Ñ04ÈA±|B€_»ÿâ²uëëáìGr²sGŽõÀýwŸtòépô1'lÛ¾¥ªª2--Ýîp¨ªÕ#†¡€”2€"ëŠè8ëìóÞ}gnqqIqqiÏ6ÓÓ36oÚX]]_…ˆ¤”Ñî h4"„ÃÐC¡àˆ£[àLIq8S¬Vë>û†€º½}÷$B=†Òä/ ºÒ¬ÇX„ûÚPv¶ˆ<ØÉýˆhÆ@š,DÑUT¥àÁNîkCaÆSN‘}<è)ÐŒ0Æ"AîkCac(L4t4c<ÐBÆ0q/zÍZ¹–ÅÂ?4Þï Þª°wΘú‡)ƒÁèëšPû~ë­·˜=µFë?nüÏO¶u;¹ðŠá©“6ûVЙwŒ¿±õîFA@SÅΡ£s›-àw‹©îÕ‰4ÉŸvø÷!{3Þ‡ËåæŒrꙚ¦åçdff½ñÆ>þø)娱ÚÛÛ‡ ZT\¢ë±h$2uÚ¡†nÉñ&qÆ-Ëüßûù¹ TÖ³Á¢¢âÊÛ×­[}È”iÁ@ð)Ó9ç±hdÊÔéˆÐÞÞ6räèÌÌ,Ÿ¯ÓãI7~âøñ?[ôéûïÍݺyÓØq].׌öÀPë<»¶zïªg°ï»&Ýzذ2·cu£·wD#ê^ð²ÚRgÛ¾Ú±~‰T43»Xi­s-{ÏR³ÙZ³ÑÈ,$kŠmóW޵‹,U”@§^4$eÅGÖkœë9%ÒédjK­ké;Öë´æ#¯Œͱf‘sÅ|­©ÚZ½AñµëECµºíÎåZk6k;õ¼r­~{ÊòÔ–º”© •zÑPKíVçš…Jg+9¥{~¡D4¥Ÿã©ê ­nñýDç» Ò/Ïù)ëîkTÕ¨Ëÿõ) û)Å(⽦.t½KMtëõ½¯h€BORr@D@ñç=r@@€ÐUŠ®g $¾ù@`×—]›/ƒ€ €y×7È!ZOÀÀš‡d~ßX¿CÆ$I ·}û¨øVJ{ª©ØÑŠðeå7ŸYrMow<@0 ãÁï©«Ýuï}X, eÿ.­kŸþÂg{Qƒ‚¤¥¾Òôd WˆoìGzböضˆ~ó  ôæÁŽhD³þyghäôÐÄYÖkR¾ú ýä_¥.~=Z8,<êД/ßC#2ɽèuïÑ’jIë1ï¬sí[¿¶V®õ}±‘™È ( K{ûoÁIs„3Õóá '^!m.ϼ§õÜÒàÄÙžyO‡ÆüL/é~ï)=¿Ütg¤.|­sÎùÒéñ¼ÿ´Êq±²Ñéo<>9Z1ž¾÷!ô½Ä«ªöêx¿˜yå!O=ö'®¾Oþhä¨ü»úaÜ«’CÑFâ6ˆ6Ipf¨rˆ5Q¤Ž´4´— €„à6)Âà¨@Å…†H’áÕš‰@Æ ²Kš~°æ£%€„¶Ii‚­E,9ˆ‘]k&[Z²Q„Áô*©#KZóPï Æ×LÅ…é3¹­ ·AÏ j„ßuì ‡ÖEÓ›fñ¯TkR/Þç˜Í–€¥šV,_¶}ë–ûx4Á,6¨Z¯5šq~ý11Þ9ûis‚ìº,ðšOÖì` gj¬t$i¶HÙXǪOµ][¹¯]³Ô¨‹›Y¨S8RµÆ<ìw¬]Œ$IÕX$DŒÅ ‡ùe`è€<ä·oXÂBJЋzTi ™i9¦'G=Šá ÚRgÛ¹Þºk šÓ£€L¸Òô¡@dd*ÁÎW€qR5RµÝŸ={ ê+ ŽoY²WÞ’Úg î@-#µäMÅ—«M²íca+aí‹…{"K?Œ7½cêÀmÐñ]¦6ȶ…‚óÏQ´t †¼Ë$·bË|³à\Å^Êê_1cdÉÃæ·%³bÙïTïWÒ÷µ°æ±öÏDΩîzΰ0¦h•^£’IÑâ~ï”¶|Þ–$ ?/ùõ«5W×w=œZÞ7ëþ%ì%Ú.CÛzåš7%~±¸Á“î¹Ý …‚#FŒÿ×Ëÿ’½öµj|!ç×U{1a„ÌLI³oXêþðyßìó…Ãݳ¦f¼dÒ^¼õ#š&1`œ‡|(…t¸ˆñðà "-‡ˆÈb³n_m¦x‚ãf"Ê·u×PèqF ‘²ì==»ÈØiž÷ŸFS'‹Eƒ 0ƃ^©ÙAÚSBçÊ‘$‹Ý²k €”@DŒu—‡îêBÐÛáM)H¿v mªñ†úoµÕÞ104š€TÔË9-`x¿jûˆao‡m e枢Dêiç½Fp›lýPØ 1ýP†´},mùèýR^¢hé¸ó÷’¡ÞB7©ZF—SÂ’…9'q3á]2¸‰€IßJYv½jÉÃúÍX#É´Î7Ófp÷$mm DæÅ섌 ¹½w>l6Šœ“•”¡LËÄŒ#x/«ùH·–6,u¢]qJ€*20Cä]&…ŒhûXöƈüBY¹ZÙ–`1‹ñ¸ºÿ½p… !˜ëïÇA€˜)áØ^¨ q‘¬U냭u"ed¼¯¶Cãç(ÚÒXTÝÚ[µBD=âX»…°m]aº3b%#´úε‹B£fSÌ´L½d¸}ëJÇú%±âahê1w £g¶@²XX«Þ¤5TÙEá²1޵‹S¾|ßLM·ToŠ $]ézî ÇúÏÃC'£z^HFW÷84 &(ª°¥Ø·®4ÓsÍ´œ^Uô'(pÚ¦¤Û4à“ˆF!âÔÌ9u¡ªe­öö¹H ¤ £œ‚5Õt U’á¦Pã;BÆÀV‚áZQè\.I€êAfGÓ2»ý¼ "µÔö± A†—¤z+¨¨¥#2°—b¬™¤±fm“‘]&hYJ Xó5°¢Èîɽ¾`ò ·­»°%Z¯¢$Aq`á%JÕ£¦âÆü³¹âì•?:&"g”œ{|þEý9$¦+Ы/vMR¶´´xÒÒ4MCÀ>’1„¯¼§¿µœóÞÆÊuûš”óÓŽÑ‹†u¹ˆT†gÏw{Ó¢Íß?©øßN™–cÛü•´9CSŽ€àä9޵‹í›–WBãg¹ƒ|‡êX·Ø±æSÓ++Œ$¿ÑP¦&Ìr®úÔBœp”éÎ’N·÷¨ŸÛ·¬d¦-Eª,¶À”ãk:Ö-–V‡‘–#<Ù‘¡“âWA¬d¸p¤‚iÇé\ý©¥n›™ž½±J?ªn>þµ@/<Ðh(ͤ?¶åƒ ÞûYG#½˜£Òô‘­ýHÃïX¨öê2‹ã×;†We–žÊ$$ÁQÆÊ®S«ž0dlC±WV¹€ìâŒâÂâÞîø #þõž?ÿîúÿ+--ÝóÒ„&‹‡ÒjÌ^úU1ÕšªüSM˜Òì¶0Ð3Ï~{EHÀ÷ÂIÈôh¤lŒ™_Âa‚”¤Z‚SŽ)1Œ˜™Yè›}!HŒƒ‹VL0»“GHšÙÅÇ]ÚÕÞYJ0tfhìá<àMݾÚ?è80 iO vz×FLCºÐÈ)#‘áS€LÝÌ*ì<öD/gÛÉŒ­Å@I„ºQC£ãxõV“ŒžzC½‚ c‘0ƒ­’Ö"tBÓÏZæ ½¸mùèÁìEX÷¼éÅHPæQ Jã…F-‹7‹¦÷LÿjáÂìƒÐ9ëþiÚŠ0¸]*)¨¤@Ú¡¬i®©æ€”:‰AO¿o2ƒ¥Û>Z¸'ð=j¤¢eTú!Í‘º–XÝîæ·4Àš7ªLCÙ»t* û}<ÿ–-›–~ñùî©( ]×êâÔ?öÀYgŸŸ‘‘yà‡±;B{QzŸÕ{ôŤ¨=³…]ß4¢]ÚÚÛl=+ Š Fì›i:"ˆ{!º¾@¢k_qéÿu-ö,ˆHÒ¾e…ÒÞ„RDOÐóËÁ4(®È]!øf•.¹Çomg¤XԉŞÍíþ¦xíÿ΀‰D<:ïÜtKNm¸²WÒ+¤gçV°ä`Ö1 *h+bö"f9Xó™êÁ”aœÙÀ €–Æ,¹¨¦‚£”©îo~Z{ cV`¤®8J™æA×h®e 5AA©CÚ4f+dZ&šà´æ¡šŠŽA¨e hh/f܆Öl¦x€«]Á!?ŽF£ìúO´Äêvø×÷¼0u/ÂÄûI|´iš¯¼òBe厹o½6cÆÏ6lX÷Ѓýä“ù¹9y¦aÞvëß~ûM¯·£¢bð+/¿˜™••šêÞ¼yã‚óKKËÞ}wîöm›?š?/==}îÜ7zàcÇ—Í#¢_x¦£½íÕW_>lD§¯ó¡ïyëÍW]©©……ÅÁ`àÅž}ñÅgÓ32ìÇsÏü½bð«Õ¶xÑ‚åË¿5j̯ÿûÈ£æÌ›÷΃÷ß³cÇV«Íf·;{ì>|¿¬¼ÂíöàsõS⣹ò½š®p~õ¤r«Êj¼½+Íx¬x˜´Ú÷q;WÎcÅã¥#ÂÃ1òËa?5Y–rfiÖ3ÇŒ[ÕÔ¹½=ð}ý)>z E¨ °Qž©£ÜS5fé¥ÇPDAˬY<ý0®ØãOipT`Ö1§N`½»ÂÔúpÕ®XÙ¾³ï{oè“[{Í‹Ï?3÷­×FŽSWWwï=wœvÚYÇwÒwÜlcü„É…EE³fc±Xß{onkk+Ôîª^ôÙ§†a~øÁ;Ï<ó÷AƒÊ%Á£Ü·yãúY³}ãÿ|4ÿƒø–ñ“?¼ï¾»ŠŠK Ó¼ý¶'2í²ËùÐ÷TWWÍ›÷î¶­›.¼ðÒ¬¬ì€ß÷î;oƒX»v͢Ϩª 0zô¸Ü¼¼ŸqÔÈ‘cî¹û¶ŒôÌãO<%ž‰>ø¾k‚@ã8»$sFAÆ^”~Ùæ'HAš 8ÿ£{_ÁÙ§5­'¿ùå’úŽÄhD;|ôôöÛc"bÄûHíñ2BÈœÅ-(¢ßrS÷KU²+H)þ Iøî¼šüö# l"d”{Š’2šÉøom–zür=»&è­kˆˆÌªÀ&DL¤ÒŠª\tÑåGÌœõê^immÙ°~­i õuµÃ‡\½zåÄI‡D£Q…óxÌcŒsÎ9F"—\zåñ'œ¼kWuVVÎy\’““ÛØXÿÕWK?áäž{ì‰çœsþ’%‹×¯[3yÒ”–æF¯·cÙÒÏÓÓ36mÞÔÙé7~bmM¢(ñ×øö»‡8xð·Û3yÒÔÜÜ<§Óµté⣎šžžÑGgk_€1Å%óVûbÉ^ÏZï¿ø–ýd>wmH7Åê¦NH”ûf€=g:õ¶ˆkÌjW\½‰;K;”i™½ÊòØ <ÓxÁ¹JÁ¹jê8¶Ï%ÈÊ•Ý0Ê=•@&È…D”âLIMõ@ à÷¤¥¥ed¸=i¿þõõC"‘H|1Æèz º£ëˆHÓ,q1iš·|SR\Ñîµâä@G{«Ã™’“—çp8¯ú嵓™:kö1¿ºú7?tï?_zŽ)Ì0¸FÇa¯ÖD$ছÿ.K\öÖ.Þ»“LQÝ)c9‡‹}üxé{„$TT BŒ3î´ÓÏ>îø“23³,K[kk4Ñ4Ín·/Zô©ßï[¸pÄUSJÑ=%„èé«ò­7¢îe† a±hyy§žvÖ 'ž:hPy$9æ˜ã/½ìË–-q8°ô‹%íË–-RtmŠHQÔX4ÚÖÖ¦i^qåÕÆüzåò~žö5 9ÃûgŽúíäŠïwZ'D™vmj~Ziª#‘žCÉ×Ñ 6Fª¢"$IýW±¡IµDjïÚp….£³ôõˆö%ˆ˜™™¥Y,0múŒM›7\ó«ËÇà䨶 IDAT!Ãn¼éö 'geg]uÕ%?þÌ•¿¸úϷݼeó¦²Aå™YÙ”‘‘¯Hǹ’••·¯N§Û“Ö³ýŒŒL»Ýƒ‡^vù/oýÓ V›-3#óö;þúÙÂsßz•q~Å•W»Ýi_tùcÞÿÉÇTNDD”••͹b³Ùç}ü¾é¢‹¯¬­­Y¿~Ó™rêigõÑ Û—Áæ6{ÄÐÕ¼¯G´O¶´æüç‹ aþôJýQSé;Èn—C†€2Qä(÷TØØù•$¹=Ñý¶¦R8 …BîT·ªi „…‚.WjüOD·yºóz½n·Ûb±J)¿Ýîˆ;I ð+Šïmøü~ŸÍfGÄ`0˜ššÚ'u÷º¦Roè¾Ù1qìL˜SšÕÑW6zöÅ„g²¦ÒÿCÏ¿¢âÖ†Hõ[µOÁo3I@q¿Íѹ?·+ÎËlªð‡°ÛqË7ç<.Ðñ?ý×4KvvWøc,5Õ½û_wïWûzÆàv»h™ "y¬Ú#³Æ,¨iy~mM¤á‘ÂÙï©¨î ­lð&Â}›©Ñq$È é ^"IÀfs"’ 8*’äó;ï2I$|;ð$}ˆ!©#óFu@I{Yn©?7lš‚.›·: ‰'Ð0p5™ÏWþ%ž$o/S™º+´½¯Çµ×Æ­—”ýq‹õ¦7Ûb0ACIú!ˆAݸöãuñKlxVª.äo`ཆ¥Û´»ùÆÖúw4×øBP3Sß0Àâ:vãÙwäqù\7ì!§â’$%‰>¯‰ÓL2b"Þ½‰8jN%Xb^hIúñ« nš:øñÙc,ñ* %^MÈx `aÌm‰×ìMØûf ÚÑ= önݳ_´Î  SÓ-Ùz›Ïsé¯2‡ºÆrOy·îy]ÆžØöØ-À“ô/ˆà¶/¶¸,jÌ”šÊsÖ†`ÄÔïIG”f OOy|UUgĸàý¯ !]=$‚(0ä ‘êµÞ/С¸nõôQ9gIÒe”ök^Ó^"IšR“Ìǰ#sÏȶÉýÅ$Ƀ¸µÕ¿¢®Š]¶OÏ9ô¤ŠÜ®²ú¦è_—¤¤xtHyH^Úù£ŠÒíZ"Aÿ‰ ÑÀQјtYÐøúÿj©1ËXÏ »â¢®\À>ûE d|‚#Ý’}fñ5¹¶Ž|Iëû7¯9·>RÉQxÞÀ$‰gÀ ´Gôç×׬nö€SSg”fÙÔ=WgÜïÄU˜`PšóÓ‡ä:¬ÀÙ“kªN|}Y{DOló¹‡Ñè8‘×v=±#°†§Nºnøƒ%Ρ†4¡r ½qC1MËQ™HjÌ:;ïl% €""Øk>`ãI’äAìˆw,Ú´Ó ãËs^8nB™ÛR"?ÀñáÝÖ1GÌK±) (Ë®]6¦$ͦAgÄh Åäˆú–„Òh@@ ³räÕ;¯Ü|Ý®Ð6ªHuýðÇóíe’$EE¸·m¦~DRåVUAf¦%ÿ‰ïN˽®¦1Î*½¡«æ­þ*^ž~L þ‘pô° ˜‰„¬5Öð÷íB@[:ö»7\Õi´iÜÊÛc-ËÀ@e+³ úôöÁÍBšù6ßêkWÛ®R™0;_«yŒ£ÂQ ÷Aõ¨$Iú eWî8lj üꣵqÝÙ:þµe›Ûñ¶¶µþˆ/jÙT.»üØŒ®oõK"`ìÝMk›5£À±Þ¹ï‹­ÀXñÞ‡‡Øuïö-»Ç A‚‹ç—K’ÿoŒ¯sD@D2î\& I‚!ïçŒ~[÷.ɱ_êÞí[v¯c&é›L¿¸¤Ä§õ~ð3Qÿµ‘“uïú»É+îî‘Ø=èU¦!¢!uÄîâMøíU’$9ˆØ]`wW[üÖg g’ÀòÛß\±ÿ ýø)ÝŸ0É8Ðõ× ¹GAöyw¬$I‚3îÿ¦îëq `’6`¯`Àvø×ÚÔ 2™˜$IoAX\ÛÖÖûz˜¤F÷ †|qË;ÔÝù¥¯‡“$É€áé5ÕIÏÆO'éëè-”ôr$I²×”‰'û¤F÷ “ÌÓŠ®º¤ìFÕ¤R'IÒ[þrĈ«Æêëq `’ÝKHeªÊ,€I» I’ÞCV…kœ!$oœŸHÒÝ+T_ßõ$H˜,„”$I/Aüý ]<’éŸDR£{KT„ Ȭ}=$I¦nb¿NÆéß$O\¯$ŽÌ9ýÄü‹9*¢Yb’$ý‚Ë'”44¿¯Ç1€Ijt¯ ƒ]cGy¦"²ƒ¤CO’$û:¢8c|Ž;éþÉ$}{†€òWª@d†Ô“nµ$Iz^5ÍîÅ¥“ì-IÞ3³räz 8—ÆaLf²$IòãØ5nò¢€`±j ÃPÜ7doHjô$ffŸ6.}ÆÛµOK¢)³Tfýû¶›9Kžº$I~¢ë&•gÙ-¯o®3$]4º¤!¹mÑFPx_l€‘š=‚[ý«fåùç1¯PÀè|dëõ “×Y’${`qmû ÇM¸ll‰$¨÷G.xoe2ºã'>À’“$x .®j¹à½•a½Î>sîò¯êÚ“ŽŽŸ@ÒŽþn~I2^Ë2"P™¥.¼ã/~áRÓÖw.ëirسº&g“¼$ñ:ý»—öï–`Ž(HaŸ×´žðú²¨›[|ß5¢‰@RWO¬$?ÌA*+Ò: µ\[±•Û$H+·ZtåˆÔÉD];ô¾3Š_á°¬Nȿإxb2:!ýˆËÊov©é&™vî¬pq(©ñþ,Qdöõñ%I² !¬*+ö8, I™6íæéÃÆd¹@’Såoœ2ùcKãV.ñèbMS@Ès†Üuøp—¦€”Yë˜\CSº6«›ppöýÞ‘FÇí帒ºÔŒ‰é3]jš.õl[Ñ£þ1Ö3CHSA˰ԉÙÖB @[ý«w…¶"Ûܰ¶s©A:* :U72:$uÜ]ãþSìjJÃmɼ¨ì†ò”ÑD‰dÂK’OÜࢼÛQeÙ•ƒc²Üïž>eb®¤thÊáEéyN˜DŸ×uìð†—Öu,oè’ÀªpU0åy# ?:kzIªLYêqÞ2sdYº³+FO&ï›oH|_Gw»B²ó·–Ùk ˜Þ2çˆKÊo|zÇím±¦€Ññníó»BÛ¦„LßÃ[~gJ#' ÷ë_ †Œ#ÿ²õ#â¨h̲²cÁjïbCƬܾŷêöµU‡¶" SIwöß*ÒÁ'^òUëG5¡- ¹.c *ÉÉÆ$M˰i»ü‘X̘Q˜þ‡)ƒÏy{ÅÖ°^ç?´¢²ÚÎjý‘ÓßZ10Œšòþ¯¶tÕŒ~yÃ.†ÀÙ?7Ôþ{S]Ä ò—6îú²¡c§/@yNë¥cŠçnm¢L‡õò±%¯l¨­ö…LœÌŽì·£%IB@Abhêø¿Ž½Ø1˜ˆv7>[ygup‹†šÏè˜ßø¯†H# é‹Éh|uìéjÈ‘÷´.4ÉŒÉ!°ˆmð-‹€ÂÔºpå¯W·±s9¦qËÙ§;›dÀÏ´4K¶LÖ5M2 ÝE$Xž»èÜà ]6ü¼¶ý†Ï6Ö¢ °ú`ôÙ5Õõþ ¢Î¨Ý—7â7ªÊ°§Û¡!eÄñZC±¥µíC‚¿¨kŸøÜgÛ˜ª)Ž,*vÛA’ÊØŒÒ¬‹z0çÀ$¦F›dHI¢÷Fõ*ÐÝÄ„\^߈©VíìaùŸÖ´noBbÍ%¼_ˆ@Z¸ý祿îž$ILoBÔ0BŽ "*L=>ÿ‚Á®1É$—$ûIi6íî™#‡e¸€¨=KtÆ ES~;¹bT¦+ñæ M`gÎqi‡µÇš7u®H¤¶x¢Í-k/ˆ˜!…©‚Ìžìó$Iþw²ÚœAÙ‹jÛ7·úÊØDlF§ÿsQgÔ† )‘Žn€II v½éÖµÆ#:úzDûŸÑvî̳ª l ‰ôJÒ7À–¶ÀÏ^YÔÍD’°8’¨5¤P¦Ã’nµli÷'Œcz iY˜5ß^¢1kT„ãeBûzPû”$fæœöÛafZseÒé‘ä„ÈiQJÜ…3_D ç è~3©ü‰9cþ؃+W~‹Æ&2µ©©QӴƆúC¦LokmY²dQZzÆ´i‡Z,Öª•«V­Ð,–Ã;"5Õ½sçÎy}}m0œ1㈆†ºukW?©¸¤´oÏ̾†ª½¡jo¨WnhÆ@ö¢dQ¼ÖR?Ìa¨(Êôü4¿n®nìLÏû€yÎHùöÒ K6C¾ç·Á­$‹@LTº×cÝÿË@F)°‰}s&òîUâˆ]ßtmS©»WÂT©7î¿Ù|{w€Ê7Kþ8ég—\{Nɯ‰³wP$éìôz½M º»ãö›Ö­]ÝÔÜxÛ­loo›?ÿý¾ô|[kkkk‹Ïׇ›¼ÞŽøº>_çÍ7]_W·«rÇvÝнÞöP(ÔÐPç÷ùyø¾ë~ó«+¾Ü²eÓí·ß‹E~úñ}÷Þ%¥Ü´yC{{Û×+—ßuç-DôöÜ7®¸ü‚…Ÿ.xþÙ§.½øœ×_û×¢EŸ^ý«Ëš›ûöÌìKˆ†f¤¤;,½R+"µ¾M`x·}€ ¸ œc,ÒêwÛ­îcÀX×*,~' 0_¾kE®|³ 2à (Ý÷Ãí+ßZ÷Gâá£Æü¿ å úß#dï0v´AÆy¥¿M·æýîë“•—i„ÐV¹ëY3ó(îÇ,Ù¨·P¸š:Êd•’i`-ÀÎå²u¾È;[qT ·#"DDbÍd+@KŠ0> "FÎrfø(¸˜ŽÁŒ[D›¥ˆ€­-y¨7S¸¦{w" ’i`+eLƒðN2¼d+B5 \x9ð§¶ÝAΔ„t¾T~È”ixúç|¶ð“+¾ºûžཷß\¹â«ª•Œ³³ÎúyªÛ‰D*ÊŸvúÙÓ§_·µµeçΗ^ö‹)S€CgüL× /º< ¶¶4{쉗^ö‹?ß~çlܸI.Wê÷ß}ÑÅW{ì‰[¶lZ»úëG} ð3ÆÒÓ3nøãŸ6oÞtÑgüéÖ»ÊÊ*N>iöúuk³gåöå©Ùw ÑSGk EÏ|ýKP~ôm ÑZµÁµôÀ„YzÑ‘’νMj[ƒHñYE@Ä¢Aµ©FZÂa_¿ÄVµÎ?í$=§„ ¹¯¸Ê#îï0² …+…hDY,*UM¤å°@‡ÖT-5«ž;¸È0Òšw¡0ŒÌáJçMj{£p¥™…Ä"Aµ¹FZFf ª5,62 ¤=åÇçM‚3æ~ÕÖAM„·Ï£Ñf[ûŒÂ¸;šA¤Ž „*ÉZLfZÞ3m%,²L„*1ûX¥á5¨© ¸x´Ž ?6Kk>çv@ üdëGÂ^‚Ðô&]©2 ªŸÐ™•¹'0ÍC»ž6-9`†¡ýsQx±jŸ7Qn¦p3 -ï™¶RY*ÂC0kŽÒðP\`-`¾ ²c‰° *\ËØƒ‘5Dª$ ÎpåCDñ+UU;ÃÏ~bšæ˜qãsóò™2íûï¾ø¢snúÓ£G¥oß–å僯ÿßî¿ÿîÑ£ÇÞü§;zþJD‹uüø‰Œ±êê*ÎØüùïé1}öœcñ¡ÿÚÒÜ”™•…€¦i"@II)ç¼ ¿ #3Ëíö¨ªš——ßÞÞÖçb?Áù‹6…LÑeÌþJ[=F‚ZS•‘‘§ùÛkéYE¶-Ë£ƒFG†LLù|.YmÂé‰Z¬Š·™…üZC¥‘žKŠªæXû¹Ú\m¦ç¡i8W~ä=öRîoOùâ]`,8qJéZôš‘YÀƒ¶-+ý3ÏæÍ®/æ [ ©š´Ú¹¯Ý±n±ž]lß²6Z>Öõù›ÒæN·‘‘gÛúµµf³‘–#5«t¤îÑ;¹½=DIôfƒï+²0Û–6•w,‘Ys¸s(î|ÈPìà™Â´tlzËôL¤À™w¦âžÀ€À=™…«(ï4Õ.šAÊ9EÕ<¸ëy³}¡ÈœÍõ(¾’»'³ÚgMf…‹T3Ûï2|+¤ˆ¤A¿Ö˜¡êqCqg S=ØüŽéOÁm2ÿl%u„à‰ 本0Þ'8Ù¸#ÛVÔ­‹ÀìNpÀ`ÈÁY¬ÖsÏ¿8>+(¥dŒÝþç{žxâá7^ÿ×È‘£Mašæ7 ¥RÊ9G;iò”ÓO;æÜó.R%c …Ÿ_ (ÊÕ×üVQ¨©®zûí×ßxó"zçí·â²NR@×çD‰ÖÚ"ú¼ªö`DBdèdkõÆàø#…';íí'Œ¬Âè‰À¹cÝb=·ÔÒTÕyä9zÁ` 4ŠGƒÉG"PWÕ}†Ú‰¤iž_°mú2V8Dñ6yO¼JÏä™÷´ðdŽ8‹u¶¦¿õ˜V»Õºc5©ÿgã2íݧôÜÒè äX»HÏ*Ôš«½Goä"KíViu9@îùÎI±ªE.{eg(j øiÒtÛcªšæRÒöb 2 z;è^h™'‚›¤½”¡ÙÇ)ÍsEÓ[BêÝùn¿"8ʹæAP eÆÚHFÁ’¶"D‘Fr”3"P]`Í…p Eªeê8ÎR£ôvh™'B›¥}C²QšÞ4›Þ23¹ŒQÍãF¤Žöx”Q÷Ÿ[ž2Úú·O K„à¢á#F}úéG¯¼üŒÎ4¨üw×]ýè#÷?óÌ“Þ÷ß›û÷¿=²mëæñã'iš6bĨ¿ÿí‘%Ÿ/Н¸mëæ'ÿöÈK/>S^68;+gèáõ õÿÛ£€_!¥€ó/¸dÓ¦ ·ü醇¾÷í·ßp{<ÙY9?öÐ?žz¢µµI!¤èÒ}"Ã0âmš†ì… ôGð{* !@ŠÃb³îMhã ³Oélu~ý±ÚVodH›#4j†kÉ[ö5‹à›Bç»íÑÈD6¨V=¯Lñµ¡i˜™†'€¸¯]Ï”)‘š®6Õ¨m‘²1¤ªÀÆ"<Ø©x›+?VÛ›ŒÌiw…Fêúü ûº%@24öîoKýäeîkßódޤ9¥YË.8¼Üí賚{ÉÀ°£%Iw\7ì¡úÈÎg¶ß®°=]pØe¥2p+Ø+Xö19ä1Sǰ÷è–\´d‚4¾Ý±f)uP4W‘%Qín¶F º0\-™ÆEbö34Ú!ZO i ˜CXæìÝvwºÆª;î1,9˜~(+ÿ£Z÷¼Ùø–Yöõ;Âû_Á¼zÛ¼†—Úbl·¤p¦€î‡ºŒÌYÜ9„õª1Bÿ¬ÚzäQs²²²czÌb±üåî×­]ÝØØ_Pàr¥Ž;ÞfszØÆ€k}ýòåËrróâ+MœxH(<ÿ‚KN爑£ÿöä³---çî{ÌÈÌ€!C†ýíÉçV¯þÚ4ŒÁƒ‡¦¦º~ô© ëÖ—”þüÜ <ž´ó/¸Ô0tHõxþñ—²³³àö?ßëJqõÝ)éã‚ÛÛF®ˆzÌõÅÜhÑðXÅX0®ï%¥9,¯ŸrÈ»ÛX¶uϦ4 ˆ@³‘j‰ ™€@Mš42í¿ëy%¤(`À@O‰}â¾V „jK­™šÑÕB%ÞÎbS[ë"c~†¾Vîo7†OÕZk•ŽF@œ‘j•š5V¹÷b¥IDAT4<2x\÷î”Ðä9ÑÒQiïýÝÈ.2 wœr{þ ÎÕ |³Î=ö£Ç;;ÃO®ÚÙÕ |`h4"ê[ëý«·`/¢ÐP- šß5™Æ3fñÆ·L$- µLtÅ–ùPRÀš Š ¥N¯šÙ'qn·:½…ê_5;7Ê‚‹ä cdBÖl^û¢ÑðaHõ€g23üPó¤±ë9CËdÎr–9›5ͦÔ4Ô²ÑY-JT@uÁÿoïΣäªê<€ÿ~÷-µwuwUõZ½§—ì{‚ !(θÌ8:¨€0Î ÇQt€£3spÎ8™Ã¨£èÑ££¢(0æ€@B„¬¤³tÒIïÝ骮å½wïoþxN'€ÝtÕ«ÊïóW¥óòÞíœzߺuß½÷çoÄÑßI' ö µáœå±ŠcÙ÷íÿ‚@¡ŸÌh`ORß'×OšIÂ|2š$(©H× Ý"âÊUk@)¥ÆÚuÜŸ+¢d²9™l"RJùüþM›.u€P(¼nýÆéƒ•€ÎΞÎÎ"jjnqÿ ÄbñË/¿ræ°ººúººú™KÌŒ«@{Ç"E¤”jjjžùa± ‚””šïW%B$Ôª~{ÿ¸aä[–€tÜŸ§-ç7½ƒ/Ïkm´ò”?~ö¡ô†Í™å›B/<ªMŽ)3àÄëêúÀöG…¬¨VÁJº65~æ×Sk.%Í}^"Œ¡£‘§~Žˆúø`jÃf-=Žî§AzÍ[ÃO?úý/ô‰!§ºÞj]JšÝú ´ó*Í7ue–_Úñ¸>9, ¿“htªjÛŸ²"&CÑàŽÇA:(m«¡}î®1ⶉmãg”/QX°1¸ø‡çߥ¿Ç_–Ê‘©ùæ™E°Ç)õ¢ ´c°YdÐÔËŠ$„ _=¦w)g’‚mÂߌ  ÛG™Cªr¦…@ø`äQ9¹]UoÒ¬ wŠ@ Ê)ÈöS°Ñ;N©]Jø ºBè„ü¥v+ÊCx‰$1ÛGéý $„:…¯Ó;•“¦`›´`¦WeúȬÂP·˜Çÿ ÔgO¼C™£ƒ÷:ãO©@ ê ù-§"R Cµ¯žËq•8iÙ»FRg0B€RæPŸòG¯½Õj\tjÜÖ“Õ´¹ß*ˆÚ‰QßÑ}ùd§¬¬1ƒ‡ Ñnèá*_ß´óv}«SY Jƒ‡õ‰á\çjÒt0}ýí\®m¹–Ï'»dU­È¤´É;ž¡@}¤ß:`ïE‚|s·Œ&ŒCÆàaÂnX$ÃQ_ßtl«®UVÕýûõ‰![u­Óóÿ$ Q½‘hË;7oìüÍ«^÷ ΡÒèG»LáéŠÔ”39Ç:C3†±·j $š1Т( ÑuÝjA@°ƒ9ÓÏ ÉR]sê€pº=ú5€“}X_ úêNž_B ­{¹õ§Nl¡E@3—{-’œòCÿøøÀÏž}ÄíGhÆu@Ì„ù œJ‚X¤ª9Ô|•S.q#YëE{h¾_Õ‰@h"Ÿ@Š*ð´¿5´XÀÌ9rÊræ8!‘¬Ldªj@)PÒ®kµëZ§HåºÖL¿VíÆEvã¢é;Jò‹V‚"÷©PH€@‘O:‰&%9±z'Þ@Ó—«o³ëÛ¦G*‰r]kg.g';íd’slÄ¡ÔêúêO]Ðùõçz·ö”ÁÔŽRÊh@¼µë ƒ¹#ß=ðÅ9wƒ# 3ùuÆþÒdŸT³ÿ–µ =B§C@ö¬cfùUâžpæŸÏ>Éù¯iDGÙ){<§2§~OÔ ùA]è8þ´¬}‡Y<¯ñ蜴oè|Ïuu·ÌóÚ¬èžÉüè¾ßÎ;bl«ê¡o[‰Æñ·ßàTןêDMíþkÖýß¡á/>½oî3Í~^*O¿sþÄ¥“m_¤À±Oe(ÑiǼòI¬:ýÎù“矻åÓ0ç8cY;ã”üŒWIe4Ñö±''±…ÛP‰ð7a =0$@ãÖÐí¿[‘:mi! ñ}š&áC™›WÏXI°röÜÇ1ÏÈç²`[ æ›Ñ(m«¾=µæ2'Þxê™! 8R=°`÷hjaZ RZMÝ0¯Ç# l÷Hê¶GvH¢¹§„—‚’Êh€‡Žß€H@ UJÊ•à TK¨g0×g©ü+?HhPw>¯ IØyHÓ§V]D§4XоùlïôûÈ­ÿ½ M(~:#ÀâDÅÞ±´TTh(©ùÑnA©îèªñ+Êõñ—"™ð5þýÒ¯_›¼ÑV¯1Lj€$4;zíY>á’–Ä›cXô>ÈQÔ‹üüÝ\ÝQ ²4g¸¿šëG]“¼¡Òˆï*'³e·I)!Š kô—G¿½?õ’Vʵt™§h({ïhúÙãcŽ*‡PgB<2™ùÒ3/ompÂ:’éE]«šƒ]Êcë2^/R¤®ïøÔÍw€)üÐìÜêŸÌKå„’±–ÊPÙŒ•é[6¯þÜ›{€èZ¬-œ­ô2jj†ðÝÜy×U@@‚yìJîa’EJCq4Ó{(½›ëc±!bó?¯Zõ‹“Å8þÆ)"DÜ1tbïhªÌÒÙUª=5´UîÞ½ŸÎ«<! ‡œùÔgñ¦–POÚ™³sì~"µPSV8–Éè—Û†³Öô½¢ (ÅûF¸8éO寳ÖWþð2”ÓÇŒ’î¯áÁôžã™ƒ’俆÷ßÒyWP‹”Ðö’ä®óöi÷Üsmòwã2h¶ $À ƒý“ ¸}cç›––XŸšÅ¾ûß¹þúeÍ@PfÃ볕j?Ú%Púµ`Âßh©"ØÊBDÝó3"t4üz0e[*_ï?O9“XεΙ—œ¨ô‰€O: Aª’H:S~]Lfí±¬õ±Gþx$•-Ë!Ž%Ýv¡†úÿÙrÏÎÛ²MῪñƒ]‘•'7xó\ïÀ:·TþM‰Íw,ß’ð5JeïœxæPz7·ee áÓ¿ÛyëÃ/(Àª€q˺ŽîxÄ{wÌInäºieË®Y_áÓmGþîððñty÷lÊ £P’ D-t]Óíá¥R9J æ©j­µ¨Qm ?ŽæŽ?7ú¸E9w|£ì&z³’€¶"ª ú»½2¤€@Ã9Šm˜!D"hšš€ÞñÌÇ@1ï-¶KV9å"ŠöØíÛþ쉡EC ícÝ÷$ŽrH’S”¼& œÌ(’Šdc°ýëZ]G@»&Ÿýñ៴ÇÓ™—À—ÇÒ+ï{ô·‡‡pm}å–«V7V@)wä·8­"[º ¸(Yýâ—-ŽEñ7¾þìþŒ-Ë>]e˜SΤ¥²àSøMͯȉÕ+ª.ô‹ ¯ È!›H)R½ò£w¶G–ÀpîØ÷~åÈÔ~ !P”e•BVrÀhƲ¤€ ®… -  PÔZº¨)îs·ß#ZðÒSî%@QC$pÏ+š£!Ø5’úì»úSYÀ“%Á΋|(ËŒv7]¨šÚóÕÝŸ8˜ÞÍ¡®O.þZK¨S‘4…¯)ØéwWgKåÏÉÖŠT^fIwªÆŠÊ þ¤éÓK£ÛÂK '§~ÕÿÝáü1Ù`žã¦žÀ'Ž~ð—ÏÍíµß¾zMK4J…L£3VaNç5€#ÏM?g¦¿LP0ßÒ’¨ ûA©*¿qIsbi<CSù-ÏÉäÏ“¾ólež6Y  ó@jç×vÿÝ©]ÔU±êKkVh•$MáÛTsM…S¤àäZ÷ß*’3¯‰”:¹ñ3ÉÓ^;î,ºj_Í;›>\hµd>ªÇ>±ä«â—©qkø®?~豟h¨€!Lg×1os;Ô ‹Ÿï;vÃÛ÷§AÑ;:jŸþë·Ä&(ªôïZ’ŒøôéI{jÖ÷RE§m!=ûõ̰ Áôk¢ÖÊÐÍë;êò§:üÃë6\Ü€}céËøÔ¯ ‚@@]œ‡ eŸÑî7"bÊ™|~ì1[Yj‡Ó{¿õòçÆ¬AHø“·tÝÝ^b«|@ßÖý/oJ\éîÚS±¶%Üí.4¯4km@@µþäÆøÛ 4ÉEáew®ünSp‘MVH¯xWÓG“Áµþé…<9ô€!LE2íL÷ÿ±×ñx*÷ÄÁAEšxêèèÇÙ1ž·`Y¢âÞ+VµFƒ U]ÈÿßW¯]]W ŽÒ¾¹9ÞQv#¸9t+€ ;VqeG­@E—·&~úî êB~PTòß~AWs4ÛO\òý'>8šf+šäMÏË>£g w6‚H9ü$e ÔÆóCÿ¶çö¾©}šÐý"óÕEŒ*EŽ.Ìt~æÝÍc«¼"ùÞ–Ûî\ùä,«¼à–®»z˜€le‘"%PÈö}þÅ›þ8±ÕÔüŠäÑLï¤=6ý!ÁgV¢NWG<–Ê~ï¥#Y[žÑÔ‡Üvd2 B„ ­1ˆ˜:EL}ËUknZÙ Žˆßçºï\½¤¥®í¬ûâ[—é(/¥$""øÂÐÄÛ´uÛÀhZNª½#©9{zàå¼ì8Ÿ¡”jÎ.r”­¡.P  !|ÊRy ´ú`«­¬Á\Öú›ÃF´7õ…õhµ¯¶?sàÔè‘;µY’tÏSÔßéUädæÆEŸ}oëÇŠÝ6_[Ž^ôǽ[ŽÏ¸! k¶T¶$]ÃîêÈDÎêOeqy¢‚^š€DÈWí7ö¥ÝYsDtò‹.€"o­áš³Þ€†0Ý×î$9DD@êðÔ>p7Ÿ;–=H¥ SöÄ {tf#ͬ=áfv¾@múmO·š-‚£hçàÄÌzÅ&Àý¤žÊ §³îÎÎp* ¡<÷Ù8WÎ÷Œ>Ãìéú¬­A5ÔgÞOÅì}é<Økf¬ÐfJÌîûÏ~§¯7áûf~¼úMŠ1Æg4cŒyg4cŒyg4cŒyg4cŒyg4cŒyg4cŒyg4cŒyg4cŒyWá2Z ðZåªói‚×”–S|¯ižYž^¸Œ6…ϯMáÞa£ªÊ¬™ÙŸ ´PÌW[솰³1Ö“»0³‚"Ò}z{e¨Øí˜V¸Œ®6 ÁVINÁ®È\’dÜ×Ðj+vCØYˆÌõ• ¸~ {5‰ ocCU±[1­pmßòÊ u4yHºÀˆdkxq­¿¥Ø agÁ¯k—·Ö€@¾] `uMti¼¢Øí˜VЯKê®­ 4¬ªs™ÂEýûxoë’ó¶¶šöXø~),xóê6á™0Í踯áºäMЇ¤ ÈVù ñ·­_V솰³Ö üíÚ~Ì^PŽüóî†ÍízxSèÇ—7¼çâÚ«ó*Wà랟le'üÉ¿jû¤†^yHÍÎÊ+[¯îl‡»5!Uc4ôÙ‹zL/•(+tSZèúöOu„—9Ê*ð¥Ï7ŠTȈ|¤ã3­ážb·…½N!SûòeË{j+ArL/0¢°ßø×K—­¨ñÖ,ÕÂÕœíèTï7öÞ¾c|«Ž:×Ì>çÈ’ù¸¿áÖ®/\TsU±›ÃÞ¨½£éüê¹­}£ Kÿ{ eMEð›W¬xOO²Ø­9Sq2NØ£ß;ðåÇ~šv& á㪀ç9Ê(VU_ü—­_Z¹±ØíaçÆÐTþŽ'vý`g_:gƒ¦ñírÎHˆ—¶%>¿iÉ…±b·æU-£]»O<ûðñ=3üð”LIå(@ÀIÎ"‚ÐP3„¹$ºasÃûׯ.ñkÁb7‹c¿ïݲýÐûŸÈÙ’ˆ'²¾^ˆ(Ч‹‹“±ë—·\×Y2=ú̦È 4žÙ7¹mjç¸5h©¿ïΖŽF…Q -Z]WëoÖ…Qì±…¢ˆ†¦òOÛ>x¢?ËÚß-gËÔD<`.ŽE.nеFCžzBøJÅÏhÆc¯ÅÓ Œ1vžãŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïâŒfŒ1ïú;‚‹ˆIEND®B`‚bwctl_1.5.4+dfsg1.orig/doc/bwctld.conf.man.html0000664000076500007710000005222112560414557016231 0ustar Manpage of bwctld.conf

bwctld.conf

Section: File Formats (5)
Updated: $Date: 2008-10-09 12:27:47 -0400 (Thu, 09 Oct 2008) $
Index Return to Main Contents
 

NAME

bwctld.conf - Bandwidth Control daemon configuration file  

DESCRIPTION

The bwctld.conf file is the configuration file for the bwctld(8) program. It is used to configure the basic operation of the server. For example, what addresses and ports it should listen on, where it should send error messages, and where it should save files.

The policy rules for bwctld are configured using the bwctld.limits file; the details for configuring those policies are described in the bwctld.limits(5) manual page.

The format of this file is:

*
Comment lines are any line where the first non-whitespace character is '#'. These lines are counted for the purposes of returning line numbers in error messages but are otherwise ignored by the spawned bwctld.
*
Lines may be continued using the semi-standard '\' character followed immediately by a newline character. This is the only valid place for the '\' character. If it is found elsewhere, a syntax error is reported.
*
Blank lines are treated as comment lines.
*
All other lines are used to set configuration options. The format of these lines is an initial keyword followed by a variable list of arguments, separated by whitespace.
 

CONFIGURATION OPTIONS

access_priority priority
Syslog priority to log access messages.
Default:
LOG_INFO
allow_unsync
Directs bwctld to continue accepting valid requests for throughput tests when the system clock is not synchronized. bwctld prefers to have an NTP synchronized system clock to ensure the two endpoints of the test are actually agreeing to the same scheduled time window for test execution. This option is used to bypass this requirement for systems that either do not have the NTP system calls, or prefer not to configure NTP.

Note: if the difference between the system clocks on the two endpoints is too great, the eventual throughput test will fail when the endpoints attempt to run the test at different times. The threshold for this difference is controlled using the sync_fuzz option. (If you set allow_unsync, you should set sync_fuzz to a reasonable value for your system.)

Default:
unset (set if the operating system does have the NTP system calls)
auth_mode authmode
Specify the authentication modes the server is willing to use for communication. auth_mode should be set as a character string, with any or all of the characters "AEO". The modes are:
A
[A]uthenticated. This mode encrypts the control connection.
E
[E]ncrypted. This mode encrypts the control connection. If the test supports encryption, this mode will additionally encrypt the test stream. (Encryption of the test stream is not currently supported, so this mode is currently identical to authenticated.)
O
[O]pen. No encryption of any kind is done.

The server can specify all the modes with which it is willing to communicate. The most strict mode that both the server and the client are willing to use will be selected.

Default:
"AEO"
bottleneck_capacity bottleneckcapacity
This value is used in the algorithm to dynamically set the TCP send/recv window sizes. This option is likely to be removed in the future once a dynamic bottleneck_capacity algorithm is incorporated into the code. (This option only really works when the local NIC is the bottleneck.) If this option is not specified, the dynamic window calculation requested by the -W option to bwctl is not done and the advisory value is used.
Default:
unset
control_timeout controltimeout
Number of seconds to wait for protocol messages before timing out. This value should be significantly larger than what typical users specify for the -I flag of bwctl or bwctl will have to open a new control connection for each new test it requests.
Default:
7200 (Picked to be the same as the default for TCP keepalive)
die_by dieby
Number of seconds to wait for child processes to gracefully terminate before killing them with SIGKILL. This is in response to the master process receiving SIGTERM or SIGHUP.
Default:
5
disable_iperf
Prevent bwctl from executing Iperf tests
Default:
unset
disable_iperf3
Prevent bwctl from executing Iperf3 tests
Default:
unset
disable_nuttcp
Prevent bwctl from executing Nuttcp tests
Default:
unset
disable_owamp
Prevent bwctl from executing Owamp tests
Default:
unset
disable_ping
Prevent bwctl from executing Ping tests
Default:
unset
disable_tracepath
Prevent bwctl from executing Tracepath tests
Default:
unset
disable_traceroute
Prevent bwctl from executing Traceroute tests
Default:
unset
facility facility
Syslog facility to log messages.
Default:
LOG_DAEMON
group group
Specifies the gid the bwctld process should run as. group can be specified using a valid group name on the system or by using -gid. This option is only used if bwctld is started as root.
Default:
unset
iperf_cmd iperfcmd
The path to the Iperf command on the system. If the iperf_cmd does not contain a '/' character, then the PATH of the bwctld environment will be searched to find the Iperf executable.
Default:
iperf
iperf_port iperfport
The port number(s) that Iperf receivers will use. Currently, bwctld simply cycles through this range linearly. iperf_port can be specified as a single valid port number or as a range as low-high. The range must be specified as two valid port numbers with the '-' character separating them. Whitespace is not allowed within the iperf_port. For example, "5001-5004" would be valid, but "5001 - 5004" would be invalid.

This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of nuttcp_port and thrulay_port.

Default:
unset
iperf3_port iperf3port
The port number(s) that Iperf3 receivers will use. Currently, bwctld simply cycles through this range linearly. iperf3_port can be specified as a single valid port number or as a range as low-high. The range must be specified as two valid port numbers with the '-' character separating them. Whitespace is not allowed within the iperf3_port. For example, "5001-5004" would be valid, but "5001 - 5004" would be invalid.

This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of nuttcp_port and thrulay_port.

Default:
unset
log_location
Directs the bwctld process to report source code file and line number information with error messages. This is a particularly useful option to set when sending in messages as part of a bug report.
Default:
unset
nuttcp_cmd nuttcpcmd
The path to the Nuttcp command on the system. If the nuttcp_cmd does not contain a '/' character, then the PATH of the bwctl environment will be searched to find the Nuttcp executable.
Default:
nuttcp
nuttcp_port nuttcpport
The port number(s) that Nuttcp receivers will use. Currently, bwctld simply cycles through this range linearly. nuttcp_port can be specified as a single valid port number or as a range as low-high. The range must be specified as two valid port numbers with the '-' character separating them. Whitespace is not allowed within the nuttcp_port. For example, "5001-5004" would be valid, but "5001 - 5004" would be invalid.

This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of iperf_port and thrulay_port.

Default:
unset
owamp_cmd owampcmd
The path to the owping command on the system. If the owamp_cmd does not contain a '/' character, then the PATH of the bwctl environment will be searched to find the owping executable.
Default:
owping
owamp_server_cmd owampservercmd
The path to the owampd command on the system. If the owamp_server_cmd does not contain a '/' character, then the PATH of the bwctl environment will be searched to find the owampd executable.
Default:
owampd
owamp_port owampport
The port number(s) that Owamp receivers will use. Currently, bwctld simply cycles through this range linearly. owamp_port must be specified as a range as low-high. The range must be specified as two valid port numbers with the '-' character separating them. Whitespace is not allowed within the owamp_port. For example, "5001-5004" would be valid, but "5001 - 5004" would be invalid.

This value must be set to a range because it is used for both the Owamp communication and test ports.

Default:
unset
peer_port 0 | lowport-highport
Specify the port range that will be used on the local host for peer connections to other bwctld servers. These connections are used to verify clock timing between the servers and to exchange test results. This is a required part of the protocol used by BWCTL to run tests. However, this option allows system administrators to limit these connections to a specific port range, which should allow BWCTL to work in a firewall environment. This option can be specified in two ways. First, as a 0, which would indicate that bwctld should allow the system to pick the port (ephemeral). Second, as a range. lowport must be a smaller value than highport and both numbers must be valid port values. (16-bit unsigned integer values)
Default:
0
ping_cmd pingcmd
The path to the ping command on the system. If the ping_cmd does not contain a '/' character, then the PATH of the bwctl environment will be searched to find the ping executable.
Default:
ping
ping6_cmd ping6cmd
The path to the ping6 command on the system. If the ping6_cmd does not contain a '/' character, then the PATH of the bwctl environment will be searched to find the ping6 executable.
Default:
ping6
post_hook /path/to/script
Specifies a script to run after each bwctl session has finished. These hooks can be used to save the results into a database, track usage or any number of other tasks. You can specify as many hooks as you want by including multiple post_hook entries.
priority priority
Syslog priority to log error messages.
Default:
LOG_ERR
root_folly
Disables the checks that disable bwctld if it is run with root permissions. There are legitimate reasons to run bwctld as root, but it is risky. Forcing this additional option will make it less likely root permissions are accidently used.
Default:
unset
src_node nodename:port
Specify the address and port on which bwctld will listen for requests. nodename can be specified using a DNS name or using the textual representation of the address. It is possible to set the source address without setting the port by simply leaving off the ':' and port specification. If an IPv6 address is specified, note that the accepted format contains nodename in square brackets as: [fe80::fe9f:62d8]. This ensures the port number is distinct from the address specification.
Default:
nodename is wildcarded as any currently available address
port is 4823
sync_fuzz syncfuzz
This value is added to the NTP error estimates to increase the tolerance of bwctld to incomplete NTP configurations, or if the NTP system calls are not available. If NTP is unavailable to bwctld it assumes the clock is accurate to within one second plus the value of sync_fuzz. This option is specified as a floating point number in seconds. For example, to indicate that the system is synchronized within one second, you could specify this option as 1.0.

Practically, this option is used to determine the size of the time window buffer before and after each throughput test.

Default:
0.0
test_port testport
The port number(s) that receivers of all test types will use, unless otherwise set using one of the other port variables. Currently, bwctld simply cycles through this range linearly. test_port must be specified as a range as low-high. The range must be specified as two valid port numbers with the '-' character separating them. Whitespace is not allowed within the test_port. For example, "5001-5004" would be valid, but "5001 - 5004" would be invalid.

This value must be set to a range because it is used for both the Owamp communication and test ports.

Default:
5001-5900
thrulay_port thrulayport
The port number(s) that Thrulay receivers will use. Currently, bwctld simply cycles through this range linearly. thrulay_port can be specified as a single valid port number or as a range as low-high. The range must be specified as two valid port numbers with the '-' character separating them. Whitespace is not allowed within the thrulay_port. For example, "5001-5004" would be valid, but "5001 - 5004" would be invalid.

This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of iperf_port and nuttcp_port.

Default:
unset
tracepath_cmd tracepathcmd
The path to the tracepath command on the system. If the tracepath_cmd does not contain a '/' character, then the PATH of the bwctl environment will be searched to find the tracepath executable.
Default:
tracepath
tracepath6_cmd tracepath6cmd
The path to the tracepath6 command on the system. If the tracepath6_cmd does not contain a '/' character, then the PATH of the bwctl environment will be searched to find the tracepath6 executable.
Default:
tracepath6
traceroute_cmd traceroutecmd
The path to the traceroute command on the system. If the traceroute_cmd does not contain a '/' character, then the PATH of the bwctl environment will be searched to find the traceroute executable.
Default:
traceroute
traceroute6_cmd traceroute6cmd
The path to the traceroute6 command on the system. If the traceroute6_cmd does not contain a '/' character, then the PATH of the bwctl environment will be searched to find the traceroute6 executable.
Default:
traceroute6
user user
Specifies the uid the bwctld process should run as. user can be specified using a valid user name on the system or by using -uid. This option is only used if bwctld is started as root. If the given user has root permissions, the root_folly option must also be specified.
Default:
unset
var_dir vardir
Directory path where the bwctld.pid file will be placed.
Default:
Current directory
 

SEE ALSO

bwctl(1), bwctld(8), bwctld.limits(5), bwctld.keys(5), and the http://software.internet2.edu/bwctl/ web site.

For details on Iperf3, see the https://github.com/esnet/iperf web site.

For details on Iperf, see the http://sourceforge.net/projects/iperf web site.

For details on Nuttcp, see the http://www.wcisd.hpc.mil/nuttcp/Nuttcp-HOWTO.html web site.

For details on Owamp, see the http://software.internet2.edu/owamp web site.  

ACKNOWLEDGMENTS

This material is based in part on work supported by the National Science Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF.


 

Index

NAME
DESCRIPTION
CONFIGURATION OPTIONS
SEE ALSO
ACKNOWLEDGMENTS

This document was created by man2html, using the manual pages.
Time: 15:06:34 GMT, March 20, 2015 bwctl_1.5.4+dfsg1.orig/doc/bwctlrc.man.html0000664000076500007710000005251212560414557015471 0ustar Manpage of bwctlrc

bwctlrc

Section: File Formats (5)
Updated: $Date: 2008-10-09 12:27:47 -0400 (Thu, 09 Oct 2008) $
Index Return to Main Contents
 

NAME

bwctlrc - Bandwidth Control configuration file  

DESCRIPTION

The bwctlrc file is a configuration file for the bwctl(8) program. If a test is requested using bwctl, and there is not a local bwctld(8) running, bwctl will spawn its own copy of bwctld. This configuration file is used to configure the basic operation of the automatically spawned server. For example, it can be used to configure whether to allow the local clock to be unsynchroznied, or where the iperf command is located.

This file can be placed in ~/.bwctlrc, where it will be automatically read by bwctl when it spawns off a bwctld. If the file is put elsewhere, the BWCTLRC environmental variable can be set to the path to the file and bwctl will read it.

The format of this file is:

*
Comment lines are any line where the first non-whitespace character is '#'. These lines are counted for the purposes of returning line numbers in error messages but are otherwise ignored by the spawned bwctld.
*
Lines may be continued using the semi-standard '\' character followed immediately by a newline character. This is the only valid place for the '\' character. If it is found elsewhere, a syntax error is reported.
*
Blank lines are treated as comment lines.
*
All other lines are used to set configuration options. The format of these lines is an initial keyword followed by a variable list of arguments, separated by whitespace.
 

CONFIGURATION OPTIONS

access_priority priority
Syslog priority to log access messages.
Default:
LOG_INFO
allow_unsync
Directs bwctld to continue accepting valid requests for throughput tests when the system clock is not synchronized. bwctld prefers to have an NTP synchronized system clock to ensure the two endpoints of the test are actually agreeing to the same scheduled time window for test execution. This option is used to bypass this requirement for systems that either do not have the NTP system calls, or prefer not to configure NTP.

Note: if the difference between the system clocks on the two endpoints is too great, the eventual throughput test will fail when the endpoints attempt to run the test at different times. The threshold for this difference is controlled using the sync_fuzz option. (If you set allow_unsync, you should set sync_fuzz to a reasonable value for your system.)

Default:
unset (set if the operating system does have the NTP system calls)
auth_mode authmode
Specify the authentication modes the server is willing to use for communication. auth_mode should be set as a character string, with any or all of the characters "AEO". The modes are:
A
[A]uthenticated. This mode encrypts the control connection.
E
[E]ncrypted. This mode encrypts the control connection. If the test supports encryption, this mode will additionally encrypt the test stream. (Encryption of the test stream is not currently supported, so this mode is currently identical to authenticated.)
O
[O]pen. No encryption of any kind is done.

The server can specify all the modes with which it is willing to communicate. The most strict mode that both the server and the client are willing to use will be selected.

Default:
"AEO"
bottleneck_capacity bottleneckcapacity
This value is used in the algorithm to dynamically set the TCP send/recv window sizes. This option is likely to be removed in the future once a dynamic bottleneck_capacity algorithm is incorporated into the code. (This option only really works when the local NIC is the bottleneck.) If this option is not specified, the dynamic window calculation requested by the -W option to bwctl is not done and the advisory value is used.
Default:
unset
control_timeout controltimeout
Number of seconds to wait for protocol messages before timing out. This value should be significantly larger than what typical users specify for the -I flag of bwctl or bwctl will have to open a new control connection for each new test it requests.
Default:
7200 (Picked to be the same as the default for TCP keepalive)
die_by dieby
Number of seconds to wait for child processes to gracefully terminate before killing them with SIGKILL. This is in response to the master process receiving SIGTERM or SIGHUP.
Default:
5
disable_iperf
Prevent bwctl from executing Iperf tests
Default:
unset
disable_iperf3
Prevent bwctl from executing Iperf3 tests
Default:
unset
disable_nuttcp
Prevent bwctl from executing Nuttcp tests
Default:
unset
disable_owamp
Prevent bwctl from executing Owamp tests
Default:
unset
disable_ping
Prevent bwctl from executing Ping tests
Default:
unset
disable_tracepath
Prevent bwctl from executing Tracepath tests
Default:
unset
disable_traceroute
Prevent bwctl from executing Traceroute tests
Default:
unset
facility facility
Syslog facility to log messages.
Default:
LOG_DAEMON
group group
Specifies the gid the bwctld process should run as. group can be specified using a valid group name on the system or by using -gid. This option is only used if bwctld is started as root.
Default:
unset
iperf_cmd iperfcmd
The path to the Iperf command on the system. If the iperf_cmd does not contain a '/' character, then the PATH of the bwctld environment will be searched to find the Iperf executable.
Default:
iperf
iperf_port iperfport
The port number(s) that Iperf receivers will use. Currently, bwctld simply cycles through this range linearly. iperf_port can be specified as a single valid port number or as a range as low-high. The range must be specified as two valid port numbers with the '-' character separating them. Whitespace is not allowed within the iperf_port. For example, "5001-5004" would be valid, but "5001 - 5004" would be invalid.

This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of nuttcp_port and thrulay_port.

Default:
unset
iperf3_port iperf3port
The port number(s) that Iperf3 receivers will use. Currently, bwctld simply cycles through this range linearly. iperf3_port can be specified as a single valid port number or as a range as low-high. The range must be specified as two valid port numbers with the '-' character separating them. Whitespace is not allowed within the iperf3_port. For example, "5001-5004" would be valid, but "5001 - 5004" would be invalid.

This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of nuttcp_port and thrulay_port.

Default:
unset
log_location
Directs the bwctld process to report source code file and line number information with error messages. This is a particularly useful option to set when sending in messages as part of a bug report.
Default:
unset
nuttcp_cmd nuttcpcmd
The path to the Nuttcp command on the system. If the nuttcp_cmd does not contain a '/' character, then the PATH of the bwctl environment will be searched to find the Nuttcp executable.
Default:
nuttcp
nuttcp_port nuttcpport
The port number(s) that Nuttcp receivers will use. Currently, bwctld simply cycles through this range linearly. nuttcp_port can be specified as a single valid port number or as a range as low-high. The range must be specified as two valid port numbers with the '-' character separating them. Whitespace is not allowed within the nuttcp_port. For example, "5001-5004" would be valid, but "5001 - 5004" would be invalid.

This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of iperf_port and thrulay_port.

Default:
unset
owamp_cmd owampcmd
The path to the owping command on the system. If the owamp_cmd does not contain a '/' character, then the PATH of the bwctl environment will be searched to find the owping executable.
Default:
owping
owamp_server_cmd owampservercmd
The path to the owampd command on the system. If the owamp_server_cmd does not contain a '/' character, then the PATH of the bwctl environment will be searched to find the owampd executable.
Default:
owampd
owamp_port owampport
The port number(s) that Owamp receivers will use. Currently, bwctld simply cycles through this range linearly. owamp_port must be specified as a range as low-high. The range must be specified as two valid port numbers with the '-' character separating them. Whitespace is not allowed within the owamp_port. For example, "5001-5004" would be valid, but "5001 - 5004" would be invalid.

This value must be set to a range because it is used for both the Owamp communication and test ports.

Default:
unset
peer_port 0 | lowport-highport
Specify the port range that will be used on the local host for peer connections to other bwctld servers. These connections are used to verify clock timing between the servers and to exchange test results. This is a required part of the protocol used by BWCTL to run tests. However, this option allows system administrators to limit these connections to a specific port range, which should allow BWCTL to work in a firewall environment. This option can be specified in two ways. First, as a 0, which would indicate that bwctld should allow the system to pick the port (ephemeral). Second, as a range. lowport must be a smaller value than highport and both numbers must be valid port values. (16-bit unsigned integer values)
Default:
0
ping_cmd pingcmd
The path to the ping command on the system. If the ping_cmd does not contain a '/' character, then the PATH of the bwctl environment will be searched to find the ping executable.
Default:
ping
ping6_cmd ping6cmd
The path to the ping6 command on the system. If the ping6_cmd does not contain a '/' character, then the PATH of the bwctl environment will be searched to find the ping6 executable.
Default:
ping6
post_hook /path/to/script
Specifies a script to run after each bwctl session has finished. These hooks can be used to save the results into a database, track usage or any number of other tasks. You can specify as many hooks as you want by including multiple post_hook entries.
priority priority
Syslog priority to log error messages.
Default:
LOG_ERR
root_folly
Disables the checks that disable bwctld if it is run with root permissions. There are legitimate reasons to run bwctld as root, but it is risky. Forcing this additional option will make it less likely root permissions are accidently used.
Default:
unset
src_node nodename:port
Specify the address and port on which bwctld will listen for requests. nodename can be specified using a DNS name or using the textual representation of the address. It is possible to set the source address without setting the port by simply leaving off the ':' and port specification. If an IPv6 address is specified, note that the accepted format contains nodename in square brackets as: [fe80::fe9f:62d8]. This ensures the port number is distinct from the address specification.
Default:
nodename is wildcarded as any currently available address
port is 4823
sync_fuzz syncfuzz
This value is added to the NTP error estimates to increase the tolerance of bwctld to incomplete NTP configurations, or if the NTP system calls are not available. If NTP is unavailable to bwctld it assumes the clock is accurate to within one second plus the value of sync_fuzz. This option is specified as a floating point number in seconds. For example, to indicate that the system is synchronized within one second, you could specify this option as 1.0.

Practically, this option is used to determine the size of the time window buffer before and after each throughput test.

Default:
0.0
test_port testport
The port number(s) that receivers of all test types will use, unless otherwise set using one of the other port variables. Currently, bwctld simply cycles through this range linearly. test_port must be specified as a range as low-high. The range must be specified as two valid port numbers with the '-' character separating them. Whitespace is not allowed within the test_port. For example, "5001-5004" would be valid, but "5001 - 5004" would be invalid.

This value must be set to a range because it is used for both the Owamp communication and test ports.

Default:
5001-5900
thrulay_port thrulayport
The port number(s) that Thrulay receivers will use. Currently, bwctld simply cycles through this range linearly. thrulay_port can be specified as a single valid port number or as a range as low-high. The range must be specified as two valid port numbers with the '-' character separating them. Whitespace is not allowed within the thrulay_port. For example, "5001-5004" would be valid, but "5001 - 5004" would be invalid.

This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of iperf_port and nuttcp_port.

Default:
unset
tracepath_cmd tracepathcmd
The path to the tracepath command on the system. If the tracepath_cmd does not contain a '/' character, then the PATH of the bwctl environment will be searched to find the tracepath executable.
Default:
tracepath
tracepath6_cmd tracepath6cmd
The path to the tracepath6 command on the system. If the tracepath6_cmd does not contain a '/' character, then the PATH of the bwctl environment will be searched to find the tracepath6 executable.
Default:
tracepath6
traceroute_cmd traceroutecmd
The path to the traceroute command on the system. If the traceroute_cmd does not contain a '/' character, then the PATH of the bwctl environment will be searched to find the traceroute executable.
Default:
traceroute
traceroute6_cmd traceroute6cmd
The path to the traceroute6 command on the system. If the traceroute6_cmd does not contain a '/' character, then the PATH of the bwctl environment will be searched to find the traceroute6 executable.
Default:
traceroute6
user user
Specifies the uid the bwctld process should run as. user can be specified using a valid user name on the system or by using -uid. This option is only used if bwctld is started as root. If the given user has root permissions, the root_folly option must also be specified.
Default:
unset
var_dir vardir
Directory path where the bwctld.pid file will be placed.
Default:
Current directory
 

SEE ALSO

bwctl(1), bwctld(8), bwctld.limits(5), bwctld.keys(5), and the http://software.internet2.edu/bwctl/ web site.

For details on Iperf3, see the https://github.com/esnet/iperf web site.

For details on Iperf, see the http://sourceforge.net/projects/iperf web site.

For details on Nuttcp, see the http://www.wcisd.hpc.mil/nuttcp/Nuttcp-HOWTO.html web site.

For details on Owamp, see the http://software.internet2.edu/owamp web site.  

ACKNOWLEDGMENTS

This material is based in part on work supported by the National Science Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF.


 

Index

NAME
DESCRIPTION
CONFIGURATION OPTIONS
SEE ALSO
ACKNOWLEDGMENTS

This document was created by man2html, using the manual pages.
Time: 15:06:34 GMT, March 20, 2015 bwctl_1.5.4+dfsg1.orig/doc/bwctld.limits.man0000664000076500007710000002661612560414557015653 0ustar '\"t .\" The first line of this file must contain the '"[e][r][t][v] line .\" to tell man to run the appropriate filter "t" for table. .\" .\" $Id$ .\" .\"###################################################################### .\"# # .\"# Copyright (C) 2004 # .\"# Internet2 # .\"# All Rights Reserved # .\"# # .\"###################################################################### .\" .\" File: bwctld.limits.man .\" .\" Author: Jeff Boote .\" Internet2 .\" .\" Date: Fri Feb 13 12:45:52 MST 2004 .\" .\" Description: .\" .TH bwctld.limits 5 "$Date$" .SH NAME bwctld.limits \- \fBB\fRand\fBw\fRidth \fBC\fRon\fBt\fRro\fBl\fR \fBd\fRaemon policy configuration file .SH DESCRIPTION The \fBbwctld.limits\fR file is used to define the policy configuration for the \fBbwctld\fR program. It allows the system administrator to allocate the resources in a variety of ways. .PP There are two parts to the policy configuration: .TP Authentication Who is making the request? This can be very specific to an individual user or it can be more general in that the connection is coming from some particular network. .TP Authorization Now that the connection has been generally identified, what will \fBbwctld\fR allow it to do? .PP The authentication is done by assigning a \fIuserclass\fR to each new connection as it comes in. Each \fIuserclass\fR has a set of limits associated with it. The \fIuserclass\fRes are hierarchical, so a connection must pass the limit restrictions of the given \fIuserclass\fR as well as all parent classes. .PP Within the \fBbwcltd.limits\fR file, \fIassign\fR lines are used to assign a \fIuserclass\fR to a given connection. \fIlimit\fR lines are used to define a \fIuserclass\fR and set the limits associated with that \fIuserclass\fR. The file is read sequentially, and it is not permitted to use a \fIclassname\fR before it is defined using a limit line. .PP The format of this file is: .RS .IP \(bu Comment lines are any line where the first non-whitespace character is '#'. These lines are counted to return line numbers in error messages but are otherwise ignored by \fBbwctld\fR. .IP \(bu Lines may be continued using the semi-standard '\\' character followed immediately by a newline. This is the only valid place for the '\\' character. If it is found elsewhere a syntax error is reported. .IP \(bu Blank lines are treated as comment lines. .IP \(bu All other lines must conform to the syntax of a \fIlimit\fR line or an \fIassign\fR line. .RE .SH CONFIGURATION OPTIONS .TP \fIlimit\fR This directive is used to define the \fIuserclass\fR hierarchy. It defines the \fIclassname\fR as well as the limits associated with that class. A \fIclassname\fR may only be defined once. The format of the \fIlimit\fR directive is: .PP .RS limit \fIclassname\fR with \fIlimtype\fR=\fIvalue\fR[,\fIlimtype\fR=\fIvalue\fR]* .PP \fIclassname\fR defines the name of the class with the given limits. Whitespace is used as a separator but is otherwise ignored. \fIclassname\fR may be used as a directory name component within \fBbwctld\fR, so take care not to use characters that would be invalid. (i.e. '*' or '/' would be particularly bad.) .PP \fIlimtype\fR and \fIvalue\fR indicate the particular type of limit and value to apply to this \fIuserclass\fR. The available settings for \fIlimtype\fR are: .TS li li li _ _ _ li l l . limtype valid values default allow_open_mode on/off on allow_tcp on/off on allow_udp on/off off bandwidth integer (b/s) 0 (unlimited) duration integer (seconds) 0 (unlimited) event_horizon integer (seconds) 0 (unlimited) max_time_error integer (seconds) 0 (unlimited) parent previously defined \fIclassname\fR null pending integer 0 (unlimited) .TE .TP .I allow_open_mode This limit is only useful if the class is assigned to a netmask. It is used to limit specific IP/netmask identities to only encrypted or authenticated mode transactions or to allow open mode. .TP .I allow_tcp Allow TCP \fBIperf\fR tests for \fIuserclass\fR. .TP .I allow_udp Allow UDP \fBIperf\fR tests for \fIuserclass\fR. .TP .I bandwidth Maximum amount of bandwidth to allow \fIuserclass\fR to use in a UDP \fBIperf\fR test. 0 indicates unlimited by policy, but remember this is checked all the way to the root of the hierarchy. (If you want an unlimited \fIuserclass\fR, your root must be unlimited, and the whole path down to the given \fIuserclass\fR.) .TP .I duration Maximum duration of a single \fBIperf\fR test for this \fIuserclass\fR. .TP .I event_horizon Maximum window into the future to look when trying to schedule a test for this \fIuserclass\fR. .TP .I max_time_error Maximum amount of time error to allow for tests in this class. The time error is the sum of the errors reported by NTP on the two involved systems. The larger the time error, the larger the duration of the reservation because the time error is used to ensure tests don't overlap. There is a limit on this to defend against DOS attacks where a client could report large errors to ensure other clients can not allocate test reservations. .TP .I parent The first \fIlimit\fR line cannot have a parent since none have been defined yet. As such, the first line defines the root of your class hierarchy. All remaining limit lines \fBMUST\fR assign a parent. (It is hierarchical, after all.) .TP .I pending Maximum number of \fIpending\fR reservations for this \fIuserclass\fR. .RE .TP \fIassign\fR The \fIassign\fR directive is used to assign a \fIuserclass\fR to a given connection. Basically, it authenticates the connection. The format of the \fIassign\fR directive is: .PP .RS assign \fIauthtype\fR [\fIargs\fR] \fIclassname\fR .PP \fIauthtype\fR identifies the type of authentication being used. Whitespace is used as a separator but is otherwise ignored. \fIclassname\fR must have been previously defined with the \fIlimit\fR directive earlier in the file. .PP The available settings for \fIauthtype\fR are: .TP .B default Used if no other assignment matches. It takes no \fIargs\fR. .TP .BI net " subnet" Assign a specific \fIsubnet\fR to a given \fIuserclass\fR. \fIsubnet\fR must be specified using VLSM notation (IP/nbits). The only \fIarg\fR is the \fIsubnet\fR. For example: .RS .TP 127.0.0.1/32 would match only the loopback IPv4 address. .TP ::1/128 would match only the loopback IPv6 address. .TP 192.168.1.0/24 would match all hosts on the 192.168.1.XXX network. .PP There must be no set bits in the non-masked portion of the address part of the \fIsubnet\fR specification. i.e., 192.168.1.1/24 would be an invalid \fIsubnet\fR due to the bit set in the fourth octet. .RE .TP .BI user " user" Assign a specific \fIuser\fR to a given \fIuserclass\fR. The \fIuser\fR must be defined in the \fBbwctld.keys\fR file. .SH AUTHENTICATION PROCESS \fBbwctld\fR determines if it should allow a connection from the client based upon the authentication mode of the request and the source IP address of the connection. If the client connection is in authenticated or encrypted mode, the daemon does not do any filtering based upon the source address of the connection. (See the \fB\-A\fR option to \fBbwctl\fR and the \fIauthmode\fR option in \fBbwctld.conf\fR.) In these modes, \fBbwctld\fR simply uses the \fIidentity\fR of the connection to determine the \fIuserclass\fR limits. If the connection is made in open mode, then \fBbwctld\fR first uses the source address to determine if \fBbwctld\fR should allow an open mode connection from that subnet at all. (This is the purpose of the \fIallow_open_mode limtype\fR described above.) If open mode is allowed from this subnet, then the \fIuserclass\fR is determined by the closest subnet match defined by the \fIassign net\fR lines in the \fBbwctld.limits\fR file. .SH EXAMPLES An initial \fIlimit\fR line might look like: .RS .HP limit root with \\ .br bandwidth=900m, \\ .br duration=0, \\ .br allow_udp=on, \\ .br allow_tcp=on, \\ .br allow_open_mode=off .RE .PP This would create a \fIuserclass\fR named \fBroot\fR. Because no \fIparent\fR is specified, this must be the first \fIuserclass\fR defined in the file. This \fIuserclass\fR has very liberal limits (UDP enabled with 900m limit). However, open mode authentication is not enabled for this \fIuserclass\fR, so the connections that get these limits must successfully authenticate using an AES key. .PP If an administrator also wants to create a \fIuserclass\fR that is used to deny all requests, they might add: .RS .HP limit jail with \\ .br parent=root, \\ .br allow_udp=off, \\ .br allow_tcp=off, \\ .br allow_open_mode=off .RE .PP This would create a \fIuserclass\fR named \fBjail\fR. Because UDP and TCP tests have both been denied, no tests will be allowed. Also, \fIallow_open_mode\fR is off, so initial connections that are not in authenticated or encrypted mode would be dropped immediately anyway. (It would not make much sense to assign a \fIuser\fR identity to this \fIuserclass\fR. If you don't want connections from a particular \fIuser\fR, the best thing to do is to remove that \fIuser\fR from the \fBbwctld.keys\fR file. .PP If the administrator wanted to allow a limited amount of open tests, they could define a \fIuserclass\fR like: .RS .HP limit open with \\ .br parent=root, \\ .br allow_open_mode=on, \\ .br allow_udp=off, \\ .br allow_tcp=on, \\ .br duration=30, \\ .br event_horizon=300, \\ .br pending=5 .RE .PP This could be used to allow TCP throughput tests by random connections. It limits those tests to 30 seconds in duration, and only allows them to be scheduled within the next 5 minutes (\fIevent_horizon\fR=300). Additionally, it only allows this \fIuserclass\fR to have 5 currently \fIpending\fR reservations. This ensures that this \fIuserclass\fR can only schedule 50% of the next 5 minutes. The advantage of this kind of setup is that the administrator can define other \fIuserclasses\fR with a larger \fIevent_horizon\fR allowing then to have priority over this class. (Suggestions for other methods of priority scheduling should be sent to bwctl\-users@internet2.edu.) .PP Now, these three \fIuserclasses\fR might be assigned to specific connections in the following ways: .RS .PP # default open .br assign default \fBopen\fR .PP # badguys subnet .br assign net 192.168.1.0/24 \fBjail\fR .PP # network admins .br assign user joe \fBroot\fR .br assign user jim \fBroot\fR .br assign user bob \fBroot\fR .br .RE .PP This set of \fIassign\fR lines specifically denies access from any open mode connection from the \fBbadguys\fR subnet. It specifically allows access to authenticated or encrypted mode transactions that can authenticate as the \fIidentities\fR \fBjoe jim\fR or \fBbob\fR (even from the \fBbadguys\fR subnet). All other connections would match the \fIassign default\fR rule and get the limits associated with the \fBopen\fR \fIuserclass\fR. .SH SEE ALSO bwctl(1), bwctld(8), bwctld.limits(5), bwctld.keys(5), and the \%http://software.internet2.edu/bwctl/ web site. .PP For details on \fBIperf3\fR, see the \%https://github.com/esnet/iperf web site. .PP For details on \fBIperf\fR, see the \%http://sourceforge.net/projects/iperf web site. .PP For details on \fBNuttcp\fR, see the \%http://www.wcisd.hpc.mil/nuttcp/Nuttcp\-HOWTO.html web site. .PP For details on \fBOwamp\fR, see the \%http://software.internet2.edu/owamp web site. .SH ACKNOWLEDGMENTS This material is based in part on work supported by the National Science Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF. bwctl_1.5.4+dfsg1.orig/doc/bwctlrc.man0000664000076500007710000004557212560414557014536 0ustar .lf 1 bwctlrc.ms .\" The first line of this file must contain the '"[e][r][t][v] line .\" to tell man to run the appropriate filter "t" for table. .\" .\" $Id: bwctlrc.man 493 2008-10-09 16:27:47Z aaron $ .\" .\"###################################################################### .\"# # .\"# Copyright (C) 2004 # .\"# Internet2 # .\"# All Rights Reserved # .\"# # .\"###################################################################### .\" .\" File: bwctlrc.8 .\" .\" Author: Jeff Boote and Aaron Brown .\" Internet2 .\" .\" Date: Tue Jan 06 07:44:09 EST 2009 .\" .\" Description: .\" .TH bwctlrc 5 "$Date: 2008\-10\-09 12:27:47 \-0400 (Thu, 09 Oct 2008) $" .SH NAME bwctlrc \- \fBB\fRand\fBw\fRidth \fBC\fRon\fBt\fRro\fBl\fR configuration file .SH DESCRIPTION The \fBbwctlrc\fR file is a configuration file for the bwctl(8) program. If a test is requested using bwctl, and there is not a local bwctld(8) running, bwctl will spawn its own copy of bwctld. This configuration file is used to configure the basic operation of the automatically spawned server. For example, it can be used to configure whether to allow the local clock to be unsynchroznied, or where the iperf command is located. .PP This file can be placed in ~/.bwctlrc, where it will be automatically read by bwctl when it spawns off a bwctld. If the file is put elsewhere, the BWCTLRC environmental variable can be set to the path to the file and bwctl will read it. .PP .lf 1 bwctld_conf_opts.man .\" The first line of this file must contain the '"[e][r][t][v] line .\" to tell man to run the appropriate filter "t" for table. .\" .\" $Id: bwctlrc.man 493 2008-10-09 16:27:47Z aaron $ .\" .\"###################################################################### .\"# # .\"# Copyright (C) 2004 # .\"# Internet2 # .\"# All Rights Reserved # .\"# # .\"###################################################################### .\" .\" File: bwctlrc.8 .\" .\" Author: Jeff Boote and Aaron Brown .\" Internet2 .\" .\" Date: Tue Jan 06 07:44:09 EST 2009 .\" .\" Description: .\" .PP The format of this file is: .RS .IP \(bu Comment lines are any line where the first non-whitespace character is '#'. These lines are counted for the purposes of returning line numbers in error messages but are otherwise ignored by the spawned \fBbwctld\fR. .IP \(bu Lines may be continued using the semi-standard '\\' character followed immediately by a newline character. This is the only valid place for the '\\' character. If it is found elsewhere, a syntax error is reported. .IP \(bu Blank lines are treated as comment lines. .IP \(bu All other lines are used to set configuration options. The format of these lines is an initial keyword followed by a variable list of arguments, separated by whitespace. .RE .SH CONFIGURATION OPTIONS .TP .BI access_priority " priority" Syslog \fIpriority\fR to log access messages. .RS .IP Default: LOG_INFO .RE .TP .B allow_unsync Directs \fBbwctld\fR to continue accepting valid requests for throughput tests when the system clock is not synchronized. \fBbwctld\fR prefers to have an NTP synchronized system clock to ensure the two endpoints of the test are actually agreeing to the same scheduled time window for test execution. This option is used to bypass this requirement for systems that either do not have the NTP system calls, or prefer not to configure NTP. .RS .PP Note: if the difference between the system clocks on the two endpoints is too great, the eventual throughput test will fail when the endpoints attempt to run the test at different times. The threshold for this difference is controlled using the \fIsync_fuzz\fR option. (If you set allow_unsync, you should set \fIsync_fuzz\fR to a reasonable value for your system.) .PP .IP Default: unset (set if the operating system does have the NTP system calls) .RE .TP .BI auth_mode " authmode" Specify the authentication modes the server is willing to use for communication. \fIauth_mode\fR should be set as a character string, with any or all of the characters "AEO". The modes are: .RS .IP \fBA\fR [\fBA\fR]uthenticated. This mode encrypts the control connection. .IP \fBE\fR [\fBE\fR]ncrypted. This mode encrypts the control connection. If the test supports encryption, this mode will additionally encrypt the test stream. (Encryption of the test stream is not currently supported, so this mode is currently identical to authenticated.) .IP \fBO\fR [\fBO\fR]pen. No encryption of any kind is done. .PP The server can specify all the modes with which it is willing to communicate. The most strict mode that both the server and the client are willing to use will be selected. .IP Default: "AEO" .RE .TP .BI bottleneck_capacity " bottleneckcapacity" This value is used in the algorithm to dynamically set the TCP send/recv window sizes. This option is likely to be removed in the future once a dynamic \fIbottleneck_capacity\fR algorithm is incorporated into the code. (This option only really works when the local NIC is the bottleneck.) If this option is not specified, the dynamic window calculation requested by the \fB\-W\fR option to \fBbwctl\fR is not done and the advisory value is used. .RS .IP Default: unset .RE .TP .BI control_timeout " controltimeout" Number of seconds to wait for protocol messages before timing out. This value should be significantly larger than what typical users specify for the \fB\-I\fR flag of \fBbwctl\fR or \fBbwctl\fR will have to open a new control connection for each new test it requests. .RS .IP Default: 7200 (Picked to be the same as the default for TCP keepalive) .RE .TP .BI die_by " dieby" Number of seconds to wait for child processes to gracefully terminate before killing them with \fBSIGKILL\fR. This is in response to the master process receiving \fBSIGTERM\fR or \fBSIGHUP\fR. .RS .IP Default: 5 .RE .TP .BI disable_iperf Prevent \fBbwctl\fR from executing \fBIperf\fR tests .RS .IP Default: unset .RE .TP .BI disable_iperf3 Prevent \fBbwctl\fR from executing \fBIperf3\fR tests .RS .IP Default: unset .RE .TP .BI disable_nuttcp Prevent \fBbwctl\fR from executing \fBNuttcp\fR tests .RS .IP Default: unset .RE .TP .BI disable_owamp Prevent \fBbwctl\fR from executing \fBOwamp\fR tests .RS .IP Default: unset .RE .TP .BI disable_ping Prevent \fBbwctl\fR from executing \fBPing\fR tests .RS .IP Default: unset .RE .TP .BI disable_tracepath Prevent \fBbwctl\fR from executing \fBTracepath\fR tests .RS .IP Default: unset .RE .TP .BI disable_traceroute Prevent \fBbwctl\fR from executing \fBTraceroute\fR tests .RS .IP Default: unset .RE .TP .BI facility " facility" Syslog \fIfacility\fR to log messages. .RS .IP Default: LOG_DAEMON .RE .TP .BI group " group" Specifies the gid the \fBbwctld\fR process should run as. \fIgroup\fR can be specified using a valid group name on the system or by using \-gid. This option is only used if \fBbwctld\fR is started as root. .RS .IP Default: unset .RE .TP .BI iperf_cmd " iperfcmd" The path to the \fBIperf\fR command on the system. If the \fIiperf_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctld\fR environment will be searched to find the \fBIperf\fR executable. .RS .IP Default: iperf .RE .TP .BI iperf_port " iperfport" The port number(s) that \fBIperf\fR receivers will use. Currently, \fBbwctld\fR simply cycles through this range linearly. \fIiperf_port\fR can be specified as a single valid port number or as a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid port numbers with the '\-' character separating them. Whitespace is not allowed within the \fIiperf_port\fR. For example, \fB"5001\-5004"\fR would be valid, but \fB"5001 \- 5004"\fR would be invalid. .RS .PP This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of nuttcp_port and thrulay_port. .PP .IP Default: unset .RE .TP .BI iperf3_port " iperf3port" The port number(s) that \fBIperf3\fR receivers will use. Currently, \fBbwctld\fR simply cycles through this range linearly. \fIiperf3_port\fR can be specified as a single valid port number or as a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid port numbers with the '\-' character separating them. Whitespace is not allowed within the \fIiperf3_port\fR. For example, \fB"5001\-5004"\fR would be valid, but \fB"5001 \- 5004"\fR would be invalid. .RS .PP This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of nuttcp_port and thrulay_port. .PP .IP Default: unset .RE .TP .B log_location Directs the \fBbwctld\fR process to report source code file and line number information with error messages. This is a particularly useful option to set when sending in messages as part of a bug report. .RS .IP Default: unset .RE .TP .BI nuttcp_cmd " nuttcpcmd" The path to the \fBNuttcp\fR command on the system. If the \fInuttcp_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBNuttcp\fR executable. .RS .IP Default: nuttcp .RE .TP .BI nuttcp_port " nuttcpport" The port number(s) that \fBNuttcp\fR receivers will use. Currently, \fBbwctld\fR simply cycles through this range linearly. \fInuttcp_port\fR can be specified as a single valid port number or as a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid port numbers with the '\-' character separating them. Whitespace is not allowed within the \fInuttcp_port\fR. For example, \fB"5001\-5004"\fR would be valid, but \fB"5001 \- 5004"\fR would be invalid. .RS .PP This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of iperf_port and thrulay_port. .PP .IP Default: unset .RE .TP .BI owamp_cmd " owampcmd" The path to the \fBowping\fR command on the system. If the \fIowamp_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBowping\fR executable. .RS .IP Default: owping .RE .TP .BI owamp_server_cmd " owampservercmd" The path to the \fBowampd\fR command on the system. If the \fIowamp_server_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBowampd\fR executable. .RS .IP Default: owampd .RE .TP .BI owamp_port " owampport" The port number(s) that \fBOwamp\fR receivers will use. Currently, \fBbwctld\fR simply cycles through this range linearly. \fIowamp_port\fR must be specified as a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid port numbers with the '\-' character separating them. Whitespace is not allowed within the \fIowamp_port\fR. For example, \fB"5001\-5004"\fR would be valid, but \fB"5001 \- 5004"\fR would be invalid. .RS .PP This value must be set to a range because it is used for both the \fBOwamp\fR communication and test ports. .PP .IP Default: unset .RE .TP .BI peer_port " 0 | lowport\-highport" Specify the port range that will be used on the local host for peer connections to other .B bwctld servers. These connections are used to verify clock timing between the servers and to exchange test results. This is a required part of the protocol used by .B BWCTL to run tests. However, this option allows system administrators to limit these connections to a specific port range, which should allow .B BWCTL to work in a firewall environment. This option can be specified in two ways. First, as a 0, which would indicate that .B bwctld should allow the system to pick the port (ephemeral). Second, as a range. .I lowport must be a smaller value than .I highport and both numbers must be valid port values. (16-bit unsigned integer values) .RS .IP Default: 0 .RE .TP .BI ping_cmd " pingcmd" The path to the \fBping\fR command on the system. If the \fIping_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBping\fR executable. .RS .IP Default: ping .RE .TP .BI ping6_cmd " ping6cmd" The path to the \fBping6\fR command on the system. If the \fIping6_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBping6\fR executable. .RS .IP Default: ping6 .RE .TP .BI post_hook " /path/to/script" Specifies a script to run after each bwctl session has finished. These hooks can be used to save the results into a database, track usage or any number of other tasks. You can specify as many hooks as you want by including multiple post_hook entries. .TP .BI priority " priority" Syslog \fIpriority\fR to log error messages. .RS .IP Default: LOG_ERR .RE .TP .B root_folly Disables the checks that disable \fBbwctld\fR if it is run with \fIroot\fR permissions. There are legitimate reasons to run \fBbwctld\fR as root, but it is risky. Forcing this additional option will make it less likely root permissions are accidently used. .RS .IP Default: unset .RE .TP .BI src_node " nodename:port" Specify the address and port on which \fBbwctld\fR will listen for requests. \fInodename\fR can be specified using a DNS name or using the textual representation of the address. It is possible to set the source address without setting the \fIport\fR by simply leaving off the ':' and \fIport\fR specification. If an IPv6 address is specified, note that the accepted format contains \fInodename\fR in square brackets as: [fe80::fe9f:62d8]. This ensures the port number is distinct from the address specification. .RS .IP Default: \fInodename\fR is wildcarded as any currently available address .br \fIport\fR is 4823 .RE .TP .BI sync_fuzz " syncfuzz" This value is added to the NTP error estimates to increase the tolerance of \fBbwctld\fR to incomplete NTP configurations, or if the NTP system calls are not available. If NTP is unavailable to \fBbwctld\fR it assumes the clock is accurate to within one second plus the value of \fIsync_fuzz\fR. This option is specified as a floating point number in seconds. For example, to indicate that the system is synchronized within one second, you could specify this option as 1.0. .RS .PP Practically, this option is used to determine the size of the time window buffer before and after each throughput test. .IP Default: 0.0 .RE .TP .BI test_port " testport" The port number(s) that receivers of all test types will use, unless otherwise set using one of the other port variables. Currently, \fBbwctld\fR simply cycles through this range linearly. \fItest_port\fR must be specified as a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid port numbers with the '\-' character separating them. Whitespace is not allowed within the \fItest_port\fR. For example, \fB"5001\-5004"\fR would be valid, but \fB"5001 \- 5004"\fR would be invalid. .RS .PP This value must be set to a range because it is used for both the \fBOwamp\fR communication and test ports. .PP .IP Default: 5001-5900 .RE .TP .BI thrulay_port " thrulayport" The port number(s) that \fBThrulay\fR receivers will use. Currently, \fBbwctld\fR simply cycles through this range linearly. \fIthrulay_port\fR can be specified as a single valid port number or as a range as \fIlow\fR\-\fIhigh\fR. The range must be specified as two valid port numbers with the '\-' character separating them. Whitespace is not allowed within the \fIthrulay_port\fR. For example, \fB"5001\-5004"\fR would be valid, but \fB"5001 \- 5004"\fR would be invalid. .RS .PP This value should be set to a range because it can take a few minutes for a port to become free after a test has run. If the port is not free when the next test starts, the test will fail. If set to a range, the daemon will cycle through them when starting tests, decreasing the chance that a port will still be open when the test starts. For best results, ensure that this range is different from that of iperf_port and nuttcp_port. .PP .IP Default: unset .RE .TP .BI tracepath_cmd " tracepathcmd" The path to the \fBtracepath\fR command on the system. If the \fItracepath_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBtracepath\fR executable. .RS .IP Default: tracepath .RE .TP .BI tracepath6_cmd " tracepath6cmd" The path to the \fBtracepath6\fR command on the system. If the \fItracepath6_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBtracepath6\fR executable. .RS .IP Default: tracepath6 .RE .TP .BI traceroute_cmd " traceroutecmd" The path to the \fBtraceroute\fR command on the system. If the \fItraceroute_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBtraceroute\fR executable. .RS .IP Default: traceroute .RE .TP .BI traceroute6_cmd " traceroute6cmd" The path to the \fBtraceroute6\fR command on the system. If the \fItraceroute6_cmd\fR does not contain a '/' character, then the PATH of the \fBbwctl\fR environment will be searched to find the \fBtraceroute6\fR executable. .RS .IP Default: traceroute6 .RE .TP .BI user " user" Specifies the uid the \fBbwctld\fR process should run as. \fIuser\fR can be specified using a valid user name on the system or by using \-uid. This option is only used if \fBbwctld\fR is started as root. If the given \fIuser\fR has \fIroot\fR permissions, the \fIroot_folly\fR option must also be specified. .RS .IP Default: unset .RE .TP .BI var_dir " vardir" Directory path where the bwctld.pid file will be placed. .RS .IP Default: Current directory .RE .lf 40 bwctlrc.ms .SH SEE ALSO bwctl(1), bwctld(8), bwctld.limits(5), bwctld.keys(5), and the \%http://software.internet2.edu/bwctl/ web site. .PP For details on \fBIperf3\fR, see the \%https://github.com/esnet/iperf web site. .PP For details on \fBIperf\fR, see the \%http://sourceforge.net/projects/iperf web site. .PP For details on \fBNuttcp\fR, see the \%http://www.wcisd.hpc.mil/nuttcp/Nuttcp\-HOWTO.html web site. .PP For details on \fBOwamp\fR, see the \%http://software.internet2.edu/owamp web site. .SH ACKNOWLEDGMENTS This material is based in part on work supported by the National Science Foundation (NSF) under Grant No. ANI-0314723. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF. bwctl_1.5.4+dfsg1.orig/doc/architecture.html0000664000076500007710000001642012560414557015737 0ustar BWCTL - Architecture

BWCTL Architecture

$Date$

Components Overview

In the general case, BWCTL works by having a bwctld process on each of the endpoint test systems. The bwctl client contacts each of those daemons and requests a test. That request includes an indication of the desired time period as well as a full parameterization of the desired Iperf, Nuttcp or Thrulay test. bwctld is responsible for implementing the policy and scheduling constraints.

General Case

bwctld has been developed as a classic accept/fork daemon. The master daemon process listens for new network connections and also manages the resources for all child bwctld processes. Once a connection comes in, bwctld forks a child process to handle that request. The child process deals with all encryption and communication issues with the client, as well as dealing with all static resource limits. Static resource limits are those not dependent upon what is currently happening on the node. For example, the request broker can easily determine if the given client is allowed to do UDP tests without talking to the master daemon. Once the request broker process determines the request is valid, it makes a request to the master daemon for the resources and time period requested by the client. If the master daemon has the resources available (including the open time period), it grants the request.

Scheduling Requests

The time period for the test is always requested by the client. It makes a request to the request broker process on each endpoint of the test in turn. The time period is requested by specifying two timestamps. The earliest time and the latest time the client is willing to settle for. The request broker either returns a tentative reservation with the first open time that will fulfill the parameters of the test or a request denied message. The client can then use the tentative reservation time as the earliest time in the request to the request broker on the other host. Eventually, an agreed upon time will be reached or the latest time will be reached. If the request broker can not fulfill the request before the latest time specified in the request, it will return a server too busy message. If the client gets the same time from both servers, it must then confirm the reservation with a start session message. The start session message must be received before a configurable timeout period and before the reservation time, or the server will disallow the reservation.

Scheduling Algorithm

The bwctld parent resource broker process holds the master schedule. When requests come in from clients, the request broker process does the non-global authorization checks and then passes the global authorization checks up to the resource broker including the request for a given time slot. The scheduling itself is simply a first-fit algorithm with limits imposed on how far it is willing to schedule into the future.

Each time slot that is requested is padded to allow for time synchronization issues. The algorithm for the padding is dynamic and depends upon the following factors:

    L (local)
    accuracy of the local clock as reported by NTP and the local sync_fuzz parameter setting
    P (peer)
    accuracy of the peer clock as reported by NTP and the peer sync_fuzz parameter setting
    R (round trip time)
    Round Trip Time between the local host and the peer
The algorithm is:
    A + L + P + (2 * R)
Where A is a small constant. (Currently, one second in the code.)

This amount of time is padded before and after each time slot that is requested. The algorithm was designed to continue to work in the case when the test peer is not as well synchronized and is perhaps halfway around the globe.

The padding is placed before and after the test slot because there is 2 RTT of communication before and after each test. For well synchronized hosts that are fairly near one another, this algorithm usually provides 2-3 seconds of padding between each test (time slot). This could potentially be reduced by making the A constant smaller. That constant represents the amount of time it takes a host to context switch, start processes, and includes how quickly the throughput tester notices that its time is up. Experimentation has shown that even with 1 second of padding, the throughput testers sometimes need to be killed off.

Test Execution

Once the client sends the the start session message, the request broker forks off a peer agent that is responsible for verifying the time offset to the other endpoint of the test and initializing the communication socket that will be used to trade results of the test.

If the test endpoint systems have a reasonably close idea of the time, and they can communicate, the peer agent forks off the test process. The test process waits until the scheduled start time and then executes the desired throughput tester with the correct command line parameters. Note: Experience is showing that a closer integration with the testing process (Iperf, Nuttcp or Thrulay) may be needed in the future.

End User Workstation Configuration

In the event that the local host is one of the endpoints and there is no local bwctld running, bwctl will spawn additional processes to execute the local side of the test directly. In this case, a diagram of the processes involved would look like the following:

Local bwctld not available

The same basic communication takes place between the different processes in this alignment. The main difference is that the client has no need of a resource broker. This is the expected usage scenario for end user workstations to run tests to well defined BWCTL measurement beacons.

* The images above shows a dashed blue line around the processes that occur on each host.



$Id$ bwctl_1.5.4+dfsg1.orig/bwlib/0000775000076500007710000000000012560414557012716 5ustar bwctl_1.5.4+dfsg1.orig/bwlib/nuttcp.c0000664000076500007710000002174112560414557014404 0ustar /* * ex: set tabstop=4 ai expandtab softtabstop=4 shiftwidth=4: * -*- mode: c-basic-indent: 4; tab-width: 4; indent-tabs-mode: nil -*- * $Id$ */ /* * File: nuttcp.c * * Author: Jeff W. Boote * Internet2 * * Date: Thu Dec 27 15:31:29 MST 2007 * * Description: * * This file encapsulates the functionality required to run an * nuttcp throughput tool in bwctl. * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include /* * Function: NuttcpAvailable * * Description: * * In Args: * Out Args: * Scope: * * Returns: * * Side Effect: * */ static BWLBoolean NuttcpAvailable( BWLContext ctx, BWLToolDefinition tool ) { char confkey[BWL_MAX_TOOLNAME + 10]; char *cmd; /* We expect 'nuttcp -V' to print to stdout something like 'nuttcp-.3.1' */ char *pattern = "nuttcp-"; /* Expected begin of stdout */ char buf[1024]; int n; /* * Build conf-key name that is used to store the tool cmd */ strcpy(confkey,"V."); strncat(confkey,tool->name,sizeof(confkey) - strlen(confkey) - 1); strncat(confkey,"_cmd",sizeof(confkey) - strlen(confkey) - 1); /* * Fetch 'tool' name */ if( !(cmd = (char *)BWLContextConfigGetV(ctx,confkey))){ BWLError(ctx,BWLErrDEBUG,BWLErrUNKNOWN, "NuttcpAvailable(): %s unset, using \"%s\"", "nuttcp_cmd",tool->def_cmd); cmd = tool->def_cmd; } /* * If it exited as expected, check the return string. */ n = ExecCommand(ctx, buf, sizeof(buf), cmd, "-V", NULL); if(n == 0){ if(0 == strncmp(buf,pattern,strlen(pattern))){ /* nuttcp found! */ return True; } } /* This is what we exit with if the exec fails so it likely means the tool isn't installed. */ BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "NuttcpAvailable(): Unable to verify that nuttcp is working. It may not be installed. exit status: %d: output: %s", n, buf); return False; } static BWLBoolean NuttcpValidateTest( BWLContext ctx, BWLToolDefinition tool, BWLTestSpec test_spec ) { /* * TODO: Fix this to allow UDP Nuttcp tests. */ if(test_spec.udp){ BWLError(ctx,BWLErrWARNING,BWLErrPOLICY, "NuttcpPreRunTest: Older bwctl instances don't support nuttcp UDP connections, and may reject the test."); } return _BWLToolGenericValidateTest(ctx, tool, test_spec); } /* * Function: NuttcpPreRunTest * * Description: * Does all 'prep' work for running an nuttcp test. * * Returns a 'closure' pointer. NULL indicates * failure. * This 'closure' pointer is passed on to the NuttcpRunTest. * * (closure pointer is just the arg list for the exec) * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ /* This NuttcpArgs can be a static because it is only used from within a * forked process. If bwctl ever goes to threads, this will need to be * made thread-local memory. */ static char *NuttcpArgs[_BWL_MAX_TOOLARGS*2]; static void * NuttcpPreRunTest( BWLContext ctx, BWLTestSession tsess ) { char confkey[BWL_MAX_TOOLNAME + 10]; int len; char *cmd; int a = 0; char recvhost[MAXHOSTNAMELEN]; size_t hlen = sizeof(recvhost); if (BWLAddrNodeName(tsess->cntrl->ctx,tsess->test_spec.server,recvhost,hlen, NI_NUMERICHOST) == NULL) { BWLError(tsess->cntrl->ctx,BWLErrFATAL,EINVAL, "NuttcpPreRunTest: Invalid server I2Addr"); return NULL; } /* Fill in any taskset options */ a = BWLToolGenericFillCPUAffinityCommand(ctx, tsess->tool, NuttcpArgs); /* * Build conf-key name that is used to store the tool cmd */ strcpy(confkey,"V."); strncat(confkey,tsess->tool->name,sizeof(confkey) - strlen(confkey) - 1); strncat(confkey,"_cmd",sizeof(confkey) - strlen(confkey) - 1); /* Run nuttcp */ cmd = (char*)BWLContextConfigGetV(ctx,confkey); if(!cmd) cmd = tsess->tool->def_cmd; /* Figure out arguments. */ NuttcpArgs[a++] = cmd; /* Be verbose */ NuttcpArgs[a++] = "-vv"; if(tsess->test_spec.len_buffer){ NuttcpArgs[a++] = "-l"; NuttcpArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.len_buffer); } NuttcpArgs[a++] = "-p"; NuttcpArgs[a++] = BWLUInt32Dup(ctx,tsess->tool_port); // explicitly set the control port NuttcpArgs[a++] = "-P"; NuttcpArgs[a++] = "5000"; if(tsess->test_spec.udp){ NuttcpArgs[a++] = "-u"; } if((!tsess->conf_server) && (tsess->test_spec.bandwidth)){ NuttcpArgs[a++] = "-R"; /* nuttcp expects a number of Kbps */ NuttcpArgs[a++] = BWLUInt64Dup(ctx, tsess->test_spec.bandwidth / 1000); } if(tsess->test_spec.window_size){ NuttcpArgs[a++] = "-w"; /* nuttcp expects a number of Kbytes. */ NuttcpArgs[a++] = BWLUInt32Dup(ctx, tsess->test_spec.window_size / 1024); } if(tsess->test_spec.report_interval){ NuttcpArgs[a++] = "-i"; if( !(NuttcpArgs[a++] = BWLDoubleDup(ctx,tsess->test_spec.report_interval / 1000.0))){ return NULL; } } NuttcpArgs[a++] = "-T"; NuttcpArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.duration); if (BWLAddrIsIPv6(ctx, tsess->test_spec.server)) { NuttcpArgs[a++] = "-6"; } if(tsess->conf_server){ NuttcpArgs[a++] = "--nofork"; NuttcpArgs[a++] = "-1"; } else { if(tsess->test_spec.tos){ NuttcpArgs[a++] = "-c"; NuttcpArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.tos); } if(tsess->test_spec.parallel_streams > 0){ NuttcpArgs[a++] = "-N"; NuttcpArgs[a++] = BWLUInt32Dup(ctx, tsess->test_spec.parallel_streams); } if (tsess->test_spec.server_sends) { NuttcpArgs[a++] = "-r"; } else { NuttcpArgs[a++] = "-t"; } if( !(NuttcpArgs[a++] = strdup(recvhost))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno, "NuttcpPreRunTest():strdup(): %M"); return NULL; } } NuttcpArgs[a++] = NULL; /* * Report what will be run in the output file */ if (tsess->test_spec.verbose) { fprintf(tsess->localfp,"bwctl: exec_line:"); for(len=0;NuttcpArgs[len];len++){ fprintf(tsess->localfp," %s",NuttcpArgs[len]); } fprintf(tsess->localfp,"\n"); } return (void *)NuttcpArgs; } /* * Function: NuttcpRunTest * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ static BWLBoolean NuttcpRunTest( BWLContext ctx, BWLTestSession tsess __attribute__((unused)), void *closure ) { char **ipargs = (char **)closure; /* * Now run nuttcp! */ execvp(ipargs[0],ipargs); BWLError(ctx,BWLErrFATAL,errno,"execvp(%s): %M",ipargs[0]); exit(BWL_CNTRL_FAILURE); } BWLToolDefinitionRec BWLToolNuttcp = { "nuttcp", /* name */ "nuttcp", /* def_cmd */ NULL, /* def_server_cmd */ 5001, /* def_port */ _BWLToolGenericParse, /* parse */ BWLGenericParseThroughputParameters, /* parse_request */ BWLGenericUnparseThroughputParameters, /* unparse_request */ NuttcpAvailable, /* tool_avail */ NuttcpValidateTest, /* validate_test */ _BWLToolGenericInitTest, /* init_test */ NuttcpPreRunTest, /* pre_run */ NuttcpRunTest, /* run */ _BWLToolGenericKillTest, /* kill */ BWL_TEST_THROUGHPUT, /* test_types */ BWLToolClientSideData, /* results_side */ True, /* supports_server_sends */ True, /* supports_endpointless */ 5001, /* The server port to use in endpointless tests */ 0, /* parsable format */ }; bwctl_1.5.4+dfsg1.orig/bwlib/missing_getopt.h0000664000076500007710000000071012560414557016120 0ustar #if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) #define no_argument 0 #define required_argument 1 #define optional_argument 2 #endif typedef struct option { const char *name; int has_arg; int *flag; int val; } option; int missing_getopt_long(int nargc, char * const *nargv, const char *options, const struct option *long_options, int *idx); extern char *optarg; extern int optind, opterr, optopt; bwctl_1.5.4+dfsg1.orig/bwlib/bwlib.h0000664000076500007710000012517412560414557014200 0ustar /* * ex: set tabstop=4 ai expandtab softtabstop=4 shiftwidth=4: * -*- mode: c-basic-indent: 4; tab-width: 4; indent-tabls-mode: nil -*- * $Id$ */ /* * File: bwlib.h * * Author: Jeff W. Boote * * Date: Tue Sep 9 15:44:43 MDT 2003 * * Description: * This header file describes the bwlib API. The bwlib API is intended * to provide a portable layer for implementing the bwlib protocol. * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifndef IPCNTRL_H #define IPCNTRL_H #include /* * Portablility sanity checkes. */ #if HAVE_CONFIG_H #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME #undef PACKAGE_STRING #undef PACKAGE_TARNAME #undef PACKAGE_VERSION #undef PATCH_LEVEL #include #if !HAVE_ERRNO_H || !HAVE_NETDB_H || !HAVE_STDLIB_H || !HAVE_SYS_PARAM_H #error Missing Header! #endif #if !HAVE_GETADDRINFO || !HAVE_SOCKET #error Missing needed networking capabilities! (getaddrinfo and socket) #endif #if !HAVE_MEMSET #error Missing needed memory functions! #endif #endif /* HAVE_CONFIG_H */ #ifndef HAVE___ATTRIBUTE__ #define __attribute__(x) #endif #if defined HAVE_DECL_FSEEKO && !HAVE_DECL_FSEEKO #define fseeko(a,b,c) fseek(a,b,c) #endif #include #include #include #include #include #include #include #ifndef False #define False (0) #endif #ifndef True #define True (!False) #endif #ifndef MIN #define MIN(a,b) (((a)<(b))?(a):(b)) #endif #ifndef MAX #define MAX(a,b) (((a)>(b))?(a):(b)) #endif /* A sentinel pointer which is different to NULL */ #define NOTNULL ((void*)1L) /* * Filename/path component macros used by various parts of bwlib. */ #ifndef BWL_PATH_SEPARATOR #define BWL_PATH_SEPARATOR "/" #endif #ifndef BWL_PATH_SEPARATOR_LEN #define BWL_PATH_SEPARATOR_LEN 1 #endif #ifndef BWL_FILE_EXT #define BWL_FILE_EXT ".bw" #endif /* * The ascii decimal encoding of the 64 bit timestamps takes this many * chars. Log(2^64) * * fmt indicates 0 padding, 20 significant digits. */ #ifndef BWL_TSTAMPFMT #define BWL_TSTAMPFMT "%020llu" #endif #ifndef BWL_TSTAMPCHARS #define BWL_TSTAMPCHARS 20 #endif #include /* Default mode offered by the server */ #define BWL_DEFAULT_OFFERED_MODE (BWL_MODE_OPEN|BWL_MODE_AUTHENTICATED|BWL_MODE_ENCRYPTED) /* * TODO: 4823 should eventually be replaced by an IANA blessed service name. */ #define BWL_CONTROL_SERVICE_NUMBER 4823 #define BWL_CONTROL_SERVICE_NAME "4823" /* * Default value to use for the listen backlog. We pick something large * and let the OS truncate it if it isn't willing to do that much. */ #define BWL_LISTEN_BACKLOG (64) /* * BWLNum64 is interpreted as 32bits of "seconds" and 32bits of * "fractional seconds". * The byte ordering is defined by the hardware for this value. 4 MSBytes are * seconds, 4 LSBytes are fractional. Each set of 4 Bytes is pulled out * via shifts/masks as a 32bit unsigned int when needed independently. * * sync/multiplier/scale are defined as in Section 5.1 of * draft-ietf-ippm-owdp-05.txt: * If sync is non-zero, then the party generating the timestamp claims to * have an external source of synchronization to UTC. * multiplier and scale are used to indicate the estimated error of * tstamp. * They are interpreted as follows: * multiplier*(2^(-32))*(2^Scale) * * (implementor note) * Effectively, this breaks down such that if Scale is 0, then the multiplier * is the error in the same scale as the fractional seconds of tstamp. * Therefore, for "real" errors greater than an 8 bit number at that scale * the value can just be right shifted until it fits into an 8 bit integer, * and the number of shifts would indicate the "Scale" value. */ typedef uint64_t BWLNum64; /* * Arithmetic/Conversion functions on BWLNum64 numbers. */ /* * These macros should be used instead of directly using * arithmetic on these types in the event that the underlying * type is changed from an uint64_t to some kind of structure. * */ #define BWLNum64Diff(x,y) (((x)>(y)) ? ((x)-(y)) : ((y)-(x))) #define BWLNum64Add(x,y) ((x)+(y)) #define BWLNum64Sub(x,y) ((x)-(y)) #define BWLNum64Cmp(x,y) (((x)<(y)) ? -1 : (((x)>(y)) ? 1 : 0)) #define BWLNum64Min(x,y) (((x)<(y)) ? (x) : (y)) #define BWLNum64Max(x,y) (((x)>(y)) ? (x) : (y)) extern BWLNum64 BWLNum64Mult( BWLNum64 x, BWLNum64 y ); extern BWLNum64 BWLULongToNum64( uint32_t from ); extern BWLNum64 BWLI2numTToNum64( I2numT from ); extern void BWLNum64ToTimeval( struct timeval *to, BWLNum64 from ); extern void BWLTimevalToNum64( BWLNum64 *to, struct timeval *from ); extern void BWLNum64ToTimespec( struct timespec *to, BWLNum64 from ); extern void BWLTimespecToNum64( BWLNum64 *to, struct timespec *from ); extern double BWLNum64ToDouble( BWLNum64 from ); extern BWLNum64 BWLDoubleToNum64( double from ); extern BWLNum64 BWLUsecToNum64(uint32_t usec); /* * These structures are opaque to the API user. * They are used to maintain state internal to the library. */ typedef struct BWLContextRec *BWLContext; typedef struct BWLControlRec *BWLControl; /* * TimeStamp related types and structures needed throughout. */ typedef struct BWLTimeStampRec{ BWLNum64 tstamp; uint8_t sync; uint8_t multiplier; uint8_t scale; } BWLTimeStamp; /* Codes for returning error severity and type. */ /* when possible, values are mapped to syslog "priorities" we want to use. */ typedef enum { BWLErrFATAL=LOG_ERR, /* 3 */ BWLErrWARNING=LOG_WARNING, /* 4 */ BWLErrINFO=LOG_INFO, /* 6 */ BWLErrDEBUG=LOG_DEBUG, /* 7 */ BWLErrOK=I2LOG_NONE /* 8 */ } BWLErrSeverity; typedef enum { BWLErrUNKNOWN=0, BWLErrPOLICY, BWLErrINVALID, BWLErrUNSUPPORTED } BWLErrType; /* * Valid values for "accept" - this will be added to for the purpose of * enumerating the reasons for rejecting a session, or early termination * of a test session. */ typedef enum{ BWL_CNTRL_INVALID=-1, BWL_CNTRL_ACCEPT=0x0, BWL_CNTRL_REJECT=0x1, BWL_CNTRL_FAILURE=0x2, BWL_CNTRL_UNSUPPORTED=0x4 } BWLAcceptType; /* Supported tools. The values*/ typedef enum{ BWL_TOOL_UNDEFINED=0, BWL_TOOL_IPERF=0x01, BWL_TOOL_NUTTCP=0x02, BWL_TOOL_THRULAY=0x04, BWL_TOOL_IPERF3=0x08, BWL_TOOL_PING=0x10, BWL_TOOL_TRACEROUTE=0x20, BWL_TOOL_TRACEPATH=0x40, BWL_TOOL_OWAMP=0x80, BWL_TOOL_PARIS_TRACEROUTE=0x100, } BWLToolType; /* Supported test types. The values*/ typedef enum{ BWL_TEST_UNDEFINED=0, BWL_TEST_THROUGHPUT=0x1, BWL_TEST_LATENCY=0x2, BWL_TEST_TRACEROUTE=0x4, BWL_TEST_ALL=0x7, } BWLTestType; typedef enum{ BWL_DATA_UNKNOWN=0, BWL_DATA_ON_CLIENT=0x1, BWL_DATA_ON_SERVER=0x2, BWL_DATA_ON_BOTH=0x3, } BWLTestSideData; typedef uint32_t BWLBoolean; typedef uint8_t BWLSID[16]; typedef uint8_t BWLSequence[4]; typedef uint32_t BWLToolAvailability; /* * technically the username in the client greeting message can have uint8_t * but this implementation limits it to a valid "char" type. */ #define BWL_USERID_LEN 16 typedef char BWLUserID[BWL_USERID_LEN+1]; /* add 1 for '\0' */ typedef uint8_t BWLKey[16]; #define BWL_MODE_PROTOCOL_TESTER_NEGOTIATION_VERSION (0x01000000) #define BWL_MODE_PROTOCOL_OMIT_VERSION (0x02000000) #define BWL_MODE_PROTOCOL_1_5_VERSION (0x04000000) #define BWL_MODE_PROTOCOL_1_5_2_VERSION (0x05000000) #define BWL_MODE_PROTOCOL_VERSION_MASK (0xff000000) #define BWL_MODE_UNDEFINED (0x0) #define BWL_MODE_LEAST_RESTRICTIVE (0x80) #define BWL_MODE_OPEN (0x1) #define BWL_MODE_AUTHENTICATED (0x2) #define BWL_MODE_ENCRYPTED (0x4) #define BWL_MODE_DOCIPHER (BWL_MODE_AUTHENTICATED|BWL_MODE_ENCRYPTED) #define BWL_MODE_ALLMODES (BWL_MODE_DOCIPHER|BWL_MODE_OPEN) typedef uint32_t BWLSessionMode; typedef uint32_t BWLProtocolVersion; typedef struct{ BWLBoolean verbose; I2Addr client; I2Addr server; BWLTimeStamp req_time; BWLNum64 latest_time; BWLBoolean server_sends; BWLBoolean no_server_endpoint; uint32_t duration; // Throughput test parameters BWLToolType tool_id; BWLBoolean udp; uint8_t tos; uint64_t bandwidth; uint32_t window_size; uint32_t len_buffer; uint16_t report_interval; uint8_t omit; uint8_t parallel_streams; uint8_t units; uint8_t outformat; BWLBoolean dynamic_window_size; // Ping test parameters // 'duration' field is ping_packet_count * (ping_packet_count / 1000) // 'bandwidth' field is (ping_packet_count * ping_packet_size) * (1 / ping_interpacket_time) * 8 uint16_t ping_packet_count; uint16_t ping_interpacket_time; // in milliseconds uint16_t ping_packet_size; uint8_t ping_packet_ttl; // Traceroute test parameters // Maximum test duration is 'duration' field BWLBoolean traceroute_udp; uint16_t traceroute_packet_size; uint8_t traceroute_first_ttl; uint8_t traceroute_last_ttl; } BWLTestSpec; typedef uint32_t BWLPacketSizeT; /* * The BWLScheduleContextRec is used to maintain state for the schedule * generator. Multiple contexts can be allocated to maintain multiple * "streams" of schedules. */ typedef struct BWLScheduleContextRec *BWLScheduleContext; BWLScheduleContext BWLScheduleContextCreate( BWLContext ctx, uint8_t seed[16], uint32_t mean ); void BWLScheduleContextFree( BWLScheduleContext sctx ); BWLErrSeverity BWLScheduleContextReset( BWLScheduleContext sctx, uint8_t seed[16], uint32_t mean ); BWLNum64 BWLScheduleContextGenerateNextDelta( BWLScheduleContext sctx ); /* * Error Reporting: * * Notice that this macro expands to multiple statements so it is * imperative that you enclose it's use in {} in single statement * context's such as: * if(test) * BWLError(...); NO,NO,NO,NO! * Instead: * if(test){ * BWLError(...); * } * * * (Sure would be nice if it were possible to do vararg macros...) */ #define BWLError I2ErrLocation_(__FILE__,__DATE__,__LINE__); \ BWLError_ /* * Don't call this directly - use the BWLError macro. * Let me repeat. * Don't call this directly - use the BWLError macro. */ extern void BWLError_( BWLContext ctx, BWLErrSeverity severity, BWLErrType etype, const char *fmt, ... ); /* * The "context" is used to basically initializes the library. There is no * "global" state - so you can create more than one "context" if you like. * (Well... SIGPIPE is disabled... I suppose that is global.) * * There are specific defaults that can be modified within the context by * calling the BWLContextConfigSet function with the following keys and * types. (The key is a string - the type indicates what type of data * will be stored/retrieved using that key. * The first couple of char's of the name indicate what integral type * needs to be used to set the value. */ /* Used to define a 'generic' function type to use for setting/getting * functions below. */ typedef void (*BWLFunc)(void); /* * This type is used to hold a pointer to an integer pointer. That pointer * points at a value that determines if the low/level i/o functions should * return on interrupt. If it is non-zero an interrupt will cause the i/o * routine to fail and return. If it is zero, the low level i/o routine will * ignore the interrupt and restart the i/o. * (this can be used to ignore some signals and return on others.) */ #define BWLInterruptIO "V.BWLInterruptIO" /* * This type is used by the Daemon request broker to decide how * long to wait for responses from the client and peer agent. */ #define BWLControlTimeout "U32.BWLControlTimeout" /* * This context variable is used to hold a pointer to a port-range record. This * record is used to indicate what port ranges should be used for port * selections. */ #define BWLPeerPortRange "V.BWLPeerPortRange" typedef struct BWLPortRangeRec{ uint16_t i; /* current port */ uint16_t low; uint16_t high; } BWLPortRangeRec, *BWLPortRange; /* * This type is used to hold a pointer to an unsigned-64 bit int that * holds a fallback value for the bottleneckcapacity. This is used with * a rtt estimate to dynamically size the send/recv window sizes. * (uint64_t) */ #define BWLBottleNeckCapacity "U64.BWLBottleNeckCapacity" /* * This type is used to define the function that retrieves the shared * secret from whatever key-store is in use. * It should return True if it is able to fill in the key_ret variable that * is passed in from the caller. False if not. If the function returns false, * the caller should check the err_ret value. If OK, then the userid simply * didn't exist - otherwise it indicates an error in the key store mechanism. * * If an application doesn't set this, Encrypted and Authenticated * mode will be disabled. */ #define BWLGetAESKey "F.BWLGetAESKey" typedef BWLBoolean (*BWLGetAESKeyFunc)( BWLContext ctx, const BWLUserID userid, uint8_t *key_ret, BWLErrSeverity *err_ret ); /* * This function will be called from BWLControlOpen and BWLServerAccept * to determine if the control connection should be accepted. * It is called after connecting, and after determining the userid. * On failure, value of *err_ret can be inspected: if > BWLErrWARNING, * this means rejection based on policy, otherwise there was an error * in the function itself. * * If an application doesn't set this, all connections will be allowed. */ #define BWLCheckControlPolicy "F.BWLCheckControlPolicy" typedef BWLBoolean (*BWLCheckControlPolicyFunc)( BWLControl cntrl, BWLSessionMode mode_req, const BWLUserID userid, struct sockaddr *local_sa_addr, struct sockaddr *remote_sa_addr, BWLErrSeverity *err_ret ); /* * This function will be called by BWLRequestTestSession if * one of the endpoints of the test is on the localhost. * If err_ret returns BWLErrFATAL, BWLRequestTestSession/BWLProcessTestSession * will not continue, and return BWLErrFATAL as well. * * Only the IP address values will be set in the sockaddr structures - * i.e. port numbers will not be valid. * * If an application doesn't set this, all tests will be allowed. * * The application can use the "closure" pointer to store data that will * be passed onto the Open/Close and TestComplete functions. The intended * purpose of this pointer is to keep track of resources that are "reserved" * from this function - allowing the other functions to "free" or modify * those resource reservations. * * NOTE: Even if the application does not use the "closure" pointer to keep * track of resources - it should set the closure to a non-NULL value upon * return so the OpenFile function knows the file is being opened for * writing (a receiver context) and not being opened for reading (a fetch * context). */ #define BWLCheckTestPolicy "F.BWLCheckTestPolicy" typedef BWLBoolean (*BWLCheckTestPolicyFunc)( BWLControl cntrl, BWLSID sid, BWLBoolean local_sender, struct sockaddr *local_sa_addr, struct sockaddr *remote_sa_addr, socklen_t sa_len, BWLTestSpec *test_spec, BWLNum64 fuzz_time, BWLNum64 *reservation_ret, uint16_t *tool_port_ret, uint16_t *local_tool_port_ret, void **closure, BWLErrSeverity *err_ret ); /* * This function will be called when a test is "complete". It is used * to free resources that were allocated on behalf of the test including * memory associated with the "closure" pointer itself if necessary. */ #define BWLTestComplete "F.BWLTestComplete" typedef void (*BWLTestCompleteFunc)( BWLControl cntrl, void *closure, BWLAcceptType aval ); /* * This function will be called when tests are complete and results * are available. * (The function should handle the case where the FILE*'s are null. This * simply means that test results are unavailable.) */ #define BWLProcessResults "F.BWLProcessResults" typedef BWLErrSeverity (*BWLProcessResultsFunc)( BWLControl cntrl, BWLBoolean local_sender, BWLTestSpec *tspec, FILE *sendfp, FILE *recvfp ); /* * This value is used to increase the tolerance of bwctld to deal * with incorrectly configured ntpd processes. Specified as a (*double). */ #define BWLSyncFuzz "DBL.BWLSyncFuzz" /* * This value is used to indicate if NTP synchronization is required * for tests to happen. If this value is set, then the application * can attempt to continue without determining if the current clock * is really synchronized. */ #define BWLAllowUnsync "V.BWLAllowUnsync" /* * This value is used to indicate the priority to report 'access' * logging. (This is useful for isolating in syslog configurations.) */ #define BWLAccessPriority "U32.BWLAccessPriority" #ifndef NDEBUG /* * This void* type is used to aid in child-debugging. If BWLChildWait is * non-null forked off endpoints will go into a busy-wait loop to * allow a debugger to attach to the process. (i.e. they will be hung until * attached and the loop variable modified with the debugger. This should * not strictly be needed, but the gdb on many of the test plateforms I * used did not implement the follow-fork-mode option.) This was a quick * fix. (This will not be used if bwlib is compiled with -DNDEBUG.) */ #define BWLChildWait "V.BWLChildWait" #endif /* * This value is used to indicate only IPv4 addresses should be used. */ #define BWLIPv4Only "V.BWLIPv4Only" /* * This value is used to indicate only IPv6 addresses should be used. */ #define BWLIPv6Only "V.BWLIPv6Only" extern BWLContext BWLContextCreate( I2ErrHandle eh, ... ); BWLBoolean BWLContextFinalize( BWLContext ctx ); BWLBoolean BWLContextFindTools( BWLContext ctx ); /* * Used to register memory pointers that should be free'd when the * Context is free'd. (Returns false if the Context is unable to * register the memory - failure if ENOMEM. */ BWLBoolean BWLContextRegisterMemory( BWLContext ctx, void *ptr ); extern void BWLContextFree( BWLContext ctx ); extern I2ErrHandle BWLContextErrHandle( BWLContext ctx ); /* * Used to specify the level of error messages that should be printed/syslogged * (this level and 'worse' of course.) */ extern void BWLContextSetErrMask( BWLContext ctx, BWLErrSeverity level ); /* * Retrieve current error masking level */ extern BWLErrSeverity BWLContextErrMask( BWLContext ctx ); extern BWLBoolean BWLContextConfigSet( BWLContext ctx, const char *key, ... ); extern void* BWLContextConfigGetV( BWLContext ctx, const char *key ); extern BWLFunc BWLContextConfigGetF( BWLContext ctx, const char *key ); extern BWLBoolean BWLContextConfigGetU32( BWLContext ctx, const char *key, uint32_t *ui32 ); extern BWLBoolean BWLContextConfigGetU64( BWLContext ctx, const char *key, uint64_t *u64 ); extern BWLBoolean BWLContextConfigGetDbl( BWLContext ctx, const char *key, double *dbl ); extern BWLBoolean BWLContextConfigDelete( BWLContext ctx, const char *key ); /* * The following functions are completely analogous to the Context versions * but are used to maintain state information about a particular control * connection. */ extern BWLBoolean BWLControlConfigSet( BWLControl cntrl, const char *key, ... ); extern void* BWLControlConfigGetV( BWLControl cntrl, const char *key ); extern BWLFunc BWLControlConfigGetF( BWLControl cntrl, const char *key ); extern BWLBoolean BWLControlConfigGetU32( BWLControl cntrl, const char *key, uint32_t *ui32 ); extern BWLBoolean BWLControlConfigGetU64( BWLControl cntrl, const char *key, uint64_t *u64 ); extern BWLBoolean BWLControlConfigGetDbl( BWLControl cntrl, const char *key, double *dbl ); extern BWLBoolean BWLControlConfigDelete( BWLControl cntrl, const char *key ); extern I2Addr BWLAddrByControl( BWLControl cntrl ); extern int BWLControlFD( BWLControl cntrl ); extern I2Addr BWLAddrByLocalControl( BWLControl cntrl ); extern I2Addr BWLControlRemoteAddr( BWLControl cntrl ); /* * BWLControlOpen allocates an BWLclient structure, opens a connection to * the BWL server and goes through the initialization phase of the * connection. This includes AES/CBC negotiation. It returns after receiving * the ServerOK message. * * This is typically only used by an BWL client application (or a server * when acting as a client of another BWL server). * * err_ret values: * BWLErrOK completely successful - highest level mode ok'd * BWLErrINFO session connected with less than highest level mode * BWLErrWARNING session connected but future problems possible * BWLErrFATAL function will return NULL - connection is closed. * (Errors will have been reported through the BWLErrFunc * in all cases.) * function return values: * If successful - even marginally - a valid BWLclient handle * is returned. If unsuccessful, NULL is returned. * * server_addr can use any of the I2AddrBy* functions. * * Once an I2Addr record is passed into this function - it is * automatically free'd and should not be referenced again in any way. * * Client */ extern BWLControl BWLControlOpen( BWLContext ctx, const char *local_addr, /* src addr or NULL */ I2Addr server_addr, /* server addr or NULL */ uint32_t mode_mask, /* OR of BWLSessionMode vals */ BWLUserID userid, /* null if unwanted */ BWLNum64 *uptime_ret, /* server uptime - ret or NULL */ BWLToolAvailability *avail_tools, /* server supported tool */ BWLErrSeverity *err_ret ); /* * The following function is used to query the time/errest from * the remote server. This is useful for determining if a control * connection is still valid and to fetch the current NTP errest * from that system since it could change. It also updates the * control connections idea of the BWLGetRTTBound * * Client */ extern BWLErrSeverity BWLControlTimeCheck( BWLControl cntrl, BWLTimeStamp *remote_time ); /* * Client and Server */ extern BWLErrSeverity BWLControlClose( BWLControl cntrl ); /* * Request a test session - if the function returns True, then avail_time_ret * holds the time of the reservation. The first time this function is called * to configure a 'receiver', the sid will be returned. If it is called to * configure a 'sender', then sid MUST be passed in. (This function * can be called with a req_time later than the latest_time to cancel * a session.) This function can be called repeatedly to change the reservation * time. All future calls MUST pass in the same sid until this session is * declared invalid. (For these modify calls - the only parameters that * are looked at in the test_spec are the req_time and the latest_time. All * other parameters are preserved from the previous call.) * * Exactly one of a receiver OR a sender may be configured with each call. * * If the function returns False - check err_ret. If err_ret is ErrOK, the * session was denied by the server, and the control connection is still * valid. In this case, if (avail_time_ret != 0), then the server was * acceptible to the parameters of the request, but simply did not have * the resources available. * * Reasons this function will return False: * 1. Server denied test: err_ret==ErrOK * If avail_time_ret == 0, than no reason can be determined. * If avail_time_ret != 0, the client should interpret this is "busy". * 2. Control connection failure: err_ret == ErrFATAL * 3. Local resource problem (malloc/fork/fdopen): err_ret == ErrFATAL * 4. Bad addresses: err_ret == ErrWARNING * * Once an I2Addr record has been passed into this function, it * is automatically free'd. It should not be referenced again in any way. * * Conversely, the test_spec is completely copied, and the caller continues * to "own" all memory associated with it after this call. * * Client: * */ extern BWLBoolean BWLSessionRequest( BWLControl control_handle, BWLBoolean sender, BWLTestSpec *test_spec, BWLTimeStamp *avail_time_ret, uint16_t *tool_port, BWLSID sid_ret, BWLAcceptType *acceptval, BWLErrSeverity *err_ret ); /* * Start all test sessions - if successful, returns BWLErrOK. * * Client and Server */ extern BWLErrSeverity BWLStartSession( BWLControl control_handle, uint16_t *dataport ); /* * Wait for test sessions to complete. This function will return the * following integer values: * <0 ErrorCondition * 0 StopSession received, acted upon, and sent back. * 1 wake_time reached * * 2 system event (signal) * * To effect a poll - specify a waketime in the past. 1 will be returned * if there is nothing to read. * * To use a signal interaction instead of the waketime interface, set the * retn_on_intr pointer. Install a signal handler that sets the value * to non-zero, and this function will return 2. (If wake_time is non-null, * retn_on_intr is not used.) This interface can be used without signal * handlers as well be simply passing in a pointer to a non-zero value. * This function will return for any interrupt. (The signal interface * allows you to set the value to non-zero only for signals you are * actually interested in.) * * To block indefinately, specify NULL for wake_time and NULL for * retn_on_intr. (StopSessionWait will poll the status of current tests * automatically whenever a system event takes place in this case, so * StopSessionWait will never return 1 or 2 in this case.) * * If wake_time or retn_on_intr is set, and this function returns 1 or 2, then * it is required to poll the status of each local endpoint using * BWLTestSessionStatus until all sessions complete. (BWLSessionsActive is * a simple way to poll all of them - you know you are done when it returns 0.) * You can of course recall StopSessionWait in this case. * * Server Only */ extern int BWLStopSessionWait( BWLControl control_handle, BWLNum64 *wake_time, /* abs time */ int *retn_on_intr, BWLAcceptType *acceptval, /* out */ BWLErrSeverity *err_ret ); /* * Used to poll the status of a test endpoint. * * returns: * True if it could get the status, * False if it could not. (session with given sid wasn't found, * or "send" indicated a remote endpoint.) * * aval returns the following for status: * <0 Test is not yet complete. * >=0 Accept value of completed test. 0 indicates success * other values indicate type of error test encountered. * * Server Only */ extern BWLBoolean BWLSessionStatus( BWLControl cntrl, BWLSID sid, /* SID of test to poll */ BWLAcceptType *aval /* out - return accept value */ ); /* * Used to determine how many local endpoints are still active. * (effectively calls the BWLTestSessionStatus function on all endpoints * and determines if they are complete yet.) * * If acceptval is non-null it is set to the MAX acceptval of any * complete session. * * returns: * number of active endpoints. * * Server Only */ extern int BWLSessionsActive( BWLControl cntrl, BWLAcceptType *acceptval /* rtn */ ); /* * Send the StopSession message, and wait for the response. * * Server Only */ extern BWLErrSeverity BWLStopSession( BWLControl control_handle, int *retn_on_intr, BWLAcceptType *acceptval /* in/out */ ); /* * Signal the server to stop the session, and read the response. * The response should contain the test results, and they will * be printed to the fp passed in. * * Client Only */ extern BWLErrSeverity BWLEndSession( BWLControl cntrl, int *retn_on_intr, BWLAcceptType *acceptval, FILE *fp ); /* * Return the file descriptor being used for the control connection. An * application can use this to call select or otherwise poll to determine * if anything is ready to be read but they should not read or write to * the descriptor. * This can be used in conjunction with the BWLStopSessionWait * function so that the application can recieve user input, and only call * the BWLStopSessionWait function when there is something to read * from the connection. (A nul timestamp would be used in this case * so that BWLStopSessionWait does not block.) * * This is also useful in a policy context - getpeername can be called * on this descriptor. * * If the control_handle is no longer connected - the function will return * a negative value. * * Client and Server. */ extern int BWLControlFD( BWLControl control_handle ); extern int BWLErrorFD( BWLContext ctx ); extern I2Addr BWLServerSockCreate( BWLContext ctx, I2Addr addr, BWLErrSeverity *err_ret ); /*! * Function: BWLControlAccept * * Description: * This function is used to initialiize the communication * to the peer. * * In Args: * connfd,connsaddr, and connsaddrlen are all returned * from "accept". * * Returns: Valid BWLControl handle on success, NULL if * the request has been rejected, or error has occurred. * * If *rtn_on_intr and an inturrupt happens during write/read * err_ret will be set to BWLErrWARNING. * * Return value does not distinguish between illegal * requests, those rejected on policy reasons, or * errors encountered by the server during execution. * * Side Effect: */ extern BWLControl BWLControlAccept( BWLContext ctx, /* library context */ int connfd, /* conencted socket */ struct sockaddr *connsaddr, /* connected socket addr */ socklen_t connsaddrlen, /* connected socket addr len */ uint32_t mode_offered, /* advertised server mode */ BWLNum64 uptime, /* uptime report */ int *retn_on_intr, /* return on i/o interrupt */ BWLErrSeverity *err_ret /* err - return */ ); typedef enum BWLRequestType{ BWLReqInvalid=-1, BWLReqSockClose=0, BWLReqTest=1, BWLReqStartSession=2, BWLReqStopSession=3, BWLReqTime=4 } BWLRequestType; extern BWLRequestType BWLReadRequestType( BWLControl cntrl, int *retn_on_intr ); extern BWLErrSeverity BWLProcessTestRequest( BWLControl cntrl, int *retn_on_intr ); extern BWLErrSeverity BWLProcessTimeRequest( BWLControl cntrl, int *retn_on_intr ); extern BWLErrSeverity BWLProcessStartSession( BWLControl cntrl, int *retn_on_intr ); extern BWLErrSeverity BWLProcessStopSession( BWLControl cntrl ); extern BWLContext BWLGetContext( BWLControl cntrl ); extern BWLSessionMode BWLGetMode( BWLControl cntrl ); /* * Returns bytes/second: 0.0 on error. */ extern double BWLTestPacketBandwidth( BWLContext ctx, int af, BWLSessionMode mode, BWLTestSpec *tspec ); /* * tools.c abstraction * * These types are used to define the functionality for a given 'tool' */ #define BWL_MAX_TOOLNAME PATH_MAX typedef struct BWLToolDefinitionRec BWLToolDefinitionRec, *BWLToolDefinition; /* * Client functions to 'invoke' tool functionality */ extern BWLToolType BWLToolGetID( BWLContext ctx, const char *name ); extern uint32_t BWLToolGetNumTools( BWLContext ctx ); extern const char * BWLToolGetNameByID( BWLContext ctx, BWLToolType id ); extern BWLTestType BWLToolGetTestTypesByID( BWLContext ctx, BWLToolType tool_id ); extern const char * BWLToolGetNameByIndex( BWLContext ctx, uint32_t i ); extern BWLTestType BWLToolGetTestTypesByIndex( BWLContext ctx, uint32_t i ); extern const char * BWLToolGetToolNames( BWLContext ctx, BWLToolAvailability tools ); /* * return vals: -1 (key recognized, val invalid) * 1 (key recognized, val used) * 0 (key not recognized) */ extern int BWLToolParseArg( BWLContext ctx, const char *key, const char *val ); extern BWLBoolean BWLToolValidateTest( BWLContext ctx, BWLToolType id, BWLTestSpec test_spec ); extern BWLErrSeverity BWLToolInitTest( BWLContext ctx, BWLToolType tool_id, uint16_t *toolport ); extern int save_path( BWLContext ctx, const char *key, const char *val ); /* * daemon.c functions for PeerAgent daemon (client or server invoked) */ extern int BWLDaemonParseArg( BWLContext ctx, const char *key, char *val ); /* * time.c conversion functions. */ #define BWLJAN_1970 (unsigned long)0x83aa7e80 /* diffs in epoch*/ #ifndef tvalclear #define tvalclear(a) (a)->tv_sec = (a)->tv_usec = 0 #endif #ifndef tvaladd #define tvaladd(a,b) \ do{ \ (a)->tv_sec += (b)->tv_sec; \ (a)->tv_usec += (b)->tv_usec; \ if((a)->tv_usec >= 1000000){ \ (a)->tv_sec++; \ (a)->tv_usec -= 1000000; \ } \ } while (0) #endif #ifndef tvalsub #define tvalsub(a,b) \ do{ \ (a)->tv_sec -= (b)->tv_sec; \ (a)->tv_usec -= (b)->tv_usec; \ if((a)->tv_usec < 0){ \ (a)->tv_sec--; \ (a)->tv_usec += 1000000; \ } \ } while (0) #endif #ifndef tvalcmp #define tvalcmp(tvp,uvp,cmp) \ (((tvp)->tv_sec == (uvp)->tv_sec) ? \ ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ ((tvp)->tv_sec cmp (uvp)->tv_sec)) #endif /* Operations on timespecs */ #ifndef timespecclear #define timespecclear(tvp) ((tvp)->tv_sec = (tvp)->tv_nsec = 0) #endif #ifndef timespecisset #define timespecisset(tvp) ((tvp)->tv_sec || (tvp)->tv_nsec) #endif #ifndef timespeccmp #define timespeccmp(tvp, uvp, cmp) \ (((tvp)->tv_sec == (uvp)->tv_sec) ? \ ((tvp)->tv_nsec cmp (uvp)->tv_nsec) : \ ((tvp)->tv_sec cmp (uvp)->tv_sec)) #endif #ifndef timespecadd #define timespecadd(vvp, uvp) \ do { \ (vvp)->tv_sec += (uvp)->tv_sec; \ (vvp)->tv_nsec += (uvp)->tv_nsec; \ if ((vvp)->tv_nsec >= 1000000000){ \ (vvp)->tv_sec++; \ (vvp)->tv_nsec -= 1000000000; \ } \ } while (0) #endif #ifndef timespecsub #define timespecsub(vvp, uvp) \ do { \ (vvp)->tv_sec -= (uvp)->tv_sec; \ (vvp)->tv_nsec -= (uvp)->tv_nsec; \ if ((vvp)->tv_nsec < 0) { \ (vvp)->tv_sec--; \ (vvp)->tv_nsec += 1000000000; \ } \ } while (0) #endif #ifndef timespecdiff #define timespecdiff(vvp,uvp) \ do { \ struct timespec ts1_,ts2_; \ if(timespeccmp(vvp,uvp,>)){ \ ts1_ = *vvp; \ ts2_ = *uvp; \ }else{ \ ts1_ = *uvp; \ ts2_ = *vvp; \ } \ timespecsub(&ts1_,&ts2_); \ *vvp = ts1_; \ } while(0) #endif extern BWLNum64 BWLGetRTTBound( BWLControl cntrl ); extern void BWLSetTimeStampError( BWLTimeStamp *tstamp, BWLNum64 err ); extern BWLNum64 BWLGetTimeStampError( BWLTimeStamp *tstamp ); extern BWLTimeStamp * BWLGetTimeStamp( BWLContext ctx, BWLTimeStamp *tstamp ); extern BWLTimeStamp * BWLTimevalToTimeStamp( BWLTimeStamp *tstamp, struct timeval *tval ); extern struct timeval * BWLTimeStampToTimeval( struct timeval *tval, BWLTimeStamp *tstamp ); extern BWLTimeStamp * BWLTimespecToTimeStamp( BWLTimeStamp *tstamp, struct timespec *tval, uint32_t *errest, /* usec's */ uint32_t *last_errest /* usec's */ ); extern struct timespec * BWLTimeStampToTimespec( struct timespec *tval, BWLTimeStamp *tstamp ); /* * util.c functions. (Basically a useful place to put config functions * that are needed by the spawned daemon of bwctl as well as the real * bwctld daemon. */ extern I2Boolean BWLPortsParse( BWLContext ctx, const char *pspec, BWLPortRange prange_mem ); /* * Return the next port in the cycle */ extern uint16_t BWLPortsNext( BWLPortRange prange ); /* * Set the next port - useful when initializing the state to start with * a specific 'i' in the range. * (No errors - if 'i' is not in the range, this function uses a random * number generator to determone what to use, and if that fails starts * with the beginning of the range.) */ extern void BWLPortsSetI( BWLContext ctx, BWLPortRange prange, uint16_t i ); /* * How long is the range? */ #define BWLPortsRange(prange) (prange->high - prange->low) extern char * BWLUInt64Dup( BWLContext ctx, uint64_t n ); extern char * BWLUInt32Dup( BWLContext ctx, uint32_t n ); extern char * BWLDoubleDup( BWLContext ctx, double n ); BWLTestSideData BWLToolGetResultsSideByID( BWLContext ctx, BWLToolType tool_id, BWLTestSpec *spec ); char BWLToolGetParsableFormatByID( BWLContext ctx, uint32_t i ); BWLTestSideData BWLToolServerSideData( BWLContext ctx, BWLTestSpec *spec ); BWLTestSideData BWLToolClientSideData( BWLContext ctx, BWLTestSpec *spec ); BWLTestSideData BWLToolSenderSideData( BWLContext ctx, BWLTestSpec *spec ); int ExecCommand( BWLContext ctx, char *output_buf, int output_buf_size, char *command, ... ); BWLBoolean BWLNTPIsSynchronized( BWLContext ctx ); double BWLNum64ToTimestampDouble(BWLNum64 tstamp); BWLBoolean BWLAddrIsIPv6( BWLContext ctx, I2Addr addr ); time_t BWLNum64ToTimestamp(BWLNum64 tstamp); char * BWLAddrNodeName( BWLContext ctx, I2Addr addr, char *buf, size_t len, int flags ); BWLBoolean BWLAddrIsLoopback( I2Addr addr ); char * BWLDiscoverSourceAddr( BWLContext ctx, const char *remote_addr, const char *local_interface, char *buf, size_t buflen ); BWLToolAvailability BWLToolGetCommonTools( BWLContext ctx, BWLToolAvailability tools_1, BWLToolAvailability tools_2, BWLTestType test_type ); BWLBoolean BWLIsInterface( const char *interface ); BWLBoolean BWLCntrlIsLocal( BWLControl cntrl ); uint16_t BWLToolStandardTesterPortByID( BWLContext ctx, BWLToolType tool_id ); BWLBoolean BWLToolSupportsEndpointlessTestsByID( BWLContext ctx, BWLToolType tool_id ); int BWLToolGenericFillCPUAffinityCommand( BWLContext ctx, BWLToolDefinition tool, char **cmdline ); BWLNum64 BWLTimestampToNum64(time_t ts); #endif /* OWAMP_H */ bwctl_1.5.4+dfsg1.orig/bwlib/iperf3.c0000664000076500007710000002603012560414557014253 0ustar /* * ex: set tabstop=4 ai expandtab softtabstop=4 shiftwidth=4: * -*- mode: c-basic-indent: 4; tab-width: 4; indent-tabs-mode: nil -*- * $Id$ */ /* * File: iperf3.c * * Author: Aaron Brown * Internet2 * * Description: * * This file encapsulates the functionality required to run an * iperf3 throughput tool in bwctl. * * License: * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include /* * Function: Iperf3Available * * Description: * * In Args: * Out Args: * Scope: * * Returns: * * Side Effect: * */ static BWLBoolean Iperf3Available( BWLContext ctx, BWLToolDefinition tool ) { int len; char *cmd; char *patterns[] = { "iperf 3.0.11", "iperf 3.1" }; /* Expected begin of stdout */ /* We expect 'iperf3 -v' to print to stderr something like 'iperf 3.0.11' or 'iperf 3.1*' */ char buf[1024]; int n; /* * Fetch 'tool' name */ if( !(cmd = (char *)BWLContextConfigGetV(ctx,"V.iperf3_cmd"))){ BWLError(ctx,BWLErrDEBUG,BWLErrUNKNOWN, "Iperf3Available(): %s unset, using \"%s\"", "iperf3_cmd",tool->def_cmd); cmd = tool->def_cmd; } n = ExecCommand(ctx, buf, sizeof(buf), cmd, "-v", NULL); if(n == 0 || n == 1) { int i; for(i = 0; i < strlen(buf); i++) { int j; for(j = 0; j < sizeof(patterns)/sizeof(char *); j++) { if(0 == strncmp(buf + i,patterns[j],strlen(patterns[j]))){ /* iperf3 found! */ return True; } } } } /* This is what we exit with if the exec fails so it likely means the tool isn't installed. */ BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "Iperf3Available(): An appropriate version of iperf3 is not available (>= 3.0.11). It may not be installed. exit status: %d: output: %s", n, buf); return False; } static BWLBoolean Iperf3ValidateTest( BWLContext ctx, BWLToolDefinition tool, BWLTestSpec test_spec ) { // validate the units if(test_spec.units){ switch((char)test_spec.units){ case 'b': case 'B': case 'k': case 'K': case 'm': case 'M': case 'g': case 'G': case 'a': case 'A': break; default: BWLError(ctx,BWLErrFATAL,EINVAL, "Iperf3ValidateTest: Invalid units specification: %c", (char)test_spec.units); return False; break; } } if(test_spec.outformat){ switch((char)test_spec.outformat){ case 'c': case 'J': break; default: BWLError(ctx,BWLErrFATAL,EINVAL, "Iperf3ValidateTest: Invalid output format specification %c", (char)test_spec.outformat); return False; break; } } return _BWLToolGenericValidateTest(ctx, tool, test_spec); } /* * Function: Iperf3PreRunTest * * Description: * Does all 'prep' work for running an iperf3 test. * * Returns a 'closure' pointer. NULL indicates * failure. * This 'closure' pointer is passed on to the Iperf3RunTest. * * (closure pointer is just the arg list for the exec) * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ /* This Iperf3Args can be a static because it is only used from within a * forked process. If bwctl ever goes to threads, this will need to be * made thread-local memory. */ static char *Iperf3Args[_BWL_MAX_TOOLARGS*2]; static void * Iperf3PreRunTest( BWLContext ctx, BWLTestSession tsess ) { int len; char *cmd; int a = 0; char recvhost[MAXHOSTNAMELEN]; char sendhost[MAXHOSTNAMELEN]; if(BWLAddrNodeName(ctx, tsess->test_spec.server, recvhost, sizeof(recvhost), NI_NUMERICHOST) == NULL) { BWLError(tsess->cntrl->ctx,BWLErrFATAL,EINVAL, "Iperf3PreRunTest(): Invalid server I2Addr"); return NULL; } if(BWLAddrNodeName(ctx, tsess->test_spec.client, sendhost, sizeof(sendhost), NI_NUMERICHOST) == NULL) { BWLError(tsess->cntrl->ctx,BWLErrFATAL,EINVAL, "Iperf3PreRunTest(): Invalid client I2Addr"); return NULL; } /* Fill in any taskset options */ a = BWLToolGenericFillCPUAffinityCommand(ctx, tsess->tool, Iperf3Args); /* Run iperf3 */ cmd = (char*)BWLContextConfigGetV(ctx,"V.iperf3_cmd"); if(!cmd) cmd = tsess->tool->def_cmd; /* * First figure out the args for iperf */ Iperf3Args[a++] = cmd; /* * Set the address information */ if(tsess->conf_server){ Iperf3Args[a++] = "-s"; Iperf3Args[a++] = "-1"; // Make it a one-shot server Iperf3Args[a++] = "-B"; if( !(Iperf3Args[a++] = strdup(recvhost))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"Iperf3PreRunTest():strdup(): %M"); return NULL; } } else{ Iperf3Args[a++] = "-c"; if( !(Iperf3Args[a++] = strdup(recvhost))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"Iperf3PreRunTest():strdup(): %M"); return NULL; } Iperf3Args[a++] = "-B"; if( !(Iperf3Args[a++] = strdup(sendhost))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"Iperf3PreRunTest():strdup(): %M"); return NULL; } } /* * Set some common parameters */ Iperf3Args[a++] = "-f"; if(!tsess->test_spec.units){ Iperf3Args[a++] = "m"; } else{ char temp[2]; temp[0] = (char)tsess->test_spec.units; temp[1] = '\0'; if( !(Iperf3Args[a++] = strdup(temp))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno, "Iperf3PreRunTest():strdup(): %M"); return NULL; } } if(tsess->test_spec.outformat == 'J'){ Iperf3Args[a++] = "-J"; } Iperf3Args[a++] = "-p"; if( !(Iperf3Args[a++] = BWLUInt32Dup(ctx,tsess->tool_port))){ return NULL; } if(tsess->test_spec.report_interval){ Iperf3Args[a++] = "-i"; if( !(Iperf3Args[a++] = BWLDoubleDup(ctx,tsess->test_spec.report_interval / 1000.0))){ return NULL; } } if (tsess->test_spec.verbose) { Iperf3Args[a++] = "-V"; } /* * set some client-specific parameters */ if(!tsess->conf_server){ Iperf3Args[a++] = "-Z"; // Set the zerocopy mode by default (for backwards compatibility of results) if(tsess->test_spec.omit){ Iperf3Args[a++] = "--omit"; if( !(Iperf3Args[a++] = BWLUInt32Dup(ctx,tsess->test_spec.omit))){ return NULL; } } if(tsess->test_spec.tos){ Iperf3Args[a++] = "-S"; if( !(Iperf3Args[a++] = BWLUInt32Dup(ctx,tsess->test_spec.tos))){ return NULL; } } if (tsess->test_spec.server_sends) Iperf3Args[a++] = "--reverse"; Iperf3Args[a++] = "-t"; if( !(Iperf3Args[a++] = BWLUInt32Dup(ctx,tsess->test_spec.duration))){ return NULL; } if(tsess->test_spec.parallel_streams > 0){ Iperf3Args[a++] = "-P"; if( !(Iperf3Args[a++] = BWLUInt32Dup(ctx,tsess->test_spec.parallel_streams))){ return NULL; } } if(tsess->test_spec.udp){ Iperf3Args[a++] = "-u"; } if(tsess->test_spec.len_buffer){ Iperf3Args[a++] = "-l"; if( !(Iperf3Args[a++] = BWLUInt32Dup(ctx,tsess->test_spec.len_buffer))){ return NULL; } } if(tsess->test_spec.bandwidth){ Iperf3Args[a++] = "-b"; if( !(Iperf3Args[a++] = BWLUInt64Dup(ctx,tsess->test_spec.bandwidth))){ return NULL; } } if(tsess->test_spec.window_size){ Iperf3Args[a++] = "-w"; if( !(Iperf3Args[a++] = BWLUInt32Dup(ctx,tsess->test_spec.window_size))){ return NULL; } } } Iperf3Args[a++] = NULL; /* * Report what will be run in the output file */ if (tsess->test_spec.verbose) { fprintf(tsess->localfp,"bwctl: exec_line:"); for(len=0;Iperf3Args[len];len++){ fprintf(tsess->localfp," %s",Iperf3Args[len]); } fprintf(tsess->localfp,"\n"); } return (void *)Iperf3Args; } /* * Function: Iperf3RunTest * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ static BWLBoolean Iperf3RunTest( BWLContext ctx, BWLTestSession tsess __attribute__((unused)), void *closure ) { char **ipargs = (char **)closure; /* * Now run iperf! */ execvp(ipargs[0],ipargs); BWLError(ctx,BWLErrFATAL,errno,"execvp(%s): %M",ipargs[0]); exit(BWL_CNTRL_FAILURE); } BWLToolDefinitionRec BWLToolIperf3 = { "iperf3", /* name */ "iperf3", /* def_cmd */ "iperf3", /* def_server_cmd */ 5001, /* def_port */ _BWLToolGenericParse, /* parse */ BWLGenericParseThroughputParameters, /* parse_request */ BWLGenericUnparseThroughputParameters, /* unparse_request */ Iperf3Available, /* tool_avail */ Iperf3ValidateTest, /* validate_test */ _BWLToolGenericInitTest, /* init_test */ Iperf3PreRunTest, /* pre_run */ Iperf3RunTest, /* run */ _BWLToolGenericKillTest, /* kill */ BWL_TEST_THROUGHPUT, /* test_types */ BWLToolClientSideData, /* results_side */ True, /* supports_server_sends */ True, /* supports_endpointless */ 5201, /* The server port to use in endpointless tests */ 'J', /* parsable format */ }; bwctl_1.5.4+dfsg1.orig/bwlib/iperf.c0000664000076500007710000002556212560414557014201 0ustar /* * ex: set tabstop=4 ai expandtab softtabstop=4 shiftwidth=4: * -*- mode: c-basic-indent: 4; tab-width: 4; indent-tabs-mode: nil -*- * $Id$ */ /* * File: iperf.c * * Author: Jeff W. Boote * Internet2 * * Date: Mon Sep 03 12:42:26 MDT 2007 * * Description: * * This file encapsulates the functionality required to run an * iperf throughput tool in bwctl. * * License: * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include /* * Function: IperfAvailable * * Description: * * In Args: * Out Args: * Scope: * * Returns: * * Side Effect: * */ static BWLBoolean IperfAvailable( BWLContext ctx, BWLToolDefinition tool ) { char *cmd; char *pattern = "iperf version "; /* Expected begin of stderr */ /* We expect 'iperf -v' to print to stderr something like 'iperf version 2.0.2 (03 May 2005) pthreads' */ char buf[1024]; int n; /* * Fetch 'tool' name */ if( !(cmd = (char *)BWLContextConfigGetV(ctx,"V.iperf_cmd"))){ BWLError(ctx,BWLErrDEBUG,BWLErrUNKNOWN, "IperfAvailable(): %s unset, using \"%s\"", "iperf_cmd",tool->def_cmd); cmd = tool->def_cmd; } n = ExecCommand(ctx, buf, sizeof(buf), cmd, "-v", NULL); if(n == 0 || n == 1) { if(0 == strncmp(buf,pattern,strlen(pattern))){ /* iperf found! */ return True; } } /* This is what we exit with if the exec fails so it likely means the tool isn't installed. */ BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "IperfAvailable(): Unable to verify that iperf is working. It may not be installed. exit status: %d: output: %s", n, buf); return False; } static BWLBoolean IperfValidateTest( BWLContext ctx, BWLToolDefinition tool, BWLTestSpec test_spec ) { // validate the units if(test_spec.units){ switch((char)test_spec.units){ case 'b': case 'B': case 'k': case 'K': case 'm': case 'M': case 'g': case 'G': case 'a': case 'A': break; default: BWLError(ctx,BWLErrFATAL,EINVAL, "IperfValidateTest: Invalid units specification: %c", (char)test_spec.units); return False; break; } } if(test_spec.outformat){ switch((char)test_spec.outformat){ case 'c': break; default: BWLError(ctx,BWLErrFATAL,EINVAL, "IperfValidateTest: Invalid output format specification %c", (char)test_spec.outformat); return False; break; } } if(!test_spec.udp && test_spec.bandwidth){ BWLError(ctx,BWLErrFATAL,EINVAL, "IperfValidateTest: iperf does not support setting TCP bandwidth"); return False; } return _BWLToolGenericValidateTest(ctx, tool, test_spec); } /* * Function: IperfPreRunTest * * Description: * Does all 'prep' work for running an iperf test. * * Returns a 'closure' pointer. NULL indicates * failure. * This 'closure' pointer is passed on to the IperfRunTest. * * (closure pointer is just the arg list for the exec) * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ /* This IperfArgs can be a static because it is only used from within a * forked process. If bwctl ever goes to threads, this will need to be * made thread-local memory. */ static char *IperfArgs[_BWL_MAX_TOOLARGS*2]; static void * IperfPreRunTest( BWLContext ctx, BWLTestSession tsess ) { int len; char *cmd; int a = 0; char recvhost[MAXHOSTNAMELEN]; char sendhost[MAXHOSTNAMELEN]; if(BWLAddrNodeName(ctx, tsess->test_spec.server, recvhost, sizeof(recvhost), NI_NUMERICHOST) == NULL) { BWLError(tsess->cntrl->ctx,BWLErrFATAL,EINVAL, "IperfPreRunTest(): Invalid server I2Addr"); return NULL; } if(BWLAddrNodeName(ctx, tsess->test_spec.client, sendhost, sizeof(sendhost), NI_NUMERICHOST) == NULL) { BWLError(tsess->cntrl->ctx,BWLErrFATAL,EINVAL, "IperfPreRunTest(): Invalid client I2Addr"); return NULL; } /* Fill in any taskset options */ a = BWLToolGenericFillCPUAffinityCommand(ctx, tsess->tool, IperfArgs); /* Run iperf */ cmd = (char*)BWLContextConfigGetV(ctx,"V.iperf_cmd"); if(!cmd) cmd = tsess->tool->def_cmd; /* * First figure out the args for iperf */ IperfArgs[a++] = cmd; if(tsess->conf_server){ IperfArgs[a++] = "-B"; if( !(IperfArgs[a++] = strdup(recvhost))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"IperfPreRunTest():strdup(): %M"); return NULL; } IperfArgs[a++] = "-s"; } else{ IperfArgs[a++] = "-c"; if( !(IperfArgs[a++] = strdup(recvhost))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"IperfPreRunTest():strdup(): %M"); return NULL; } IperfArgs[a++] = "-B"; if( !(IperfArgs[a++] = strdup(sendhost))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"IperfPreRunTest():strdup(): %M"); return NULL; } if(tsess->test_spec.tos){ IperfArgs[a++] = "-S"; if( !(IperfArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.tos))){ return NULL; } } } /* * XXX: Perhaps these should be validated earlier, in the CheckTest * function chain? */ IperfArgs[a++] = "-f"; if(!tsess->test_spec.units){ IperfArgs[a++] = "b"; } else{ char temp[2]; temp[0] = (char)tsess->test_spec.units; temp[1] = '\0'; if( !(IperfArgs[a++] = strdup(temp))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno, "IperfPreRunTest():strdup(): %M"); return NULL; } } if(tsess->test_spec.outformat){ IperfArgs[a++] = "-y"; IperfArgs[a++] = "c"; } if(tsess->test_spec.parallel_streams > 0){ IperfArgs[a++] = "-P"; if( !(IperfArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.parallel_streams))){ return NULL; } } if(tsess->test_spec.len_buffer){ IperfArgs[a++] = "-l"; if( !(IperfArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.len_buffer))){ return NULL; } } IperfArgs[a++] = "-m"; IperfArgs[a++] = "-p"; if( !(IperfArgs[a++] = BWLUInt32Dup(ctx,tsess->tool_port))){ return NULL; } if(tsess->test_spec.udp){ IperfArgs[a++] = "-u"; if((!tsess->conf_server) && (tsess->test_spec.bandwidth)){ IperfArgs[a++] = "-b"; if( !(IperfArgs[a++] = BWLUInt64Dup(ctx,tsess->test_spec.bandwidth))){ return NULL; } } } if(tsess->test_spec.window_size){ IperfArgs[a++] = "-w"; if( !(IperfArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.window_size))){ return NULL; } } IperfArgs[a++] = "-t"; if( !(IperfArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.duration))){ return NULL; } if(tsess->test_spec.report_interval){ IperfArgs[a++] = "-i"; if( !(IperfArgs[a++] = BWLDoubleDup(ctx,tsess->test_spec.report_interval / 1000.0))){ return NULL; } } if (BWLAddrIsIPv6(ctx, tsess->test_spec.server)) { IperfArgs[a++] = "-V"; } IperfArgs[a++] = NULL; /* * Report what will be run in the output file */ if (tsess->test_spec.verbose) { fprintf(tsess->localfp,"bwctl: exec_line:"); for(len=0;IperfArgs[len];len++){ fprintf(tsess->localfp," %s",IperfArgs[len]); } fprintf(tsess->localfp,"\n"); } return (void *)IperfArgs; } /* * Function: IperfRunTest * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ static BWLBoolean IperfRunTest( BWLContext ctx, BWLTestSession tsess __attribute__((unused)), void *closure ) { char **ipargs = (char **)closure; /* * Now run iperf! */ execvp(ipargs[0],ipargs); BWLError(ctx,BWLErrFATAL,errno,"execvp(%s): %M",ipargs[0]); exit(BWL_CNTRL_FAILURE); } BWLBoolean IperfKillTest( BWLContext ctx, pid_t pid, int force ) { int signal = force?SIGKILL:SIGTERM; if(killpg(pid,signal) == 0){ /* * Send the SIGTERM kill signal twice, iperf does not exit after * receiving one */ if (!force) killpg(pid,signal); return True; } else if (errno == ESRCH) { return True; } else { return False; } } BWLToolDefinitionRec BWLToolIperf = { "iperf", /* name */ "iperf", /* def_cmd */ NULL, /* def_server_cmd */ 5001, /* def_port */ _BWLToolGenericParse, /* parse */ BWLGenericParseThroughputParameters, /* parse_request */ BWLGenericUnparseThroughputParameters, /* unparse_request */ IperfAvailable, /* tool_avail */ IperfValidateTest, /* validate_test */ _BWLToolGenericInitTest, /* init_test */ IperfPreRunTest, /* pre_run */ IperfRunTest, /* run */ IperfKillTest, /* kill */ BWL_TEST_THROUGHPUT, /* test_types */ BWLToolServerSideData, /* results_side */ False, /* supports_server_sends */ True, /* supports_endpointless */ 5001, /* The server port to use in endpointless tests */ 0, /* parsable format */ }; bwctl_1.5.4+dfsg1.orig/bwlib/util.c0000664000076500007710000003704712560414557014052 0ustar /* * $Id$ */ /* * File: util.c * * Author: Jeff W. Boote * Internet2 * * Date: Tue Sep 16 14:27:47 MDT 2003 * * Description: * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "bwlibP.h" /* * Function: BWLPortsSetI * * Description: * Initialize port-range so the 'next port' function starts * with the given 'i' port. If i is 0, this function initializes * the port-range with a random port (or failing that, uses * the lowest value in the port-range). * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ void BWLPortsSetI( BWLContext ctx, BWLPortRange prange, uint16_t i ) { uint16_t range; /* * Initialize current port */ if((i != 0) && (i > prange->low) && (i < prange->high)){ prange->i = i; } else{ prange->i = prange->low; if( (range = BWLPortsRange(prange))){ uint32_t r; /* * Get a random 32bit num to aid in selecting first port. * (Silently fail - it is not that big of a deal if the * first port is selected.) */ if(I2RandomBytes(ctx->rand_src,(uint8_t*)&r,4) == 0){ prange->i = prange->low + ((double)r / 0xffffffff * range); } } } return; } /* * Function: BWLPortsParse * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ I2Boolean BWLPortsParse( BWLContext ctx, const char *pspec, BWLPortRange prange ) { char chmem[BWL_MAX_TOOLNAME]; char *tstr,*endptr; long tint; if(!pspec || (strlen(pspec) >= sizeof(chmem))){ BWLError(ctx,BWLErrFATAL,EINVAL,"Invalid port-range: \"%s\"",pspec); return False; } strcpy(chmem,pspec); tstr = chmem; endptr = NULL; while(isspace((int)*tstr)) tstr++; tint = strtol(tstr,&endptr,10); if(!endptr || (tstr == endptr) || (tint < 0) || (tint > (int)0xffff)){ goto failed; } prange->low = (uint16_t)tint; while(isspace((int)*endptr)) endptr++; switch(*endptr){ case '\0': prange->high = prange->low; goto done; break; case '-': endptr++; break; default: goto failed; } tstr = endptr; endptr = NULL; while(isspace((int)*tstr)) tstr++; tint = strtol(tstr,&endptr,10); if(!endptr || (tstr == endptr) || (tint < 0) || (tint > (int)0xffff)){ goto failed; } prange->high = (uint16_t)tint; if(prange->high < prange->low){ goto failed; } done: BWLPortsSetI(ctx,prange,0); return True; failed: BWLError(ctx,BWLErrFATAL,EINVAL,"Invalid port-range: \"%s\"",pspec); return False; } uint16_t BWLPortsNext( BWLPortRange prange ) { uint16_t i; assert(prange); if( !BWLPortsRange(prange)){ return prange->i; } /* save i to return */ i = prange->i; /* compute next i */ prange->i -= prange->low; prange->i = (prange->i + 1) % BWLPortsRange(prange); prange->i += prange->low; return i; } char * BWLUInt64Dup( BWLContext ctx, uint64_t n ) { char nbuf[100]; int len; char *ret; nbuf[sizeof(nbuf)-1] = '\0'; len = snprintf(nbuf,sizeof(nbuf)-1,"%llu",(unsigned long long)n); if((len < 0) || ((unsigned)len >= sizeof(nbuf))){ BWLError(ctx,BWLErrFATAL,errno,"snprintf(): %M"); return NULL; } if((ret = strdup(nbuf))) return ret; BWLError(ctx,BWLErrFATAL,errno,"strdup(): %M"); return NULL; } char * BWLUInt32Dup( BWLContext ctx, uint32_t n ) { return BWLUInt64Dup(ctx,(uint64_t)n); } char * BWLDoubleDup( BWLContext ctx, double n ) { char nbuf[100]; int len; char *ret; nbuf[sizeof(nbuf)-1] = '\0'; len = snprintf(nbuf,sizeof(nbuf)-1,"%lf",n); if((len < 0) || ((unsigned)len >= sizeof(nbuf))){ BWLError(ctx,BWLErrFATAL,errno,"snprintf(): %M"); return NULL; } if((ret = strdup(nbuf))) return ret; BWLError(ctx,BWLErrFATAL,errno,"strdup(): %M"); return NULL; } int ExecCommand( BWLContext ctx, char *output_buf, int output_buf_size, char *command, ... ) { int fdpipe[2]; pid_t pid; int status; int rc; int i; char **argv = NULL; va_list ap; /* Count the number of commands so we know how much to allocate */ va_start(ap, command); i = 1; while (va_arg(ap, char *) != NULL) i++; va_end(ap); argv = calloc(i + 1, sizeof(char *)); if(argv == NULL) { BWLError(ctx,BWLErrFATAL,errno,"ExecCommand():pipe(): %M"); goto error_out; } i = 1; argv[0] = command; va_start(ap, command); while ((argv[i] = va_arg(ap, char *)) != NULL) i++; va_end(ap); if(pipe(fdpipe) < 0) { BWLError(ctx,BWLErrFATAL,errno,"ExecCommand():pipe(): %M"); goto error_out; } pid = fork(); /* fork error */ if(pid < 0){ BWLError(ctx,BWLErrFATAL,errno,"ExecCommand():fork(): %M"); goto error_out; } if(0 == pid){ char buf[1024]; /* * Redirect stdout/stderr into their respective pipes. */ dup2(fdpipe[1],STDOUT_FILENO); dup2(fdpipe[1],STDERR_FILENO); close(fdpipe[0]); close(fdpipe[1]); execvp(command,argv); snprintf(buf,sizeof(buf)-1,"ExecCommand(): exec(%s)",command); perror(buf); exit(1); } close(fdpipe[1]); while(((rc = waitpid(pid,&status,0)) == -1) && errno == EINTR); if(rc < 0){ BWLError(ctx,BWLErrFATAL,errno, "ExecCommand(): waitpid(), rc = %d: %M",rc); goto error_out; } /* * If iperf did not even exit... */ if(!WIFEXITED(status)){ if(WIFSIGNALED(status)){ BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "ExecCommand(): %s exited due to signal=%d", command, WTERMSIG(status)); } BWLError(ctx,BWLErrWARNING,errno,"ExecCommand(): %s unusable", command); goto error_out; } if (output_buf) { /* * Read any output from the child */ bzero(output_buf, output_buf_size); read(fdpipe[0],output_buf,output_buf_size - 1); close(fdpipe[0]); } free(argv); return WEXITSTATUS(status); error_out: if (argv) free(argv); return -1; } char * BWLAddrNodeName( BWLContext ctx, I2Addr addr, char *buf, size_t len, int flags ) { struct sockaddr *saddr; socklen_t saddrlen; if( !(saddr = I2AddrSAddr(addr,&saddrlen))){ BWLError(ctx,BWLErrFATAL,EINVAL, "I2AddrServName(): Invalid address"); return NULL; } if (getnameinfo((struct sockaddr *)saddr, saddrlen, buf, len, 0, 0, flags) != 0) { BWLError(ctx,BWLErrFATAL,EINVAL, "I2AddrServName(): Problem resolving address"); return NULL; } return buf; } BWLBoolean BWLAddrIsIPv6( BWLContext ctx, I2Addr addr ) { struct sockaddr *saddr; socklen_t saddrlen; BWLBoolean retval; if( !(saddr = I2AddrSAddr(addr,&saddrlen))){ BWLError(ctx,BWLErrFATAL,EINVAL, "I2AddrServName(): Invalid address"); return False; } retval = False; #ifdef AF_INET6 if (saddr->sa_family == AF_INET6) { retval = True; } #endif return retval; } char * BWLDiscoverSourceAddr( BWLContext ctx, const char *remote_addr, const char *local_interface, char *buf, size_t buflen ) { int rc; I2Addr temp_addr; struct addrinfo hints; struct addrinfo *result, *rp; char *retval; char temp_address[1024]; size_t temp_address_len; char temp_port[10]; struct sockaddr_storage sbuff; socklen_t saddrlen = sizeof(sbuff); // An unorthodox way of parsing the address... temp_addr = I2AddrByNode(NULL, remote_addr); if (!temp_addr) { BWLError(ctx,BWLErrDEBUG,EINVAL, "BWLDiscoverSourceAddr(): Invalid address: I2AddrByNode failed"); return NULL; } temp_address_len = sizeof(temp_address); remote_addr = I2AddrNodeName(temp_addr, temp_address, &temp_address_len); I2AddrFree(temp_addr); snprintf(temp_port, sizeof(temp_port), "%d", (rand() % 16000 + 1)); hints.ai_socktype = SOCK_DGRAM; hints.ai_flags = 0; hints.ai_protocol = 0; hints.ai_canonname = NULL; hints.ai_addr = NULL; hints.ai_next = NULL; if( BWLContextConfigGetV(ctx,BWLIPv4Only)){ hints.ai_family = AF_INET; } else if( BWLContextConfigGetV(ctx,BWLIPv6Only)){ hints.ai_family = AF_INET6; } else { hints.ai_family = AF_UNSPEC; } if ((rc = getaddrinfo(remote_addr, temp_port, &hints, &result)) != 0) { BWLError(ctx,BWLErrDEBUG,EINVAL, "BWLDiscoverSourceAddr(): Invalid address: %s", gai_strerror(rc)); return NULL; } retval = NULL; for(rp = result; rp != NULL; rp = rp->ai_next){ if (local_interface) { struct ifaddrs *ifaddr, *ifa; if (getifaddrs(&ifaddr) == -1) { return NULL; } for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) { if (strcmp(ifa->ifa_name, local_interface) != 0) continue; if (ifa->ifa_addr == NULL) continue; if (rp->ai_family != ifa->ifa_addr->sa_family) continue; // This is a hacky method of getting the addrlen. It should match // the remote_addrinfo's addrlen. if (getnameinfo(ifa->ifa_addr, rp->ai_addrlen, buf, buflen, NULL, 0, NI_NUMERICHOST) == 0) { retval = buf; break; } } freeifaddrs(ifaddr); if (retval) break; } else { int temp_sd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); if (temp_sd < 0) { continue; } if (connect(temp_sd, rp->ai_addr, rp->ai_addrlen) != 0) { close(temp_sd); continue; } if(getsockname(temp_sd,(void*)&sbuff,&saddrlen) == 0){ if (getnameinfo((struct sockaddr *)&sbuff, saddrlen, buf, buflen, NULL, 0, NI_NUMERICHOST) == 0) { close(temp_sd); retval = buf; break; } } close(temp_sd); } } if (result) { freeaddrinfo(result); } return retval; } BWLBoolean BWLIsInterface( const char *interface ) { BWLBoolean retval; struct ifaddrs *ifaddr, *ifa; if (getifaddrs(&ifaddr) == -1) { return False; } retval = False; for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) { if (strcmp(ifa->ifa_name, interface) == 0) { retval = True; break; } } freeifaddrs(ifaddr); return retval; } BWLBoolean BWLAddrIsLoopback( I2Addr addr ) { struct addrinfo *sai; struct sockaddr *saddr; socklen_t saddrlen; BWLBoolean retval; if((saddr = I2AddrSAddr(addr,&saddrlen))){ if (I2SockAddrIsLoopback(saddr, saddrlen)) { retval = True; } else { retval = False; } } else if ((sai = I2AddrAddrInfo(addr, NULL, NULL))) { retval = True; while(sai != NULL) { if (!I2SockAddrIsLoopback(sai->ai_addr, sai->ai_addrlen)) { // It has at least one non-loopback address retval = False; } sai = sai->ai_next; } } else { retval = False; } return retval; } BWLBoolean BWLCntrlIsLocal( BWLControl cntrl ) { BWLBoolean retval; struct ifaddrs *ifaddr, *ifa; struct sockaddr *addr; socklen_t addr_len; if (BWLAddrIsLoopback(cntrl->remote_addr)) { return True; } if (getifaddrs(&ifaddr) == -1) { return False; } retval = False; addr = I2AddrSAddr(cntrl->remote_addr, &addr_len); for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) { if (ifa->ifa_addr == NULL) { continue; } if (BWLSockaddrCompare(ifa->ifa_addr, addr)) { retval = True; break; } } freeifaddrs(ifaddr); return retval; } BWLBoolean BWLSockaddrCompare( struct sockaddr *sa, struct sockaddr *sb ) { if (sa->sa_family != sb->sa_family) return False; /* * With IPv6 address structures, assume a non-hostile implementation that * stores the address as a contiguous sequence of bits. Any holes in the * sequence would invalidate the use of memcmp(). */ if (sa->sa_family == AF_INET) { if (((struct sockaddr_in *)(sa))->sin_addr.s_addr == ((struct sockaddr_in *)(sb))->sin_addr.s_addr) { return True; } #ifdef AF_INET6 } else if (sa->sa_family == AF_INET6) { if (0 == memcmp((char *) &(((struct sockaddr_in6 *)(sa))->sin6_addr), (char *) &(((struct sockaddr_in6 *)(sb))->sin6_addr), sizeof((((struct sockaddr_in6 *)(sa))->sin6_addr)))) { return True; } #endif } return False; } BWLBoolean BWLParseCPUAffinityString( const char *cpu_affinity ) { int i; BWLBoolean retval = True; BWLBoolean next_number = False; if (strlen(cpu_affinity) == 0) { retval = False; } for(i = 0; i < strlen(cpu_affinity); i++) { switch (cpu_affinity[i]) { case '-': case ',': if (next_number) retval = False; next_number = True; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (next_number) next_number = False; break; default: retval = False; break; } } return retval; } bwctl_1.5.4+dfsg1.orig/bwlib/Makefile.am0000664000076500007710000000322412560414557014753 0ustar # # $Id$ # ######################################################################### # # # Copyright (C) 2003 # # Internet2 # # All Rights Reserved # # # ######################################################################### # # File: Makefile.am # # Author: Jeff Boote # Internet2 # # Date: Tue Sep 16 14:23:59 MDT 2003 # # Description: libbwlib build description. # INCLUDES = $(BWLINCS) $(I2UTILINCS) lib_LIBRARIES = libbwlib.a libbwlib_a_SOURCES = api.c capi.c sapi.c context.c error.c bwlibP.h \ protocol.c io.c endpoint.c time.c arithm64.c \ rijndael-alg-fst.c rijndael-alg-fst.h \ rijndael-api-fst.c rijndael-api-fst.h \ util.c daemon.c missing_getopt.c missing_getopt.h \ $(TOOL_SOURCES) # add parent libbwlib_a_CFLAGS = -I.. TOOL_SOURCES = tools.c iperf3.c ping.c traceroute.c tracepath.c owamp.c paris-traceroute.c if TOOL_THRULAY TOOL_SOURCES += thrulay.c endif if TOOL_IPERF TOOL_SOURCES += iperf.c endif if TOOL_NUTTCP TOOL_SOURCES += nuttcp.c endif I2utilincludedir = $(pkgincludedir) I2utilinclude_HEADERS = bwlib.h # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # bwctl_1.5.4+dfsg1.orig/bwlib/io.c0000664000076500007710000001043112560414557013470 0ustar /* ** $Id$ */ /* * File: io.c * * Author: Jeff W. Boote * * Date: Tue Sep 16 14:26:30 MDT 2003 * * Description: This file contains the private functions to * to facilitate IO that the library needs to do. * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include int _BWLSendBlocksIntr( BWLControl cntrl, uint8_t *buf, int num_blocks, int *retn_on_intr ) { ssize_t n; if (cntrl->mode & BWL_MODE_DOCIPHER) _BWLEncryptBlocks(cntrl, buf, num_blocks, buf); n = I2Writeni(cntrl->sockfd,buf, (unsigned)num_blocks*_BWL_RIJNDAEL_BLOCK_SIZE,retn_on_intr); if(n < 0){ if(!*retn_on_intr || (errno != EINTR)){ BWLError(cntrl->ctx,BWLErrFATAL,errno, "I2Writeni(): %M"); } return -1; } return num_blocks; } int _BWLReceiveBlocksIntr( BWLControl cntrl, uint8_t *buf, int num_blocks, int *retn_on_intr ) { ssize_t n; n = I2Readni(cntrl->sockfd,buf, (unsigned)num_blocks*_BWL_RIJNDAEL_BLOCK_SIZE,retn_on_intr); if(n < 0){ if(!*retn_on_intr || (errno != EINTR)){ BWLError(cntrl->ctx,BWLErrFATAL,errno,"I2Readni(): %M"); } return -1; } /* * Short reads mean socket was closed. */ if(n != (num_blocks*_BWL_RIJNDAEL_BLOCK_SIZE)) return 0; if (cntrl->mode & BWL_MODE_DOCIPHER) _BWLDecryptBlocks(cntrl, buf, num_blocks, buf); return num_blocks; } int _BWLSendBlocks( BWLControl cntrl, uint8_t *buf, int num_blocks ) { int intr=0; int *retn_on_intr = &intr; if(cntrl->retn_on_intr){ retn_on_intr = cntrl->retn_on_intr; } return _BWLSendBlocksIntr(cntrl,buf,num_blocks,retn_on_intr); } int _BWLReceiveBlocks( BWLControl cntrl, uint8_t *buf, int num_blocks ) { int intr=0; int *retn_on_intr = &intr; if(cntrl->retn_on_intr){ retn_on_intr = cntrl->retn_on_intr; } return _BWLReceiveBlocksIntr(cntrl,buf,num_blocks,retn_on_intr); } /* ** The following two functions encrypt/decrypt a given number ** of (16-byte) blocks. IV is currently updated within ** the rijndael api (blockEncrypt/blockDecrypt). */ int _BWLEncryptBlocks( BWLControl cntrl, uint8_t *buf, int num_blocks, uint8_t *out ) { int r; r = blockEncrypt(cntrl->writeIV, &cntrl->encrypt_key, buf, num_blocks*16*8, out); if (r != num_blocks*16*8) return -1; return 0; } int _BWLDecryptBlocks( BWLControl cntrl, uint8_t *buf, int num_blocks, uint8_t *out ) { int r; r = blockDecrypt(cntrl->readIV, &cntrl->decrypt_key, buf, num_blocks*16*8, out); if (r != num_blocks*16*8) return -1; return 0; } /* ** This function sets up the key field of a BWLControl structure, ** using the binary key located in . */ void _BWLMakeKey( BWLControl cntrl, uint8_t *binKey ) { cntrl->encrypt_key.Nr = rijndaelKeySetupEnc(cntrl->encrypt_key.rk, binKey, 128); cntrl->decrypt_key.Nr = rijndaelKeySetupDec(cntrl->decrypt_key.rk, binKey, 128); } /* ** The next two functions perform a single encryption/decryption ** of Token in Control protocol, using a given (binary) key and the IV of 0. */ #define TOKEN_BITS_LEN (2*16*8) int _BWLEncryptToken( unsigned char *binKey, unsigned char *token_in, unsigned char *token_out ) { int r; uint8_t IV[16]; keyInstance key; memset(IV, 0, 16); key.Nr = rijndaelKeySetupEnc(key.rk, binKey, 128); r = blockEncrypt(IV, &key, token_in, TOKEN_BITS_LEN, token_out); if (r != TOKEN_BITS_LEN) return -1; return 0; } int _BWLDecryptToken( unsigned char *binKey, unsigned char *token_in, unsigned char *token_out ) { int r; uint8_t IV[16]; keyInstance key; memset(IV, 0, 16); key.Nr = rijndaelKeySetupDec(key.rk, binKey, 128); r = blockDecrypt(IV, &key, token_in, TOKEN_BITS_LEN, token_out); if (r != TOKEN_BITS_LEN) return -1; return 0; } bwctl_1.5.4+dfsg1.orig/bwlib/ping.c0000664000076500007710000002425012560414557014022 0ustar /* * ex: set tabstop=4 ai expandtab softtabstop=4 shiftwidth=4: * -*- mode: c-basic-indent: 4; tab-width: 4; indent-tabs-mode: nil -*- * $Id: ping.c 599 2013-08-02 17:27:12Z aaron $ */ /* * File: ping.c * * Author: Aaron Brown * Internet2 * * Date: 2013-09-02 * * Description: * * This file encapsulates the functionality required to run a * ping test in bwctl. * * License: * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include #define PING_DEFAULT_CMD "ping" #define PING6_DEFAULT_CMD "ping6" /* * Function: PingAvailable * * Description: * * In Args: * Out Args: * Scope: * * Returns: * * Side Effect: * */ static BWLBoolean PingAvailable( BWLContext ctx, BWLToolDefinition tool ) { BWLBoolean ping_available = False; BWLBoolean ping6_available = False; char *ping_cmd; char *ping6_cmd; int n; char buf[1024]; /* * Fetch the 'ping' */ if( !(ping_cmd = (char *)BWLContextConfigGetV(ctx,"V.ping_cmd"))){ BWLError(ctx,BWLErrDEBUG,BWLErrUNKNOWN, "PingAvailable(): %s unset, using \"%s\"", "ping_cmd",PING_DEFAULT_CMD); ping_cmd = PING_DEFAULT_CMD; } /* * Fetch the 'ping6' */ if( !(ping6_cmd = (char *)BWLContextConfigGetV(ctx,"V.ping6_cmd"))){ BWLError(ctx,BWLErrDEBUG,BWLErrUNKNOWN, "PingAvailable(): %s unset, using \"%s\"", "ping6_cmd",PING6_DEFAULT_CMD); ping6_cmd = PING6_DEFAULT_CMD; } n = ExecCommand(ctx, buf, sizeof(buf), ping_cmd, "-c", "1", "127.0.0.1", NULL); if (n == 0) { ping_available = True; } else { BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "PingAvailable(): Unable to verify that '%s' is working. It may not be installed. exit status: %d: output: %s", ping_cmd, n, buf); } n = ExecCommand(ctx, buf, sizeof(buf), ping6_cmd, "-c", "1", "::1", NULL); if (n == 0) { ping6_available = True; } else { BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "PingAvailable(): Unable to verify that '%s' is working. It may not be installed. exit status: %d: output: %s", ping6_cmd, n, buf); } return (ping_available || ping6_available); } /* * Function: PingPreRunTest * * Description: * Does all 'prep' work for running an ping test. * * Returns a 'closure' pointer. NULL indicates * failure. * This 'closure' pointer is passed on to the PingRunTest. * * (closure pointer is just the arg list for the exec) * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ /* This PingArgs can be a static because it is only used from within a * forked process. If bwctl ever goes to threads, this will need to be * made thread-local memory. */ static char *PingArgs[_BWL_MAX_TOOLARGS*2]; static void * PingPreRunTest( BWLContext ctx, BWLTestSession tsess ) { int len; char *cmd; char *default_cmd; char *cmd_variable; int a = 0; I2Addr remote_side; I2Addr local_side; char addr_str[INET6_ADDRSTRLEN]; // If 'server sends' mode is in effect, the server runs the ping command, // because the client doesn't need to set anything up. It's a hack, but it // should work. if((tsess->conf_server && !tsess->test_spec.server_sends) || (tsess->conf_client && tsess->test_spec.server_sends)) { // special case. We don't have to do anything, so we just fork a process // that waits until killed, or times out after 'duration' seconds. fprintf(tsess->localfp,"bwctl: nothing to exec for ping server\n"); PingArgs[0] = NULL; return (void *)PingArgs; } if (tsess->test_spec.server_sends) { local_side = tsess->test_spec.server; remote_side = tsess->test_spec.client; } else { local_side = tsess->test_spec.client; remote_side = tsess->test_spec.server; } if (BWLAddrIsIPv6(ctx, remote_side)) { cmd_variable = "V.ping6_cmd"; default_cmd = PING6_DEFAULT_CMD; } else { cmd_variable = "V.ping_cmd"; default_cmd = PING_DEFAULT_CMD; } /* Run ping */ cmd = (char*)BWLContextConfigGetV(ctx,cmd_variable); if(!cmd) cmd = default_cmd; /* * First figure out the args for ping */ PingArgs[a++] = cmd; PingArgs[a++] = "-c"; if( !(PingArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.ping_packet_count))){ return NULL; } PingArgs[a++] = "-i"; if( !(PingArgs[a++] = BWLDoubleDup(ctx,(tsess->test_spec.ping_interpacket_time/1000.0)))){ return NULL; } #ifdef linux /* * On linux, set a more reasonable wait time so that in the 100% packet * loss case, ping will finish in the allotted time. */ PingArgs[a++] = "-W"; PingArgs[a++] = "1"; #endif if(tsess->test_spec.ping_packet_size){ PingArgs[a++] = "-s"; if( !(PingArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.ping_packet_size))){ return NULL; } } if(tsess->test_spec.ping_packet_ttl){ #ifdef linux PingArgs[a++] = "-t"; #else PingArgs[a++] = "-m"; #endif if( !(PingArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.ping_packet_ttl))){ return NULL; } } if(tsess->test_spec.tos){ #ifdef linux PingArgs[a++] = "-Q"; #else PingArgs[a++] = "-z"; #endif if( !(PingArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.tos))){ return NULL; } } // Bind to the specified address #ifdef linux // Linux ping version use -I to bind to the specific address PingArgs[a++] = "-I"; #else // BSD ping versions use -S to bind to the specific address PingArgs[a++] = "-S"; #endif if( BWLAddrNodeName(ctx, local_side, addr_str, sizeof(addr_str), NI_NUMERICHOST) == 0) { BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"PingPreRunTest():Problem resolving address"); return NULL; } if( !(PingArgs[a++] = strdup(addr_str))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"PingPreRunTest():strdup(): %M"); return NULL; } if( BWLAddrNodeName(ctx, remote_side, addr_str, sizeof(addr_str), NI_NUMERICHOST) == 0) { BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"PingPreRunTest():Problem resolving address"); return NULL; } if( !(PingArgs[a++] = strdup(addr_str))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"PingPreRunTest():strdup(): %M"); return NULL; } PingArgs[a++] = NULL; /* * Report what will be run in the output file */ if (tsess->test_spec.verbose) { fprintf(tsess->localfp,"bwctl: exec_line:"); for(len=0;PingArgs[len];len++){ fprintf(tsess->localfp," %s",PingArgs[len]); } fprintf(tsess->localfp,"\n"); } return (void *)PingArgs; } /* * Function: PingRunTest * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ static BWLBoolean PingRunTest( BWLContext ctx, BWLTestSession tsess, void *closure ) { char **ipargs = (char **)closure; if (ipargs[0] != NULL) { /* * Now run ping! */ execvp(ipargs[0],ipargs); BWLError(ctx,BWLErrFATAL,errno,"execvp(%s): %M",ipargs[0]); exit(BWL_CNTRL_FAILURE); } // Special case for the ping server. There isn't anything for the receive // side to run, so just sleep until duration is up. sleep(tsess->test_spec.duration); exit(0); } /* * Function: PingInitTest * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLErrSeverity PingInitTest( BWLContext ctx, BWLToolDefinition tool, uint16_t *toolport ) { return BWLErrOK; } int PingParse( BWLContext ctx, BWLToolDefinition tool, const char *key, const char *val ) { if(!strncasecmp(key,"ping_cmd",strlen(key))){ return save_path(ctx,key,val); } if(!strncasecmp(key,"ping6_cmd",strlen(key))){ return save_path(ctx,key,val); } return _BWLToolGenericParse(ctx, tool, key, val); } BWLToolDefinitionRec BWLToolPing = { "ping", /* name */ "ping", /* def_cmd */ NULL, /* def_server_cmd */ 0, /* def_port */ PingParse, /* parse */ BWLGenericParsePingParameters, /* parse_request */ BWLGenericUnparsePingParameters, /* unparse_request */ PingAvailable, /* tool_avail */ _BWLToolGenericValidateTest, /* validate_test */ PingInitTest, /* init_test */ PingPreRunTest, /* pre_run */ PingRunTest, /* run */ _BWLToolGenericKillTest, /* kill */ BWL_TEST_LATENCY, /* test_types */ BWLToolSenderSideData, /* results_side */ True, /* supports_server_sends */ True, /* supports_endpointless */ 0, /* The server port to use in endpointless tests */ 0, /* parsable format */ }; bwctl_1.5.4+dfsg1.orig/bwlib/rijndael-api-fst.c0000664000076500007710000001241212560414557016213 0ustar /** * rijndael-api-fst.c * * @version 2.9 (December 2000) * * Optimised ANSI C code for the Rijndael cipher (now AES) * * @author Vincent Rijmen * @author Antoon Bosselaers * @author Paulo Barreto * * This code is hereby placed in the public domain. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''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 AUTHORS 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. * * Acknowledgements: * * We are deeply indebted to the following people for their bug reports, * fixes, and improvement suggestions to this implementation. Though we * tried to list all contributions, we apologise in advance for any * missing reference. * * Andrew Bales * Markus Friedl * John Skodon */ #include #include #include #include "rijndael-alg-fst.h" #include "rijndael-api-fst.h" #include /* ** This function sets up a binary key based on a 32-byte ** hex-encoded raw key material. */ int makeKey(keyInstance *key, BYTE direction, char *keyMaterial) { int i; u8 cipherKey[MAXKB]; if (key == NULL) { return BAD_KEY_INSTANCE; } /* initialize key schedule: */ /* keyMat = key->keyMaterial; */ for (i = 0; i < 128/8; i++) { int t, v; t = *keyMaterial++; if ((t >= '0') && (t <= '9')) v = (t - '0') << 4; else if ((t >= 'a') && (t <= 'f')) v = (t - 'a' + 10) << 4; else if ((t >= 'A') && (t <= 'F')) v = (t - 'A' + 10) << 4; else return BAD_KEY_MAT; t = *keyMaterial++; if ((t >= '0') && (t <= '9')) v ^= (t - '0'); else if ((t >= 'a') && (t <= 'f')) v ^= (t - 'a' + 10); else if ((t >= 'A') && (t <= 'F')) v ^= (t - 'A' + 10); else return BAD_KEY_MAT; cipherKey[i] = (u8)v; } if (direction == DIR_ENCRYPT) { key->Nr = rijndaelKeySetupEnc(key->rk, cipherKey, 128); } else { key->Nr = rijndaelKeySetupDec(key->rk, cipherKey, 128); } return TRUE; } /* ** This function takes hex-encoded IV and converts it to binary. */ int cipherInit(BYTE *binIV, char *hexIV) { if (hexIV != NULL) { int i; for (i = 0; i < MAX_IV_SIZE; i++) { int t, j; t = hexIV[2*i]; if ((t >= '0') && (t <= '9')) j = (t - '0') << 4; else if ((t >= 'a') && (t <= 'f')) j = (t - 'a' + 10) << 4; else if ((t >= 'A') && (t <= 'F')) j = (t - 'A' + 10) << 4; else return BAD_CIPHER_INSTANCE; t = hexIV[2*i+1]; if ((t >= '0') && (t <= '9')) j ^= (t - '0'); else if ((t >= 'a') && (t <= 'f')) j ^= (t - 'a' + 10); else if ((t >= 'A') && (t <= 'F')) j ^= (t - 'A' + 10); else return BAD_CIPHER_INSTANCE; binIV[i] = (u8)j; } } else { memset(binIV, 0, MAX_IV_SIZE); } return TRUE; } /* ** This function encrypts a given number of bits (= inputlen), ** assumed to bo divisible by 128 (= 16 bytes * 8 bits/byte). ** NOTICE that binIV is automatically updated in the end. */ int blockEncrypt(BYTE *binIV, keyInstance *key, BYTE *input, int inputLen, BYTE *outBuffer) { int i, numBlocks; u8 block[16], *iv; if (binIV == NULL || key == NULL) return BAD_CIPHER_STATE; if (input == NULL || inputLen <= 0) { return 0; /* nothing to do */ } numBlocks = inputLen/128; iv = binIV; for (i = numBlocks; i > 0; i--) { ((u32*)block)[0] = ((u32*)input)[0] ^ ((u32*)iv)[0]; ((u32*)block)[1] = ((u32*)input)[1] ^ ((u32*)iv)[1]; ((u32*)block)[2] = ((u32*)input)[2] ^ ((u32*)iv)[2]; ((u32*)block)[3] = ((u32*)input)[3] ^ ((u32*)iv)[3]; rijndaelEncrypt(key->rk, key->Nr, block, outBuffer); iv = outBuffer; input += 16; outBuffer += 16; } /* Update the IV so we don't have to do it in bwlib library. */ memcpy(binIV, iv, 16); return 128*numBlocks; } /* ** This function encrypts a given number of bits (= inputlen), ** assumed to be divisible by 128 (= #bits in 16 bytes). ** NOTICE that binIV is updated! (CBC mode) */ int blockDecrypt(BYTE *binIV, keyInstance *key, BYTE *input, int inputLen, BYTE *outBuffer) { int i, numBlocks; u8 block[16], *iv; if (binIV == NULL || key == NULL) return BAD_CIPHER_STATE; if (input == NULL || inputLen <= 0) return 0; /* nothing to do */ numBlocks = inputLen/128; iv = binIV; for (i = numBlocks; i > 0; i--) { rijndaelDecrypt(key->rk, key->Nr, input, block); ((u32*)block)[0] ^= ((u32*)iv)[0]; ((u32*)block)[1] ^= ((u32*)iv)[1]; ((u32*)block)[2] ^= ((u32*)iv)[2]; ((u32*)block)[3] ^= ((u32*)iv)[3]; memcpy(binIV, input, 16); memcpy(outBuffer, block, 16); input += 16; outBuffer += 16; } return 128*numBlocks; } void bytes2Key(keyInstance *key, BYTE *sid) { key->Nr = rijndaelKeySetupEnc(key->rk, sid, 128); } bwctl_1.5.4+dfsg1.orig/bwlib/thrulay.c0000664000076500007710000002312612560414557014556 0ustar /* * ex: set tabstop=4 ai expandtab softtabstop=4 shiftwidth=4: * -*- mode: c-basic-indent: 4; tab-width: 4; indent-tabs-mode: nil -*- * $Id$ */ /* * File: thrulay.c * * Author: Jeff W. Boote * Internet2 * * Date: Mon Sep 03 12:42:26 MDT 2007 * * Description: * * This file encapsulates the functionality required to run the * thrulay throughput tool in bwctl. * * This file will only be complied in by 'config' if TOOL_THRULAY * is defined. * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include /* * Function: ThrulayAvailable * * Description: * This file will only be complied in by 'config' if TOOL_THRULAY * is defined. So... The available func always returns True. * * In Args: * Out Args: * Scope: * * Returns: * * Side Effect: * */ static BWLBoolean ThrulayAvailable( BWLContext ctx __attribute__((unused)), BWLToolDefinition tool __attribute__((unused)) ) { return True; } static thrulay_opt_t thrulay_opt; /* * Function: ThrulayPreRunTest * * Description: * Does all 'prep' work for running a thrulay test. * * Returns a 'closure' pointer. NULL indicates * failure. * This 'closure' pointer is passed on to the ThrulayRunTest. * * (closure pointer is just non-null value that is not used) * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ static void * ThrulayPreRunTest( BWLContext ctx, BWLTestSession tsess ) { char recvhost[MAXHOSTNAMELEN]; size_t hlen; int rc; hlen = sizeof(recvhost); I2AddrNodeName(tsess->test_spec.server,recvhost,&hlen); if(!hlen){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,EINVAL, "ThrulayPreRunTest: Invalid server I2Addr"); return NULL; } /* -w window size in bytes */ if(!tsess->test_spec.window_size){ tsess->test_spec.window_size = THRULAY_DEFAULT_WINDOW; } /* -m parallel test streams */ if(tsess->test_spec.parallel_streams < 1){ tsess->test_spec.parallel_streams = 1; } if(tsess->conf_server){ /* Run thrulay server through its API */ /* Log through stderr and verbose reports. */ rc = thrulay_server_init(LOGTYPE_STDERR,1); if (rc < 0){ BWLError(ctx,BWLErrFATAL,errno,"Initializing thrulay server: %s", thrulay_server_strerror(rc)); } /* * XXX: Make a more informative 'info' message indicating the * test that is being done. */ fprintf(tsess->localfp, "bwctl: thrulay_server: streams=%d,win_size=%u\n", tsess->test_spec.parallel_streams, tsess->test_spec.window_size); } else{ /* Run thrulay client through its API */ /* Give default values to the test spec struct */ thrulay_client_options_init(&thrulay_opt); /* But disable output. */ thrulay_opt.reporting_verbosity = -1; if( !(thrulay_opt.server_name = strdup(recvhost))){ BWLError(ctx,BWLErrFATAL,errno,"ThrulayPreRunTest():strdup(): %M"); return NULL; } /* -t test duration in seconds */ thrulay_opt.test_duration = tsess->test_spec.duration; /* -i reporting interval in seconds */ if(tsess->test_spec.report_interval){ thrulay_opt.reporting_interval = tsess->test_spec.report_interval; } /* -l block size */ if(tsess->test_spec.len_buffer){ thrulay_opt.block_size = tsess->test_spec.len_buffer; } /* -p server port */ thrulay_opt.port = tsess->tool_port; /* Rate, if UDP test */ if(tsess->test_spec.udp){ thrulay_opt.rate = tsess->test_spec.bandwidth; } /* -w window size in bytes */ thrulay_opt.window = tsess->test_spec.window_size; /* -m parallel test streams */ thrulay_opt.num_streams = tsess->test_spec.parallel_streams; /* -b (busy wait in UDP test) and -D (DSCP value for TOS byte): not used for the moment. */ /* Multicast options not used too. */ /* * TODO: Fix this to allow UDP Thrulay tests. */ if(tsess->test_spec.udp){ fprintf(tsess->localfp, "bwctl: There are some known problems with using Thrulay and UDP. Only run this if you're debugging the problem.\n"); BWLError(ctx,BWLErrDEBUG,BWLErrPOLICY, "ThrulayPreRunTest: There are some known problems with using Thrulay and UDP. Only run this if you're debugging the problem.\n"); } /* * XXX: Make a more informative 'info' message indicating the * test that is being done. */ fprintf(tsess->localfp, "bwctl: thrulay_client(): protocol=%s, streams=%d,win_size=%u\n" "bwctl: thrulay_client(): duration=%d,report_interval=%d\n" "bwctl: thrulay_client(): block_size=%d,serv_port=%u,udp_rate=%llu\n", ((tsess->test_spec.udp)?"UDP":"TCP"), tsess->test_spec.parallel_streams, tsess->test_spec.window_size, thrulay_opt.test_duration, thrulay_opt.reporting_interval, thrulay_opt.block_size, thrulay_opt.port, ((tsess->test_spec.udp)?thrulay_opt.rate:0) ); } return (void *)&thrulay_opt; } /* * Function: ThrulayRunTest * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ static BWLBoolean ThrulayRunTest( BWLContext ctx, BWLTestSession tsess, void *closure __attribute__((unused)) ) { int rc; if(tsess->conf_server){ int wstatus; int ret=0; pid_t pid; /* * Now run thrulay server! */ rc = thrulay_server_listen(tsess->tool_port, (int)tsess->test_spec.window_size); if (rc < 0){ BWLError(ctx,BWLErrINFO,errno,"Thrulay server listen: %s", thrulay_server_strerror(rc)); } rc = thrulay_server_start(tsess->test_spec.parallel_streams, NULL); if (rc < 0){ BWLError(ctx,BWLErrINFO,errno,"Thrulay server: %s", thrulay_server_strerror(rc)); } while(1){ AGAIN: pid = waitpid(-1,&wstatus,0); switch(pid){ case 0: BWLError(ctx,BWLErrFATAL,errno, "thrulay_server: waidpid(-1): returned 0"); exit(BWL_CNTRL_FAILURE); /* NOTREACHED */ case -1: if(errno == EINTR) goto AGAIN; if(errno == ECHILD) goto DONE; break; default: if(WIFEXITED(wstatus)){ ret = MAX(ret,WEXITSTATUS(wstatus)); goto AGAIN; } if(WIFSIGNALED(wstatus)){ fprintf(tsess->localfp, "bwctl: thrulay_server: stream killed: #%d", WTERMSIG(wstatus)); ret = 255; goto DONE; } } } DONE: exit(ret); } else{ /* * Now run thrulay client! */ rc = thrulay_client_init(thrulay_opt); if (rc < 0){ BWLError(ctx,BWLErrINFO,errno,"Initializing thrulay client: %s", thrulay_client_strerror(rc)); } rc = thrulay_client_start(); if (rc < 0){ BWLError(ctx,BWLErrINFO,errno,"While performing thrulay " "test: %s", thrulay_client_strerror(rc)); } rc = thrulay_client_report_final(); if (rc < 0){ BWLError(ctx,BWLErrINFO,errno,"While generating thrulay" " final report: %s", thrulay_client_strerror(rc)); } thrulay_client_exit(); exit(0); } } BWLToolDefinitionRec BWLToolThrulay = { "thrulay", /* name */ NULL, /* def_cmd */ NULL, /* def_server_cmd */ 5003, /* def_port */ _BWLToolGenericParse, /* parse */ BWLGenericParseThroughputParameters, /* parse_request */ BWLGenericUnparseThroughputParameters, /* unparse_request */ ThrulayAvailable, /* tool_avail */ _BWLToolGenericValidateTest, /* validate_test */ _BWLToolGenericInitTest, /* init_test */ ThrulayPreRunTest, /* pre_run */ ThrulayRunTest, /* run */ BWL_TEST_THROUGHPUT /* test_types */ }; bwctl_1.5.4+dfsg1.orig/bwlib/time.c0000664000076500007710000005502412560414557014026 0ustar /* * $Id$ */ /************************************************************************ * * * Copyright (C) 2003 * * Internet2 * * All Rights Reserved * * * ************************************************************************/ /* * File: time.c * * Author: Jeff W. Boote * Internet2 * * Date: Tue Sep 16 14:27:27 MDT 2003 * * Description: * * functions to encode and decode BWLTimeStamp into 8 octet * buffer for transmitting over the network. * * The format for a timestamp messages is as follows: * * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00| Integer part of seconds | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 04| Fractional part of seconds | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * The format for an Error Estimate is: * 0 1 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00|S|Z| Scale | Multiplier | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include #include #include #include #include #include #ifdef HAVE_SYS_TIMEX_H #include #endif static struct timeval timeoffset; static int sign_timeoffset = 0; static int ntpsyscall_fails; /* initialized in InitNTP */ #ifdef HAVE_SYS_TIMEX_H static int ntp_unsync = 1; #endif /* * Function: _BWLInitNTP * * Description: * Initialize NTP. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: * * If STA_NANO is defined, we insist it is set, this way we can be sure that * ntp_gettime is returning a timespec and not a timeval. * * TODO: The correct way to fix this is: * 1. If ntptimeval contains a struct timespec - then use nano's period. * 2. else if STA_NANO is set, then use nano's. * 3. else ???(mills solution requires root - ugh) * will this work? * (do a timing test: * gettimeofday(A); * getntptime(B); * nanosleep(1000); * getntptime(C); * gettimeofday(D); * * 1. Interprete B and C as usecs * if(D-A < C-B) * nano's * else * usecs */ int _BWLInitNTP( BWLContext ctx ) { char *toffstr=NULL; ntpsyscall_fails = 1; /* * If this system has the ntp system calls, use them. Otherwise, * assume the clock is not synchronized. * (Setting SyncFuzz is advisable in this case.) */ #ifdef HAVE_SYS_TIMEX_H { struct timex ntp_conf; memset(&ntp_conf,0,sizeof(ntp_conf)); if( ntp_adjtime(&ntp_conf) < 0){ BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN,"ntp_adjtime(): %M"); BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "NTP: BWCTL will not be able to verify synchronization on this system"); goto NOADJTIME; } ntpsyscall_fails = 0; if(ntp_conf.status & STA_UNSYNC){ BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "NTP: Status UNSYNC (clock offset problems likely)"); } else{ ntp_unsync = 0; } #ifdef STA_NANO if( !(ntp_conf.status & STA_NANO)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "NTP: STA_NANO should be set. Make sure ntpd is running, and your NTP configuration is good."); } #endif /* STA_NANO */ } NOADJTIME: #else BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "NTP: Status Unknown (NTP syscalls unavailable)"); #endif if( !(toffstr = getenv("BWCTL_DEBUG_TIMEOFFSET"))){ timeoffset.tv_sec = 0; timeoffset.tv_usec = 0; } else{ double td; double td2; char *estr=NULL; td = strtod(toffstr,&estr); if((toffstr == estr) || (errno == ERANGE)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Invalid BWCTL_DEBUG_TIMEOFFSET env var: %s",toffstr); return 1; } if(td == 0.0){ sign_timeoffset = 0; } else{ if(td > 0.0){ sign_timeoffset = 1; } else{ sign_timeoffset = -1; td = -td; } /* * remove seconds from td and assign to tv_sec */ td2 = trunc(td); timeoffset.tv_sec = (long int)td2; td -= td2; /* * convert fractional seconds from td into usec */ td *= 1000000; td2 = trunc(td); timeoffset.tv_usec = (long int)td2; BWLError(ctx,BWLErrDEBUG,BWLErrUNKNOWN, "BWCTL_DEBUG_TIMEOFFSET: sec=%c%lu, usec=%lu", (sign_timeoffset > 0)?'+':'-', timeoffset.tv_sec,timeoffset.tv_usec); } } return 0; } BWLBoolean BWLNTPIsSynchronized( BWLContext ctx ) { BWLTimeStamp ts; if(!BWLGetTimeStamp(ctx,&ts)) { BWLError(ctx,BWLErrFATAL,errno, "BWLGetTimeStamp failed"); return False; } return ts.sync?True:False; } struct timespec * _BWLGetTimespec( BWLContext ctx, struct timespec *ts, uint32_t *esterr, int *synchronized ) { struct timeval tod; static BWLBoolean check_fuzz=False; static long syncfuzz = 0; uint32_t maxerr; /* * By default, assume the clock is unsynchronized, but that it * is still acurate to within .1 second (1000000 usec's). */ *synchronized = 0; maxerr = (uint32_t)100000; if(gettimeofday(&tod,NULL) != 0){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"gettimeofday(): %M"); return NULL; } if(sign_timeoffset > 0){ tvaladd(&tod,&timeoffset); } else if(sign_timeoffset < 0){ tvalsub(&tod,&timeoffset); } /* assign localtime */ ts->tv_sec = tod.tv_sec; ts->tv_nsec = tod.tv_usec * 1000; /* convert to nsecs */ /* * If ntp system calls are available use them to determine * time error. */ #ifdef HAVE_SYS_TIMEX_H if( !ntpsyscall_fails){ struct timex ntp_conf; int n; memset(&ntp_conf,0,sizeof(ntp_conf)); n = ntp_adjtime(&ntp_conf); /* * Check sync flag */ if(n < 0){ BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN,"ntp_adjtime(): %M"); BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "NTP: BWCTL will not be able to verify synchronization on this system"); ntpsyscall_fails = 1; } else if(ntp_conf.status & STA_UNSYNC){ /* * Report the unsync state - but only at level "info". * This is reported at level "warning" at initialization. * (Only report if this is a state change.) */ if(!ntp_unsync){ BWLError(ctx,BWLErrINFO,BWLErrUNKNOWN,"NTP: Status UNSYNC"); ntp_unsync = 1; } } else{ long sec; if(ntp_unsync){ BWLError(ctx,BWLErrINFO,BWLErrUNKNOWN,"NTP: Status SYNC (recovered)"); ntp_unsync = 0; } *synchronized = 1; /* * Apply ntp "offset" */ #ifdef STA_NANO if(ntp_conf.status & STA_NANO) sec = 1000000000; else sec = 1000000; #else sec = 1000000; #endif /* * Convert negative offsets to positive ones by decreasing * the ts->tv_sec. */ while(ntp_conf.offset < 0){ ts->tv_sec--; ntp_conf.offset += sec; } /* * Make sure the "offset" is less than 1 second */ while(ntp_conf.offset >= sec){ ts->tv_sec++; ntp_conf.offset -= sec; } #ifdef STA_NANO if(!(ntp_conf.status & STA_NANO)) ntp_conf.offset *= 1000; #else ntp_conf.offset *= 1000; #endif ts->tv_nsec += ntp_conf.offset; if(ts->tv_nsec >= 1000000000){ ts->tv_sec++; ts->tv_nsec -= 1000000000; } maxerr = (uint32_t)ntp_conf.maxerror; } } #endif /* * See if SyncFuzz was set. * Used to increase tolerance for incomplete NTP configs. */ if(!check_fuzz){ double tdbl; if(BWLContextConfigGetDbl(ctx,BWLSyncFuzz,&tdbl)){ /* * BWLSyncFuzz is specified as a double (sec) * ntp errors are long (usec) convert. */ syncfuzz = (long int) (tdbl * 1000000); } check_fuzz=True; } /* * Set estimated error */ *esterr = maxerr + syncfuzz; /* * Make sure a non-zero error is always returned - perfection * is not allowed. ;) */ if(!*esterr){ *esterr = 1; } return ts; } BWLTimeStamp * BWLGetTimeStamp( BWLContext ctx, BWLTimeStamp *tstamp ) { struct timespec ts; uint32_t errest; int synchronized; if(!tstamp) return NULL; if(!_BWLGetTimespec(ctx,&ts,&errest,&synchronized)) return NULL; tstamp->sync = synchronized; /* type conversion */ return BWLTimespecToTimeStamp(tstamp,&ts,&errest,NULL); } /* * Function: _BWLEncodeTimeStamp * * Description: * Takes an BWLTimeStamp structure and encodes the time * value from that structure to the byte array in network * byte order appropriate for sending the value over the wire. * (See above format diagram.) * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ void _BWLEncodeTimeStamp( uint8_t buf[8], BWLTimeStamp *tstamp ) { uint32_t t32; assert(tstamp); assert(buf); /* * seconds - Most Significant 32 bits hold the seconds in * host byte order. Set t32 to this value in network byte order, * then copy them to bytes 0-4 in buf. */ t32 = (uint32_t)((tstamp->tstamp >> 32) & 0xFFFFFFFF); t32 = htonl(t32); memcpy(&buf[0],&t32,4); /* * frac seconds - Least significant 32 bits hold the fractional * seconds in host byte order. Set t32 to this value in network * byte order, then copy them to bytes 5-8 in buf. */ t32 = (uint32_t)(tstamp->tstamp & 0xFFFFFFFF); t32 = htonl(t32); memcpy(&buf[4],&t32,4); return; } /* * Function: _BWLEncodeTimeStampErrEstimate * * Description: * Takes an BWLTimeStamp structure and encodes the time * error estimate value from that structure to the byte array * in network order as appropriate for sending the value over * the wire. (See above format diagram.) * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLBoolean _BWLEncodeTimeStampErrEstimate( uint8_t buf[2], BWLTimeStamp *tstamp ) { assert(tstamp); assert(buf); /* * If multiplier is 0, this is an invalid error estimate. */ if(!tstamp->multiplier){ return False; } /* * Scale is 6 bit quantity, and first 2 bits MUST be zero here. */ buf[0] = tstamp->scale & 0x3F; /* * Set the first bit for sync. */ if(tstamp->sync){ buf[0] |= 0x80; } buf[1] = tstamp->multiplier; return True; } /* * Function: _BWLDecodeTimeStamp * * Description: * Takes a buffer of 8 bytes of bwlib protocol timestamp * information and saves it in the BWLTimeStamp structure * in the tstamp BWLNum64 field. (See above format diagram * for bwlib protocol timestamp format, and bwlib.h header * file for a description of the BWLNum64 type.) * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ void _BWLDecodeTimeStamp( BWLTimeStamp *tstamp, uint8_t buf[8] ) { uint32_t t32; assert(tstamp); assert(buf); /* * First clear tstamp. */ memset(&tstamp->tstamp,0,8); /* * seconds is first 4 bytes in network byte order. * copy to a 32 bit int, correct the byte order, then assign * to the most significant 32 bits of tstamp. */ memcpy(&t32,&buf[0],4); tstamp->tstamp = (BWLNum64)(ntohl(t32)) << 32; /* * fractional seconds are the next 4 bytes in network byte order. * copy to a 32 bit int, correct the byte order, then assign to * the least significant 32 bits of tstamp. */ memcpy(&t32,&buf[4],4); tstamp->tstamp |= (ntohl(t32) & 0xFFFFFFFF); return; } /* * Function: _BWLDecodeTimeStampErrEstimate * * Description: * Takes a buffer of 2 bytes of bwlib protocol timestamp * error estimate information and saves it in the BWLTimeStamp * structure. (See above format diagram for bwlib protocol * timestamp error estimate format, and bwlib.h header * file for a description of the BWLNum64 type.) * * In Args: * * Out Args: * * Scope: * Returns: * True if the ErrEstimate is valid, False if it is not. * Side Effect: */ BWLBoolean _BWLDecodeTimeStampErrEstimate( BWLTimeStamp *tstamp, uint8_t buf[2] ) { assert(tstamp); assert(buf); /* * If multiplier is 0, this is an invalid timestamp. From here, just * set sync and scale to 0 as well. */ if(!buf[1]){ buf[0] = 0; } tstamp->sync = (buf[0] & 0x80)?1:0; tstamp->scale = buf[0] & 0x3F; tstamp->multiplier = buf[1]; return (tstamp->multiplier != 0); } /* * Function: BWLTimevalToTimeStamp * * Description: * This function takes a struct timeval and converts the time value * to an BWLTimeStamp. This function assumes the struct timeval is * an absolute time offset from unix epoch (0h Jan 1, 1970), and converts * the time to an BWLTimeStamp which uses time similar to the description * in RFC 1305 (NTP). i.e. epoch is 0h Jan 1, 1900. * * The Error Estimate of the BWLTimeStamp structure is invalidated * in this function. (A struct timeval gives no indication of the error.) * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLTimeStamp * BWLTimevalToTimeStamp( BWLTimeStamp *tstamp, struct timeval *tval ) { /* * Ensure valid tstamp, tval - and ensure scale of tv_nsec is valid */ if(!tstamp || !tval) return NULL; /* * Now convert representation. */ BWLTimevalToNum64(&tstamp->tstamp,tval); /* * Convert "epoch"'s - must do after conversion or there is the risk * of overflow since time_t is a 32bit signed quantity instead of * unsigned. */ tstamp->tstamp = BWLNum64Add(tstamp->tstamp, BWLULongToNum64(BWLJAN_1970)); return tstamp; } /* * Function: BWLTimeStampToTimeval * * Description: * This function takes an BWLTimeStamp structure and returns a * valid struct timeval based on the time value encoded in it. * This function assumees the BWLTimeStamp is holding an absolute * time value, and is not holding a relative time. i.e. It assumes * the time value is relative to NTP epoch. * * The Error Estimate of the BWLTimeStamp structure is ignored by * this function. (A struct timeval gives no indication of the error.) * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ struct timeval * BWLTimeStampToTimeval( struct timeval *tval, BWLTimeStamp *tstamp ) { BWLNum64 tmp; if(!tval || !tstamp) return NULL; /* * Convert "epoch"'s - must do before conversion or there is the risk * of overflow since time_t is a 32bit signed quantity instead of * unsigned. */ tmp = BWLNum64Sub(tstamp->tstamp, BWLULongToNum64(BWLJAN_1970)); BWLNum64ToTimeval(tval,tmp); return tval; } /* * Function: BWLSetTimeStampError * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ void BWLSetTimeStampError( BWLTimeStamp *tstamp, BWLNum64 val ) { BWLNum64 err; /* * Just in the unlikely event that val is represented * by a type larger than 64 bits... * (This ensures that scale will not overflow the * 6 bits available to it.) */ err = val & (uint64_t)0xFFFFFFFFFFFFFFFFULL; /* * Now shift err until it will fit in an 8 bit * multiplier (after adding one for rounding err: this * is the reason a value of 0xFF is shifted one last * time), counting the shifts to set the scale. */ tstamp->scale = 0; while(err >= 0xFF){ err >>= 1; tstamp->scale++; } err++; /* rounding error:represents shifted off bits */ tstamp->multiplier = 0xFF & err; return; } /* * Function: BWLGetTimeStampError * * Description: * Retrieve the timestamp error estimate as a double in seconds. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLNum64 BWLGetTimeStampError( BWLTimeStamp *tstamp ) { BWLNum64 err; uint8_t scale; if(!tstamp) return 0; /* * Place multiplier in 64bit int large enough to hold full value. * (Due to the interpretation of BWLNum64 being 32 bits of seconds, * and 32 bits of "fraction", this effectively divides by 2^32.) */ err = tstamp->multiplier & 0xFF; /* * Now shift it based on the "scale". * (This affects the 2^scale multiplication.) */ scale = tstamp->scale & 0x3F; while(scale>0){ err <<= 1; scale--; } return err; } /* * Function: BWLTimespecToTimeStamp * * Description: * This function takes a struct timespec and converts it to an * BWLTimeStamp. The timespec is assumed to be an absolute time * relative to unix epoch. The BWLTimeStamp will be an absolute * time relative to 0h Jan 1, 1900. * * If errest is not set, then parts of the BWLTimeStamp that deal * with the error estimate. (scale, multiplier, sync) will be * set to 0. * * If errest is set, sync will be unmodified. (An errest of 0 is * NOT valid, and will be treated as if errest was not set.) * * Scale and Multiplier will be set from the value of errest. * * If last_errest is set, then Scale and Multiplier will be left * unmodified if (*errest == *last_errest). * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLTimeStamp * BWLTimespecToTimeStamp( BWLTimeStamp *tstamp, struct timespec *tval, uint32_t *errest, /* usec's */ uint32_t *last_errest ) { /* * Ensure valid tstamp, tval - and ensure scale of tv_nsec is valid */ if(!tstamp || !tval) return NULL; /* * Now convert representation. */ BWLTimespecToNum64(&tstamp->tstamp,tval); /* * Convert "epoch"'s - must do after conversion or there is the risk * of overflow since time_t is a 32bit signed quantity instead of * unsigned. */ tstamp->tstamp = BWLNum64Add(tstamp->tstamp, BWLULongToNum64(BWLJAN_1970)); /* * If errest is set, and is non-zero. */ if(errest && *errest){ /* * If last_errest is set, and the error hasn't changed, * then we don't touch the prec portion assuming it is * already correct. */ if(!last_errest || (*errest != *last_errest)){ BWLSetTimeStampError(tstamp,BWLUsecToNum64(*errest)); } } else{ tstamp->sync = 0; tstamp->scale = 0; tstamp->multiplier = 0; } return tstamp; } /* * Function: BWLTimeStampToTimespec * * Description: * This function takes an BWLTimeStamp structure and returns a * valid struct timespec based on the time value encoded in it. * This function assumees the BWLTimeStamp is holding an absolute * time value, and is not holding a relative time. i.e. It assumes * the time value is relative to NTP epoch. * * The Error Estimate of the BWLTimeStamp structure is ignored by * this function. (A struct timespec gives no indication of the error.) * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ struct timespec * BWLTimeStampToTimespec( struct timespec *tval, BWLTimeStamp *tstamp ) { BWLNum64 tmp; if(!tval || !tstamp) return NULL; /* * Convert "epoch"'s - must do before conversion or there is the risk * of overflow since time_t is a 32bit signed quantity instead of * unsigned. */ tmp = BWLNum64Sub(tstamp->tstamp, BWLULongToNum64(BWLJAN_1970)); BWLNum64ToTimespec(tval,tmp); return tval; } time_t BWLNum64ToTimestamp(BWLNum64 tstamp) { struct timespec ts; /* * Convert "epoch"'s - must do before conversion or there is the risk * of overflow since time_t is a 32bit signed quantity instead of * unsigned. */ tstamp = BWLNum64Sub(tstamp, BWLULongToNum64(BWLJAN_1970)); BWLNum64ToTimespec(&ts,tstamp); return ts.tv_sec; } double BWLNum64ToTimestampDouble(BWLNum64 tstamp) { struct timespec ts; double retval; /* * Convert "epoch"'s - must do before conversion or there is the risk * of overflow since time_t is a 32bit signed quantity instead of * unsigned. */ tstamp = BWLNum64Sub(tstamp, BWLULongToNum64(BWLJAN_1970)); BWLNum64ToTimespec(&ts,tstamp); retval = ts.tv_sec + ts.tv_nsec/1000000000.0; return retval; } BWLNum64 BWLTimestampToNum64(time_t ts) { /* * Convert "epoch"'s - must do before conversion or there is the risk * of overflow since time_t is a 32bit signed quantity instead of * unsigned. */ return BWLULongToNum64(ts + BWLJAN_1970); } bwctl_1.5.4+dfsg1.orig/bwlib/sapi.c0000664000076500007710000007443012560414557014026 0ustar /* * ex: set tabstop=4 ai expandtab softtabstop=4 shiftwidth=4: * $Id$ */ /************************************************************************ * * * Copyright (C) 2003 * * Internet2 * * All Rights Reserved * * * ************************************************************************/ /* * File: sapi.c * * Author: Jeff W. Boote * Internet2 * * Date: Tue Sep 16 14:27:01 MDT 2003 * * Description: * * This file contains the api functions typically called from an * bwlib server application. * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include #include #include static int OpenSocket( BWLContext ctx __attribute__((unused)), int family, I2Addr addr ) { struct addrinfo *fai; struct addrinfo *ai; int on; int fd = -1; if(!(fai = I2AddrAddrInfo(addr,NULL,BWL_CONTROL_SERVICE_NAME))){ return -2; } for(ai = fai;ai;ai = ai->ai_next){ if(ai->ai_family != family) continue; fd =socket(ai->ai_family,ai->ai_socktype,ai->ai_protocol); if(fd < 0) continue; on=1; if(setsockopt(fd,SOL_SOCKET,SO_REUSEADDR,&on, sizeof(on)) != 0){ goto failsock; } /* * TODO Check for the superseded IPV6_BINDV6ONLY sockopt too? * (No - not unless someone complains.) */ #if defined(AF_INET6) && defined(IPPROTO_IPV6) && defined(IPV6_V6ONLY) on=0; if((ai->ai_family == AF_INET6) && setsockopt(fd,IPPROTO_IPV6,IPV6_V6ONLY,&on, sizeof(on)) != 0){ goto failsock; } #endif if(bind(fd,ai->ai_addr,ai->ai_addrlen) == 0){ I2AddrSetFD(addr,-1,True); I2AddrSetSocktype(addr,ai->ai_socktype); I2AddrSetSAddr(addr,ai->ai_addr,ai->ai_addrlen); I2AddrSetFD(addr,fd,True); break; } if(errno == EADDRINUSE) return -2; failsock: while((close(fd) < 0) && (errno == EINTR)); fd = -1; } return fd; } /* * Function: BWLServerSockCreate * * Description: * Used by server to create the initial listening socket. * (It is not required that the server use this interface, * but it will be kept up-to-date and in sync with the * client BWLControlOpen function. For example, both of * these functions currently give priority to IPV6 addresses * over IPV4.) * * The addr should be NULL for a wildcard socket, or bound to * a specific interface using I2AddrByNode or I2AddrByAddrInfo. * * This function will create the socket, bind it, and set the * "listen" backlog length. * * If addr is set using I2AddrByFD, it will cause an error. * (It doesn't really make much sense to call this function at * all if you are going to create and bind your own socket - * the only thing left is to call "listen"...) * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ I2Addr BWLServerSockCreate( BWLContext ctx, I2Addr addr, BWLErrSeverity *err_ret ) { int fd = -1; *err_ret = BWLErrOK; /* * I2AddrByFD is invalid. */ if(addr && (I2AddrFD(addr) > -1)){ BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "Invalid I2Addr record - fd already specified."); goto error; } /* * If no addr specified, then use wildcard address. */ if((!addr) && !(addr = I2AddrByWildcard(BWLContextErrHandle(ctx),SOCK_STREAM, BWL_CONTROL_SERVICE_NAME))){ goto error; } if(!I2AddrSetPassive(addr,True)){ goto error; } #ifdef AF_INET6 /* * First try IPv6 addrs only */ fd = OpenSocket(ctx,AF_INET6,addr); /* * Fall back to IPv4 addrs if necessary. */ if(fd == -1) #endif fd = OpenSocket(ctx,AF_INET,addr); /* * if we failed to find any IPv6 or IPv4 addresses... punt. */ if(fd < 0){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "BWLServerSockCreate:%M"); goto error; } /* * We have a bound socket - set the listen backlog. */ if(listen(fd,BWL_LISTEN_BACKLOG) < 0){ BWLError(ctx,BWLErrFATAL,errno,"listen(%d,%d):%s", fd,BWL_LISTEN_BACKLOG,strerror(errno)); goto error; } return addr; error: I2AddrFree(addr); *err_ret = BWLErrFATAL; return NULL; } /* * Function: BWLControlAccept * * Description: * This function is used to initialiize the communication * to the peer. * * In Args: * connfd,connsaddr, and connsaddrlen are all returned * from "accept". * * Returns: Valid BWLControl handle on success, NULL if * the request has been rejected, or error has occurred. * Return value does not distinguish between illegal * requests, those rejected on policy reasons, or * errors encountered by the server during execution. * * Side Effect: */ BWLControl BWLControlAccept( BWLContext ctx, /* library context */ int connfd, /* connected socket */ struct sockaddr *connsaddr, /* connected socket addr */ socklen_t connsaddrlen, /* connected socket addr len */ uint32_t mode_offered, /* advertised server mode */ BWLNum64 uptime, /* uptime for server */ int *retn_on_intr, /* if *retn_on_intr return */ BWLErrSeverity *err_ret /* err - return */ ) { BWLControl cntrl; uint8_t challenge[16]; uint8_t rawtoken[32]; uint8_t token[32]; int rc; int ival=0; int *intr = &ival; BWLTimeStamp timestart,timeend; char remotenode[NI_MAXHOST],remoteserv[NI_MAXSERV]; size_t remotenodelen = sizeof(remotenode); size_t remoteservlen = sizeof(remoteserv); char localnode[NI_MAXHOST],localserv[NI_MAXSERV]; size_t localnodelen = sizeof(localnode); size_t localservlen = sizeof(localserv); uint32_t access_prio = _BWL_DEFAULT_ACCESSPRIO; *err_ret = BWLErrFATAL; /* * Check for valid context. */ if( !ctx->valid){ BWLError(ctx,BWLErrFATAL,EINVAL, "BWLControlAccept(): Invalid context record"); return NULL; } if(!ctx->tool_avail){ BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "BWLControlAccept: Context invalid, tools not initialized"); return NULL; } (void)BWLContextConfigGetU32(ctx,BWLAccessPriority,&access_prio); if(connfd < 0){ BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "BWLControlAccept: Invalid socket fd"); return NULL; } if(retn_on_intr){ intr = retn_on_intr; } *err_ret = BWLErrOK; mode_offered &= BWL_MODE_ALLMODES; if( !(cntrl = _BWLControlAlloc(ctx,err_ret))){ BWLError(ctx,BWLErrFATAL,errno,"_BWLControlAlloc(): %M"); goto error; } cntrl->sockfd = connfd; cntrl->server = True; /* * set up remote_addr for policy decisions, and log reporting. * * If connsaddr is not existant, than create the Addr using the * socket only. */ if(!connsaddr || !connsaddrlen){ if(!(cntrl->remote_addr = I2AddrBySockFD(ctx,connfd,True))){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unable to determine socket peername: %M"); *err_ret = BWLErrFATAL; goto error; } } else{ if( !(cntrl->remote_addr = I2AddrBySAddr( BWLContextErrHandle(ctx), connsaddr,connsaddrlen,SOCK_STREAM,0))){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unable to determine socket peername: %M"); *err_ret = BWLErrFATAL; goto error; } if( !I2AddrSetFD(cntrl->remote_addr,connfd,True)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unable to set socket fd: %M"); *err_ret = BWLErrFATAL; goto error; } } /* * set up local_addr for policy decisions, and log reporting. */ if( !(cntrl->local_addr = I2AddrByLocalSockFD( BWLContextErrHandle(ctx),connfd,False))){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unable to determine socketname: %M"); *err_ret = BWLErrFATAL; goto error; } if( !I2AddrNodeName(cntrl->remote_addr,remotenode,&remotenodelen) || !I2AddrServName(cntrl->remote_addr,remoteserv,&remoteservlen) || !I2AddrNodeName(cntrl->local_addr,localnode,&localnodelen) || !I2AddrServName(cntrl->local_addr,localserv,&localservlen)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unable to set service names: %M"); goto error; } BWLError(ctx,access_prio,BWLErrPOLICY, "Connection to (%s:%s) from (%s:%s)", localnode,localserv,remotenode,remoteserv); /* generate 16 random bytes of challenge and save them away. */ if(I2RandomBytes(ctx->rand_src,challenge, 16) != 0){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"I2RandomBytes(): %M"); *err_ret = BWLErrFATAL; goto error; } if(!BWLGetTimeStamp(ctx,×tart)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"BWLGetTimeStamp(): %M"); *err_ret = BWLErrFATAL; goto error; } if( (rc = _BWLWriteServerGreeting(cntrl,mode_offered, challenge,intr)) < BWLErrOK){ *err_ret = (BWLErrSeverity)rc; BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "BWLControlAccept(): Unable to write ServerGreeting message"); goto error; } /* * If no mode offered, immediately close socket after sending * server greeting. (Nice way of saying goodbye.) */ if(!mode_offered){ BWLError(cntrl->ctx,access_prio,BWLErrPOLICY, "Control request to (%s:%s) denied from (%s:%s): mode == 0", localnode,localserv,remotenode,remoteserv); goto error; } if((rc = _BWLReadClientGreeting(cntrl,&cntrl->mode,rawtoken, cntrl->readIV,intr)) < BWLErrOK){ *err_ret = (BWLErrSeverity)rc; BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "BWLControlAccept(): Unable to read ClientGreeting message"); goto error; } if(!BWLGetTimeStamp(ctx,&timeend)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"BWLGetTimeStamp(): %M"); *err_ret = BWLErrFATAL; goto error; } cntrl->rtt_bound = BWLNum64Sub(timeend.tstamp,timestart.tstamp); /* insure that exactly one mode is chosen */ if( (cntrl->mode != BWL_MODE_OPEN) && (cntrl->mode != BWL_MODE_AUTHENTICATED) && (cntrl->mode != BWL_MODE_ENCRYPTED)){ BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "BWLControlAccept(): Invalid mode(%d) in request.",cntrl->mode); *err_ret = BWLErrFATAL; goto error; } if(!(cntrl->mode | mode_offered)){ /* can't provide requested mode */ BWLError(cntrl->ctx,access_prio,BWLErrPOLICY, "Control request to (%s:%s) denied from (%s:%s): mode not offered (%u)", localnode,localserv,remotenode,remoteserv,cntrl->mode); if( (rc = _BWLWriteServerOK(cntrl,BWL_CNTRL_REJECT,(BWLNum64)0, 0,intr)) < BWLErrOK){ *err_ret = (BWLErrSeverity)rc; } goto error; } if(cntrl->mode & (BWL_MODE_AUTHENTICATED|BWL_MODE_ENCRYPTED)){ uint8_t binKey[16]; BWLBoolean getkey_success; /* Fetch the encryption key into binKey */ /* * go through the motions of decrypting token even if * getkey fails to find username to minimize vulnerability * to timing attacks. */ getkey_success = _BWLCallGetAESKey(cntrl->ctx,cntrl->userid_buffer, binKey,err_ret); /* CallGetAESKey failed due to invalid program state */ if(!getkey_success && (*err_ret != BWLErrOK)){ (void)_BWLWriteServerOK(cntrl,BWL_CNTRL_FAILURE,(BWLNum64)0,0,intr); goto error; } if (_BWLDecryptToken(binKey,rawtoken,token) < 0){ BWLError(cntrl->ctx,BWLErrFATAL, BWLErrUNKNOWN, "Encryption state problem?!?!"); (void)_BWLWriteServerOK(cntrl, BWL_CNTRL_FAILURE,(BWLNum64)0,0,intr); *err_ret = BWLErrFATAL; goto error; } /* Decrypted challenge is in the first 16 bytes */ if((memcmp(challenge,token,16) != 0) || !getkey_success){ if(!getkey_success){ BWLError(cntrl->ctx,access_prio,BWLErrPOLICY, "Unknown userid (%s)", cntrl->userid_buffer); } else{ BWLError(cntrl->ctx,access_prio,BWLErrPOLICY, "Control request to (%s:%s) denied from (%s:%s):Invalid challenge encryption", localnode,localserv,remotenode,remoteserv); } (void)_BWLWriteServerOK(cntrl,BWL_CNTRL_REJECT,(BWLNum64)0,0,intr); goto error; } /* Authentication ok - set encryption fields */ cntrl->userid = cntrl->userid_buffer; if(I2RandomBytes(cntrl->ctx->rand_src,cntrl->writeIV,16) != 0){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unable to fetch randomness..."); (void)_BWLWriteServerOK(cntrl,BWL_CNTRL_FAILURE,(BWLNum64)0,0,intr); goto error; } memcpy(cntrl->session_key,&token[16],16); _BWLMakeKey(cntrl,cntrl->session_key); } if(!_BWLCallCheckControlPolicy(cntrl,cntrl->mode,cntrl->userid, I2AddrSAddr(cntrl->local_addr,NULL), I2AddrSAddr(cntrl->remote_addr,NULL),err_ret)){ if(*err_ret > BWLErrWARNING){ BWLError(ctx,access_prio,BWLErrPOLICY, "ControlSession request to (%s:%s) denied from userid(%s):(%s:%s)", localnode,localserv, (cntrl->userid)?cntrl->userid:"nil", remotenode,remoteserv); /* * send mode of 0 to client, and then close. */ (void)_BWLWriteServerOK(cntrl,BWL_CNTRL_REJECT,(BWLNum64)0,0,intr); } else{ BWLError(ctx,*err_ret,BWLErrUNKNOWN, "Policy function failed."); (void)_BWLWriteServerOK(cntrl,BWL_CNTRL_FAILURE,(BWLNum64)0,0,intr); } goto error; } /* * Made it through the gauntlet - accept the control session! */ if( (rc = _BWLWriteServerOK(cntrl,BWL_CNTRL_ACCEPT,uptime, ctx->tool_avail,intr)) < BWLErrOK){ *err_ret = (BWLErrSeverity)rc; goto error; } BWLError(ctx,access_prio,BWLErrPOLICY, "ControlSession([%s]:%s) accepted from userid(%s):([%s]:%s)", localnode,localserv, (cntrl->userid)?cntrl->userid:"nil", remotenode,remoteserv); return cntrl; error: BWLControlClose(cntrl); return NULL; } BWLErrSeverity BWLProcessTestRequest( BWLControl cntrl, int *retn_on_intr ) { BWLTestSession tsession = cntrl->tests; BWLErrSeverity err_ret=BWLErrOK; int rc; BWLAcceptType acceptval = BWL_CNTRL_FAILURE; int ival=0; int *intr = &ival; uint32_t access_prio = _BWL_DEFAULT_ACCESSPRIO; if(retn_on_intr){ intr = retn_on_intr; } (void)BWLContextConfigGetU32(cntrl->ctx,BWLAccessPriority,&access_prio); /* * Read the TestRequest and use tsession to hold the information. * (during schedule negotiation, only the timestamps from the * subsequent requests are used.) */ if((rc = _BWLReadTestRequest(cntrl,intr,&tsession,&acceptval)) != BWLErrOK){ switch(acceptval){ case BWL_CNTRL_INVALID: return BWLErrFATAL; case BWL_CNTRL_FAILURE: case BWL_CNTRL_UNSUPPORTED: return BWLErrWARNING; default: /* NOTREACHED */ abort(); } } if(!BWLGetTimeStamp(cntrl->ctx,&tsession->localtime)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrUNKNOWN, "BWLGetTimeStamp(): %M"); err_ret = BWLErrWARNING; acceptval = BWL_CNTRL_FAILURE; goto error; } /* * Initialize reservation time. */ tsession->reserve_time = BWLULongToNum64(0); /* * Update of current reservation. */ if(tsession == cntrl->tests){ /* * If req_time is 0, client is cancelling. */ if(tsession->test_spec.req_time.tstamp == 0){ err_ret = BWLErrINFO; acceptval = BWL_CNTRL_REJECT; goto error; } } else{ /* * If this "new" session is a receiver session, create a SID for it. */ if(tsession->conf_server && (_BWLCreateSID(tsession) != 0)){ err_ret = BWLErrWARNING; acceptval = BWL_CNTRL_FAILURE; goto error; } /* * Get definition record for selected tool * (This will fail if an unsupported tool is requested.) */ if( !(tsession->tool = _BWLToolGetDefinition(cntrl->ctx, tsession->test_spec.tool_id))){ err_ret = BWLErrWARNING; acceptval = BWL_CNTRL_UNSUPPORTED; goto error; } } /* * compute "fuzz" time. */ tsession->fuzz = BWLGetTimeStampError(&tsession->test_spec.req_time); tsession->fuzz = BWLNum64Add(tsession->fuzz, BWLGetTimeStampError(&tsession->localtime)); /* * Add a constant to make up for the fact that iperf -u usually * run for some fraction of a second longer than the -t option * specifies. * * TODO: Make this constant configurable somehow? */ tsession->fuzz = BWLNum64Add(tsession->fuzz,BWLDoubleToNum64(1.5)); if(!_BWLCallCheckTestPolicy(cntrl,tsession,&err_ret)){ if(err_ret < BWLErrOK) goto error; BWLError(cntrl->ctx,access_prio,BWLErrPOLICY, "Test not allowed"); acceptval = BWL_CNTRL_REJECT; err_ret = BWLErrINFO; goto error; } /* * Validate the test after running CheckTestPolicy as CheckTestPolicy may * set or change test spec parameters. */ if (!BWLToolValidateTest(cntrl->ctx,tsession->test_spec.tool_id, tsession->test_spec)) { err_ret = BWLErrWARNING; acceptval = BWL_CNTRL_UNSUPPORTED; goto error; } if( (rc = _BWLWriteTestAccept(cntrl,intr,BWL_CNTRL_ACCEPT,tsession)) < BWLErrOK){ err_ret = (BWLErrSeverity)rc; goto err2; } /* * Add tsession to list of tests managed by this control connection. */ cntrl->tests = tsession; return BWLErrOK; error: /* * If it is a non-fatal error, communication should continue, so * send negative accept. */ if(err_ret >= BWLErrWARNING) (void)_BWLWriteTestAccept(cntrl,intr,acceptval,tsession); err2: if(tsession) _BWLTestSessionFree(cntrl->ctx,tsession,BWL_CNTRL_FAILURE); return err_ret; } BWLErrSeverity BWLProcessTimeRequest( BWLControl cntrl, int *retn_on_intr ) { int rc; int ival=0; int *intr = &ival; BWLTimeStamp tstamp; if(retn_on_intr){ intr = retn_on_intr; } if( (rc = _BWLReadTimeRequest(cntrl,intr)) < BWLErrOK) return _BWLFailControlSession(cntrl,rc); if(!BWLGetTimeStamp(cntrl->ctx,&tstamp)) return _BWLFailControlSession(cntrl,BWLErrFATAL); if( (rc = _BWLWriteTimeResponse(cntrl,&tstamp,intr)) < BWLErrOK) return _BWLFailControlSession(cntrl,rc); return BWLErrOK; } BWLErrSeverity BWLProcessStartSession( BWLControl cntrl, int *retn_on_intr ) { int rc; BWLErrSeverity err=BWLErrOK; int ival=0; int *intr = &ival; uint16_t peerport = 0; if(retn_on_intr){ intr = retn_on_intr; } if( (rc = _BWLReadStartSession(cntrl,&peerport,intr)) < BWLErrOK) return _BWLFailControlSession(cntrl,rc); if(!_BWLEndpointStart(cntrl->tests,&peerport,&err)){ (void)_BWLWriteStartAck(cntrl,intr,0,BWL_CNTRL_FAILURE); return _BWLFailControlSession(cntrl,(int)err); } if( (rc = _BWLWriteStartAck(cntrl,intr,peerport,BWL_CNTRL_ACCEPT)) < BWLErrOK) return _BWLFailControlSession(cntrl,rc); return BWLErrOK; } /* * Function: BWLSessionStatus * * Description: * This function returns the "status" of the test session identified * by the sid. "send" indicates which "side" of the test to retrieve * information about. * * In Args: * * Out Args: * * Scope: * Returns: True if status was available, False otherwise. * aval contains the actual "status": * <0 Test is not yet complete * >=0 Valid BWLAcceptType - see enum for meaning. * Side Effect: */ BWLBoolean BWLSessionStatus( BWLControl cntrl, BWLSID sid, BWLAcceptType *aval ) { BWLTestSession tsession; BWLErrSeverity err; /* * First find the tsession record for this test. */ tsession = cntrl->tests; if(!tsession || (memcmp(sid,tsession->sid,sizeof(BWLSID)) != 0)) return False; return _BWLEndpointStatus(cntrl->ctx,tsession,aval,&err); } int BWLSessionsActive( BWLControl cntrl, BWLAcceptType *aval ) { BWLTestSession tsession; BWLAcceptType laval = 0; BWLErrSeverity err; tsession = cntrl->tests; if(tsession && _BWLEndpointStatus(cntrl->ctx,tsession,&laval,&err) && (laval < 0)) return 1; if(aval) *aval = laval; return 0; } BWLErrSeverity BWLStopSession( BWLControl cntrl, int *retn_on_intr, BWLAcceptType *acceptval_ret /* in/out */ ) { BWLErrSeverity err,err2=BWLErrOK; BWLRequestType msgtype; BWLAcceptType aval=BWL_CNTRL_ACCEPT; BWLAcceptType *acceptval=&aval; int ival=0; int *intr=&ival; FILE *fp; if(!cntrl->tests){ return BWLErrOK; } if(acceptval_ret){ acceptval = acceptval_ret; } if(retn_on_intr){ intr = retn_on_intr; } /* * Stop the local endpoint. This should not return until * the datafile is "flushed" into "localfp". */ (void)_BWLEndpointStop(cntrl->ctx,cntrl->tests,*acceptval,&err2); /* * If acceptval would have been "success", but stopping of local * endpoints failed, send failure acceptval instead and return error. * (The endpoint_stop_func should have reported the error.) */ if(!*acceptval && (err2 < BWLErrWARNING)){ *acceptval = BWL_CNTRL_FAILURE; fp = NULL; } else{ fp = cntrl->tests->localfp; } err = (BWLErrSeverity)_BWLWriteStopSession(cntrl,intr,*acceptval,fp); if(err < BWLErrWARNING) return _BWLFailControlSession(cntrl,BWLErrFATAL); err2 = MIN(err,err2); msgtype = BWLReadRequestType(cntrl,intr); if(msgtype == BWLReqSockClose){ BWLError(cntrl->ctx,BWLErrFATAL,errno, "BWLStopSession:Control socket closed: %M"); return _BWLFailControlSession(cntrl,BWLErrFATAL); } if(msgtype != BWLReqStopSession){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "Invalid protocol message received..."); return _BWLFailControlSession(cntrl,BWLErrFATAL); } if( (err = _BWLReadStopSession(cntrl,acceptval,intr, cntrl->tests->remotefp)) != BWLErrOK){ return _BWLFailControlSession(cntrl,(int)err); } err2 = MIN(err,err2); err = _BWLCallProcessResults(cntrl->tests); err2 = MIN(err,err2); err = _BWLTestSessionFree(cntrl->ctx,cntrl->tests,*acceptval); cntrl->state &= ~_BWLStateTest; return MIN(err,err2); } int BWLStopSessionWait( BWLControl cntrl, BWLNum64 *wake, int *retn_on_intr, BWLAcceptType *acceptval_ret, BWLErrSeverity *err_ret ) { struct timeval reltime; struct timeval *waittime = NULL; fd_set readfds; fd_set exceptfds; int rc; int msgtype; BWLErrSeverity err2=BWLErrOK; BWLAcceptType aval; BWLAcceptType *acceptval=&aval; int ival=0; int *intr=&ival; FILE *fp; *err_ret = BWLErrOK; if(acceptval_ret){ acceptval = acceptval_ret; } *acceptval = BWL_CNTRL_ACCEPT; if(retn_on_intr){ intr = retn_on_intr; } if(!cntrl || cntrl->sockfd < 0){ *err_ret = BWLErrFATAL; return -1; } /* * If there are no active sessions, get the status and return. */ if(!BWLSessionsActive(cntrl,acceptval) || (*acceptval)){ /* * Sessions are complete - send StopSession message. */ *err_ret = BWLStopSession(cntrl,intr,acceptval); return 0; } AGAIN: if(wake){ BWLTimeStamp currstamp; BWLNum64 wakenum; if(!BWLGetTimeStamp(cntrl->ctx,&currstamp)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrUNKNOWN, "BWLGetTimeStamp(): %M"); return -1; } if(BWLNum64Cmp(currstamp.tstamp,*wake) < 0){ wakenum = BWLNum64Sub(*wake,currstamp.tstamp); BWLNum64ToTimeval(&reltime,wakenum); } else{ tvalclear(&reltime); } waittime = &reltime; } FD_ZERO(&readfds); FD_SET(cntrl->sockfd,&readfds); FD_ZERO(&exceptfds); FD_SET(cntrl->sockfd,&exceptfds); rc = select(cntrl->sockfd+1,&readfds,NULL,&exceptfds,waittime); if(rc < 0){ if(errno != EINTR){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrUNKNOWN, "select():%M"); *err_ret = BWLErrFATAL; return -1; } if(waittime || *intr){ return 2; } /* * If there are tests still happening, and no tests have * ended in error - go back to select and wait for the * rest of the tests to complete. */ if(BWLSessionsActive(cntrl,acceptval) && !*acceptval){ goto AGAIN; } /* * Sessions are complete - send StopSession message. */ *err_ret = BWLStopSession(cntrl,intr,acceptval); return 0; } if(rc == 0) return 1; if(!FD_ISSET(cntrl->sockfd,&readfds) && !FD_ISSET(cntrl->sockfd,&exceptfds)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrUNKNOWN, "select():cntrl fd not ready?:%M"); *err_ret = _BWLFailControlSession(cntrl,BWLErrFATAL); return -1; } msgtype = BWLReadRequestType(cntrl,intr); if(msgtype == 0){ BWLError(cntrl->ctx,BWLErrFATAL,errno, "BWLStopSessionWait: Control socket closed: %M"); *err_ret = _BWLFailControlSession(cntrl,BWLErrFATAL); return -1; } if(msgtype != 3){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "Invalid protocol message received..."); *err_ret = _BWLFailControlSession(cntrl,BWLErrFATAL); return -1; } *err_ret = _BWLReadStopSession(cntrl,intr,acceptval, cntrl->tests->remotefp); if(*err_ret != BWLErrOK){ *err_ret = _BWLFailControlSession(cntrl,(int)*err_ret); return -1; } /* * If StopSessions was sent with accept==0, then make EndpointStop * wait for the local endpoint to exit before continuing. */ if(*acceptval == 0){ cntrl->tests->endpoint->dont_kill = 1; } /* * Stop the local endpoint. This should not return until * the datafile is "flushed" into "localfp". */ (void)_BWLEndpointStop(cntrl->ctx,cntrl->tests,*acceptval,&err2); if(err2 < BWLErrWARNING){ *acceptval = BWL_CNTRL_FAILURE; fp = NULL; } else{ fp = cntrl->tests->localfp; } *err_ret = MIN(*err_ret,err2); if( (err2 = _BWLWriteStopSession(cntrl,intr,*acceptval,fp)) != BWLErrOK){ (void)_BWLFailControlSession(cntrl,(int)err2); } *err_ret = MIN(*err_ret,err2); err2 = _BWLCallProcessResults(cntrl->tests); *err_ret = MIN(*err_ret,err2); while(cntrl->tests){ err2 = _BWLTestSessionFree(cntrl->ctx,cntrl->tests,*acceptval); *err_ret = MIN(*err_ret,err2); } cntrl->state &= ~_BWLStateTest; *err_ret = MIN(*err_ret, err2); return 0; } bwctl_1.5.4+dfsg1.orig/bwlib/protocol.c0000664000076500007710000021122612560414557014727 0ustar /* ** $Id$ */ /* * File: protocol.c * * Author: Jeff W. Boote * * Date: Tue Sep 16 14:26:45 MDT 2003 * * Description: This file contains the private functions that * speak the bwlib protocol directly. * (i.e. read and write the data and save it * to structures for the rest of the api to deal * with.) * * The idea is to basically keep all network ordering * architecture dependant things in this file. And * hopefully to minimize the impact of any changes * to the actual protocol message formats. * * (ease of referenceing byte offsets is why * the &buf[BYTE] notation is being used.) * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include /* * ServerGreeting message format: * * size: 32 octets * * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00| | * 04| Unused (12 octets) | * 08| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 12| PROTO-VERS | Modes | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 16| | * 20| Challenge (16 octets) | * 24| | * 28| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * PROTO-VERS of '1' implies tool negotiation */ BWLErrSeverity _BWLWriteServerGreeting( BWLControl cntrl, uint32_t avail_modes, uint8_t *challenge, /* [16] */ int *retn_on_err ) { /* * buf_aligned it to ensure uint32_t alignment, but I use * buf for actuall assignments to make the array offsets agree with * the byte offsets shown above. */ uint8_t *buf = (uint8_t*)cntrl->msg; if(!_BWLStateIsInitial(cntrl)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLWriteServerGreeting:called in wrong state."); return BWLErrFATAL; } /* * Set unused bits to 0. */ memset(buf,0,12); *((uint32_t *)&buf[12]) = htonl(avail_modes | BWL_MODE_PROTOCOL_1_5_2_VERSION); memcpy(&buf[16],challenge,16); if(I2Writeni(cntrl->sockfd,buf,32,retn_on_err) != 32){ return BWLErrFATAL; } cntrl->state = _BWLStateSetup; return BWLErrOK; } BWLErrSeverity _BWLReadServerGreeting( BWLControl cntrl, uint32_t *mode, /* modes available - returned */ uint8_t *challenge /* [16] : challenge - returned */ ) { uint8_t *buf = (uint8_t*)cntrl->msg; int intr = 0; int *retn_on_intr = &intr; if(cntrl->retn_on_intr){ retn_on_intr = cntrl->retn_on_intr; } if(!_BWLStateIsInitial(cntrl)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadServerGreeting:called in wrong state."); return BWLErrFATAL; } if(I2Readni(cntrl->sockfd,buf,32,retn_on_intr) != 32){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrUNKNOWN, "Read failed:(%s)",strerror(errno)); return (int)BWLErrFATAL; } *mode = ntohl(*((uint32_t *)&buf[12])); /* * Get tool negotiation byte and clear it for subsequent * operations on the mode field. */ cntrl->protocol_version = *mode & BWL_MODE_PROTOCOL_VERSION_MASK; *mode &= ~BWL_MODE_PROTOCOL_VERSION_MASK; memcpy(challenge,&buf[16],16); cntrl->state = _BWLStateSetup; return BWLErrOK; } /* * * * ClientGreeting message format: * * size: 68 octets * * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00| Mode | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 04| | * 08| Username (16 octets) | * 12| | * 16| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 20| | * 24| Token (32 octets) | * 28| | * 32| | * 36| | * 40| | * 44| | * 48| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 52| | * 56| Client-IV (16 octets) | * 60| | * 64| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * Note: The high-order byte of 'Mode' is set to the protocol version * cntrl->protocol_version, which is (currently) * BWL_MODE_PROTOCOL_OMIT_VERSION from the server. */ BWLErrSeverity _BWLWriteClientGreeting( BWLControl cntrl, uint8_t *token /* [32] */ ) { uint8_t *buf = (uint8_t*)cntrl->msg; int intr=0; int *retn_on_intr = &intr; if(cntrl->retn_on_intr){ retn_on_intr = cntrl->retn_on_intr; } if(!_BWLStateIsSetup(cntrl)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLWriteClientGreeting:called in wrong state."); return BWLErrFATAL; } *(uint32_t *)&buf[0] = htonl(cntrl->mode | cntrl->protocol_version); if(cntrl->mode & BWL_MODE_DOCIPHER){ memcpy(&buf[4],cntrl->userid,16); memcpy(&buf[20],token,32); memcpy(&buf[52],cntrl->writeIV,16); }else{ memset(&buf[4],0,64); } if(I2Writeni(cntrl->sockfd, buf, 68,retn_on_intr) != 68) return BWLErrFATAL; return BWLErrOK; } BWLErrSeverity _BWLReadClientGreeting( BWLControl cntrl, uint32_t *mode, uint8_t *token, /* [32] - return */ uint8_t *clientIV, /* [16] - return */ int *retn_on_intr ) { ssize_t len; uint8_t *buf = (uint8_t*)cntrl->msg; if(!_BWLStateIsSetup(cntrl)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadClientGreeting: called in wrong state."); return BWLErrFATAL; } if((len = I2Readni(cntrl->sockfd,buf,68,retn_on_intr)) != 68){ if((len < 0) && *retn_on_intr && (errno == EINTR)){ return BWLErrFATAL; } /* * if len == 0 - this is just a socket close, no error * should be printed. */ if(len != 0){ BWLError(cntrl->ctx,BWLErrFATAL,errno,"I2Readni(): %M"); } return BWLErrFATAL; } *mode = ntohl(*(uint32_t *)&buf[0]); /* * Get tool negotiation byte and clear it for subsequent * operations on the mode field. */ cntrl->protocol_version = *mode & BWL_MODE_PROTOCOL_VERSION_MASK; *mode &= ~BWL_MODE_PROTOCOL_VERSION_MASK; memcpy(cntrl->userid_buffer,&buf[4],16); memcpy(token,&buf[20],32); memcpy(clientIV,&buf[52],16); return BWLErrOK; } BWLAcceptType _BWLGetAcceptType( BWLControl cntrl, uint8_t val ) { switch(val){ case BWL_CNTRL_ACCEPT: return BWL_CNTRL_ACCEPT; case BWL_CNTRL_REJECT: return BWL_CNTRL_REJECT; case BWL_CNTRL_FAILURE: return BWL_CNTRL_FAILURE; case BWL_CNTRL_UNSUPPORTED: return BWL_CNTRL_UNSUPPORTED; default: BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLGetAcceptType:Invalid val %u",val); return BWL_CNTRL_INVALID; } } /* * ServerOK message format: * * size: 48 octets * * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00| Tool availability bit-mask | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 04| Unused (11 octets) | * 08| | * + +-+-+-+-+-+-+-+-+ * 12| | Accept | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 16| | * 20| Server-IV (16 octets) | * 24| | * 28| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 32| Uptime (Timestamp) | * 36| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 40| Integrity Zero Padding (8 octets) | * 44| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * */ BWLErrSeverity _BWLWriteServerOK( BWLControl cntrl, BWLAcceptType code, BWLNum64 uptime, BWLToolAvailability avail_tools, int *retn_on_intr ) { ssize_t len; BWLTimeStamp tstamp; uint8_t *buf = (uint8_t*)cntrl->msg; int ival=0; int *intr=&ival; if(!_BWLStateIsSetup(cntrl)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLWriteServerOK: called in wrong state."); return BWLErrFATAL; } if(retn_on_intr){ intr = retn_on_intr; } /* Available tools bit-mask. */ *(uint32_t*)&buf[0] = htonl(avail_tools); /* 11 unused bytes */ memset(&buf[4],0,11); *(uint8_t *)&buf[15] = code & 0xff; memcpy(&buf[16],cntrl->writeIV,16); if((len = I2Writeni(cntrl->sockfd,buf,32,intr)) != 32){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrUNKNOWN, "_BWLWriteServerOK: Unable to write ServerOK message"); return BWLErrFATAL; } if(code == BWL_CNTRL_ACCEPT){ /* * Uptime should be encrypted if encr/auth mode so use Block * func. */ tstamp.tstamp = uptime; _BWLEncodeTimeStamp(&buf[0],&tstamp); memset(&buf[8],0,8); if(_BWLSendBlocksIntr(cntrl,buf,1,intr) != 1){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrUNKNOWN, "_BWLWriteServerOK: Unable to write ServerOK message"); return BWLErrFATAL; } cntrl->state = _BWLStateRequest; } else{ cntrl->state = _BWLStateInvalid; memset(&buf[0],0,16); if((len = I2Writeni(cntrl->sockfd,buf,16,intr)) != 16){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrUNKNOWN, "_BWLWriteServerOK: Unable to write ServerOK message"); return BWLErrFATAL; } } return BWLErrOK; } BWLErrSeverity _BWLReadServerOK( BWLControl cntrl, BWLAcceptType *acceptval, /* ret */ BWLToolAvailability *avail_tools /* ret */ ) { uint8_t *buf = (uint8_t*)cntrl->msg; int intr = 0; int *retn_on_intr = &intr; if(cntrl->retn_on_intr){ retn_on_intr = cntrl->retn_on_intr; } if(!_BWLStateIsSetup(cntrl)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadServerOK:called in wrong state."); return BWLErrFATAL; } if(I2Readni(cntrl->sockfd,buf,32,retn_on_intr) != 32){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrUNKNOWN, "Read failed:(%s)",strerror(errno)); cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } *acceptval = _BWLGetAcceptType(cntrl,buf[15]); if(*acceptval == BWL_CNTRL_INVALID){ cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } if(avail_tools){ *avail_tools = ntohl(*(uint32_t *)&buf[0]); /* * If this server pre-dates tester negotiation protocol, * then add in iperf as an implicite tester. */ if(!cntrl->protocol_version){ *avail_tools = BWL_TOOL_IPERF; } } memcpy(cntrl->readIV,&buf[16],16); cntrl->state = _BWLStateUptime; return BWLErrOK; } BWLErrSeverity _BWLReadServerUptime( BWLControl cntrl, BWLNum64 *uptime /* ret */ ) { uint8_t *buf = (uint8_t*)cntrl->msg; BWLTimeStamp tstamp; if(!_BWLStateIs(_BWLStateUptime,cntrl)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadServerUptime: called in wrong state."); return BWLErrFATAL; } if(_BWLReceiveBlocks(cntrl,buf,1) != 1){ BWLError(cntrl->ctx,BWLErrFATAL,errno, "_BWLReadServerUptime: Unable to read from socket."); cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } if(memcmp(&buf[8],cntrl->zero,8)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadServerUptime: Invalid zero padding"); return BWLErrFATAL; } _BWLDecodeTimeStamp(&tstamp,&buf[0]); *uptime = tstamp.tstamp; cntrl->state = _BWLStateRequest; return BWLErrOK; } /* * This function is called on the server side to read the first block * of client requests. The remaining read request messages MUST be called * next!. * It is also called by the client side from BWLStopSessionWait and * BWLStopSession */ BWLRequestType BWLReadRequestType( BWLControl cntrl, int *retn_on_intr ) { uint8_t msgtype; int n; int ival=0; int *intr = &ival; if(retn_on_intr){ intr = retn_on_intr; } if(!_BWLStateIsRequest(cntrl) || _BWLStateIsReading(cntrl)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "BWLReadRequestType: called in wrong state."); return BWLReqInvalid; } /* Read one block so we can peek at the message type */ n = _BWLReceiveBlocksIntr(cntrl,(uint8_t*)cntrl->msg,1,intr); if(n != 1){ cntrl->state = _BWLStateInvalid; if((n < 0) && *intr && (errno == EINTR)){ BWLError(cntrl->ctx,BWLErrDEBUG,BWLErrUNKNOWN, "BWLReadRequestType: Read interrupted by signal."); return BWLReqInvalid; } return BWLReqSockClose; } msgtype = *(uint8_t*)cntrl->msg; /* * StopSession(3) message is only allowed during active tests, * and it is the only message allowed during active tests. */ if((_BWLStateIs(_BWLStateTest,cntrl) && (msgtype != 3)) || (!_BWLStateIs(_BWLStateTest,cntrl) && (msgtype == 3))){ cntrl->state = _BWLStateInvalid; BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "BWLReadRequestType: Invalid request type received."); return BWLReqInvalid; } switch(msgtype){ /* * TestRequest */ case 1: cntrl->state |= _BWLStateTestRequest; break; case 2: cntrl->state |= _BWLStateStartSession; break; case 3: cntrl->state |= _BWLStateStopSession; break; case 4: cntrl->state |= _BWLStateTimeRequest; break; default: cntrl->state = _BWLStateInvalid; BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "BWLReadRequestType: Unknown msg:%d",msgtype); return BWLReqInvalid; } return (BWLRequestType)msgtype; } /* * TimeRequest message format: * * size:32 octets * * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00| 4 | | * +-+-+-+-+-+-+-+-+ | * 04| Unused | * 08| | * 12| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 16| | * 20| Integrity Zero Padding (16 octets) | * 24| | * 28| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * */ BWLErrSeverity _BWLWriteTimeRequest( BWLControl cntrl ) { uint8_t *buf = (uint8_t*)cntrl->msg; if(!_BWLStateIsRequest(cntrl) || _BWLStateIsPending(cntrl)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLWriteTimeRequest: called in wrong state."); return BWLErrFATAL; } buf[0] = 4; /* Request-Time message # */ memset(&buf[1],0,31); if(_BWLSendBlocks(cntrl,buf,2) != 2){ cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } cntrl->state |= _BWLStateTimeResponse; return BWLErrOK; } BWLErrSeverity _BWLReadTimeRequest( BWLControl cntrl, int *retn_on_intr ) { uint8_t *buf = (uint8_t*)cntrl->msg; int ival=0; int *intr=&ival; if(!_BWLStateIs(_BWLStateTimeRequest,cntrl)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadTimeRequest: called in wrong state."); return BWLErrFATAL; } if(retn_on_intr){ intr = retn_on_intr; } /* * Already read the first block - read the rest for this message * type. */ if(_BWLReceiveBlocksIntr(cntrl,&buf[16],1,intr) != 1){ BWLError(cntrl->ctx,BWLErrFATAL,errno, "_BWLReadTimeRequest: Unable to read from socket."); cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } /* * Check integrity bits. */ if(memcmp(cntrl->zero,&buf[16],16) != 0){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadTimeRequest: Invalid MBZ bits"); cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } cntrl->state &= ~_BWLStateTimeRequest; cntrl->state |= _BWLStateTimeResponse; return BWLErrOK; } /* * TimeResponse message format: * * size:32 octets * * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00| Timestamp | * 04| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 08| Error Estimate | | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | * 12| UNUSED | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 16| | * 20| Integrity Zero Padding (16 octets) | * 24| | * 28| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * */ BWLErrSeverity _BWLWriteTimeResponse( BWLControl cntrl, BWLTimeStamp *tstamp, int *ret_on_intr ) { uint8_t *buf = (uint8_t*)cntrl->msg; int ival=0; int *intr=&ival; if(!_BWLStateIs(_BWLStateTimeResponse,cntrl)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLWriteTimeResponse: called in wrong state."); return BWLErrFATAL; } if(ret_on_intr) intr = ret_on_intr; /* * zero everything */ memset(&buf[0],0,32); /* * Encode time and time error estimate */ _BWLEncodeTimeStamp(&buf[0],tstamp); if(!_BWLEncodeTimeStampErrEstimate(&buf[8],tstamp)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrUNKNOWN, "Invalid Timestamp Error"); return BWLErrFATAL; } /* * Send the TimeResponse message */ if(_BWLSendBlocksIntr(cntrl,buf,2,intr) != 2){ cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } cntrl->state &= ~_BWLStateTimeResponse; return BWLErrOK; } BWLErrSeverity _BWLReadTimeResponse( BWLControl cntrl, BWLTimeStamp *tstamp ) { uint8_t *buf = (uint8_t*)cntrl->msg; if(!_BWLStateIs(_BWLStateTimeResponse,cntrl)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadTimeResponse: called in wrong state."); return BWLErrFATAL; } /* * Already read the first block - read the rest for this message * type. */ if(_BWLReceiveBlocks(cntrl,&buf[0],2) != 2){ BWLError(cntrl->ctx,BWLErrFATAL,errno, "_BWLReadTimeResponse: Unable to read from socket."); cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } /* * Check integrity bits. */ if(memcmp(cntrl->zero,&buf[16],16) != 0){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadTimeRequest: Invalid MBZ bits"); cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } /* * Decode time and time error estimate */ _BWLDecodeTimeStamp(tstamp,&buf[0]); if(!_BWLDecodeTimeStampErrEstimate(tstamp,&buf[8])){ cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } cntrl->state &= ~_BWLStateTimeResponse; return BWLErrOK; } /* * TestRequest message format: * * size:112(+16) octets (+16 octets added if tool negotiation supported) * * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00| 1 | UDP | IPVN | Conf-Sender | Conf-Receiver | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 04| Duration | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 08| Req Time | * 12| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 16| Latest Time | * 20| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 24| Time Error Estimate | Recv Port | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 28| Sender Address | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 32| Sender Address (cont.) or Unused | * 36| | * 40| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 44| Receiver Address | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 48| Receiver Address (cont.) or Unused | * 52| | * 56| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 60| | * 64| SID (16 octets) | * 68| | * 72| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 76| Bandwidth | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 80| Buffer Length | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 84| Window Size | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 88| Report Interval | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 92| Dynamic | TOS | nParallel | MBZ | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 96| Tool selection bit-mask | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 100| Verbose | Reverse Flow | No Endpoint | | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 104| Unused | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 108| Out Fmt | bandwidth-exp | Omit Time | Units | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 112| | * 116| Integrity Zero Padding (16 octets) | * 120| | * 124| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * Recv Port only valid if Conf-Receiver is set * * No Endpoint is only valid if Conf-Sender is set, and Reverse Flow is * not. * * Dynamic is a bit mask. * BWL_DYNAMIC_WINSIZE = 0x1 * If this bit is set, the "Window Size" parameter is only used if * the server can't determine a better dynamic one. * * The block with 'Tool selection bit-mask' and 12 unused * bytes is written only when the mode byte previously returned * by the server indicates that the current tool negotiation * version is supported (BWL_MODE_TESTER_NEGOTIATION_VERSION). * * nParallel is also only used if server protocol version is >= * BWL_MODE_TESTER_NEGOTIATION_VERSION */ BWLErrSeverity _BWLWriteTestRequest( BWLControl cntrl, BWLTestSession tsession ) { uint8_t *buf = (uint8_t*)cntrl->msg; BWLTestSpec *tspec = &tsession->test_spec; BWLTimeStamp tstamp; struct sockaddr *ssaddr; struct sockaddr *rsaddr; uint8_t version; uint32_t message_len; int blocks; BWLBoolean tool_negotiation; BWLBoolean omit_available; BWLBoolean reverse_available; /* * Ensure cntrl is in correct state. */ if(!_BWLStateIsRequest(cntrl) || _BWLStateIsPending(cntrl)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLWriteTestRequest:called in wrong state."); return BWLErrFATAL; } /* * Interpret addresses */ ssaddr = I2AddrSAddr(tspec->client,NULL); rsaddr = I2AddrSAddr(tspec->server,NULL); if(!ssaddr || !rsaddr){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLWriteTestRequest: Unable to decode sockaddrs"); return BWLErrFATAL; } if(ssaddr->sa_family != rsaddr->sa_family){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "Address Family mismatch"); return BWLErrFATAL; } /* * Addresses are consistant. Can we deal with what we * have been given? (We only support AF_INET and AF_INET6.) */ switch (ssaddr->sa_family){ case AF_INET: version = 4; break; #ifdef AF_INET6 case AF_INET6: version = 6; break; #endif default: BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "Invalid IP Address Family"); return BWLErrFATAL; } /* Is there support for tool negotiation as in this version? */ /* If so, the tool selection block will be written. */ tool_negotiation = cntrl->protocol_version >= BWL_MODE_PROTOCOL_TESTER_NEGOTIATION_VERSION; if (tool_negotiation){ message_len = 8*_BWL_RIJNDAEL_BLOCK_SIZE; } else { message_len = 7*_BWL_RIJNDAEL_BLOCK_SIZE; } /* Is there support for the -O omit flag in this version? */ omit_available = cntrl->protocol_version >= BWL_MODE_PROTOCOL_OMIT_VERSION; reverse_available = cntrl->protocol_version >= BWL_MODE_PROTOCOL_1_5_VERSION; /* * Initialize buffer */ memset(&buf[0],0,message_len); buf[0] = 1; /* Request-Session message # */ buf[1] = version & 0xF; /* version */ buf[2] = (tsession->conf_client)?1:0; buf[3] = (tsession->conf_server)?1:0; /* * slots and npackets... convert to network byte order. */ _BWLEncodeTimeStamp(&buf[8],&tspec->req_time); tstamp.tstamp = tspec->latest_time; _BWLEncodeTimeStamp(&buf[16],&tstamp); if(!_BWLEncodeTimeStampErrEstimate(&buf[24],&tspec->req_time)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "Invalid req_time time errest"); return BWLErrFATAL; } *(uint16_t*)&buf[26] = htons(tsession->tool_port); /* * Now set addr values. (sockaddr vars will already have * values in network byte order.) */ switch(version){ /* type punning - socket api, leaving as is for now. */ struct sockaddr_in *saddr4; #ifdef AF_INET6 struct sockaddr_in6 *saddr6; case 6: /* client address */ saddr6 = (struct sockaddr_in6*)ssaddr; memcpy(&buf[28],saddr6->sin6_addr.s6_addr,16); /* server address and port */ saddr6 = (struct sockaddr_in6*)rsaddr; memcpy(&buf[44],saddr6->sin6_addr.s6_addr,16); break; #endif case 4: /* client address */ saddr4 = (struct sockaddr_in*)ssaddr; *(uint32_t*)&buf[28] = saddr4->sin_addr.s_addr; /* server address */ saddr4 = (struct sockaddr_in*)rsaddr; *(uint32_t*)&buf[44] = saddr4->sin_addr.s_addr; break; default: /* * This can't happen, but default keeps compiler * warnings away. */ abort(); break; } memcpy(&buf[60],tsession->sid,16); *(uint32_t*)&buf[96] = htonl(tspec->tool_id); *(uint32_t*)&buf[4] = htonl(tspec->duration); buf[100] = tspec->verbose; if(!tool_negotiation && tspec->outformat){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrUNSUPPORTED, "Legacy server does not support -y option"); return BWLErrFATAL; } *(uint32_t*)&buf[108] = tspec->outformat; if (!reverse_available && tspec->server_sends) { BWLError(cntrl->ctx,BWLErrFATAL,BWLErrUNSUPPORTED, "Legacy server does not support firewall mode"); return BWLErrFATAL; } if (!reverse_available && tspec->server_sends) { BWLError(cntrl->ctx,BWLErrFATAL,BWLErrUNSUPPORTED, "Legacy server does not support firewall mode"); return BWLErrFATAL; } buf[101] = tspec->server_sends; buf[102] = tspec->no_server_endpoint; if(tspec->tos){ buf[93] = tspec->tos; } if (BWLToolUnparseRequestParameters(tspec->tool_id, cntrl->ctx,buf,tspec,cntrl->protocol_version, tsession) != BWLErrOK) { BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "Problem writing test request parameters"); return BWLErrFATAL; } /* * Now - send the request! 112(+4) octets == 7(+1) blocks. */ blocks = message_len / _BWL_RIJNDAEL_BLOCK_SIZE; if(_BWLSendBlocks(cntrl,buf,blocks) != blocks){ cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } cntrl->state |= _BWLStateTestAccept; return BWLErrOK; } BWLErrSeverity BWLGenericUnparseThroughputParameters( BWLContext ctx, uint8_t *buf, BWLTestSpec *tspec, BWLProtocolVersion protocol_version, BWLTestSession tsession ) { BWLBoolean tool_negotiation; BWLBoolean omit_available; uint64_t bandwidth; uint8_t bandwidth_exp = 0; /* * Check if tool negotiation has been requested. */ tool_negotiation = protocol_version >= BWL_MODE_PROTOCOL_TESTER_NEGOTIATION_VERSION; /* Is there support for the -O omit flag in this version? */ omit_available = protocol_version >= BWL_MODE_PROTOCOL_OMIT_VERSION; if(tspec->udp){ /* udp */ buf[1] |= 0x10; } if (protocol_version < BWL_MODE_PROTOCOL_1_5_VERSION && (tspec->bandwidth > 0 && !tspec->udp) && tsession->conf_client) { BWLError(ctx,BWLErrFATAL,BWLErrUNSUPPORTED, "Legacy server does not support setting the TCP bandwidth"); return BWLErrFATAL; } bandwidth = tspec->bandwidth; while(bandwidth > 0xFFFFFFFFULL){ bandwidth_exp++; bandwidth >>= 1; } *(uint32_t*)&buf[76] = htonl((uint32_t)(bandwidth & 0xFFFFFFFFULL)); *(uint32_t*)&buf[80] = htonl(tspec->len_buffer); *(uint32_t*)&buf[84] = htonl(tspec->window_size); if (protocol_version >= BWL_MODE_PROTOCOL_1_5_VERSION) *(uint32_t*)&buf[88] = htonl(tspec->report_interval); else *(uint32_t*)&buf[88] = htonl(tspec->report_interval / 1000); if(tspec->dynamic_window_size){ buf[92] |= _BWL_DYNAMIC_WINDOW_SIZE; } if(tool_negotiation){ buf[94] = tspec->parallel_streams; *(uint32_t*)&buf[96] = htonl(tspec->tool_id); buf[109] = bandwidth_exp; buf[111] = tspec->units; } else if(tspec->parallel_streams){ BWLError(ctx,BWLErrFATAL,BWLErrUNSUPPORTED, "Legacy server does not support -P option"); return BWLErrFATAL; } else if(tspec->units){ BWLError(ctx,BWLErrFATAL,BWLErrUNSUPPORTED, "Legacy server does not support -f option"); return BWLErrFATAL; } else if(bandwidth_exp > 0){ BWLError(ctx,BWLErrFATAL,BWLErrUNSUPPORTED, "Legacy server does not support -b greater than 4.3g"); return BWLErrFATAL; } if(omit_available){ buf[110] = tspec->omit; } else if(tspec->omit){ BWLError(ctx,BWLErrFATAL,BWLErrUNSUPPORTED, "Legacy server does not support -O option"); return BWLErrFATAL; } return BWLErrOK; } BWLErrSeverity BWLGenericUnparseTracerouteParameters( BWLContext ctx, uint8_t *buf, BWLTestSpec *tspec, BWLProtocolVersion protocol_version, BWLTestSession tsession ) { BWLBoolean tos_available; tos_available = protocol_version >= BWL_MODE_PROTOCOL_1_5_2_VERSION; if(tspec->tos && !tos_available){ BWLError(ctx,BWLErrFATAL,BWLErrUNSUPPORTED, "Legacy server does not support setting TOS bit"); return BWLErrFATAL; } *(uint32_t*)&buf[4] = htonl(tspec->duration); buf[76] = tspec->traceroute_first_ttl; buf[77] = tspec->traceroute_last_ttl; *(uint16_t*)&buf[78] = htons((uint16_t)(tspec->traceroute_packet_size)); return BWLErrOK; } BWLErrSeverity BWLGenericUnparsePingParameters( BWLContext ctx, uint8_t *buf, BWLTestSpec *tspec, BWLProtocolVersion protocol_version, BWLTestSession tsession ) { BWLBoolean tos_available; tos_available = protocol_version >= BWL_MODE_PROTOCOL_1_5_2_VERSION; if(tspec->tos && !tos_available){ BWLError(ctx,BWLErrFATAL,BWLErrUNSUPPORTED, "Legacy server does not support setting TOS bit"); return BWLErrFATAL; } *(uint16_t*)&buf[76] = htons((uint16_t)(tspec->ping_packet_count)); *(uint16_t*)&buf[78] = htons((uint16_t)(tspec->ping_packet_size)); *(uint16_t*)&buf[80] = htons((uint16_t)(tspec->ping_interpacket_time)); buf[84] = tspec->ping_packet_ttl; return BWLErrOK; } /* * Function: _BWLReadTestRequest * * Description: * This function reads a test request off the wire and encodes * the information in a TestSession record. * * The acceptval pointer will be non-null and will return a value. * (i.e. if there is a memory allocation error, it will be set to * BWL_CNTRL_FAILURE. If there is invalid data in the TestRequest * it will be set to BWL_CNTRL_REJECT.) * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLErrSeverity _BWLReadTestRequest( BWLControl cntrl, int *retn_on_intr, BWLTestSession *test_session, BWLAcceptType *accept_ret ) { uint8_t *buf = (uint8_t*)cntrl->msg; BWLTimeStamp tstamp; BWLErrSeverity err_ret=BWLErrFATAL; struct sockaddr_storage sendaddr_rec; struct sockaddr_storage recvaddr_rec; socklen_t addrlen = sizeof(sendaddr_rec); int socktype; int protocol; I2Addr SendAddr=NULL; I2Addr RecvAddr=NULL; uint8_t ipvn; BWLSID sid; BWLTestSpec tspec; BWLTestSession tsession=NULL; int ival=0; int *intr=&ival; uint16_t tool_port; BWLBoolean conf_client; BWLBoolean conf_server; int blocks=_BWL_TEST_REQUEST_BLK_LEN; /* 8 */ uint32_t padding_pos; BWLBoolean tool_negotiation; BWLBoolean omit_available; BWLBoolean reverse_available; BWLBoolean verbose_available; if(!_BWLStateIs(_BWLStateTestRequest,cntrl)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadTestRequest: called in wrong state."); return BWLErrFATAL; } memset(&sendaddr_rec,0,addrlen); memset(&recvaddr_rec,0,addrlen); memset(&tspec,0,sizeof(tspec)); memset(sid,0,sizeof(sid)); /* * Initialize BWLAcceptType */ *accept_ret = BWL_CNTRL_INVALID; /* * If caller wants to participate in interrupts, use the passed in addr. */ if(retn_on_intr){ intr = retn_on_intr; } /* * Check if tool negotiation has been requested. */ tool_negotiation = cntrl->protocol_version >= BWL_MODE_PROTOCOL_TESTER_NEGOTIATION_VERSION; if(!tool_negotiation){ blocks--; } padding_pos = (blocks -1) * _BWL_RIJNDAEL_BLOCK_SIZE; /* Is there support for the -O omit flag in this version? */ omit_available = cntrl->protocol_version >= BWL_MODE_PROTOCOL_OMIT_VERSION; /* Is there support for the -O omit flag in this version? */ reverse_available = cntrl->protocol_version >= BWL_MODE_PROTOCOL_1_5_VERSION; verbose_available = cntrl->protocol_version >= BWL_MODE_PROTOCOL_1_5_2_VERSION; /* * Already read the first block - read the rest for this message * type. */ if(_BWLReceiveBlocksIntr(cntrl,&buf[16],blocks-1,intr) != (blocks-1)){ BWLError(cntrl->ctx,BWLErrFATAL,errno, "_BWLReadTestRequest: Unable to read from socket."); goto error; } if(memcmp(cntrl->zero,&buf[padding_pos],_BWL_RIJNDAEL_BLOCK_SIZE)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadTestRequest: Invalid zero padding"); goto error; } /* * Decode the parameters that are used for initial request AND * for reservation update. */ _BWLDecodeTimeStamp(&tspec.req_time,&buf[8]); if(!_BWLDecodeTimeStampErrEstimate(&tspec.req_time,&buf[24])){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadTestRequest: Invalid time errest"); goto error; } _BWLDecodeTimeStamp(&tstamp,&buf[16]); tspec.latest_time = tstamp.tstamp; tool_port = ntohs(*(uint16_t*)&buf[26]); /* * copy sid (will be ignored if this is an initial receive request) */ memcpy(sid,&buf[60],16); if(*test_session){ tsession = *test_session; if(memcmp(sid,tsession->sid,16) != 0){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadTestRequest: sid mismatch"); goto error; } tsession->test_spec.req_time = tspec.req_time; tsession->test_spec.latest_time = tspec.latest_time; if(!tsession->conf_server){ tsession->tool_port = tool_port; } } else{ /* * If *test_session is NULL, than there are currently no * outstanding reservations. Therefore, this is a new request * so decode it. */ ipvn = buf[1] & 0xF; switch(buf[2]){ case 0: conf_client = False; break; case 1: default: conf_client = True; break; } switch(buf[3]){ case 0: conf_server = False; break; case 1: default: conf_server = True; break; } if(conf_client == conf_server){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadTestRequest: Invalid req(send/recv?)"); goto error; } if(conf_server){ tool_port = 0; } switch(ipvn){ struct sockaddr_in *saddr4; #ifdef AF_INET6 struct sockaddr_in6 *saddr6; case 6: if(addrlen < (socklen_t)sizeof(struct sockaddr_in6)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadTestRequest: socklen not large enough (%d < %d)", addrlen, sizeof(struct sockaddr_in6)); goto error; } addrlen = sizeof(struct sockaddr_in6); /* type punning - socket api, leaving for now */ /* client address and port */ saddr6 = (struct sockaddr_in6*)&sendaddr_rec; saddr6->sin6_family = AF_INET6; memcpy(saddr6->sin6_addr.s6_addr,&buf[28],16); saddr6->sin6_port = 0; /* server address and port */ saddr6 = (struct sockaddr_in6*)&recvaddr_rec; saddr6->sin6_family = AF_INET6; memcpy(saddr6->sin6_addr.s6_addr,&buf[44],16); saddr6->sin6_port = 0; break; #endif case 4: if(addrlen < (socklen_t)sizeof(struct sockaddr_in)){ BWLError(cntrl->ctx,BWLErrFATAL, BWLErrINVALID, "_BWLReadTestRequest: socklen not large enough (%d < %d)", addrlen, sizeof(struct sockaddr_in)); goto error; } addrlen = sizeof(struct sockaddr_in); /* type punning - socket api, leaving for now */ /* client address and port */ saddr4 = (struct sockaddr_in*)&sendaddr_rec; saddr4->sin_family = AF_INET; saddr4->sin_addr.s_addr = *(uint32_t*)&buf[28]; saddr4->sin_port = 0; /* server address and port */ saddr4 = (struct sockaddr_in*)&recvaddr_rec; saddr4->sin_family = AF_INET; saddr4->sin_addr.s_addr = *(uint32_t*)&buf[44]; saddr4->sin_port = 0; break; default: BWLError(cntrl->ctx,BWLErrWARNING,BWLErrINVALID, "_BWLReadTestRequest: Unsupported IP version (%d)", ipvn); goto error; } if(tool_negotiation){ tspec.tool_id = ntohl(*(uint32_t*)&buf[96]); /* Ensure only one bit is set in the tool selection bit-mask */ if(tspec.tool_id & (tspec.tool_id - 1)){ BWLError(cntrl->ctx,BWLErrWARNING,BWLErrINVALID, "_BWLReadTestRequest: Multiple tools requested (%d)", tspec.tool_id); err_ret = BWLErrWARNING; *accept_ret = BWL_CNTRL_FAILURE; goto error; } } else{ tspec.tool_id = BWL_TOOL_IPERF; } tspec.duration = ntohl(*(uint32_t*)&buf[4]); if (verbose_available) { tspec.verbose = buf[100]; } else { // before 1.5.2, verbose output was the default. tspec.verbose = 1; } tspec.tos = buf[93]; if (reverse_available) { tspec.server_sends = buf[101]; tspec.no_server_endpoint = buf[102]; } if(tool_negotiation){ tspec.outformat = buf[108]; } if (BWLToolParseRequestParameters(tspec.tool_id,cntrl->ctx,buf,&tspec,cntrl->protocol_version) != BWLErrOK) { BWLError(cntrl->ctx,BWLErrWARNING,BWLErrINVALID, "_BWLReadTestRequest: Problem reading test parameters for tool (%d)", tspec.tool_id); err_ret = BWLErrWARNING; *accept_ret = BWL_CNTRL_FAILURE; goto error; } #ifdef HAVE_STRUCT_SOCKADDR_SA_LEN ((struct sockaddr *)&sendaddr_rec)->sa_len = ((struct sockaddr *)&recvaddr_rec)->sa_len = addrlen; #endif /* * Prepare the address buffers. * (Don't bother checking for null return - it will be checked * by _BWLTestSessionAlloc.) */ if(tspec.udp){ socktype = SOCK_DGRAM; protocol = IPPROTO_UDP; } else{ socktype = SOCK_STREAM; protocol = IPPROTO_TCP; } SendAddr = I2AddrBySAddr(BWLContextErrHandle(cntrl->ctx), (struct sockaddr*)&sendaddr_rec,addrlen, socktype,protocol); RecvAddr = I2AddrBySAddr(cntrl->ctx, (struct sockaddr*)&recvaddr_rec,addrlen, socktype,protocol); /* * Allocate a record for this test. */ if( !(tsession = _BWLTestSessionAlloc(cntrl,conf_client, SendAddr,RecvAddr,tool_port,&tspec))){ err_ret = BWLErrWARNING; *accept_ret = BWL_CNTRL_FAILURE; goto error; } /* * copy sid into tsession - if the sid still needs to be * generated - it still will be in sapi.c:BWLProcessTestRequest */ memcpy(tsession->sid,&buf[60],16); } *test_session = tsession; *accept_ret = BWL_CNTRL_ACCEPT; cntrl->state &= ~_BWLStateTestRequest; cntrl->state |= _BWLStateTestAccept; return BWLErrOK; error: if(tsession){ _BWLTestSessionFree(cntrl->ctx,tsession,BWL_CNTRL_FAILURE); }else{ I2AddrFree(SendAddr); I2AddrFree(RecvAddr); } if(err_ret < BWLErrWARNING){ cntrl->state = _BWLStateInvalid; } return err_ret; } BWLErrSeverity BWLGenericParseThroughputParameters( BWLContext ctx, const uint8_t *buf, BWLTestSpec *tspec, BWLProtocolVersion protocol_version ) { BWLBoolean tool_negotiation; BWLBoolean omit_available; /* * Check if tool negotiation has been requested. */ tool_negotiation = protocol_version >= BWL_MODE_PROTOCOL_TESTER_NEGOTIATION_VERSION; /* Is there support for the -O omit flag in this version? */ omit_available = protocol_version >= BWL_MODE_PROTOCOL_OMIT_VERSION; tspec->udp = (buf[1]>>4)?True:False; tspec->bandwidth = ntohl(*(uint32_t*)&buf[76]); tspec->len_buffer = ntohl(*(uint32_t*)&buf[80]); tspec->window_size = ntohl(*(uint32_t*)&buf[84]); tspec->report_interval = ntohl(*(uint32_t*)&buf[88]); if (protocol_version < BWL_MODE_PROTOCOL_1_5_VERSION) tspec->report_interval = ntohl(*(uint32_t*)&buf[88]) * 1000; tspec->dynamic_window_size = buf[92] & _BWL_DYNAMIC_WINDOW_SIZE; if(tool_negotiation){ uint8_t bandwidth_exp; tspec->parallel_streams = buf[94]; bandwidth_exp = buf[109]; tspec->bandwidth <<= bandwidth_exp; tspec->units = buf[111]; } if(omit_available){ tspec->verbose = buf[100]; tspec->omit = buf[110]; } return BWLErrOK; } BWLErrSeverity BWLGenericParseTracerouteParameters( BWLContext ctx, const uint8_t *buf, BWLTestSpec *tspec, BWLProtocolVersion protocol_version ) { BWLBoolean tos_available; tos_available = protocol_version >= BWL_MODE_PROTOCOL_1_5_2_VERSION; if(tspec->tos && !tos_available){ tspec->tos = 0; } tspec->traceroute_first_ttl = buf[76]; tspec->traceroute_last_ttl = buf[77]; tspec->traceroute_packet_size = htons(*(uint16_t*)&buf[78]); return BWLErrOK; } BWLErrSeverity BWLGenericParsePingParameters( BWLContext ctx, const uint8_t *buf, BWLTestSpec *tspec, BWLProtocolVersion protocol_version ) { BWLBoolean tos_available; tos_available = protocol_version >= BWL_MODE_PROTOCOL_1_5_2_VERSION; if(tspec->tos && !tos_available){ tspec->tos = 0; } tspec->ping_packet_count = htons(*(uint16_t*)&buf[76]); tspec->ping_packet_size = htons(*(uint16_t*)&buf[78]); tspec->ping_interpacket_time = htons(*(uint16_t*)&buf[80]); tspec->ping_packet_ttl = buf[84]; return BWLErrOK; } /* * * TestAccept message format: * * size: 32 octets * * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00| Accept | Unused | Port | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 04| | * 08| SID (16 octets) | * 12| | * 16| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 20| Reservation Time | * 24| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 28| Zero Padding (4 octets) | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * */ BWLErrSeverity _BWLWriteTestAccept( BWLControl cntrl, int *intr, BWLAcceptType acceptval, BWLTestSession tsession ) { uint8_t *buf = (uint8_t*)cntrl->msg; BWLTimeStamp tstamp; if(!_BWLStateIs(_BWLStateTestAccept,cntrl)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLWriteTestAccept called in wrong state."); return BWLErrFATAL; } memset(buf,0,32); buf[0] = acceptval & 0xff; if(tsession->conf_server){ *(uint16_t *)&buf[2] = htons(tsession->tool_port); } memcpy(&buf[4],tsession->sid,16); tstamp.tstamp = tsession->reserve_time; _BWLEncodeTimeStamp(&buf[20],&tstamp); if(_BWLSendBlocksIntr(cntrl,buf,2,intr) != 2){ cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } cntrl->state &= ~_BWLStateTestAccept; return BWLErrOK; } BWLErrSeverity _BWLReadTestAccept( BWLControl cntrl, BWLAcceptType *acceptval, BWLTestSession tsession ) { uint8_t *buf = (uint8_t*)cntrl->msg; BWLTimeStamp tstamp; if(!_BWLStateIs(_BWLStateTestAccept,cntrl)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadTestAccept called in wrong state."); return BWLErrFATAL; } /* * Get the servers response. */ if(_BWLReceiveBlocks(cntrl,buf,2) != 2){ BWLError(cntrl->ctx,BWLErrFATAL,errno, "_BWLReadTestAccept:Unable to read from socket."); cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } /* * Check zero padding first. */ if(memcmp(&buf[28],cntrl->zero,4)){ cntrl->state = _BWLStateInvalid; BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "Invalid Accept-Session message received"); return BWLErrFATAL; } *acceptval = _BWLGetAcceptType(cntrl,buf[0]); if(*acceptval == BWL_CNTRL_INVALID){ cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } if(tsession->conf_server){ tsession->tool_port = ntohs(*(uint16_t*)&buf[2]); memcpy(tsession->sid,&buf[4],16); } _BWLDecodeTimeStamp(&tstamp,&buf[20]); tsession->reserve_time = tstamp.tstamp; cntrl->state &= ~_BWLStateTestAccept; return BWLErrOK; } /* * * StartSession message format: * * size: 32 octets * * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00| 2 | Unused | PeerPort | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 04| Unused (12 octets) | * 08| | * 12| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 16| | * 20| Zero Padding (16 octets) | * 24| | * 28| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * */ BWLErrSeverity _BWLWriteStartSession( BWLControl cntrl, uint16_t peerport ) { uint8_t *buf = (uint8_t*)cntrl->msg; if(!_BWLStateIsRequest(cntrl) || _BWLStateIsPending(cntrl) || !cntrl->tests){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLWriteStartSession: called in wrong state."); return BWLErrFATAL; } /* initialize buffer */ memset(&buf[0],0,32); buf[0] = 2; /* start-session identifier */ /* * If conf_client, than need to "set" the peerport. */ if(cntrl->tests->conf_client){ *(uint16_t*)&buf[2] = htons(peerport); } if(_BWLSendBlocks(cntrl,buf,2) != 2){ cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } cntrl->state |= _BWLStateStartAck; cntrl->state |= _BWLStateTest; return BWLErrOK; } BWLErrSeverity _BWLReadStartSession( BWLControl cntrl, uint16_t *peerport, int *retn_on_intr ) { int n; uint8_t *buf = (uint8_t*)cntrl->msg; if(!_BWLStateIs(_BWLStateStartSession,cntrl) || !cntrl->tests){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadStartSession called in wrong state."); return BWLErrFATAL; } /* * Already read the first block - read the rest for this message * type. */ n = _BWLReceiveBlocksIntr(cntrl,&buf[16], _BWL_STOP_SESSIONS_BLK_LEN-1,retn_on_intr); if((n < 0) && *retn_on_intr && (errno == EINTR)){ return BWLErrFATAL; } if(n != (_BWL_STOP_SESSIONS_BLK_LEN-1)){ BWLError(cntrl->ctx,BWLErrFATAL,errno, "_BWLReadStartSession: Unable to read from socket."); cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } if(memcmp(cntrl->zero,&buf[16],16)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadStartSession: Invalid zero padding"); cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } if(buf[0] != 2){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadStartSession: Not a StartSession message..."); cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } if(cntrl->tests->conf_client){ *peerport = ntohs(*(uint16_t*)&buf[2]); } /* * The control connection is now ready to send the response. */ cntrl->state &= ~_BWLStateStartSession; cntrl->state |= _BWLStateStartAck; cntrl->state |= _BWLStateTest; return BWLErrOK; } /* * * StartAck message format: * * size: 32 octets * * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00| Accept | Unused | PeerPort | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 04| Unused (12 octets) | * 08| | * 12| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 16| | * 20| Zero Padding (16 octets) | * 24| | * 28| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * */ BWLErrSeverity _BWLWriteStartAck( BWLControl cntrl, int *retn_on_intr, uint16_t peerport, BWLAcceptType acceptval ) { int n; uint8_t *buf = (uint8_t*)cntrl->msg; if(!_BWLStateIs(_BWLStateStartAck,cntrl)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLWriteStartAck called in wrong state."); return BWLErrFATAL; } memset(&buf[0],0,32); buf[0] = acceptval & 0xff; if(cntrl->tests->conf_server){ *(uint16_t*)&buf[2] = htons(peerport); } n = _BWLSendBlocksIntr(cntrl,buf,_BWL_CONTROL_ACK_BLK_LEN,retn_on_intr); if((n < 0) && *retn_on_intr && (errno == EINTR)){ return BWLErrFATAL; } if(n != _BWL_CONTROL_ACK_BLK_LEN){ cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } /* * StartAck has been sent, leave that state. */ cntrl->state &= ~_BWLStateStartAck; /* * Test was denied - go back to Request state. */ if(_BWLStateIs(_BWLStateTest,cntrl) && (acceptval != BWL_CNTRL_ACCEPT)){ cntrl->state &= ~_BWLStateTest; } return BWLErrOK; } BWLErrSeverity _BWLReadStartAck( BWLControl cntrl, uint16_t *peerport, BWLAcceptType *acceptval ) { uint8_t *buf = (uint8_t*)cntrl->msg; *acceptval = BWL_CNTRL_INVALID; if(!_BWLStateIs(_BWLStateStartAck,cntrl)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadStartAck called in wrong state."); return BWLErrFATAL; } if(_BWLReceiveBlocks(cntrl,&buf[0],_BWL_CONTROL_ACK_BLK_LEN) != (_BWL_CONTROL_ACK_BLK_LEN)){ BWLError(cntrl->ctx,BWLErrFATAL,errno, "_BWLReadStartAck: Unable to read from socket."); cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } if(memcmp(cntrl->zero,&buf[16],16)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadStartAck: Invalid zero padding"); cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } *acceptval = _BWLGetAcceptType(cntrl,buf[0]); if(*acceptval == BWL_CNTRL_INVALID){ cntrl->state = _BWLStateInvalid; return BWLErrFATAL; } if(cntrl->tests->conf_server){ *peerport = ntohs(*(uint16_t*)&buf[2]); } /* * received StartAck - leave that state. */ cntrl->state &= ~_BWLStateStartAck; /* If StartSession was rejected get back into StateRequest */ if (_BWLStateIsTest(cntrl) && (*acceptval != BWL_CNTRL_ACCEPT)){ cntrl->state &= ~_BWLStateTest; cntrl->state |= _BWLStateRequest; } return BWLErrOK; } /* * * StopSession message format: * * size: 32 octets * * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00| 3 | Accept | | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * 04| Unused (6 octets) | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 08| N-bytes following | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 12| Unused (4 octets) | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 16| | * 20| Zero Padding (16 octets) | * 24| | * 28| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * The following is appended ONLY if (N-bytes != 0) * * ... ASCII TEST RESULTS ... (last block is zero padded) * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00| | * 04| Zero Padding (16 octets) | * 08| | * 12| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * */ BWLErrSeverity _BWLWriteStopSession( BWLControl cntrl, int *retn_on_intr, BWLAcceptType acceptval, FILE *fp ) { uint8_t *buf = (uint8_t*)cntrl->msg; struct stat sbuf; uint32_t fsize = 0; if(!( _BWLStateIs(_BWLStateRequest,cntrl) && _BWLStateIs(_BWLStateTest,cntrl))){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLWriteStopSession called in wrong state."); return BWLErrFATAL; } memset(&buf[0],0,32); buf[0] = 3; if(fp){ /* * Find out how much data we need to send. */ if(fstat(fileno(fp),&sbuf) || fseeko(fp,(off_t)0,SEEK_SET)){ acceptval = BWL_CNTRL_FAILURE; goto datadone; } fsize = (uint32_t)sbuf.st_size; /* * check for overflow. */ if(sbuf.st_size != (off_t)fsize){ fsize = 0; BWLError(cntrl->ctx,BWLErrFATAL,BWLErrUNKNOWN, "_BWLWriteStopSession: Data file size too large, failure."); acceptval = BWL_CNTRL_FAILURE; goto datadone; } *(uint32_t*)&buf[8] = htonl(fsize); } datadone: buf[1] = acceptval & 0xff; if(_BWLSendBlocksIntr(cntrl,buf,2,retn_on_intr) != 2){ return BWLErrFATAL; } if(!fsize){ return BWLErrOK; } /* * Send data with trailing zero block */ while(fsize >= _BWL_RIJNDAEL_BLOCK_SIZE){ if(fread(buf,1,_BWL_RIJNDAEL_BLOCK_SIZE,fp) != _BWL_RIJNDAEL_BLOCK_SIZE){ return _BWLFailControlSession(cntrl,BWLErrFATAL); } if(_BWLSendBlocksIntr(cntrl,buf,1,retn_on_intr) != 1){ return _BWLFailControlSession(cntrl,BWLErrFATAL); } fsize -= _BWL_RIJNDAEL_BLOCK_SIZE; } if(fsize > 0){ memset(buf,0,_BWL_RIJNDAEL_BLOCK_SIZE); if(fread(buf,1,fsize,fp) != fsize){ return _BWLFailControlSession(cntrl,BWLErrFATAL); } if(_BWLSendBlocksIntr(cntrl,buf,1,retn_on_intr) != 1){ return _BWLFailControlSession(cntrl,BWLErrFATAL); } } /* * Send a final block of zero */ memset(buf,0,_BWL_RIJNDAEL_BLOCK_SIZE); if(_BWLSendBlocksIntr(cntrl,buf,1,retn_on_intr) != 1){ return _BWLFailControlSession(cntrl,BWLErrFATAL); } return BWLErrOK; } BWLErrSeverity _BWLReadStopSession( BWLControl cntrl, int *retn_on_intr, BWLAcceptType *acceptval, FILE *fp ) { int n; uint8_t *buf = (uint8_t*)cntrl->msg; BWLAcceptType aval; uint32_t fsize; if(!(_BWLStateIs(_BWLStateRequest,cntrl) && _BWLStateIs(_BWLStateTest,cntrl))){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadStopSession called in wrong state."); return BWLErrFATAL; } /* * Already read the first block - read the rest for this message * type. */ if((n = _BWLReceiveBlocksIntr(cntrl,&buf[16],1,retn_on_intr)) != 1){ if((n < 0) && *retn_on_intr && (errno == EINTR)){ return BWLErrFATAL; } BWLError(cntrl->ctx,BWLErrFATAL,errno, "_BWLReadStopSession: Unable to read from socket."); return _BWLFailControlSession(cntrl,BWLErrFATAL); } if(memcmp(cntrl->zero,&buf[16],16)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadStopSession: Invalid zero padding"); return _BWLFailControlSession(cntrl,BWLErrFATAL); } aval = _BWLGetAcceptType(cntrl,buf[1]); if(acceptval) *acceptval = aval; if(aval == BWL_CNTRL_INVALID){ return _BWLFailControlSession(cntrl,BWLErrFATAL); } fsize = ntohl(*(uint32_t*)&buf[8]); if(!fsize){ goto end; } /* * Read test results and write to fp, if not null. */ while(fsize >= _BWL_RIJNDAEL_BLOCK_SIZE){ if(_BWLReceiveBlocksIntr(cntrl,buf,1,retn_on_intr) != 1){ return _BWLFailControlSession(cntrl,BWLErrFATAL); } if(fp && (fwrite(buf,_BWL_RIJNDAEL_BLOCK_SIZE,1,fp) != 1)){ return _BWLFailControlSession(cntrl,BWLErrFATAL); } fsize -= _BWL_RIJNDAEL_BLOCK_SIZE; } if(fsize > 0){ if(_BWLReceiveBlocksIntr(cntrl,buf,1,retn_on_intr) != 1){ return _BWLFailControlSession(cntrl,BWLErrFATAL); } if(fp && (fwrite(buf,fsize,1,fp) != 1)){ return _BWLFailControlSession(cntrl,BWLErrFATAL); } } /* * Integrity Zero block */ if(_BWLReceiveBlocksIntr(cntrl,buf,1,retn_on_intr) != 1){ return _BWLFailControlSession(cntrl,BWLErrFATAL); } if(memcmp(cntrl->zero,buf,16)){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLReadStopSession: Invalid zero padding"); return _BWLFailControlSession(cntrl,BWLErrFATAL); } end: /* * The control connection is now ready to send the response. */ cntrl->state &= ~_BWLStateStopSession; cntrl->state |= _BWLStateRequest; return BWLErrOK; } bwctl_1.5.4+dfsg1.orig/bwlib/missing_getopt.c0000664000076500007710000002422112560414557016116 0ustar /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Dieter Baron and Thomas Klausner. * * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "missing_getopt.h" #include #include #include #include #include #undef __UNCONST #define __UNCONST(a) ((void *)(size_t)(const void *)(a)) #define IGNORE_FIRST (*options == '-' || *options == '+') #define IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL) #define PERMUTE (!IS_POSIXLY_CORRECT && !IGNORE_FIRST) /* XXX: GNU ignores PC if *options == '-' */ #define IN_ORDER (!IS_POSIXLY_CORRECT && *options == '-') /* return values */ #define BADCH (int)'?' #define BADARG ((IGNORE_FIRST && options[1] == ':') || (*options == ':') ? (int)':' : (int)'?') #define INORDER (int)1 #define EMSG "" #ifndef _DIAGASSERT #define _DIAGASSERT(X) #endif int optreset; /* reset getopt */ static int missing_getopt_internal(int, char **, const char *); static int gcd(int, int); static void permute_args(int, int, int, char **); static const char *place = EMSG; /* option letter processing */ /* XXX: set optreset to 1 rather than these two */ static int nonopt_start = -1; /* first non option argument (for permute) */ static int nonopt_end = -1; /* first option after non options (for permute) */ /* * Compute the greatest common divisor of a and b. */ static int gcd(int a, int b) { int c; c = a % b; while (c != 0) { a = b; b = c; c = a % b; } return b; } /* * Exchange the block from nonopt_start to nonopt_end with the block * from nonopt_end to opt_end (keeping the same order of arguments * in each block). */ static void permute_args(int panonopt_start, int panonopt_end, int opt_end, char **nargv) { int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos; char *swap; _DIAGASSERT(nargv != NULL); /* * compute lengths of blocks and number and size of cycles */ nnonopts = panonopt_end - panonopt_start; nopts = opt_end - panonopt_end; ncycle = gcd(nnonopts, nopts); cyclelen = (opt_end - panonopt_start) / ncycle; for (i = 0; i < ncycle; i++) { cstart = panonopt_end+i; pos = cstart; for (j = 0; j < cyclelen; j++) { if (pos >= panonopt_end) pos -= nnonopts; else pos += nopts; swap = nargv[pos]; nargv[pos] = nargv[cstart]; nargv[cstart] = swap; } } } /* * missing_getopt_internal -- * Parse argc/argv argument vector. Called by user level routines. * Returns -2 if -- is found (can be long option or end of options marker). */ static int missing_getopt_internal(int nargc, char **nargv, const char *options) { char *oli; /* option letter list index */ int optchar; _DIAGASSERT(nargv != NULL); _DIAGASSERT(options != NULL); optarg = NULL; /* * XXX Some programs (like rsyncd) expect to be able to * XXX re-initialize optind to 0 and have getopt_long(3) * XXX properly function again. Work around this braindamage. */ if (optind == 0) optind = 1; if (optreset) nonopt_start = nonopt_end = -1; start: if (optreset || !*place) { /* update scanning pointer */ optreset = 0; if (optind >= nargc) { /* end of argument vector */ place = EMSG; if (nonopt_end != -1) { /* do permutation, if we have to */ permute_args(nonopt_start, nonopt_end, optind, nargv); optind -= nonopt_end - nonopt_start; } else if (nonopt_start != -1) { /* * If we skipped non-options, set optind * to the first of them. */ optind = nonopt_start; } nonopt_start = nonopt_end = -1; return -1; } if ((*(place = nargv[optind]) != '-') || (place[1] == '\0')) { /* found non-option */ place = EMSG; if (IN_ORDER) { /* * GNU extension: * return non-option as argument to option 1 */ optarg = nargv[optind++]; return INORDER; } if (!PERMUTE) { /* * if no permutation wanted, stop parsing * at first non-option */ return -1; } /* do permutation */ if (nonopt_start == -1) nonopt_start = optind; else if (nonopt_end != -1) { permute_args(nonopt_start, nonopt_end, optind, nargv); nonopt_start = optind - (nonopt_end - nonopt_start); nonopt_end = -1; } optind++; /* process next argument */ goto start; } if (nonopt_start != -1 && nonopt_end == -1) nonopt_end = optind; if (place[1] && *++place == '-') { /* found "--" */ place++; return -2; } } if ((optchar = (int)*place++) == (int)':' || (oli = strchr(options + (IGNORE_FIRST ? 1 : 0), optchar)) == NULL) { /* option letter unknown or ':' */ if (!*place) ++optind; optopt = optchar; return BADCH; } if (optchar == 'W' && oli[1] == ';') { /* -W long-option */ /* XXX: what if no long options provided (called by getopt)? */ if (*place) return -2; if (++optind >= nargc) { /* no arg */ place = EMSG; optopt = optchar; return BADARG; } else /* white space */ place = nargv[optind]; /* * Handle -W arg the same as --arg (which causes getopt to * stop parsing). */ return -2; } if (*++oli != ':') { /* doesn't take argument */ if (!*place) ++optind; } else { /* takes (optional) argument */ optarg = NULL; if (*place) /* no white space */ optarg = __UNCONST(place); /* XXX: disable test for :: if PC? (GNU doesn't) */ else if (oli[1] != ':') { /* arg not optional */ if (++optind >= nargc) { /* no arg */ place = EMSG; optopt = optchar; return BADARG; } else optarg = nargv[optind]; } place = EMSG; ++optind; } /* dump back option letter */ return optchar; } /* * getopt_long -- * Parse argc/argv argument vector. */ int missing_getopt_long(int nargc, char * const *nargv, const char *options, const struct option *long_options, int *idx) { int retval; #define IDENTICAL_INTERPRETATION(_x, _y) \ (long_options[(_x)].has_arg == long_options[(_y)].has_arg && \ long_options[(_x)].flag == long_options[(_y)].flag && \ long_options[(_x)].val == long_options[(_y)].val) if (nargv == NULL || options == NULL || long_options == NULL) { printf("getopt_long assertions failed!"); exit(42); } /* idx may be NULL */ retval = missing_getopt_internal(nargc, __UNCONST(nargv), options); if (retval == -2) { char *current_argv, *has_equal; size_t current_argv_len; int i, ambiguous, match; current_argv = __UNCONST(place); match = -1; ambiguous = 0; optind++; place = EMSG; if (*current_argv == '\0') { /* found "--" */ /* * We found an option (--), so if we skipped * non-options, we have to permute. */ if (nonopt_end != -1) { permute_args(nonopt_start, nonopt_end, optind, __UNCONST(nargv)); optind -= nonopt_end - nonopt_start; } nonopt_start = nonopt_end = -1; return -1; } if ((has_equal = strchr(current_argv, '=')) != NULL) { /* argument found (--option=arg) */ current_argv_len = has_equal - current_argv; has_equal++; } else current_argv_len = strlen(current_argv); for (i = 0; long_options[i].name; i++) { /* find matching long option */ if (strncmp(current_argv, long_options[i].name, current_argv_len)) continue; if (strlen(long_options[i].name) == (unsigned)current_argv_len) { /* exact match */ match = i; ambiguous = 0; break; } if (match == -1) /* partial match */ match = i; else if (!IDENTICAL_INTERPRETATION(i, match)) ambiguous = 1; } if (ambiguous) { /* ambiguous abbreviation */ optopt = 0; return BADCH; } if (match != -1) { /* option found */ if (long_options[match].has_arg == no_argument && has_equal) { /* * XXX: GNU sets optopt to val regardless of * flag */ if (long_options[match].flag == NULL) optopt = long_options[match].val; else optopt = 0; return BADARG; } if (long_options[match].has_arg == required_argument || long_options[match].has_arg == optional_argument) { if (has_equal) optarg = has_equal; else if (long_options[match].has_arg == required_argument) { /* * optional argument doesn't use * next nargv */ optarg = nargv[optind++]; } } if ((long_options[match].has_arg == required_argument) && (optarg == NULL)) { /* * Missing argument; leading ':' * indicates no error should be generated */ /* * XXX: GNU sets optopt to val regardless * of flag */ if (long_options[match].flag == NULL) optopt = long_options[match].val; else optopt = 0; --optind; return BADARG; } } else { /* unknown option */ optopt = 0; return BADCH; } if (long_options[match].flag) { *long_options[match].flag = long_options[match].val; retval = 0; } else retval = long_options[match].val; if (idx) *idx = match; } return retval; #undef IDENTICAL_INTERPRETATION } bwctl_1.5.4+dfsg1.orig/bwlib/rijndael-alg-fst.h0000664000076500007710000000365312560414557016221 0ustar /** * rijndael-alg-fst.h * * @version 3.0 (December 2000) * * Optimised ANSI C code for the Rijndael cipher (now AES) * * @author Vincent Rijmen * @author Antoon Bosselaers * @author Paulo Barreto * * This code is hereby placed in the public domain. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''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 AUTHORS 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. */ #ifndef __RIJNDAEL_ALG_FST_H #define __RIJNDAEL_ALG_FST_H #define MAXKC (256/32) #define MAXKB (256/8) #define MAXNR 14 typedef unsigned char u8; typedef unsigned short u16; typedef unsigned int u32; int rijndaelKeySetupEnc(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits); int rijndaelKeySetupDec(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits); void rijndaelEncrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 pt[16], u8 ct[16]); void rijndaelDecrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 ct[16], u8 pt[16]); #ifdef INTERMEDIATE_VALUE_KAT void rijndaelEncryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds); void rijndaelDecryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds); #endif /* INTERMEDIATE_VALUE_KAT */ #endif /* __RIJNDAEL_ALG_FST_H */ bwctl_1.5.4+dfsg1.orig/bwlib/endpoint.c0000664000076500007710000013136412560414557014712 0ustar /* * $Id$ */ /************************************************************************ * * * Copyright (C) 2003 * * Internet2 * * All Rights Reserved * * * ************************************************************************/ /* * File: endpoint.c * * Author: Jeff W. Boote * Internet2 * * Date: Tue Sep 16 14:25:57 MDT 2003 * * Description: * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include #include #include #include #include #include #include #include "bwlibP.h" #ifdef HAVE_THRULAY_CLIENT_H #include #endif #ifdef HAVE_THRULAY_SERVER_H #include #endif static int ipf_term; static int ipf_chld; static int ipf_intr; static int ipf_alrm; /* * Function: EndpointAlloc * * Description: * Allocate a record to keep track of the state information for * this endpoint. (Much of this state is also in the control record * and the TestSession record... May simplify this in the future * to just reference the other records.) * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ static BWLEndpoint EndpointAlloc( BWLTestSession tsess ) { BWLEndpoint ep = calloc(1,sizeof(BWLEndpointRec)); if(!ep){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno, "malloc(EndpointRec)"); return NULL; } ep->cntrl = tsess->cntrl; ep->tsess = tsess; ep->ssockfd = -1; ep->acceptval = BWL_CNTRL_INVALID; ep->wopts = WNOHANG; return ep; } /* * Function: EndpointClear * * Description: * Clear out any resources that are used in the Endpoint record * that are not needed in the parent process after the endpoint * forks off to do the actual test. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ static void EndpointClear( BWLEndpoint ep ) { if(!ep) return; if(ep->ssockfd > -1){ close(ep->ssockfd); ep->ssockfd = -1; } return; } /* * Function: EndpointFree * * Description: * completely free all resoruces associated with an endpoint record. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ static void EndpointFree( BWLEndpoint ep ) { if(!ep) return; EndpointClear(ep); free(ep); return; } static FILE * tfile( BWLTestSession tsess ) { char fname[PATH_MAX+1]; int fd; FILE *fp; strcpy(fname,tsess->cntrl->ctx->tmpdir); strcat(fname,_BWL_PATH_SEPARATOR); strcat(fname,_BWL_TMPFILEFMT); if((fd = mkstemp(fname)) < 0){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno, "mkstemp(%s): %M",fname); return NULL; } if( !(fp = fdopen(fd,"w+"))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno, "fdopen(%s:(%d)): %M",fname,fd); return NULL; } if(unlink(fname) != 0){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno, "unlink(%s): %M",fname); while((fclose(fp) != 0) && (errno == EINTR)); return NULL; } return fp; } /* * Function: epssock * * Description: * Open a server socket for the endpoint process. * Used for Peer communication. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ static int epssock( BWLTestSession tsess, uint16_t *peerport ) { int fd; int on; struct sockaddr *lsaddr; socklen_t lsaddrlen; struct sockaddr_storage sbuff; socklen_t sbuff_len = sizeof(sbuff); struct sockaddr *saddr = (struct sockaddr *)&sbuff; char nodebuff[MAXHOSTNAMELEN]; size_t nodebufflen = sizeof(nodebuff); uint16_t port; uint16_t p; BWLPortRange portrange=NULL; int saveerr=0; if( !(lsaddr = I2AddrSAddr(tsess->test_spec.server,&lsaddrlen))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,EINVAL, "epssock: Invalid server I2Addr"); return -1; } fd = socket(lsaddr->sa_family,SOCK_STREAM,IPPROTO_IP); if(fd < 0){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno, "Unable to open Endpoint Peer Server-Socket: %M"); return fd; } on=1; if(setsockopt(fd,SOL_SOCKET,SO_REUSEADDR,&on,sizeof(on)) != 0){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno, "setsockopt(SO_REUSEADDR): %M"); goto failsock; } #if defined(AF_INET6) && defined(IPPROTO_IPV6) && defined(IPV6_V6ONLY) on=0; if((lsaddr->sa_family == AF_INET6) && setsockopt(fd,IPPROTO_IPV6,IPV6_V6ONLY,&on,sizeof(on)) != 0){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno, "setsockopt(!IPV6_V6ONLY): %M"); goto failsock; } #endif if((portrange = (BWLPortRange)BWLContextConfigGetV(tsess->cntrl->ctx, BWLPeerPortRange))){ /* Initialize port range with 'random' value in range */ BWLPortsSetI(tsess->cntrl->ctx,portrange,(uint16_t)0); p = port = BWLPortsNext(portrange); } else{ p = port = 0; } do{ memset(&sbuff,0,sizeof(sbuff)); memcpy(&sbuff,lsaddr,lsaddrlen); /* type-punning!! */ /* Specify port number to use */ switch(lsaddr->sa_family){ struct sockaddr_in *s4; #ifdef AF_INET6 struct sockaddr_in6 *s6; case AF_INET6: s6 = (struct sockaddr_in6*)&sbuff; s6->sin6_port = htons(p); break; #endif case AF_INET: s4 = (struct sockaddr_in*)&sbuff; s4->sin_port = htons(p); break; default: BWLError(tsess->cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "Invalid address family for peer connection"); goto failsock; } if(bind(fd,(struct sockaddr *)&sbuff,lsaddrlen) == 0) goto bind_success; /* * If it failed, and we are not using a "range" then break out of * loop and report failure. (Or if the error is not EADDRINUSE.) */ if(!portrange || !BWLPortsRange(portrange) || (errno != EADDRINUSE)) goto bind_fail; /* * compute next port to try. */ p = BWLPortsNext(portrange); } while(p != port); saveerr = errno; BWLError(tsess->cntrl->ctx,BWLErrFATAL,BWLErrUNKNOWN, "Full PeerPortRange exhausted"); bind_fail: if(!saveerr) saveerr = errno; BWLError(tsess->cntrl->ctx,BWLErrFATAL,saveerr,"bind([%s]:%d): %M", I2AddrNodeName(tsess->test_spec.server,nodebuff,&nodebufflen),p); goto failsock; bind_success: /* set listen backlog to 1 - we only expect 1 client */ if(listen(fd,1) != 0){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"listen(): %M"); goto failsock; } if(p!=0){ *peerport = p; } else{ /* * Retrieve the ephemeral port picked by the system. */ memset(&sbuff,0,sizeof(sbuff)); if(getsockname(fd,(void*)&sbuff,&sbuff_len) != 0){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"getsockname(): %M"); goto failsock; } switch(saddr->sa_family){ struct sockaddr_in saddr4; #ifdef AF_INET6 struct sockaddr_in6 saddr6; case AF_INET6: memcpy(&saddr6,saddr,sizeof(saddr6)); *peerport = ntohs(saddr6.sin6_port); break; #endif case AF_INET: memcpy(&saddr4,saddr,sizeof(saddr4)); *peerport = ntohs(saddr4.sin_port); break; default: BWLError(tsess->cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "Endpoint control socket: Invalid AF(%d)", saddr->sa_family); goto failsock; } } return fd; failsock: while((close(fd) < 0) && (errno == EINTR)); return -1; } #define _BWLGetSIDAESKEY "V._BWLGetSIDAESKEY" static BWLBoolean getsidaeskey( BWLContext ctx, const BWLUserID userid __attribute__((unused)), BWLKey key_ret, BWLErrSeverity *err_ret ) { uint8_t *sidbytes; if(!(sidbytes = (uint8_t*)BWLContextConfigGetV(ctx,_BWLGetSIDAESKEY))){ BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "getsidaeskey: _BWLGetSIDAESKEY not set"); *err_ret = BWLErrFATAL; return False; } memcpy(key_ret,sidbytes,sizeof(BWLKey)); return True; } int signo_caught; static void sig_catch( int signo ) { signo_caught = signo; switch(signo){ case SIGTERM: case SIGINT: case SIGHUP: ipf_term++; break; case SIGALRM: ipf_alrm++; break; case SIGCHLD: ipf_chld++; /* * return - don't want sigchld to interrupt I/O */ return; break; default: BWLError(NULL,BWLErrFATAL,BWLErrUNKNOWN, "sig_catch: Invalid signal(%d)",signo); abort(); } ipf_intr++; return; } /* * This function redirects stdout to the tmpfile that was created * to hold the result, and then waits until it should fire off * the test - and then exec's. * * Child process: * Redirects I/O, resets signal environment. * Does tool specific preparation (command-line mapping). * Waits until test should actually run. * Invokes tool specific test running. */ static void run_tool( BWLEndpoint ep ) { BWLTestSession tsess = ep->tsess; BWLContext ctx = tsess->cntrl->ctx; int nullfd; int outfd = fileno(tsess->localfp); struct sigaction act; BWLTimeStamp currtime; BWLNum64 reltime; struct timespec ts_sleep; struct timespec ts_remain; void *closure; const char *tname; char addr_str[INET6_ADDRSTRLEN]; /* * Open /dev/null to dup to stdin before the exec. */ if( (nullfd = open(_BWL_DEV_NULL,O_RDONLY)) < 0){ BWLError(ctx,BWLErrFATAL,errno,"open(/dev/null): %M"); exit(BWL_CNTRL_FAILURE); } /* * Dup std in/out/err so exec'd tools see a normal environment */ if( (dup2(nullfd,STDIN_FILENO) < 0) || (dup2(outfd,STDOUT_FILENO) < 0) || (dup2(outfd,STDERR_FILENO) < 0)){ BWLError(ctx,BWLErrFATAL,errno,"dup2(): %M"); exit(BWL_CNTRL_FAILURE); } /* * Update the tsess local file fp to use the dup'd fd */ if(!(tsess->localfp = fdopen(STDOUT_FILENO,"a"))){ BWLError(ctx,BWLErrFATAL,errno,"fdopen(STDOUT): %M"); exit(BWL_CNTRL_FAILURE); } /* * Tool specific test preparation: * Also should put a comment in the output file indicating the 'args' * that were actually run.) */ if( !(closure = _BWLToolPreRunTest(ctx,tsess))){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "run_tool: Unable to prepare test"); exit(BWL_CNTRL_FAILURE); } /* * Reset ignored signals to default * * (exec will reset set signals to default, but leaves ignored signals * as is - this is confusing for some tools. i.e. some tools depend * on getting sigpipe.) */ memset(&act,0,sizeof(act)); act.sa_handler = SIG_DFL; sigemptyset(&act.sa_mask); if( (sigaction(SIGPIPE,&act,NULL) != 0) || (sigaction(SIGALRM,&act,NULL) != 0)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"sigaction(): %M"); exit(BWL_CNTRL_FAILURE); } /* * Compute the time until the test should start. */ if(!BWLGetTimeStamp(ctx,&currtime)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "BWLGetTimeStamp(): %M"); exit(BWL_CNTRL_FAILURE); } if(ipf_term) exit(BWL_CNTRL_FAILURE); if(BWLNum64Cmp(tsess->reserve_time,currtime.tstamp) < 0){ BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "run_tool(): Too LATE!"); exit(BWL_CNTRL_FAILURE); } reltime = BWLNum64Sub(tsess->reserve_time,currtime.tstamp); /* * Use the error estimates rounded up to 1 second, and start the * recv side that much before the test time. */ if(tsess->conf_server){ if(BWLNum64Cmp(reltime,tsess->fuzz) > 0){ reltime = BWLNum64Sub(reltime,tsess->fuzz); } else{ reltime = BWLULongToNum64(0); } } timespecclear(&ts_sleep); timespecclear(&ts_remain); BWLNum64ToTimespec(&ts_sleep,reltime); while(timespecisset(&ts_sleep)){ if(nanosleep(&ts_sleep,&ts_remain) == 0){ break; } if(ipf_term) exit(BWL_CNTRL_FAILURE); ts_sleep = ts_remain; } /* * Report some information about this test. */ if (tsess->test_spec.verbose) { tname = BWLToolGetNameByID(ctx,tsess->test_spec.tool_id); fprintf(tsess->localfp,"bwctl: run_tool: tester: %s\n",((tname)?tname:"unknown")); if( BWLAddrNodeName(ctx, tsess->test_spec.server, addr_str, sizeof(addr_str), NI_NUMERICHOST) != 0) { fprintf(tsess->localfp,"bwctl: run_tool: %s: %s\n", (tsess->test_spec.server_sends?"sender":"receiver"),addr_str); } if( BWLAddrNodeName(ctx, tsess->test_spec.client, addr_str, sizeof(addr_str), NI_NUMERICHOST) != 0) { fprintf(tsess->localfp,"bwctl: run_tool: %s: %s\n", (tsess->test_spec.server_sends?"receiver":"sender"),addr_str); } BWLGetTimeStamp(ctx,&currtime); fprintf(tsess->localfp,"bwctl: start_tool: %f\n", BWLNum64ToDouble(currtime.tstamp)); } fflush(tsess->localfp); _BWLToolRunTest(ctx,tsess,closure); /*NOTREACHED*/ } BWLBoolean _BWLEndpointStart( BWLTestSession tsess, uint16_t *peerport, BWLErrSeverity *err_ret ) { BWLContext ctx = tsess->cntrl->ctx; BWLEndpoint ep; BWLGetAESKeyFunc getaeskey = getsidaeskey; sigset_t sigs; sigset_t osigs; struct sigaction act; BWLTimeStamp currtime; BWLTimeStamp rtime; BWLTimeStamp currtime2; BWLNum64 reltime; struct itimerval itval; BWLAcceptType aval = BWL_CNTRL_FAILURE; fd_set readfds; fd_set exceptfds; int max_readfd; int rc=0; BWLRequestType msgtype = BWLReqInvalid; uint32_t mode; int dead_child; int alarm_set; char nambuf[MAXHOSTNAMELEN+8]; /* 8 chars for '[]:port\0' */ size_t nambuflen = sizeof(nambuf); char addr_str[INET6_ADDRSTRLEN]; BWLAcceptType acceptval; if( !(tsess->localfp = tfile(tsess)) || !(tsess->remotefp = tfile(tsess))){ return False; } if( !(ep=EndpointAlloc(tsess))){ return False; } if(tsess->conf_server && !tsess->test_spec.no_server_endpoint){ if((ep->ssockfd = epssock(tsess,peerport)) < 0){ EndpointFree(ep); return False; } } /* * sigprocmask to block signals before the fork. Then * install new sig handlers in the child before unblocking * them. In the parent, just unblock them. (The sigprocmask * is needed to stop the possible race condition of the parent registered * sig hanglers being called in the child process before the child ones * are registered.) */ sigemptyset(&sigs); sigaddset(&sigs,SIGTERM); sigaddset(&sigs,SIGINT); sigaddset(&sigs,SIGCHLD); sigaddset(&sigs,SIGALRM); if(sigprocmask(SIG_BLOCK,&sigs,&osigs) != 0){ BWLError(ctx,BWLErrFATAL,errno,"sigprocmask(): %M"); EndpointFree(ep); return False; } tsess->endpoint = ep; ep->child = fork(); if(ep->child < 0){ /* fork error */ int serr = errno; (void)sigprocmask(SIG_SETMASK,&osigs,NULL); BWLError(ctx,BWLErrFATAL,serr,"fork(): %M"); EndpointFree(ep); tsess->endpoint = NULL; return False; } if(ep->child > 0){ /* parent */ int cstatus; if(sigprocmask(SIG_SETMASK,&osigs,NULL) != 0){ BWLError(ctx,BWLErrFATAL,errno,"sigprocmask(): %M"); killpg(ep->child,SIGINT); ep->wopts &= ~WNOHANG; while((waitpid(ep->child,&cstatus,ep->wopts) < 0) && (errno == EINTR)); EndpointFree(ep); tsess->endpoint = NULL; return False; } EndpointClear(ep); /* * Keep localfp and remotefp open. The ProcessResults * function is called from this process. */ return True; } /* child */ /* * Set the process group to the PID of the child. This will get overwritten * later, but do it here so we can do "killpg(ep->child)" whether we have * forked the tester or not. */ setpgid(0, 0); /* * Set sig handlers */ ipf_alrm = ipf_term = ipf_intr = ipf_chld = 0; memset(&act,0,sizeof(act)); act.sa_handler = sig_catch; sigemptyset(&act.sa_mask); if( (sigaction(SIGTERM,&act,NULL) != 0) || (sigaction(SIGINT,&act,NULL) != 0) || (sigaction(SIGCHLD,&act,NULL) != 0) || (sigaction(SIGALRM,&act,NULL) != 0) || (sigaction(SIGHUP,&act,NULL) != 0) ){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"sigaction(): %M"); exit(BWL_CNTRL_FAILURE); } if(sigprocmask(SIG_SETMASK,&osigs,NULL) != 0){ BWLError(ctx,BWLErrFATAL,errno,"sigprocmask(): %M"); exit(BWL_CNTRL_FAILURE); } if(ipf_term){ BWLError(ctx,BWLErrFATAL,errno,"Caught SIGTERM!"); exit(BWL_CNTRL_FAILURE); } #ifndef NDEBUG /* * busy loop to wait for debugger attachment */ { void *waitfor = BWLContextConfigGetV(ctx,BWLChildWait); /* * Syslog will print the PID making it easier to 'attach' * from a debugger. */ if(waitfor){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"waitfor!"); } while(waitfor); } #endif /* * Now setup the peer control connection */ /* * Reset the GetAESKey function to use the SID for the AESKey in * the Endpoint to Endpoint control connection setup. */ if( !BWLContextConfigSet(ctx,BWLGetAESKey,(BWLFunc)getaeskey) || !BWLContextConfigSet(ctx,_BWLGetSIDAESKEY,(void *)tsess->sid) || !BWLContextConfigSet(ctx,BWLInterruptIO,(void*)&ipf_intr) ){ BWLError(ctx,BWLErrFATAL,errno, "Unable to set for Context vars for endpoint: %M"); goto end; } (void)BWLContextConfigDelete(ctx,BWLCheckControlPolicy); (void)BWLContextConfigDelete(ctx,BWLCheckTestPolicy); (void)BWLContextConfigDelete(ctx,BWLTestComplete); (void)BWLContextConfigDelete(ctx,BWLProcessResults); /* * Set a timer - if we have not established a connection with * the remote endpoint before the time the test should start, * exit. */ if(!BWLGetTimeStamp(ctx,&currtime)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "BWLGetTimeStamp(): %M"); goto end; } if (tsess->test_spec.verbose) { fprintf(tsess->localfp,"bwctl: start_endpoint: %f\n", BWLNum64ToDouble(currtime.tstamp)); if( BWLAddrNodeName(ctx, tsess->test_spec.server, addr_str, sizeof(addr_str), NI_NUMERICHOST) != 0) { fprintf(tsess->localfp,"bwctl: run_endpoint: %s: %s\n", (tsess->test_spec.server_sends?"sender":"receiver"),addr_str); } if( BWLAddrNodeName(ctx, tsess->test_spec.client, addr_str, sizeof(addr_str), NI_NUMERICHOST) != 0) { fprintf(tsess->localfp,"bwctl: run_endpoint: %s: %s\n", (tsess->test_spec.server_sends?"receiver":"sender"),addr_str); } fflush(tsess->localfp); } if(BWLNum64Cmp(tsess->reserve_time,currtime.tstamp) < 0){ BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "endpoint to endpoint setup too late"); goto end; } reltime = BWLNum64Sub(tsess->reserve_time,currtime.tstamp); #if defined NOT BWLError(ctx,BWLErrDEBUG,BWLErrINVALID, "currtime = %f, reservation = %f, reltime = %f", BWLNum64ToDouble(currtime.tstamp), BWLNum64ToDouble(tsess->reserve_time), BWLNum64ToDouble(reltime) ); BWLError(ctx,BWLErrDEBUG,BWLErrINVALID, "inter = %d, catchval = %d",ipf_intr,signo_caught); #endif memset(&itval,0,sizeof(itval)); BWLNum64ToTimeval(&itval.it_value,reltime); if(setitimer(ITIMER_REAL,&itval,NULL) != 0){ BWLError(ctx,BWLErrFATAL,errno,"setitimer(): %M"); goto end; } /* * Determine what "mode" the peer connection should happen at. * The server side should be willing to do anything as strict or * more strict than it does. The client should be the same, but * it should use the "least" strict mode that matches so set * the BWL_MODE_LEAST_RESTRICTIVE bit for the call to BWLControlOpen. */ mode = BWL_MODE_LEAST_RESTRICTIVE; switch(tsess->cntrl->mode){ case BWL_MODE_OPEN: mode |= BWL_MODE_OPEN; /*fall through*/ case BWL_MODE_AUTHENTICATED: mode |= BWL_MODE_AUTHENTICATED; /*fall through*/ case BWL_MODE_ENCRYPTED: mode |= BWL_MODE_ENCRYPTED; break; default: BWLError(tsess->cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "Endpoint: Invalid session mode"); } if(tsess->conf_server && !tsess->test_spec.no_server_endpoint){ struct sockaddr *ssaddr; socklen_t ssaddrlen; struct sockaddr_storage sbuff; socklen_t sbuff_len; int connfd; if( !(ssaddr = I2AddrSAddr(tsess->test_spec.client,&ssaddrlen))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,EINVAL, "_BWLEndpointStart: Invalid client I2Addr"); goto end; } ACCEPT: sbuff_len = sizeof(sbuff); connfd = accept(ep->ssockfd,(struct sockaddr *)&sbuff, &sbuff_len); if(connfd < 0){ if(errno == EINTR && !ipf_intr){ goto ACCEPT; } BWLError(ctx,BWLErrFATAL,errno, "Endpoint peer connection could not accept(): listening at port(%d) : %M", *peerport); fprintf(tsess->localfp, "bwctl: Remote \'client\' (%s) never initiated handshake: listening at port(%d) - canceling\n", I2AddrNodeName(tsess->test_spec.client,nambuf,&nambuflen), *peerport ); if(ipf_intr){ BWLError(tsess->cntrl->ctx,BWLErrFATAL, BWLErrINVALID, "Endpoint: Signal = %d",signo_caught); } goto end; } /* * Only allow connections from the remote testaddr */ if(I2SockAddrEqual(ssaddr,ssaddrlen, (struct sockaddr *)&sbuff,sbuff_len, I2SADDR_ADDR) <= 0){ BWLError(ctx,BWLErrFATAL,BWLErrPOLICY, "Connect from unknown addr, assuming NAT"); } close(ep->ssockfd); ep->ssockfd = -1; ep->rcntrl = BWLControlAccept(ctx,connfd, (struct sockaddr *)&sbuff,sbuff_len, mode,currtime.tstamp, &ipf_intr,err_ret); } if (tsess->conf_client && !tsess->test_spec.no_server_endpoint) { /* * Copy remote address, with modified port number * and other fields for contacting remote host. */ const char *local = NULL; char local_addr_str[1024]; const char *remote_str = NULL; char remote_addr_str[1024]; I2Addr remote = NULL; BWLToolAvailability tavail = 0; if( BWLAddrNodeName(ctx, tsess->test_spec.client, local_addr_str, sizeof(local_addr_str), NI_NUMERICHOST) != 0) { local = local_addr_str; } if( BWLAddrNodeName(ctx, tsess->test_spec.server, remote_addr_str, sizeof(remote_addr_str), NI_NUMERICHOST) != 0) { remote_str = remote_addr_str; } // create a new address for the endpoint (remote address + peerport) if (remote_str) { remote = I2AddrByNode(BWLContextErrHandle(ctx), remote_str); if (remote) { if(!(I2AddrSetPort(remote,*peerport))){ I2AddrFree(remote); remote = NULL; } } } if(!local || !remote){ BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "Endpoint: Unable to alloc peer addrs: %M"); goto end; } ep->rcntrl = BWLControlOpen(ctx,local,remote,mode,"endpoint",NULL, &tavail,err_ret); if(!ep->rcntrl){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno, "Endpoint: Unable to connect to Peer([%s]:%d): %M", remote_str, *peerport ); fprintf(tsess->localfp, "bwctl: Unable to initiate peer handshake with [%s]:%d - canceling\n", remote_str, *peerport ); } } if((!tsess->test_spec.no_server_endpoint && !ep->rcntrl) || ipf_term || ipf_alrm){ goto end; } /* * Setup dynamic window if tcp test. */ if(!tsess->test_spec.udp && tsess->test_spec.dynamic_window_size){ /* * TODO: * gets bottleneck capacity from context (set via config) * Uses BWLGetRTTBound(ep->rcntrl) for rtt estimate * * Eventually, this could send ICMP packets and use * inter-packet arrival times to estimate bottleneck capacity. * (Will this take too much time for scheduling purposes?) * * Reset window_size based on the results. */ uint64_t bnc; if( BWLContextConfigGetU64(ctx,BWLBottleNeckCapacity,&bnc)){ double dbnc = (double)bnc; double rtt; if (ep->rcntrl) { rtt = BWLNum64ToDouble(BWLGetRTTBound(ep->rcntrl)); } else { rtt = 1.0; } dbnc *= rtt / 8 * 1.1; /* * Don't worry about overflow... We wouldn't want a window * larger than can be represented as a 32bit int anyway... */ tsess->test_spec.window_size = (uint32_t)dbnc; } } /* * Now fork again. The child will go on to "exec" iperf at the * appropriate time. The parent will exchange timestamps with the other * endpoint for time-sync validation and then trade the test results * upon completion of the test. */ ep->child = fork(); if(ep->child < 0){ /* fork error */ BWLError(ctx,BWLErrFATAL,errno,"fork(): %M"); exit(BWL_CNTRL_FAILURE); } if(ep->child == 0){ /* Run the tool in the child process. */ /* * Set the process group to the PID of the child. All its children should * inherit that process group. */ setpgid(0, 0); run_tool(ep); /* NOTREACHED */ } /* * Now that we have established communication, and forked off the * test: reset the timer for just past the end of the test period. * (one second past the session time plus the fuzz time.) */ if(!BWLGetTimeStamp(ctx,&currtime)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "PeerAgent: BWLGetTimeStamp(): %M"); goto end; } if(BWLNum64Cmp(tsess->reserve_time,currtime.tstamp) < 0){ BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "PeerAgent: endpoint to endpoint setup too late"); goto end; } /* Timer for end-of-test */ reltime = BWLNum64Sub(tsess->reserve_time,currtime.tstamp); reltime = BWLNum64Add(reltime,tsess->fuzz); reltime = BWLNum64Add(reltime, BWLULongToNum64(tsess->test_spec.duration)); reltime = BWLNum64Add(reltime, BWLULongToNum64(tsess->test_spec.omit)); memset(&itval,0,sizeof(itval)); BWLNum64ToTimeval(&itval.it_value,reltime); if(setitimer(ITIMER_REAL,&itval,NULL) != 0){ BWLError(ctx,BWLErrFATAL,errno,"PeerAgent: setitimer(): %M"); goto end; } if(ipf_term){ BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "PeerAgent: Catching SIGTERM..."); goto end; } if (ep->rcntrl) { if(tsess->conf_server){ if(BWLReadRequestType(ep->rcntrl,&ipf_intr) != BWLReqTime){ BWLError(ctx,BWLErrFATAL,errno, "PeerAgent: Invalid message from peer"); goto end; } if(BWLProcessTimeRequest(ep->rcntrl,&ipf_intr) != BWLErrOK){ BWLError(ctx,BWLErrFATAL,errno, "PeerAgent: Unable to process time request for peer"); goto end; } }else{ /* * Make sure two clocks are synchronized enough that * sessions will start when they should. */ double t1,t2,tr; double e1,e2,er; if(BWLControlTimeCheck(ep->rcntrl,&rtime) != BWLErrOK){ BWLError(ctx,BWLErrFATAL,errno, "PeerAgent: BWLControlTimeCheck(): %M"); goto end; } if(!BWLGetTimeStamp(ctx,&currtime2)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "PeerAgent: BWLGetTimeStamp(): %M"); goto end; } t1 = BWLNum64ToDouble(currtime.tstamp); t2 = BWLNum64ToDouble(currtime2.tstamp); tr = BWLNum64ToDouble(rtime.tstamp); e1 = BWLNum64ToDouble(BWLGetTimeStampError(&currtime)); e2 = BWLNum64ToDouble(BWLGetTimeStampError(&currtime2)); er = BWLNum64ToDouble(BWLGetTimeStampError(&rtime)); if((t1-e1) > (tr+er)){ BWLError(ctx,BWLErrFATAL,errno, "PeerAgent: Remote clock is at least %f(secs) " "ahead of local, NTP only indicates %f(secs) error, failing", t1-tr,e1+er); fprintf(tsess->localfp, "bwctl: Remote clock is at least %f(secs) ahead of local," " NTP only indicates %f(secs) error, failing\n", t1-tr,e1+er); ipf_intr = 1; } else if((tr-er) > (t2+e2)){ BWLError(ctx,BWLErrFATAL,errno, "PeerAgent: Remote clock is at least %f(secs) " "behind local, NTP only indicates %f(secs) error, failing", tr-t2,e2+er); fprintf(tsess->localfp, "PeerAgent: Remote clock is at least %f(secs) behind local," " NTP only indicates %f(secs) error, failing\n", tr-t2,e2+er); ipf_intr = 1; } } /* * Fake rcntrl socket into "test" mode and set it up to trade results. */ ep->rcntrl->tests = tsess; tsess->cntrl = ep->rcntrl; tsess->closure = NULL; ep->rcntrl->state |= _BWLStateTest; } FD_ZERO(&readfds); if (ep->rcntrl) { FD_SET(ep->rcntrl->sockfd,&readfds); max_readfd = ep->rcntrl->sockfd; } else { max_readfd = -1; } exceptfds = readfds; /* Earliest time test should complete */ currtime2.tstamp = BWLNum64Sub(tsess->reserve_time,tsess->fuzz); currtime2.tstamp = BWLNum64Add(currtime2.tstamp, BWLULongToNum64(tsess->test_spec.duration)); currtime2.tstamp = BWLNum64Add(currtime2.tstamp, BWLULongToNum64(tsess->test_spec.omit)); /* * Wait for something to do: * Peer message - remote stopping test * Child exit - local side complete (or failed) * Timer expire - test hung? * TERM signal - parent killing this. */ while(!rc && !ipf_intr){ rc = select(max_readfd + 1,&readfds,NULL,&exceptfds,NULL); } /* * Did alarm go off? (Is the test hung?) */ alarm_set = ipf_alrm; /* * We ran into an issue where the client would finish and send a * StopSession message before the server was finished (The race condition * described in comments below). The idea with the subsequent sleep is to * pause for (hopefully) long enough for iperf to finish up. * * FIXME: we need a more elegant way to do this */ if(rc > 0){ struct timeval tv; BWLNum64ToTimeval(&tv, tsess->fuzz); assert(tv.tv_sec >= 0); sleep((unsigned)tv.tv_sec); } /* * Get current time */ BWLGetTimeStamp(ctx,&currtime); /* * unset itimer */ memset(&itval,0,sizeof(itval)); if(setitimer(ITIMER_REAL,&itval,NULL) != 0){ BWLError(ctx,BWLErrFATAL,errno,"PeerAgent: setitimer(): %M"); } /* * Is tester dead before it is killed? */ dead_child = ipf_chld; /* * send a graceful kill to the child (If already dead, errno will be ESRCH) * * There is an unlikely race condition: * The client side will finish first, it is technically possible that it * will exit, and the PeerAgent watching it exit will send the StopSession * message to the reciever PeerAgent. It is *possible* that the StopSession * message could get to the reciver PeerAgent before the tester-tool * server process ends. * * This is unlikely since it will do things like fetch the timestamp * above before sending the message, and it will have to traverse the * same network as the tester tool... However, it may eventually be * prudent to wait 'errest' after the client process finishes before * sending the StopSession message. */ if(!ipf_chld && ep->child){ if(tsess->tool->kill(ctx,ep->child,0) == True) { ep->killed = True; } else { /* kill failed */ BWLError(ctx,BWLErrFATAL,errno, "PeerAgent: kill(): Unable to gracefully kill test endpoint, pid=%d: %M", ep->child); exit(BWL_CNTRL_FAILURE); } } if(ipf_term){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "PeerAgent: Caught termination signal, test exiting"); goto end; } /* * Handle unexpected error condition - goto is C's exception * handler. */ if(rc > 0){ if(!FD_ISSET(ep->rcntrl->sockfd,&readfds)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "PeerAgent: select(): peer connection not ready?"); goto end; } } /* * Wait for the child to exit */ sleep(1); /* * * Get child exit status * */ if(!_BWLEndpointStatus(ctx,tsess,&ep->acceptval,err_ret)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "PeerAgent: _BWLEndpointStatus failed"); exit(BWL_CNTRL_FAILURE); } /* * If acceptval < 0, then test process is still running. Pull-out the * big gun (SIGKILL). */ if(ep->child && (ep->acceptval < 0)){ BWLError(ctx,BWLErrDEBUG,errno, "PeerAgent: Killing tester with SIGKILL, pid=%d", ep->child); if(tsess->tool->kill(ctx,ep->child,1) == False) { /* kill failed */ BWLError(ctx,BWLErrFATAL,errno, "PeerAgent: Unable to kill test endpoint, pid=%d: %M", ep->child); exit(BWL_CNTRL_FAILURE); } /* * call Status again, but this time wait for the process to end. */ ep->wopts &= ~WNOHANG; if(!_BWLEndpointStatus(ctx,tsess,&ep->acceptval,err_ret)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "PeerAgent: _BWLEndpointStatus failed"); exit(BWL_CNTRL_FAILURE); } } /* * Report if test completed early. */ if(BWLNum64Cmp(currtime.tstamp,currtime2.tstamp) < 0){ /* * Child exited early */ if(dead_child && ep->exit_status){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "PeerAgent: Local tool exited before expected with status=%d", ep->exit_status); fprintf(tsess->localfp, "bwctl: local tool exited before expected with status=%d\n", ep->exit_status); } /* * Peer stopped test early */ if(rc > 0){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "PeerAgent: Peer cancelled test before expected"); fprintf(tsess->localfp,"\nbwctl: remote peer cancelled test\n"); } } /* * Report if the local test had to be killed. */ if(alarm_set){ // try to make sure these print on their own line fprintf(tsess->localfp, "\nbwctl: local tool did not complete in allocated time frame and was killed\n"); } /* * Prepare data to send to peer * Print 'final' data of local tool */ if (tsess->test_spec.verbose) { fprintf(tsess->localfp,"bwctl: stop_tool: %f\n", BWLNum64ToDouble(currtime.tstamp)); fflush(tsess->localfp); } if (ep->rcntrl) { /* * Make sure that the reading/writing StopSession doesn't hang indefinitely. */ itval.it_value.tv_sec = 60; itval.it_value.tv_usec = 0; if(setitimer(ITIMER_REAL,&itval,NULL) != 0){ BWLError(ctx,BWLErrFATAL,errno,"setitimer(): %M"); goto end; } /* * Write StopSession to peer to send test results from this side. */ *err_ret = _BWLWriteStopSession(ep->rcntrl,&ipf_intr,ep->acceptval, tsess->localfp); if(*err_ret != BWLErrOK){ BWLError(ctx,BWLErrFATAL,errno, "PeerAgent: Unable to send StopSession to peer"); goto end; } /* * Is socket readable? Select again. If it was readable before, this * is a no-op. If not, this will wait until the peer StopSession * message comes. * * XXX: Need a timeout here? */ /* if earlier selected ended due to intr, reset rc to 0 so select called */ if(rc < 0) rc=0; while(!rc && !ipf_term){ rc = select(ep->rcntrl->sockfd+1,&readfds,NULL,&exceptfds,NULL); } if(ipf_term){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "PeerAgent: Caught termination signal, test exiting"); goto end; } /* * Socket ready, read StopSession message from peer. */ if(rc > 0){ msgtype = BWLReadRequestType(ep->rcntrl,&ipf_intr); switch(msgtype){ /* socket closed */ case 0: BWLError(ctx,BWLErrFATAL,errno,"PeerAgent: Test peer closed connection."); break; /* stop session message */ case 3: *err_ret = _BWLReadStopSession(ep->rcntrl,&ipf_intr,&aval, tsess->remotefp); break; /* anything else */ default: BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "PeerAgent: Invalid protocol message from test peer"); break; } } } end: if (tsess->test_spec.verbose) { fprintf(tsess->localfp,"bwctl: stop_endpoint: %f\n", BWLNum64ToDouble(currtime.tstamp)); } /* * Save acceptval because the BWLControlClose below can free the endpoint */ acceptval = ep->acceptval; if (ep->rcntrl) { BWLControlClose(ep->rcntrl); } BWLGetTimeStamp(ctx,&currtime); /* * aval == remote status * ep->acceptval == local status * * return status to parent. */ exit(aval & acceptval); } BWLBoolean _BWLEndpointStatus( BWLContext ctx, BWLTestSession tsess, BWLAcceptType *aval, /* out */ BWLErrSeverity *err_ret ) { pid_t p; int childstatus; BWLEndpoint ep = tsess->endpoint; *err_ret = BWLErrOK; if(!ep) return True; if(ep->acceptval < 0){ AGAIN: p = waitpid(ep->child,&childstatus,ep->wopts); if(p < 0){ if(errno == EINTR) goto AGAIN; BWLError(ctx,BWLErrWARNING, BWLErrUNKNOWN, "_BWLEndpointStatus: Can't query child #%d: %M", ep->child); ep->acceptval = BWL_CNTRL_FAILURE; *err_ret = BWLErrWARNING; return False; } else if(p > 0){ if(WIFEXITED(childstatus)){ ep->exit_status = WEXITSTATUS(childstatus); ep->acceptval = (ep->exit_status)? BWL_CNTRL_FAILURE : BWL_CNTRL_ACCEPT; } else if(WIFSIGNALED(childstatus)){ if(ep->killed){ ep->acceptval = BWL_CNTRL_REJECT; ep->exit_status = 0; } else{ BWLError(ctx,BWLErrWARNING,errno, "_BWLEndpointStatus: Child #%d exited from signal #%d", ep->child,WTERMSIG(childstatus)); ep->acceptval = BWL_CNTRL_FAILURE; /* signal number for exit value */ ep->exit_status = WTERMSIG(childstatus); } *err_ret = BWLErrWARNING; } } /* * if(p==0) process still running just fine - fall through. */ } *aval = ep->acceptval; return True; } BWLBoolean _BWLEndpointStop( BWLContext ctx, BWLTestSession tsess, BWLAcceptType aval, BWLErrSeverity *err_ret ) { int teststatus; BWLBoolean retval = False; BWLEndpoint ep = tsess->endpoint; if(!ep) return True; if((ep->acceptval >= 0) || (ep->child == 0)){ *err_ret = BWLErrOK; retval = True; goto done; } *err_ret = BWLErrFATAL; /* * If child already exited, kill will come back with ESRCH */ if(!ep->dont_kill){ if(killpg(ep->child,SIGTERM) != 0){ if(errno != ESRCH){ goto error; } } else{ fprintf(tsess->localfp,"bwctl: kill(%d,TERM): tester\n",ep->child); } ep->killed = True; } /* * Remove the WNOHANG bit. We need to wait until the exit status * is available. * (Should we add a timer to break out? No - not that paranoid yet.) */ ep->wopts &= ~WNOHANG; retval = _BWLEndpointStatus(ctx,tsess,&teststatus,err_ret); if(teststatus >= 0) goto done; error: BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "EndpointStop:Can't signal child #%d: %M",ep->child); done: if(aval < ep->acceptval){ aval = ep->acceptval; } ep->tsess->endpoint = NULL; EndpointFree(ep); return retval; } bwctl_1.5.4+dfsg1.orig/bwlib/error.c0000664000076500007710000000325112560414557014214 0ustar /* ** $Id$ */ /************************************************************************ * * * Copyright (C) 2003 * * Internet2 * * All Rights Reserved * * * ************************************************************************/ /* ** File: error.c ** ** Author: Jeff W. Boote ** ** Date: Tue Sep 16 14:26:09 MDT 2003 ** ** Description: * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include void BWLError_( BWLContext ctx, BWLErrSeverity severity, BWLErrType etype, const char *fmt, ... ) { va_list ap; /* * Don't report errors that are not at least as severe as errmaskprio */ if(severity > ctx->errmaskprio){ return; } va_start(ap,fmt); if(ctx && ctx->eh){ I2ErrLogVT(ctx->eh,(int)severity,(int)etype,fmt,ap); } else{ char buff[_BWL_ERR_MAXSTRING]; vsnprintf(buff,sizeof(buff),fmt,ap); fwrite(buff,sizeof(char),strlen(buff),stderr); fwrite("\n",sizeof(char),1,stderr); } va_end(ap); return; } bwctl_1.5.4+dfsg1.orig/bwlib/Makefile.in0000664000076500007710000020116212560414557014765 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$ # ######################################################################### # # # Copyright (C) 2003 # # Internet2 # # All Rights Reserved # # # ######################################################################### # # File: Makefile.am # # Author: Jeff Boote # Internet2 # # Date: Tue Sep 16 14:23:59 MDT 2003 # # Description: libbwlib build description. # INCLUDES = $(BWLINCS) $(I2UTILINCS) 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@ @TOOL_THRULAY_TRUE@am__append_1 = thrulay.c @TOOL_IPERF_TRUE@am__append_2 = iperf.c @TOOL_NUTTCP_TRUE@am__append_3 = nuttcp.c subdir = bwlib DIST_COMMON = $(I2utilinclude_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/c-attribute.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(I2utilincludedir)" LIBRARIES = $(lib_LIBRARIES) ARFLAGS = cru libbwlib_a_AR = $(AR) $(ARFLAGS) libbwlib_a_LIBADD = am__libbwlib_a_SOURCES_DIST = api.c capi.c sapi.c context.c error.c \ bwlibP.h protocol.c io.c endpoint.c time.c arithm64.c \ rijndael-alg-fst.c rijndael-alg-fst.h rijndael-api-fst.c \ rijndael-api-fst.h util.c daemon.c missing_getopt.c \ missing_getopt.h tools.c iperf3.c ping.c traceroute.c \ tracepath.c owamp.c paris-traceroute.c thrulay.c iperf.c \ nuttcp.c @TOOL_THRULAY_TRUE@am__objects_1 = libbwlib_a-thrulay.$(OBJEXT) @TOOL_IPERF_TRUE@am__objects_2 = libbwlib_a-iperf.$(OBJEXT) @TOOL_NUTTCP_TRUE@am__objects_3 = libbwlib_a-nuttcp.$(OBJEXT) am__objects_4 = libbwlib_a-tools.$(OBJEXT) libbwlib_a-iperf3.$(OBJEXT) \ libbwlib_a-ping.$(OBJEXT) libbwlib_a-traceroute.$(OBJEXT) \ libbwlib_a-tracepath.$(OBJEXT) libbwlib_a-owamp.$(OBJEXT) \ libbwlib_a-paris-traceroute.$(OBJEXT) $(am__objects_1) \ $(am__objects_2) $(am__objects_3) am_libbwlib_a_OBJECTS = libbwlib_a-api.$(OBJEXT) \ libbwlib_a-capi.$(OBJEXT) libbwlib_a-sapi.$(OBJEXT) \ libbwlib_a-context.$(OBJEXT) libbwlib_a-error.$(OBJEXT) \ libbwlib_a-protocol.$(OBJEXT) libbwlib_a-io.$(OBJEXT) \ libbwlib_a-endpoint.$(OBJEXT) libbwlib_a-time.$(OBJEXT) \ libbwlib_a-arithm64.$(OBJEXT) \ libbwlib_a-rijndael-alg-fst.$(OBJEXT) \ libbwlib_a-rijndael-api-fst.$(OBJEXT) \ libbwlib_a-util.$(OBJEXT) libbwlib_a-daemon.$(OBJEXT) \ libbwlib_a-missing_getopt.$(OBJEXT) $(am__objects_4) libbwlib_a_OBJECTS = $(am_libbwlib_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/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 = $(libbwlib_a_SOURCES) DIST_SOURCES = $(am__libbwlib_a_SOURCES_DIST) HEADERS = $(I2utilinclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 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@ 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@ MAN2HTML = @MAN2HTML@ 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_VERSION = @PACKAGE_VERSION@ PATCH_LEVEL = @PATCH_LEVEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TOP_BUILD_DIRS = @TOP_BUILD_DIRS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_aux_dir = @ac_aux_dir@ 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@ lt_ECHO = @lt_ECHO@ 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@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ lib_LIBRARIES = libbwlib.a libbwlib_a_SOURCES = api.c capi.c sapi.c context.c error.c bwlibP.h \ protocol.c io.c endpoint.c time.c arithm64.c \ rijndael-alg-fst.c rijndael-alg-fst.h \ rijndael-api-fst.c rijndael-api-fst.h \ util.c daemon.c missing_getopt.c missing_getopt.h \ $(TOOL_SOURCES) # add parent libbwlib_a_CFLAGS = -I.. TOOL_SOURCES = tools.c iperf3.c ping.c traceroute.c tracepath.c \ owamp.c paris-traceroute.c $(am__append_1) $(am__append_2) \ $(am__append_3) I2utilincludedir = $(pkgincludedir) I2utilinclude_HEADERS = bwlib.h all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bwlib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign bwlib/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 $(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 bwlib/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-libLIBRARIES: $(lib_LIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \ $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; } @$(POST_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ if test -f $$p; then \ $(am__strip_dir) \ echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \ ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \ else :; fi; \ done uninstall-libLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(libdir)' && rm -f "$$files" )"; \ cd "$(DESTDIR)$(libdir)" && rm -f $$files clean-libLIBRARIES: -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) libbwlib.a: $(libbwlib_a_OBJECTS) $(libbwlib_a_DEPENDENCIES) -rm -f libbwlib.a $(libbwlib_a_AR) libbwlib.a $(libbwlib_a_OBJECTS) $(libbwlib_a_LIBADD) $(RANLIB) libbwlib.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-api.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-arithm64.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-capi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-context.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-daemon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-endpoint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-iperf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-iperf3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-missing_getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-nuttcp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-owamp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-paris-traceroute.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-ping.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-protocol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-rijndael-alg-fst.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-rijndael-api-fst.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-sapi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-thrulay.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-tools.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-tracepath.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-traceroute.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbwlib_a-util.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 $@ $< libbwlib_a-api.o: api.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-api.o -MD -MP -MF $(DEPDIR)/libbwlib_a-api.Tpo -c -o libbwlib_a-api.o `test -f 'api.c' || echo '$(srcdir)/'`api.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-api.Tpo $(DEPDIR)/libbwlib_a-api.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='api.c' object='libbwlib_a-api.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-api.o `test -f 'api.c' || echo '$(srcdir)/'`api.c libbwlib_a-api.obj: api.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-api.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-api.Tpo -c -o libbwlib_a-api.obj `if test -f 'api.c'; then $(CYGPATH_W) 'api.c'; else $(CYGPATH_W) '$(srcdir)/api.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-api.Tpo $(DEPDIR)/libbwlib_a-api.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='api.c' object='libbwlib_a-api.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-api.obj `if test -f 'api.c'; then $(CYGPATH_W) 'api.c'; else $(CYGPATH_W) '$(srcdir)/api.c'; fi` libbwlib_a-capi.o: capi.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-capi.o -MD -MP -MF $(DEPDIR)/libbwlib_a-capi.Tpo -c -o libbwlib_a-capi.o `test -f 'capi.c' || echo '$(srcdir)/'`capi.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-capi.Tpo $(DEPDIR)/libbwlib_a-capi.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='capi.c' object='libbwlib_a-capi.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-capi.o `test -f 'capi.c' || echo '$(srcdir)/'`capi.c libbwlib_a-capi.obj: capi.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-capi.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-capi.Tpo -c -o libbwlib_a-capi.obj `if test -f 'capi.c'; then $(CYGPATH_W) 'capi.c'; else $(CYGPATH_W) '$(srcdir)/capi.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-capi.Tpo $(DEPDIR)/libbwlib_a-capi.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='capi.c' object='libbwlib_a-capi.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-capi.obj `if test -f 'capi.c'; then $(CYGPATH_W) 'capi.c'; else $(CYGPATH_W) '$(srcdir)/capi.c'; fi` libbwlib_a-sapi.o: sapi.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-sapi.o -MD -MP -MF $(DEPDIR)/libbwlib_a-sapi.Tpo -c -o libbwlib_a-sapi.o `test -f 'sapi.c' || echo '$(srcdir)/'`sapi.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-sapi.Tpo $(DEPDIR)/libbwlib_a-sapi.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sapi.c' object='libbwlib_a-sapi.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-sapi.o `test -f 'sapi.c' || echo '$(srcdir)/'`sapi.c libbwlib_a-sapi.obj: sapi.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-sapi.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-sapi.Tpo -c -o libbwlib_a-sapi.obj `if test -f 'sapi.c'; then $(CYGPATH_W) 'sapi.c'; else $(CYGPATH_W) '$(srcdir)/sapi.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-sapi.Tpo $(DEPDIR)/libbwlib_a-sapi.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sapi.c' object='libbwlib_a-sapi.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-sapi.obj `if test -f 'sapi.c'; then $(CYGPATH_W) 'sapi.c'; else $(CYGPATH_W) '$(srcdir)/sapi.c'; fi` libbwlib_a-context.o: context.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-context.o -MD -MP -MF $(DEPDIR)/libbwlib_a-context.Tpo -c -o libbwlib_a-context.o `test -f 'context.c' || echo '$(srcdir)/'`context.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-context.Tpo $(DEPDIR)/libbwlib_a-context.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='context.c' object='libbwlib_a-context.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-context.o `test -f 'context.c' || echo '$(srcdir)/'`context.c libbwlib_a-context.obj: context.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-context.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-context.Tpo -c -o libbwlib_a-context.obj `if test -f 'context.c'; then $(CYGPATH_W) 'context.c'; else $(CYGPATH_W) '$(srcdir)/context.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-context.Tpo $(DEPDIR)/libbwlib_a-context.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='context.c' object='libbwlib_a-context.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-context.obj `if test -f 'context.c'; then $(CYGPATH_W) 'context.c'; else $(CYGPATH_W) '$(srcdir)/context.c'; fi` libbwlib_a-error.o: error.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-error.o -MD -MP -MF $(DEPDIR)/libbwlib_a-error.Tpo -c -o libbwlib_a-error.o `test -f 'error.c' || echo '$(srcdir)/'`error.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-error.Tpo $(DEPDIR)/libbwlib_a-error.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='error.c' object='libbwlib_a-error.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-error.o `test -f 'error.c' || echo '$(srcdir)/'`error.c libbwlib_a-error.obj: error.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-error.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-error.Tpo -c -o libbwlib_a-error.obj `if test -f 'error.c'; then $(CYGPATH_W) 'error.c'; else $(CYGPATH_W) '$(srcdir)/error.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-error.Tpo $(DEPDIR)/libbwlib_a-error.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='error.c' object='libbwlib_a-error.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-error.obj `if test -f 'error.c'; then $(CYGPATH_W) 'error.c'; else $(CYGPATH_W) '$(srcdir)/error.c'; fi` libbwlib_a-protocol.o: protocol.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-protocol.o -MD -MP -MF $(DEPDIR)/libbwlib_a-protocol.Tpo -c -o libbwlib_a-protocol.o `test -f 'protocol.c' || echo '$(srcdir)/'`protocol.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-protocol.Tpo $(DEPDIR)/libbwlib_a-protocol.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol.c' object='libbwlib_a-protocol.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-protocol.o `test -f 'protocol.c' || echo '$(srcdir)/'`protocol.c libbwlib_a-protocol.obj: protocol.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-protocol.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-protocol.Tpo -c -o libbwlib_a-protocol.obj `if test -f 'protocol.c'; then $(CYGPATH_W) 'protocol.c'; else $(CYGPATH_W) '$(srcdir)/protocol.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-protocol.Tpo $(DEPDIR)/libbwlib_a-protocol.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol.c' object='libbwlib_a-protocol.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-protocol.obj `if test -f 'protocol.c'; then $(CYGPATH_W) 'protocol.c'; else $(CYGPATH_W) '$(srcdir)/protocol.c'; fi` libbwlib_a-io.o: io.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-io.o -MD -MP -MF $(DEPDIR)/libbwlib_a-io.Tpo -c -o libbwlib_a-io.o `test -f 'io.c' || echo '$(srcdir)/'`io.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-io.Tpo $(DEPDIR)/libbwlib_a-io.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='io.c' object='libbwlib_a-io.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-io.o `test -f 'io.c' || echo '$(srcdir)/'`io.c libbwlib_a-io.obj: io.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-io.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-io.Tpo -c -o libbwlib_a-io.obj `if test -f 'io.c'; then $(CYGPATH_W) 'io.c'; else $(CYGPATH_W) '$(srcdir)/io.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-io.Tpo $(DEPDIR)/libbwlib_a-io.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='io.c' object='libbwlib_a-io.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-io.obj `if test -f 'io.c'; then $(CYGPATH_W) 'io.c'; else $(CYGPATH_W) '$(srcdir)/io.c'; fi` libbwlib_a-endpoint.o: endpoint.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-endpoint.o -MD -MP -MF $(DEPDIR)/libbwlib_a-endpoint.Tpo -c -o libbwlib_a-endpoint.o `test -f 'endpoint.c' || echo '$(srcdir)/'`endpoint.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-endpoint.Tpo $(DEPDIR)/libbwlib_a-endpoint.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='endpoint.c' object='libbwlib_a-endpoint.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-endpoint.o `test -f 'endpoint.c' || echo '$(srcdir)/'`endpoint.c libbwlib_a-endpoint.obj: endpoint.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-endpoint.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-endpoint.Tpo -c -o libbwlib_a-endpoint.obj `if test -f 'endpoint.c'; then $(CYGPATH_W) 'endpoint.c'; else $(CYGPATH_W) '$(srcdir)/endpoint.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-endpoint.Tpo $(DEPDIR)/libbwlib_a-endpoint.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='endpoint.c' object='libbwlib_a-endpoint.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-endpoint.obj `if test -f 'endpoint.c'; then $(CYGPATH_W) 'endpoint.c'; else $(CYGPATH_W) '$(srcdir)/endpoint.c'; fi` libbwlib_a-time.o: time.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-time.o -MD -MP -MF $(DEPDIR)/libbwlib_a-time.Tpo -c -o libbwlib_a-time.o `test -f 'time.c' || echo '$(srcdir)/'`time.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-time.Tpo $(DEPDIR)/libbwlib_a-time.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='time.c' object='libbwlib_a-time.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-time.o `test -f 'time.c' || echo '$(srcdir)/'`time.c libbwlib_a-time.obj: time.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-time.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-time.Tpo -c -o libbwlib_a-time.obj `if test -f 'time.c'; then $(CYGPATH_W) 'time.c'; else $(CYGPATH_W) '$(srcdir)/time.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-time.Tpo $(DEPDIR)/libbwlib_a-time.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='time.c' object='libbwlib_a-time.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-time.obj `if test -f 'time.c'; then $(CYGPATH_W) 'time.c'; else $(CYGPATH_W) '$(srcdir)/time.c'; fi` libbwlib_a-arithm64.o: arithm64.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-arithm64.o -MD -MP -MF $(DEPDIR)/libbwlib_a-arithm64.Tpo -c -o libbwlib_a-arithm64.o `test -f 'arithm64.c' || echo '$(srcdir)/'`arithm64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-arithm64.Tpo $(DEPDIR)/libbwlib_a-arithm64.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='arithm64.c' object='libbwlib_a-arithm64.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-arithm64.o `test -f 'arithm64.c' || echo '$(srcdir)/'`arithm64.c libbwlib_a-arithm64.obj: arithm64.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-arithm64.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-arithm64.Tpo -c -o libbwlib_a-arithm64.obj `if test -f 'arithm64.c'; then $(CYGPATH_W) 'arithm64.c'; else $(CYGPATH_W) '$(srcdir)/arithm64.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-arithm64.Tpo $(DEPDIR)/libbwlib_a-arithm64.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='arithm64.c' object='libbwlib_a-arithm64.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-arithm64.obj `if test -f 'arithm64.c'; then $(CYGPATH_W) 'arithm64.c'; else $(CYGPATH_W) '$(srcdir)/arithm64.c'; fi` libbwlib_a-rijndael-alg-fst.o: rijndael-alg-fst.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-rijndael-alg-fst.o -MD -MP -MF $(DEPDIR)/libbwlib_a-rijndael-alg-fst.Tpo -c -o libbwlib_a-rijndael-alg-fst.o `test -f 'rijndael-alg-fst.c' || echo '$(srcdir)/'`rijndael-alg-fst.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-rijndael-alg-fst.Tpo $(DEPDIR)/libbwlib_a-rijndael-alg-fst.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rijndael-alg-fst.c' object='libbwlib_a-rijndael-alg-fst.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-rijndael-alg-fst.o `test -f 'rijndael-alg-fst.c' || echo '$(srcdir)/'`rijndael-alg-fst.c libbwlib_a-rijndael-alg-fst.obj: rijndael-alg-fst.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-rijndael-alg-fst.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-rijndael-alg-fst.Tpo -c -o libbwlib_a-rijndael-alg-fst.obj `if test -f 'rijndael-alg-fst.c'; then $(CYGPATH_W) 'rijndael-alg-fst.c'; else $(CYGPATH_W) '$(srcdir)/rijndael-alg-fst.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-rijndael-alg-fst.Tpo $(DEPDIR)/libbwlib_a-rijndael-alg-fst.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rijndael-alg-fst.c' object='libbwlib_a-rijndael-alg-fst.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-rijndael-alg-fst.obj `if test -f 'rijndael-alg-fst.c'; then $(CYGPATH_W) 'rijndael-alg-fst.c'; else $(CYGPATH_W) '$(srcdir)/rijndael-alg-fst.c'; fi` libbwlib_a-rijndael-api-fst.o: rijndael-api-fst.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-rijndael-api-fst.o -MD -MP -MF $(DEPDIR)/libbwlib_a-rijndael-api-fst.Tpo -c -o libbwlib_a-rijndael-api-fst.o `test -f 'rijndael-api-fst.c' || echo '$(srcdir)/'`rijndael-api-fst.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-rijndael-api-fst.Tpo $(DEPDIR)/libbwlib_a-rijndael-api-fst.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rijndael-api-fst.c' object='libbwlib_a-rijndael-api-fst.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-rijndael-api-fst.o `test -f 'rijndael-api-fst.c' || echo '$(srcdir)/'`rijndael-api-fst.c libbwlib_a-rijndael-api-fst.obj: rijndael-api-fst.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-rijndael-api-fst.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-rijndael-api-fst.Tpo -c -o libbwlib_a-rijndael-api-fst.obj `if test -f 'rijndael-api-fst.c'; then $(CYGPATH_W) 'rijndael-api-fst.c'; else $(CYGPATH_W) '$(srcdir)/rijndael-api-fst.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-rijndael-api-fst.Tpo $(DEPDIR)/libbwlib_a-rijndael-api-fst.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rijndael-api-fst.c' object='libbwlib_a-rijndael-api-fst.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-rijndael-api-fst.obj `if test -f 'rijndael-api-fst.c'; then $(CYGPATH_W) 'rijndael-api-fst.c'; else $(CYGPATH_W) '$(srcdir)/rijndael-api-fst.c'; fi` libbwlib_a-util.o: util.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-util.o -MD -MP -MF $(DEPDIR)/libbwlib_a-util.Tpo -c -o libbwlib_a-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-util.Tpo $(DEPDIR)/libbwlib_a-util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='libbwlib_a-util.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c libbwlib_a-util.obj: util.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-util.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-util.Tpo -c -o libbwlib_a-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-util.Tpo $(DEPDIR)/libbwlib_a-util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='libbwlib_a-util.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi` libbwlib_a-daemon.o: daemon.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-daemon.o -MD -MP -MF $(DEPDIR)/libbwlib_a-daemon.Tpo -c -o libbwlib_a-daemon.o `test -f 'daemon.c' || echo '$(srcdir)/'`daemon.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-daemon.Tpo $(DEPDIR)/libbwlib_a-daemon.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='daemon.c' object='libbwlib_a-daemon.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-daemon.o `test -f 'daemon.c' || echo '$(srcdir)/'`daemon.c libbwlib_a-daemon.obj: daemon.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-daemon.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-daemon.Tpo -c -o libbwlib_a-daemon.obj `if test -f 'daemon.c'; then $(CYGPATH_W) 'daemon.c'; else $(CYGPATH_W) '$(srcdir)/daemon.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-daemon.Tpo $(DEPDIR)/libbwlib_a-daemon.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='daemon.c' object='libbwlib_a-daemon.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-daemon.obj `if test -f 'daemon.c'; then $(CYGPATH_W) 'daemon.c'; else $(CYGPATH_W) '$(srcdir)/daemon.c'; fi` libbwlib_a-missing_getopt.o: missing_getopt.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-missing_getopt.o -MD -MP -MF $(DEPDIR)/libbwlib_a-missing_getopt.Tpo -c -o libbwlib_a-missing_getopt.o `test -f 'missing_getopt.c' || echo '$(srcdir)/'`missing_getopt.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-missing_getopt.Tpo $(DEPDIR)/libbwlib_a-missing_getopt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='missing_getopt.c' object='libbwlib_a-missing_getopt.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-missing_getopt.o `test -f 'missing_getopt.c' || echo '$(srcdir)/'`missing_getopt.c libbwlib_a-missing_getopt.obj: missing_getopt.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-missing_getopt.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-missing_getopt.Tpo -c -o libbwlib_a-missing_getopt.obj `if test -f 'missing_getopt.c'; then $(CYGPATH_W) 'missing_getopt.c'; else $(CYGPATH_W) '$(srcdir)/missing_getopt.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-missing_getopt.Tpo $(DEPDIR)/libbwlib_a-missing_getopt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='missing_getopt.c' object='libbwlib_a-missing_getopt.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-missing_getopt.obj `if test -f 'missing_getopt.c'; then $(CYGPATH_W) 'missing_getopt.c'; else $(CYGPATH_W) '$(srcdir)/missing_getopt.c'; fi` libbwlib_a-tools.o: tools.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-tools.o -MD -MP -MF $(DEPDIR)/libbwlib_a-tools.Tpo -c -o libbwlib_a-tools.o `test -f 'tools.c' || echo '$(srcdir)/'`tools.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-tools.Tpo $(DEPDIR)/libbwlib_a-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tools.c' object='libbwlib_a-tools.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-tools.o `test -f 'tools.c' || echo '$(srcdir)/'`tools.c libbwlib_a-tools.obj: tools.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-tools.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-tools.Tpo -c -o libbwlib_a-tools.obj `if test -f 'tools.c'; then $(CYGPATH_W) 'tools.c'; else $(CYGPATH_W) '$(srcdir)/tools.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-tools.Tpo $(DEPDIR)/libbwlib_a-tools.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tools.c' object='libbwlib_a-tools.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-tools.obj `if test -f 'tools.c'; then $(CYGPATH_W) 'tools.c'; else $(CYGPATH_W) '$(srcdir)/tools.c'; fi` libbwlib_a-iperf3.o: iperf3.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-iperf3.o -MD -MP -MF $(DEPDIR)/libbwlib_a-iperf3.Tpo -c -o libbwlib_a-iperf3.o `test -f 'iperf3.c' || echo '$(srcdir)/'`iperf3.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-iperf3.Tpo $(DEPDIR)/libbwlib_a-iperf3.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='iperf3.c' object='libbwlib_a-iperf3.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-iperf3.o `test -f 'iperf3.c' || echo '$(srcdir)/'`iperf3.c libbwlib_a-iperf3.obj: iperf3.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-iperf3.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-iperf3.Tpo -c -o libbwlib_a-iperf3.obj `if test -f 'iperf3.c'; then $(CYGPATH_W) 'iperf3.c'; else $(CYGPATH_W) '$(srcdir)/iperf3.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-iperf3.Tpo $(DEPDIR)/libbwlib_a-iperf3.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='iperf3.c' object='libbwlib_a-iperf3.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-iperf3.obj `if test -f 'iperf3.c'; then $(CYGPATH_W) 'iperf3.c'; else $(CYGPATH_W) '$(srcdir)/iperf3.c'; fi` libbwlib_a-ping.o: ping.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-ping.o -MD -MP -MF $(DEPDIR)/libbwlib_a-ping.Tpo -c -o libbwlib_a-ping.o `test -f 'ping.c' || echo '$(srcdir)/'`ping.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-ping.Tpo $(DEPDIR)/libbwlib_a-ping.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ping.c' object='libbwlib_a-ping.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-ping.o `test -f 'ping.c' || echo '$(srcdir)/'`ping.c libbwlib_a-ping.obj: ping.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-ping.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-ping.Tpo -c -o libbwlib_a-ping.obj `if test -f 'ping.c'; then $(CYGPATH_W) 'ping.c'; else $(CYGPATH_W) '$(srcdir)/ping.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-ping.Tpo $(DEPDIR)/libbwlib_a-ping.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ping.c' object='libbwlib_a-ping.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-ping.obj `if test -f 'ping.c'; then $(CYGPATH_W) 'ping.c'; else $(CYGPATH_W) '$(srcdir)/ping.c'; fi` libbwlib_a-traceroute.o: traceroute.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-traceroute.o -MD -MP -MF $(DEPDIR)/libbwlib_a-traceroute.Tpo -c -o libbwlib_a-traceroute.o `test -f 'traceroute.c' || echo '$(srcdir)/'`traceroute.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-traceroute.Tpo $(DEPDIR)/libbwlib_a-traceroute.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='traceroute.c' object='libbwlib_a-traceroute.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-traceroute.o `test -f 'traceroute.c' || echo '$(srcdir)/'`traceroute.c libbwlib_a-traceroute.obj: traceroute.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-traceroute.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-traceroute.Tpo -c -o libbwlib_a-traceroute.obj `if test -f 'traceroute.c'; then $(CYGPATH_W) 'traceroute.c'; else $(CYGPATH_W) '$(srcdir)/traceroute.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-traceroute.Tpo $(DEPDIR)/libbwlib_a-traceroute.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='traceroute.c' object='libbwlib_a-traceroute.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-traceroute.obj `if test -f 'traceroute.c'; then $(CYGPATH_W) 'traceroute.c'; else $(CYGPATH_W) '$(srcdir)/traceroute.c'; fi` libbwlib_a-tracepath.o: tracepath.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-tracepath.o -MD -MP -MF $(DEPDIR)/libbwlib_a-tracepath.Tpo -c -o libbwlib_a-tracepath.o `test -f 'tracepath.c' || echo '$(srcdir)/'`tracepath.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-tracepath.Tpo $(DEPDIR)/libbwlib_a-tracepath.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tracepath.c' object='libbwlib_a-tracepath.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-tracepath.o `test -f 'tracepath.c' || echo '$(srcdir)/'`tracepath.c libbwlib_a-tracepath.obj: tracepath.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-tracepath.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-tracepath.Tpo -c -o libbwlib_a-tracepath.obj `if test -f 'tracepath.c'; then $(CYGPATH_W) 'tracepath.c'; else $(CYGPATH_W) '$(srcdir)/tracepath.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-tracepath.Tpo $(DEPDIR)/libbwlib_a-tracepath.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tracepath.c' object='libbwlib_a-tracepath.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-tracepath.obj `if test -f 'tracepath.c'; then $(CYGPATH_W) 'tracepath.c'; else $(CYGPATH_W) '$(srcdir)/tracepath.c'; fi` libbwlib_a-owamp.o: owamp.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-owamp.o -MD -MP -MF $(DEPDIR)/libbwlib_a-owamp.Tpo -c -o libbwlib_a-owamp.o `test -f 'owamp.c' || echo '$(srcdir)/'`owamp.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-owamp.Tpo $(DEPDIR)/libbwlib_a-owamp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='owamp.c' object='libbwlib_a-owamp.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-owamp.o `test -f 'owamp.c' || echo '$(srcdir)/'`owamp.c libbwlib_a-owamp.obj: owamp.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-owamp.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-owamp.Tpo -c -o libbwlib_a-owamp.obj `if test -f 'owamp.c'; then $(CYGPATH_W) 'owamp.c'; else $(CYGPATH_W) '$(srcdir)/owamp.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-owamp.Tpo $(DEPDIR)/libbwlib_a-owamp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='owamp.c' object='libbwlib_a-owamp.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-owamp.obj `if test -f 'owamp.c'; then $(CYGPATH_W) 'owamp.c'; else $(CYGPATH_W) '$(srcdir)/owamp.c'; fi` libbwlib_a-paris-traceroute.o: paris-traceroute.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-paris-traceroute.o -MD -MP -MF $(DEPDIR)/libbwlib_a-paris-traceroute.Tpo -c -o libbwlib_a-paris-traceroute.o `test -f 'paris-traceroute.c' || echo '$(srcdir)/'`paris-traceroute.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-paris-traceroute.Tpo $(DEPDIR)/libbwlib_a-paris-traceroute.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='paris-traceroute.c' object='libbwlib_a-paris-traceroute.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-paris-traceroute.o `test -f 'paris-traceroute.c' || echo '$(srcdir)/'`paris-traceroute.c libbwlib_a-paris-traceroute.obj: paris-traceroute.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-paris-traceroute.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-paris-traceroute.Tpo -c -o libbwlib_a-paris-traceroute.obj `if test -f 'paris-traceroute.c'; then $(CYGPATH_W) 'paris-traceroute.c'; else $(CYGPATH_W) '$(srcdir)/paris-traceroute.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-paris-traceroute.Tpo $(DEPDIR)/libbwlib_a-paris-traceroute.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='paris-traceroute.c' object='libbwlib_a-paris-traceroute.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-paris-traceroute.obj `if test -f 'paris-traceroute.c'; then $(CYGPATH_W) 'paris-traceroute.c'; else $(CYGPATH_W) '$(srcdir)/paris-traceroute.c'; fi` libbwlib_a-thrulay.o: thrulay.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-thrulay.o -MD -MP -MF $(DEPDIR)/libbwlib_a-thrulay.Tpo -c -o libbwlib_a-thrulay.o `test -f 'thrulay.c' || echo '$(srcdir)/'`thrulay.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-thrulay.Tpo $(DEPDIR)/libbwlib_a-thrulay.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='thrulay.c' object='libbwlib_a-thrulay.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-thrulay.o `test -f 'thrulay.c' || echo '$(srcdir)/'`thrulay.c libbwlib_a-thrulay.obj: thrulay.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-thrulay.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-thrulay.Tpo -c -o libbwlib_a-thrulay.obj `if test -f 'thrulay.c'; then $(CYGPATH_W) 'thrulay.c'; else $(CYGPATH_W) '$(srcdir)/thrulay.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-thrulay.Tpo $(DEPDIR)/libbwlib_a-thrulay.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='thrulay.c' object='libbwlib_a-thrulay.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-thrulay.obj `if test -f 'thrulay.c'; then $(CYGPATH_W) 'thrulay.c'; else $(CYGPATH_W) '$(srcdir)/thrulay.c'; fi` libbwlib_a-iperf.o: iperf.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-iperf.o -MD -MP -MF $(DEPDIR)/libbwlib_a-iperf.Tpo -c -o libbwlib_a-iperf.o `test -f 'iperf.c' || echo '$(srcdir)/'`iperf.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-iperf.Tpo $(DEPDIR)/libbwlib_a-iperf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='iperf.c' object='libbwlib_a-iperf.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-iperf.o `test -f 'iperf.c' || echo '$(srcdir)/'`iperf.c libbwlib_a-iperf.obj: iperf.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-iperf.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-iperf.Tpo -c -o libbwlib_a-iperf.obj `if test -f 'iperf.c'; then $(CYGPATH_W) 'iperf.c'; else $(CYGPATH_W) '$(srcdir)/iperf.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-iperf.Tpo $(DEPDIR)/libbwlib_a-iperf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='iperf.c' object='libbwlib_a-iperf.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-iperf.obj `if test -f 'iperf.c'; then $(CYGPATH_W) 'iperf.c'; else $(CYGPATH_W) '$(srcdir)/iperf.c'; fi` libbwlib_a-nuttcp.o: nuttcp.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-nuttcp.o -MD -MP -MF $(DEPDIR)/libbwlib_a-nuttcp.Tpo -c -o libbwlib_a-nuttcp.o `test -f 'nuttcp.c' || echo '$(srcdir)/'`nuttcp.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-nuttcp.Tpo $(DEPDIR)/libbwlib_a-nuttcp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nuttcp.c' object='libbwlib_a-nuttcp.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-nuttcp.o `test -f 'nuttcp.c' || echo '$(srcdir)/'`nuttcp.c libbwlib_a-nuttcp.obj: nuttcp.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbwlib_a_CFLAGS) $(CFLAGS) -MT libbwlib_a-nuttcp.obj -MD -MP -MF $(DEPDIR)/libbwlib_a-nuttcp.Tpo -c -o libbwlib_a-nuttcp.obj `if test -f 'nuttcp.c'; then $(CYGPATH_W) 'nuttcp.c'; else $(CYGPATH_W) '$(srcdir)/nuttcp.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libbwlib_a-nuttcp.Tpo $(DEPDIR)/libbwlib_a-nuttcp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nuttcp.c' object='libbwlib_a-nuttcp.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) $(libbwlib_a_CFLAGS) $(CFLAGS) -c -o libbwlib_a-nuttcp.obj `if test -f 'nuttcp.c'; then $(CYGPATH_W) 'nuttcp.c'; else $(CYGPATH_W) '$(srcdir)/nuttcp.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-I2utilincludeHEADERS: $(I2utilinclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(I2utilincludedir)" || $(MKDIR_P) "$(DESTDIR)$(I2utilincludedir)" @list='$(I2utilinclude_HEADERS)'; test -n "$(I2utilincludedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(I2utilincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(I2utilincludedir)" || exit $$?; \ done uninstall-I2utilincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(I2utilinclude_HEADERS)'; test -n "$(I2utilincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(I2utilincludedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(I2utilincludedir)" && rm -f $$files 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) @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 check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) config.h installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(I2utilincludedir)"; 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-libLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-I2utilincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLIBRARIES 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 -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-I2utilincludeHEADERS uninstall-libLIBRARIES .MAKE: all install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-I2utilincludeHEADERS \ 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-libLIBRARIES 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-I2utilincludeHEADERS uninstall-am \ uninstall-libLIBRARIES # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # 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: bwctl_1.5.4+dfsg1.orig/bwlib/capi.c0000664000076500007710000007757612560414557014024 0ustar /* * $Id$ */ /* * File: capi.c * * Author: Jeff W. Boote * Internet2 * * Date: Tue Sep 16 14:25:27 MDT 2003 * * Description: * * This file contains the api functions that are typically called from * an bwlib client application. * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include #include #include #include #include #include #include #include #include #include #include /* * Function: _BWLClientBind * * Description: * This function attempts to bind the fd to a local address allowing * the client socket to have the source addr bound. * * In Args: * * Out Args: * * Scope: * Returns: * True if successful, False if unsuccessful. * Additionally err_ret will be set to BWLErrFATAL if there was a * problem with the local_addr. * Side Effect: */ static BWLBoolean _BWLClientBind( BWLControl cntrl, int fd, const char *local_addr, struct addrinfo *remote_addrinfo, BWLErrSeverity *err_ret ) { struct addrinfo *ai; BWLBoolean retval = False; *err_ret = BWLErrOK; if (BWLIsInterface(local_addr)) { struct ifaddrs *ifaddr, *ifa; if (getifaddrs(&ifaddr) == -1) { return False; } for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) { if (strcmp(ifa->ifa_name, local_addr) != 0) continue; if (ifa->ifa_addr == NULL) continue; if (remote_addrinfo->ai_family != ifa->ifa_addr->sa_family) continue; // This is a hacky method of getting the addrlen. It should match // the remote_addrinfo's addrlen. if (bind(fd,ifa->ifa_addr,remote_addrinfo->ai_addrlen) == 0){ retval = True; break; } } freeifaddrs(ifaddr); } else { struct addrinfo hints; struct addrinfo *result; memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = remote_addrinfo->ai_family; hints.ai_socktype = remote_addrinfo->ai_socktype; hints.ai_flags = 0; /* For wildcard IP address */ hints.ai_protocol = remote_addrinfo->ai_protocol; hints.ai_canonname = NULL; hints.ai_addr = NULL; hints.ai_next = NULL; if (getaddrinfo(local_addr, NULL, &hints, &result) != 0) { BWLError(cntrl->ctx,BWLErrFATAL,errno, "getaddrinfo(): %M"); return False; } for(ai=result;ai;ai = ai->ai_next){ if(bind(fd,ai->ai_addr,ai->ai_addrlen) == 0){ retval = True; break; } else{ switch(errno){ /* report these errors */ case EAGAIN: case EBADF: case ENOTSOCK: case EADDRNOTAVAIL: case EADDRINUSE: case EACCES: case EFAULT: BWLError(cntrl->ctx,BWLErrFATAL,errno, "bind(): %M"); break; /* ignore all others */ default: break; } } } freeaddrinfo(result); } return retval; } BWLBoolean __set_nonblocking(int fd, BWLBoolean non_blocking) { int curr_flags = fcntl(fd, F_GETFL, 0); if (curr_flags < 0) return False; if (non_blocking) { curr_flags |= O_NONBLOCK; } else { curr_flags &= ~O_NONBLOCK; } if (fcntl(fd, F_SETFL, curr_flags) != 0) { return False; } return False; } /* * Function: TryAddr * * Description: * This function attempts to connect to the given ai description of * the "server" addr possibly binding to "local" addr. It has a timeout period of * * In Args: * * Out Args: * * Scope: * Returns: * -1: error - future trys are unlikely to succeed - terminate upward. * 0: success - wahoo! * 1: keep trying - this one didn't work, probably addr mismatch. * Side Effect: */ /* */ static int TryAddr( BWLControl cntrl, struct addrinfo *ai, const char *local_addr, I2Addr server_addr ) { BWLErrSeverity addr_ok=BWLErrOK; int fd; fd = socket(ai->ai_family,ai->ai_socktype,ai->ai_protocol); if(fd < 0){ BWLError(cntrl->ctx,BWLErrDEBUG,errno,"socket(): %M: " "family=%d, socktype=%d, protocol=%d", ai->ai_family,ai->ai_socktype,ai->ai_protocol); return 1; } if(local_addr){ if(!_BWLClientBind(cntrl,fd,local_addr,ai,&addr_ok)){ if(addr_ok != BWLErrOK){ return -1; } goto cleanup; } } // set the socket into non-blocking mode for the connect. We'll undo this // before returning from the function. This lets us set a sane timeout. __set_nonblocking(fd, True); /* * Call connect - if it succeeds, return else try again. */ if (connect(fd,ai->ai_addr,ai->ai_addrlen) == -1 && errno != EINPROGRESS) { goto cleanup; } if (errno == EINPROGRESS) { fd_set fdset; struct timeval timeout; int err = -1; socklen_t err_len = sizeof(err); // Default: 2 second timeout timeout.tv_sec = 2; timeout.tv_usec = 0; FD_ZERO(&fdset); FD_SET(fd, &fdset); if (select(fd + 1, NULL, &fdset, NULL, &timeout) != 1) { goto cleanup; } getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &err_len); if (err != 0) goto cleanup; } /* * connected, set the fields in the addr records */ if(I2AddrSetSAddr(server_addr,ai->ai_addr,ai->ai_addrlen) == False || I2AddrSetSocktype(server_addr,ai->ai_socktype) == False || I2AddrSetProtocol(server_addr,ai->ai_protocol) == False || I2AddrSetFD(server_addr,fd,True) == False){ goto cleanup; } cntrl->remote_addr = server_addr; cntrl->sockfd = fd; __set_nonblocking(fd, False); if( !(cntrl->local_addr = I2AddrByLocalSockFD( BWLContextErrHandle(cntrl->ctx), cntrl->sockfd,False))){ BWLError(cntrl->ctx,BWLErrFATAL,errno, "I2AddrByLocalSockFD() failed"); goto cleanup; } { char remotenode[NI_MAXHOST],remoteserv[NI_MAXSERV]; size_t remotenodelen = sizeof(remotenode); size_t remoteservlen = sizeof(remoteserv); char localnode[NI_MAXHOST],localserv[NI_MAXSERV]; size_t localnodelen = sizeof(localnode); size_t localservlen = sizeof(localserv); I2AddrNodeName(cntrl->remote_addr,remotenode,&remotenodelen); I2AddrServName(cntrl->remote_addr,remoteserv,&remoteservlen); I2AddrNodeName(cntrl->local_addr,localnode,&localnodelen); I2AddrServName(cntrl->local_addr,localserv,&localservlen); BWLError(cntrl->ctx,BWLErrDEBUG,0, "Outbound connection to (%s:%s) from (%s:%s)", remotenode,remoteserv,localnode,localserv); } return 0; cleanup: __set_nonblocking(fd, False); while((close(fd) < 0) && (errno == EINTR)); return 1; } /* * Function: _BWLClientConnect * * Description: * This function attempts to create a socket connection between * the local client and the server. Each specified with I2Addr * records. If the local_addr is not specified, then the source * addr is not bound. The server_addr is used to get a valid list * of addrinfo records and each addrinfo description record is * tried until one succeeds. (IPV6 is prefered over IPV4) * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ static int _BWLClientConnect( BWLControl cntrl, const char *local_addr, I2Addr server_addr, BWLErrSeverity *err_ret ) { int rc; struct addrinfo *fai; struct addrinfo *ai; if(!server_addr) goto error; /* * Easy case - application provided socket directly. */ if((cntrl->sockfd = I2AddrFD(server_addr)) > -1){ cntrl->remote_addr = server_addr; return 0; } /* * Initialize addrinfo portion of server_addr record. */ if(!(fai = I2AddrAddrInfo(server_addr,"localhost", BWL_CONTROL_SERVICE_NAME))){ BWLError(cntrl->ctx,BWLErrFATAL,errno, "I2AddrAddrInfo failed"); goto error; } /* * Now that we have addresses - see if it is valid by attempting * to create a socket of that type, and binding(if wanted). * Also check policy for allowed connection before calling * connect. */ if( !BWLContextConfigGetV(cntrl->ctx,BWLIPv4Only)){ #ifdef AF_INET6 for(ai=fai;ai;ai=ai->ai_next){ struct sockaddr_in6 srec; if(ai->ai_family != AF_INET6) continue; /* avoid type punning by using memcpy instead of casting ai_addr */ memcpy(&srec,ai->ai_addr,sizeof(srec)); if( (rc = TryAddr(cntrl,ai,local_addr,server_addr)) == 0) { return 0; } if(rc < 0) { goto error; } } #endif } /* * Now try IPv4 addresses. */ if( !BWLContextConfigGetV(cntrl->ctx,BWLIPv6Only)){ for(ai=fai;ai;ai=ai->ai_next){ struct sockaddr_in saddr4; if(ai->ai_family != AF_INET) continue; /* avoid type punning by using memcpy instead of casting ai_addr */ memcpy(&saddr4,ai->ai_addr,sizeof(saddr4)); if( (rc = TryAddr(cntrl,ai,local_addr,server_addr)) == 0) { return 0; } if(rc < 0) { goto error; } } } error: *err_ret = BWLErrFATAL; return -1; } /* * Function: BWLControlOpen * * Description: * Opens a connection to an bwlib server. Returns after complete * control connection setup is complete. This means that encrytion * has been intialized, and the client is authenticated to the * server if that is necessary. However, the client has not * verified the server at this point. * * Returns: * A valid BWLControl pointer or NULL. * Side Effect: */ BWLControl BWLControlOpen( BWLContext ctx, /* control context */ const char *local_addr, /* local addr or null */ I2Addr server_addr, /* server addr */ uint32_t mode_req_mask, /* requested modes */ BWLUserID userid, /* userid or NULL */ BWLNum64 *uptime_ret, /* server uptime - ret */ BWLToolAvailability *tools_ret, /* server supported tools */ BWLErrSeverity *err_ret /* err - return */ ) { int rc; BWLControl cntrl; uint32_t mode_avail; uint32_t mode_avail_orig; uint32_t do_mode; uint8_t key_value[16]; uint8_t challenge[16]; uint8_t token[32]; uint8_t *key=NULL; BWLAcceptType acceptval; BWLTimeStamp timestart,timeend; BWLNum64 uptime; *err_ret = BWLErrOK; /* * Check for valid context. */ if( !ctx->valid){ BWLError(ctx,BWLErrFATAL,EINVAL, "BWLControlOpen(): Invalid context record"); *err_ret = BWLErrFATAL; return NULL; } /* * First allocate memory for the control state. */ if( !(cntrl = _BWLControlAlloc(ctx,err_ret))) { BWLError(ctx,BWLErrFATAL,errno, "Failed to allocate memory for the control state."); goto error; } /* * Initialize server record for address we are connecting to. */ if(!server_addr){ goto error; } if(!I2AddrSetSocktype(server_addr,SOCK_STREAM)){ BWLError(ctx,BWLErrFATAL,errno, "I2AddrSetSocktype() failed"); goto error; } /* * Connect to the server. * Address policy check happens in here. */ if(_BWLClientConnect(cntrl,local_addr,server_addr,err_ret) != 0) { /* * no error printing here - smart client can recover. (Spawn local...) */ BWLError(ctx,BWLErrDEBUG,errno, "_BWLClientConnect() failed"); goto error; } /* * Read the server greating. */ if((rc=_BWLReadServerGreeting(cntrl,&mode_avail,challenge)) < BWLErrOK){ BWLError(ctx,BWLErrFATAL,errno, "Server Greeting Failed"); *err_ret = (BWLErrSeverity)rc; goto error; } mode_avail_orig = mode_avail; /* * Select mode wanted... */ mode_avail &= mode_req_mask; /* mask out unwanted modes */ /* * retrieve key if needed */ if(userid && (mode_avail & BWL_MODE_DOCIPHER)){ strncpy(cntrl->userid_buffer,userid, sizeof(cntrl->userid_buffer)-1); if(_BWLCallGetAESKey(cntrl->ctx,cntrl->userid_buffer,key_value, err_ret)){ key = key_value; cntrl->userid = cntrl->userid_buffer; }else{ if(*err_ret != BWLErrOK) { BWLError(ctx,BWLErrFATAL,errno, "Get AESKey failed"); goto error; } } } /* * If no key, then remove auth/crypt modes */ if(!key) mode_avail &= ~BWL_MODE_DOCIPHER; /* * Pick "highest" level mode still available unless * least_restrictive is in the bitmask, then pick the * "lowest" level mode. */ if(mode_req_mask & BWL_MODE_LEAST_RESTRICTIVE){ do_mode = BWL_MODE_OPEN; *err_ret = BWLErrOK; while((*err_ret == BWLErrOK) &&(do_mode <= BWL_MODE_ENCRYPTED)){ if((mode_avail & do_mode) && _BWLCallCheckControlPolicy(cntrl, do_mode,cntrl->userid, I2AddrSAddr(cntrl->local_addr,NULL), I2AddrSAddr(cntrl->remote_addr,NULL), err_ret)){ cntrl->mode = do_mode; goto gotmode; } do_mode <<= 1; } }else{ do_mode = BWL_MODE_ENCRYPTED; *err_ret = BWLErrOK; while((*err_ret == BWLErrOK) && (do_mode > BWL_MODE_UNDEFINED)){ if((mode_avail & do_mode) && _BWLCallCheckControlPolicy(cntrl, do_mode,cntrl->userid, I2AddrSAddr(cntrl->local_addr,NULL), I2AddrSAddr(cntrl->remote_addr,NULL), err_ret)){ cntrl->mode = do_mode; goto gotmode; } do_mode >>= 1; } } if(*err_ret != BWLErrOK){ BWLError(ctx,BWLErrFATAL,errno, "No authentication mode available"); goto error; }else{ char buf[255]; buf[0] = '\0'; if (mode_avail_orig & BWL_MODE_OPEN) strncat(buf, " open", sizeof(buf) - strlen(buf) - 1); if (mode_avail_orig & BWL_MODE_AUTHENTICATED) strncat(buf, " authenticated", sizeof(buf) - strlen(buf) - 1); if (mode_avail_orig & BWL_MODE_ENCRYPTED) strncat(buf, " encrypted", sizeof(buf) - strlen(buf) - 1); BWLError(cntrl->ctx,BWLErrINFO,BWLErrPOLICY, "Server denied access. No authentication modes in common. Modes available: %s", buf); errno = EACCES; goto denied; } gotmode: /* * Initialize all the encryption values as necessary. */ if(cntrl->mode & BWL_MODE_DOCIPHER){ /* * Create "token" for ClientGreeting message. * Section 4.1 of bwlib spec: * AES(concat(challenge(16),sessionkey(16))) */ unsigned char buf[32]; /* * copy challenge */ memcpy(buf,challenge,16); /* * Create random session key */ if(I2RandomBytes(ctx->rand_src,cntrl->session_key,16) != 0) { BWLError(ctx,BWLErrFATAL,errno, "I2RandomBytes failed"); goto error; } /* * concat session key to buffer */ memcpy(&buf[16],cntrl->session_key,16); /* * Initialize AES structures for use with this * key. (ReadBlock/WriteBlock functions will automatically * use this key for this cntrl connection. */ _BWLMakeKey(cntrl,cntrl->session_key); /* * Encrypt the token as specified by Section 4.1 */ if(_BWLEncryptToken(key,buf,token) != 0) { BWLError(ctx,BWLErrFATAL,errno, "_BWLEncryptToken failed"); goto error; } /* * Create random writeIV */ if(I2RandomBytes(ctx->rand_src,cntrl->writeIV,16) != 0) { BWLError(ctx,BWLErrFATAL,errno, "I2RandomBytes failed"); goto error; } } /* * Get current time before sending client greeting - used * for very rough estimate of RTT. (upper bound) */ if(!BWLGetTimeStamp(ctx,×tart)) { BWLError(ctx,BWLErrFATAL,errno, "BWLGetTimeStamp failed"); goto error; } /* * Write the client greeting, and see if the Server agree's to it. */ if( ((rc=_BWLWriteClientGreeting(cntrl,token)) < BWLErrOK) || ((rc=_BWLReadServerOK(cntrl,&acceptval,tools_ret)) < BWLErrOK)){ *err_ret = (BWLErrSeverity)rc; BWLError(ctx,BWLErrFATAL,errno, "BWLWriteClientGreeeting failed"); goto error; } if(acceptval != BWL_CNTRL_ACCEPT){ BWLError(cntrl->ctx,BWLErrINFO,BWLErrPOLICY, "Server denied access"); errno = EACCES; goto denied; } /* * Get current time after response from server and set the RTT * in the "rtt_bound" field of cntrl. */ if(!BWLGetTimeStamp(ctx,&timeend)) { BWLError(ctx,BWLErrFATAL,errno, "BWLGetTimeStamp failed"); goto error; } cntrl->rtt_bound = BWLNum64Sub(timeend.tstamp,timestart.tstamp); if((rc=_BWLReadServerUptime(cntrl,&uptime)) < BWLErrOK){ *err_ret = (BWLErrSeverity)rc; BWLError(ctx,BWLErrFATAL,errno, "BWLReadServerUptime failed"); goto error; } if(uptime_ret){ *uptime_ret = uptime; } /* * Done - return! */ return cntrl; /* * If there was an error - set err_ret, then cleanup memory and return. */ error: *err_ret = BWLErrFATAL; /* * If access was denied - cleanup memory and return. */ denied: if(cntrl->remote_addr != server_addr) I2AddrFree(server_addr); BWLControlClose(cntrl); return NULL; } /* * Function: BWLControlTimeCheck * * Description: * Public function used to request the current time from the server. * (Including the servers "estimate" of it's timestamp.) * Also updates the clients idea of the rtt_bound to this server. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLErrSeverity BWLControlTimeCheck( BWLControl cntrl, BWLTimeStamp *time_ret ) { BWLErrSeverity err; BWLTimeStamp tstamp; if((err = _BWLWriteTimeRequest(cntrl)) != BWLErrOK){ goto error; } if((err = _BWLReadTimeResponse(cntrl,&tstamp)) != BWLErrOK){ goto error; } if(time_ret){ *time_ret = tstamp; } return BWLErrOK; error: return _BWLFailControlSession(cntrl,BWLErrFATAL); } /* * Function: _BWLClientRequestTestReadResponse * * Description: * This function is used to request a test from the server and * return the response. * * In Args: * * Out Args: * * Scope: * Returns: * 0 on success * Side Effect: */ static int _BWLClientRequestTestReadResponse( BWLControl cntrl, BWLTestSession tsession, BWLErrSeverity *err_ret, BWLAcceptType *acceptval ) { int rc; if((rc = _BWLWriteTestRequest(cntrl,tsession)) < BWLErrOK){ *err_ret = (BWLErrSeverity)rc; return 1; } if((rc = _BWLReadTestAccept(cntrl,acceptval,tsession)) < BWLErrOK){ *err_ret = (BWLErrSeverity)rc; return 1; } if(*acceptval == BWL_CNTRL_ACCEPT) return 0; *err_ret = BWLErrOK; return 1; } /* * Function: BWLSessionRequest * * Description: * Public function used to request a test from the server. * * In Args: * * Out Args: * * Scope: * Returns: * True/False based upon acceptance from server. If False is returned * check err_ret to see if an error condition exists. (If err_ret is * not BWLErrOK, the control connection is probably no longer valid.) * Side Effect: */ BWLBoolean BWLSessionRequest( BWLControl cntrl, BWLBoolean is_client, BWLTestSpec *test_spec, BWLTimeStamp *avail_time_ret, uint16_t *tool_port, BWLSID sid, BWLAcceptType *acceptval, BWLErrSeverity *err_ret ) { struct addrinfo *frai=NULL; struct addrinfo *fsai=NULL; struct addrinfo *rai=NULL; struct addrinfo *sai=NULL; BWLTestSession tsession = NULL; int rc=0; I2Addr server=NULL; I2Addr client=NULL; /* struct sockaddr *rsaddr; struct sockaddr *ssaddr; socklen_t saddrlen; */ BWLNum64 zero64=BWLULongToNum64(0); BWLBoolean retval = False; *acceptval = BWL_CNTRL_FAILURE; *err_ret = BWLErrOK; /* will be set to non-zero if request params ok */ avail_time_ret->tstamp = zero64; /* * Check cntrl state is appropriate for this call. * (this would happen as soon as we tried to call the protocol * function - but it saves a lot of misplaced work to check now.) */ if(!cntrl || !_BWLStateIsRequest(cntrl)){ *err_ret = BWLErrFATAL; BWLError(cntrl->ctx,*err_ret,BWLErrINVALID, "BWLSessionRequest called with invalid cntrl record"); goto error; } /* * Look for existing TestSession with this SID! */ if(cntrl->tests){ if(memcmp(sid,cntrl->tests->sid,sizeof(BWLSID))){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "BWLSessionRequest: sid mis-match"); goto error; } tsession = cntrl->tests; tsession->test_spec.req_time = test_spec->req_time; tsession->test_spec.latest_time = test_spec->latest_time; /* * If req_time == 0, this is a reservation cancellation. */ if(test_spec->req_time.tstamp == zero64) goto cancel; }else{ if(test_spec->server){ server = I2AddrCopy(test_spec->server); }else{ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "BWLSessionRequest:Invalid receive address"); } if(!server) goto error; if(test_spec->client){ client = I2AddrCopy(test_spec->client); }else{ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "BWLSessionRequest:Invalid receive address"); } if(!client) goto error; /* * Set the socktypes needed for this type of test so the * getaddrinfo happens correctly. */ if( !I2AddrSetSocktype(client, (test_spec->udp)? SOCK_DGRAM: SOCK_STREAM) || !I2AddrSetSocktype(server, (test_spec->udp)? SOCK_DGRAM: SOCK_STREAM)){ goto error; } /* * Get addrinfo for address spec's so we can choose between * the different address possiblities in the next step. */ if( !(frai = I2AddrAddrInfo(server,NULL,NULL)) || !(fsai = I2AddrAddrInfo(client,NULL,NULL))){ goto error; } /* * Determine proper address specifications for send/recv. * Loop on ai values to find a match and use that. * (We prefer IPV6 over others, so loop over IPv6 addrs * first...) Only supports AF_INET and AF_INET6. */ if( !BWLContextConfigGetV(cntrl->ctx,BWLIPv4Only)){ #ifdef AF_INET6 for(rai = frai;rai;rai = rai->ai_next){ if(rai->ai_family != AF_INET6) continue; for(sai = fsai;sai;sai = sai->ai_next){ struct sockaddr_in6 s_srec; struct sockaddr_in6 r_srec; if(rai->ai_family != sai->ai_family) continue; if(rai->ai_socktype != sai->ai_socktype) continue; memcpy(&s_srec,sai->ai_addr,sizeof(s_srec)); memcpy(&r_srec,rai->ai_addr,sizeof(r_srec)); if(IN6_IS_ADDR_LOOPBACK(&s_srec.sin6_addr) && !IN6_IS_ADDR_LOOPBACK(&r_srec.sin6_addr)) continue; if(!IN6_IS_ADDR_LOOPBACK(&s_srec.sin6_addr) && IN6_IS_ADDR_LOOPBACK(&r_srec.sin6_addr)) continue; goto foundaddr; } } #endif } if( !BWLContextConfigGetV(cntrl->ctx,BWLIPv6Only)){ for(rai = frai;rai;rai = rai->ai_next){ if(rai->ai_family != AF_INET) continue; for(sai = fsai;sai;sai = sai->ai_next){ struct sockaddr_in s_saddr4; struct sockaddr_in r_saddr4; if(rai->ai_family != sai->ai_family) continue; if(rai->ai_socktype != sai->ai_socktype) continue; memcpy(&s_saddr4,sai->ai_addr,sizeof(s_saddr4)); memcpy(&r_saddr4,rai->ai_addr,sizeof(r_saddr4)); if(s_saddr4.sin_addr.s_addr == INADDR_LOOPBACK && r_saddr4.sin_addr.s_addr != INADDR_LOOPBACK) continue; if(s_saddr4.sin_addr.s_addr != INADDR_LOOPBACK && r_saddr4.sin_addr.s_addr == INADDR_LOOPBACK) continue; goto foundaddr; } } } /* * Didn't find compatible addrs - return error. */ *err_ret = BWLErrWARNING; BWLError(cntrl->ctx,*err_ret,BWLErrINVALID, "BWLSessionRequest called with incompatible addresses"); goto error; foundaddr: /* * Fill I2Addr records with "selected" addresses for test. */ if( !I2AddrSetSAddr(server,rai->ai_addr,rai->ai_addrlen) || !I2AddrSetSAddr(client,sai->ai_addr,sai->ai_addrlen)){ BWLError(cntrl->ctx,*err_ret,BWLErrINVALID, "BWLSessionRequest: Unable to set socket info"); goto error; } /* * Save direct pointers to recv/send saddr's for policy funcs rsaddr = rai->ai_addr; ssaddr = sai->ai_addr; saddrlen = sai->ai_addrlen; */ /* * Create a structure to store the stuff we need to keep for * later calls. */ if( !(tsession = _BWLTestSessionAlloc(cntrl,is_client,client, server,*tool_port,test_spec))) goto error; } if(tsession->conf_server){ *tool_port = 0; } else{ memcpy(tsession->sid,sid,sizeof(BWLSID)); } /* * Request the server create the server & possibly the * client. (copy reservation time so a denied response can be * differentiated from a "busy" response.) */ rc = _BWLClientRequestTestReadResponse(cntrl,tsession,err_ret,acceptval); avail_time_ret->tstamp = tsession->reserve_time; if(rc != 0){ goto error; } *tool_port = tsession->tool_port; /* * Server accepted our request, and we were able to initialize this * side of the test. Add this "session" to the tests list for this * control connection if it isn't there already. */ if(cntrl->tests != tsession){ cntrl->tests = tsession; } /* * return the SID for this session to the caller. */ if(tsession->conf_server){ memcpy(sid,tsession->sid,sizeof(BWLSID)); } return True; cancel: retval = True; if(_BWLWriteTestRequest(cntrl,tsession) < BWLErrOK){ goto error; } if(_BWLReadTestAccept(cntrl,acceptval,tsession) < BWLErrOK){ goto error; } if(*acceptval != BWL_CNTRL_REJECT){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrUNKNOWN, "Reservation Cancellation Error"); _BWLFailControlSession(cntrl,BWLErrFATAL); } error: if(tsession){ _BWLTestSessionFree(cntrl->ctx, tsession,*acceptval); if(cntrl->tests == tsession){ cntrl->tests = NULL; } } else{ /* * If tsession exists - the addr's will be free'd as * part of it - otherwise, do it here. */ I2AddrFree(server); I2AddrFree(client); } return retval; } /* * Function: BWLStartSession * * Description: * This function is used by applications to send the StartSession * message to the server and to kick of it's side of all sessions. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLErrSeverity BWLStartSession( BWLControl cntrl, uint16_t *dataport /* retn for recv - set for send */ ) { int rc; BWLAcceptType acceptval; uint16_t lport_val = 0; uint16_t *lport = &lport_val; /* * Must pass valid cntrl record. */ if(!cntrl){ BWLError(NULL,BWLErrFATAL,BWLErrINVALID, "BWLStartSession called with invalid cntrl record"); return BWLErrFATAL; } /* * if dataport is non-null, pass the value pointed at by it instead * of the stack value 0. */ if(dataport){ lport = dataport; } /* * Send the StartSession message to the server */ if((rc = _BWLWriteStartSession(cntrl,*lport)) < BWLErrOK){ return _BWLFailControlSession(cntrl,rc); } /* * Read the server response. */ if(((rc = _BWLReadStartAck(cntrl,lport,&acceptval)) < BWLErrOK) || (acceptval != BWL_CNTRL_ACCEPT)){ return _BWLFailControlSession(cntrl,BWLErrFATAL); } return BWLErrOK; } BWLErrSeverity BWLEndSession( BWLControl cntrl, int *retn_on_intr, BWLAcceptType *acceptval, FILE *fp ) { int ival = 0; int *intr=&ival; BWLRequestType msgtype; BWLAcceptType aval = BWL_CNTRL_ACCEPT; BWLAcceptType *aptr = &aval; BWLErrSeverity rc; if(acceptval) aptr = acceptval; if(retn_on_intr) intr = retn_on_intr; if( (rc = _BWLWriteStopSession(cntrl,intr,*aptr,NULL)) < BWLErrOK){ *aptr = BWL_CNTRL_FAILURE; return _BWLFailControlSession(cntrl,(int)rc); } msgtype = BWLReadRequestType(cntrl,intr); if(msgtype == BWLReqSockClose){ BWLError(cntrl->ctx,BWLErrFATAL,errno, "BWLEndSession: Control socket closed: %M"); return _BWLFailControlSession(cntrl,BWLErrFATAL); } if(msgtype != BWLReqStopSession){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "BWLEndSession: Invalid protocol message received..."); return _BWLFailControlSession(cntrl,BWLErrFATAL); } if( (rc = _BWLReadStopSession(cntrl,intr,aptr,fp)) < BWLErrOK){ return _BWLFailControlSession(cntrl,(int)rc); } return _BWLTestSessionFree(cntrl->ctx,cntrl->tests,*aptr); } bwctl_1.5.4+dfsg1.orig/bwlib/config.h.in0000664000076500007710000000737712560414557014757 0ustar /* bwlib/config.h.in. Generated from configure.ac by autoheader. */ /* "name of sysconfdir under prefix" */ #undef AUTOCONF_SYSCONFDIR /* Define to 1 if you have the declaration of `fseeko', and to 0 if you don't. */ #undef HAVE_DECL_FSEEKO /* Define to 1 if you have the declaration of `optreset', and to 0 if you don't. */ #undef HAVE_DECL_OPTRESET /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the `getaddrinfo' function. */ #undef HAVE_GETADDRINFO /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the header file. */ #undef HAVE_I2UTIL_CONF_H /* Define to 1 if you have the header file. */ #undef HAVE_I2UTIL_UTIL_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 `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the `mergesort' function. */ #undef HAVE_MERGESORT /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* 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 `sa_len' is member of `struct sockaddr'. */ #undef HAVE_STRUCT_SOCKADDR_SA_LEN /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIMEX_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_TGMATH_H /* Define to 1 if you have the header file. */ #undef HAVE_THRULAY_CLIENT_H /* Define to 1 if you have the header file. */ #undef HAVE_THRULAY_SERVER_H /* Define to 1 if you have the `trunc' function. */ #undef HAVE_TRUNC /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* define if your compiler has __attribute__ */ #undef HAVE___ATTRIBUTE__ /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* MAN2HTML man-page converter */ #undef MAN2HTML /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* "The RPM version number" */ #undef PATCH_LEVEL /* 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 /* IPERF throuphput tool */ #undef TOOL_IPERF /* NUTTCP throuphput tool */ #undef TOOL_NUTTCP /* THRULAY throughput tool */ #undef TOOL_THRULAY /* Use system installed thrulay library */ #undef USE_SYS_THRULAY /* Define to empty if `const' does not conform to ANSI C. */ #undef const bwctl_1.5.4+dfsg1.orig/bwlib/arithm64.c0000664000076500007710000002055312560414557014525 0ustar /* * $Id$ */ /************************************************************************ * * * Copyright (C) 2003 * * Internet2 * * All Rights Reserved * * * ************************************************************************/ /* * File: arithm64.c * * Author: Jeff W. Boote * Internet2 * * Date: Tue Sep 16 14:25:16 MDT 2003 * * Description: * Arithmatic and conversion functions for the BWLNum64 * type. * * BWLNum64 is interpreted as 32bits of "seconds" and 32bits of * "fractional seconds". * The byte ordering is defined by the hardware for this value. 4 MSBytes are * seconds, 4 LSBytes are fractional. Each set of 4 Bytes is pulled out * via shifts/masks as a 32bit unsigned int when needed independently. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include #include #include #define MASK32(x) ((x) & 0xFFFFFFFFUL) #define BILLION 1000000000UL #define MILLION 1000000UL #define EXP2POW32 0x100000000ULL /************************************************************************ * * * Arithmetic functions * * * ************************************************************************/ /* * Function: BWLNum64Mult * * Description: * Multiplication. Allows overflow. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLNum64 BWLNum64Mult( BWLNum64 x, BWLNum64 y ) { uint64_t xlo, xhi, ylo, yhi; xlo = MASK32(x); xhi = MASK32(x>>32); ylo = MASK32(y); yhi = MASK32(y>>32); return ((xlo*ylo)>>32) + (xhi*ylo) + (xlo*yhi) + ((xhi*yhi)<<32); } /************************************************************************ * * * Conversion functions * * * ************************************************************************/ /* * Function: BWLULongToNum64 * * Description: * Convert an unsigned 32-bit integer into a BWLNum64 struct.. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLNum64 BWLULongToNum64(uint32_t a) { return ((uint64_t)a << 32); } /* * Function: BWLI2numTToNum64 * * Description: * Convert an unsigned 64-bit integer into a BWLNum64 struct.. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLNum64 BWLI2numTToNum64(I2numT a) { return (a << 32); } /* * Function: BWLNum64toTimespec * * Description: * Convert a time value in BWLNum64 representation to timespec * representation. These are "relative" time values. (Not absolutes - i.e. * they are not relative to some "epoch".) BWLNum64 values are * unsigned 64 integral types with the MS (Most Significant) 32 bits * representing seconds, and the LS (Least Significant) 32 bits * representing fractional seconds (at a resolution of 32 bits). * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ void BWLNum64ToTimespec( struct timespec *to, BWLNum64 from ) { /* * MS 32 bits represent seconds */ to->tv_sec = (long)MASK32(from >> 32); /* * LS 32 bits represent fractional seconds, normalize them to nsecs: * frac/2^32 == nano/(10^9), so * nano = frac * 10^9 / 2^32 */ to->tv_nsec = (long)MASK32((MASK32(from)*BILLION) >> 32); while(to->tv_nsec >= (long)BILLION){ to->tv_sec++; to->tv_nsec -= BILLION; } } /* * Function: BWLTimespecToNum64 * * Description: * * Convert a time value in timespec representation to an BWLNum64 * representation. These are "relative" time values. (Not absolutes - i.e. * they are not relative to some "epoch".) BWLNum64 values are * unsigned 64 integral types with the Most Significant 32 of those * 64 bits representing seconds. The Least Significant 32 bits * represent fractional seconds at a resolution of 32 bits. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ void BWLTimespecToNum64( BWLNum64 *to, struct timespec *from ) { uint32_t sec = from->tv_sec; uint32_t nsec = from->tv_nsec; *to = 0; /* * Ensure nsec's is only fractional. */ while(nsec >= BILLION){ sec++; nsec -= BILLION; } /* * Place seconds in MS 32 bits. */ *to = (uint64_t)MASK32(sec) << 32; /* * Normalize nsecs to 32bit fraction, then set that to LS 32 bits. */ *to |= MASK32(((uint64_t)nsec << 32)/BILLION); return; } /* * Function: BWLNum64toTimeval * * Description: * Convert a time value in BWLNum64 representation to timeval * representation. These are "relative" time values. (Not absolutes - i.e. * they are not relative to some "epoch".) BWLNum64 values are * unsigned 64 integral types with the MS (Most Significant) 32 bits * representing seconds, and the LS (Least Significant) 32 bits * representing fractional seconds (at a resolution of 32 bits). * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ void BWLNum64ToTimeval( struct timeval *to, BWLNum64 from ) { /* * MS 32 bits represent seconds */ to->tv_sec = (long)MASK32(from >> 32); /* * LS 32 bits represent fractional seconds, normalize them to usecs: * frac/2^32 == micro/(10^6), so * nano = frac * 10^6 / 2^32 */ to->tv_usec = (long)MASK32((MASK32(from)*MILLION) >> 32); while(to->tv_usec >= (long)MILLION){ to->tv_sec++; to->tv_usec -= MILLION; } } /* * Function: BWLTimevalToNum64 * * Description: * * Convert a time value in timeval representation to an BWLNum64 * representation. These are "relative" time values. (Not absolutes - i.e. * they are not relative to some "epoch".) BWLNum64 values are * unsigned 64 integral types with the Most Significant 32 of those * 64 bits representing seconds. The Least Significant 32 bits * represent fractional seconds at a resolution of 32 bits. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ void BWLTimevalToNum64( BWLNum64 *to, struct timeval *from ) { uint32_t sec = from->tv_sec; uint32_t usec = from->tv_usec; *to = 0; /* * Ensure usec's is only fractional. */ while(usec >= MILLION){ sec++; usec -= MILLION; } /* * Place seconds in MS 32 bits. */ *to = (uint64_t)MASK32(sec) << 32; /* * Normalize usecs to 32bit fraction, then set that to LS 32 bits. */ *to |= MASK32(((uint64_t)usec << 32)/MILLION); return; } /* * Function: BWLNum64toDouble * * Description: * Convert an BWLNum64 time value to a double representation. * The double will contain the number of seconds with the fractional * portion of the BWLNum64 mapping to the portion of the double * represented after the radix point. This will obviously loose * some precision after the radix point, however - larger values * will be representable in double than an BWLNum64. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ double BWLNum64ToDouble( BWLNum64 from ) { return (double)from / EXP2POW32; } /* * Function: BWLDoubleToNum64 * * Description: * Convert a double value to an BWLNum64 representation. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLNum64 BWLDoubleToNum64( double from ) { if(from < 0){ return 0; } return (BWLNum64)(from * EXP2POW32); } /* * Function: BWLUsecToNum64 * * Description: * Convert an unsigned 32bit number representing some number of * microseconds to an BWLNum64 representation. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLNum64 BWLUsecToNum64(uint32_t usec) { return ((uint64_t)usec << 32)/MILLION; } bwctl_1.5.4+dfsg1.orig/bwlib/rijndael-alg-fst.c0000664000076500007710000017426412560414557016223 0ustar /** * rijndael-alg-fst.c * * @version 3.0 (December 2000) * * Optimised ANSI C code for the Rijndael cipher (now AES) * * @author Vincent Rijmen * @author Antoon Bosselaers * @author Paulo Barreto * * This code is hereby placed in the public domain. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''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 AUTHORS 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. */ #include #include #include "rijndael-alg-fst.h" /* Te0[x] = S [x].[02, 01, 01, 03]; Te1[x] = S [x].[03, 02, 01, 01]; Te2[x] = S [x].[01, 03, 02, 01]; Te3[x] = S [x].[01, 01, 03, 02]; Te4[x] = S [x].[01, 01, 01, 01]; Td0[x] = Si[x].[0e, 09, 0d, 0b]; Td1[x] = Si[x].[0b, 0e, 09, 0d]; Td2[x] = Si[x].[0d, 0b, 0e, 09]; Td3[x] = Si[x].[09, 0d, 0b, 0e]; Td4[x] = Si[x].[01, 01, 01, 01]; */ static const u32 Te0[256] = { 0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU, 0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U, 0x60303050U, 0x02010103U, 0xce6767a9U, 0x562b2b7dU, 0xe7fefe19U, 0xb5d7d762U, 0x4dababe6U, 0xec76769aU, 0x8fcaca45U, 0x1f82829dU, 0x89c9c940U, 0xfa7d7d87U, 0xeffafa15U, 0xb25959ebU, 0x8e4747c9U, 0xfbf0f00bU, 0x41adadecU, 0xb3d4d467U, 0x5fa2a2fdU, 0x45afafeaU, 0x239c9cbfU, 0x53a4a4f7U, 0xe4727296U, 0x9bc0c05bU, 0x75b7b7c2U, 0xe1fdfd1cU, 0x3d9393aeU, 0x4c26266aU, 0x6c36365aU, 0x7e3f3f41U, 0xf5f7f702U, 0x83cccc4fU, 0x6834345cU, 0x51a5a5f4U, 0xd1e5e534U, 0xf9f1f108U, 0xe2717193U, 0xabd8d873U, 0x62313153U, 0x2a15153fU, 0x0804040cU, 0x95c7c752U, 0x46232365U, 0x9dc3c35eU, 0x30181828U, 0x379696a1U, 0x0a05050fU, 0x2f9a9ab5U, 0x0e070709U, 0x24121236U, 0x1b80809bU, 0xdfe2e23dU, 0xcdebeb26U, 0x4e272769U, 0x7fb2b2cdU, 0xea75759fU, 0x1209091bU, 0x1d83839eU, 0x582c2c74U, 0x341a1a2eU, 0x361b1b2dU, 0xdc6e6eb2U, 0xb45a5aeeU, 0x5ba0a0fbU, 0xa45252f6U, 0x763b3b4dU, 0xb7d6d661U, 0x7db3b3ceU, 0x5229297bU, 0xdde3e33eU, 0x5e2f2f71U, 0x13848497U, 0xa65353f5U, 0xb9d1d168U, 0x00000000U, 0xc1eded2cU, 0x40202060U, 0xe3fcfc1fU, 0x79b1b1c8U, 0xb65b5bedU, 0xd46a6abeU, 0x8dcbcb46U, 0x67bebed9U, 0x7239394bU, 0x944a4adeU, 0x984c4cd4U, 0xb05858e8U, 0x85cfcf4aU, 0xbbd0d06bU, 0xc5efef2aU, 0x4faaaae5U, 0xedfbfb16U, 0x864343c5U, 0x9a4d4dd7U, 0x66333355U, 0x11858594U, 0x8a4545cfU, 0xe9f9f910U, 0x04020206U, 0xfe7f7f81U, 0xa05050f0U, 0x783c3c44U, 0x259f9fbaU, 0x4ba8a8e3U, 0xa25151f3U, 0x5da3a3feU, 0x804040c0U, 0x058f8f8aU, 0x3f9292adU, 0x219d9dbcU, 0x70383848U, 0xf1f5f504U, 0x63bcbcdfU, 0x77b6b6c1U, 0xafdada75U, 0x42212163U, 0x20101030U, 0xe5ffff1aU, 0xfdf3f30eU, 0xbfd2d26dU, 0x81cdcd4cU, 0x180c0c14U, 0x26131335U, 0xc3ecec2fU, 0xbe5f5fe1U, 0x359797a2U, 0x884444ccU, 0x2e171739U, 0x93c4c457U, 0x55a7a7f2U, 0xfc7e7e82U, 0x7a3d3d47U, 0xc86464acU, 0xba5d5de7U, 0x3219192bU, 0xe6737395U, 0xc06060a0U, 0x19818198U, 0x9e4f4fd1U, 0xa3dcdc7fU, 0x44222266U, 0x542a2a7eU, 0x3b9090abU, 0x0b888883U, 0x8c4646caU, 0xc7eeee29U, 0x6bb8b8d3U, 0x2814143cU, 0xa7dede79U, 0xbc5e5ee2U, 0x160b0b1dU, 0xaddbdb76U, 0xdbe0e03bU, 0x64323256U, 0x743a3a4eU, 0x140a0a1eU, 0x924949dbU, 0x0c06060aU, 0x4824246cU, 0xb85c5ce4U, 0x9fc2c25dU, 0xbdd3d36eU, 0x43acacefU, 0xc46262a6U, 0x399191a8U, 0x319595a4U, 0xd3e4e437U, 0xf279798bU, 0xd5e7e732U, 0x8bc8c843U, 0x6e373759U, 0xda6d6db7U, 0x018d8d8cU, 0xb1d5d564U, 0x9c4e4ed2U, 0x49a9a9e0U, 0xd86c6cb4U, 0xac5656faU, 0xf3f4f407U, 0xcfeaea25U, 0xca6565afU, 0xf47a7a8eU, 0x47aeaee9U, 0x10080818U, 0x6fbabad5U, 0xf0787888U, 0x4a25256fU, 0x5c2e2e72U, 0x381c1c24U, 0x57a6a6f1U, 0x73b4b4c7U, 0x97c6c651U, 0xcbe8e823U, 0xa1dddd7cU, 0xe874749cU, 0x3e1f1f21U, 0x964b4bddU, 0x61bdbddcU, 0x0d8b8b86U, 0x0f8a8a85U, 0xe0707090U, 0x7c3e3e42U, 0x71b5b5c4U, 0xcc6666aaU, 0x904848d8U, 0x06030305U, 0xf7f6f601U, 0x1c0e0e12U, 0xc26161a3U, 0x6a35355fU, 0xae5757f9U, 0x69b9b9d0U, 0x17868691U, 0x99c1c158U, 0x3a1d1d27U, 0x279e9eb9U, 0xd9e1e138U, 0xebf8f813U, 0x2b9898b3U, 0x22111133U, 0xd26969bbU, 0xa9d9d970U, 0x078e8e89U, 0x339494a7U, 0x2d9b9bb6U, 0x3c1e1e22U, 0x15878792U, 0xc9e9e920U, 0x87cece49U, 0xaa5555ffU, 0x50282878U, 0xa5dfdf7aU, 0x038c8c8fU, 0x59a1a1f8U, 0x09898980U, 0x1a0d0d17U, 0x65bfbfdaU, 0xd7e6e631U, 0x844242c6U, 0xd06868b8U, 0x824141c3U, 0x299999b0U, 0x5a2d2d77U, 0x1e0f0f11U, 0x7bb0b0cbU, 0xa85454fcU, 0x6dbbbbd6U, 0x2c16163aU, }; static const u32 Te1[256] = { 0xa5c66363U, 0x84f87c7cU, 0x99ee7777U, 0x8df67b7bU, 0x0dfff2f2U, 0xbdd66b6bU, 0xb1de6f6fU, 0x5491c5c5U, 0x50603030U, 0x03020101U, 0xa9ce6767U, 0x7d562b2bU, 0x19e7fefeU, 0x62b5d7d7U, 0xe64dababU, 0x9aec7676U, 0x458fcacaU, 0x9d1f8282U, 0x4089c9c9U, 0x87fa7d7dU, 0x15effafaU, 0xebb25959U, 0xc98e4747U, 0x0bfbf0f0U, 0xec41adadU, 0x67b3d4d4U, 0xfd5fa2a2U, 0xea45afafU, 0xbf239c9cU, 0xf753a4a4U, 0x96e47272U, 0x5b9bc0c0U, 0xc275b7b7U, 0x1ce1fdfdU, 0xae3d9393U, 0x6a4c2626U, 0x5a6c3636U, 0x417e3f3fU, 0x02f5f7f7U, 0x4f83ccccU, 0x5c683434U, 0xf451a5a5U, 0x34d1e5e5U, 0x08f9f1f1U, 0x93e27171U, 0x73abd8d8U, 0x53623131U, 0x3f2a1515U, 0x0c080404U, 0x5295c7c7U, 0x65462323U, 0x5e9dc3c3U, 0x28301818U, 0xa1379696U, 0x0f0a0505U, 0xb52f9a9aU, 0x090e0707U, 0x36241212U, 0x9b1b8080U, 0x3ddfe2e2U, 0x26cdebebU, 0x694e2727U, 0xcd7fb2b2U, 0x9fea7575U, 0x1b120909U, 0x9e1d8383U, 0x74582c2cU, 0x2e341a1aU, 0x2d361b1bU, 0xb2dc6e6eU, 0xeeb45a5aU, 0xfb5ba0a0U, 0xf6a45252U, 0x4d763b3bU, 0x61b7d6d6U, 0xce7db3b3U, 0x7b522929U, 0x3edde3e3U, 0x715e2f2fU, 0x97138484U, 0xf5a65353U, 0x68b9d1d1U, 0x00000000U, 0x2cc1ededU, 0x60402020U, 0x1fe3fcfcU, 0xc879b1b1U, 0xedb65b5bU, 0xbed46a6aU, 0x468dcbcbU, 0xd967bebeU, 0x4b723939U, 0xde944a4aU, 0xd4984c4cU, 0xe8b05858U, 0x4a85cfcfU, 0x6bbbd0d0U, 0x2ac5efefU, 0xe54faaaaU, 0x16edfbfbU, 0xc5864343U, 0xd79a4d4dU, 0x55663333U, 0x94118585U, 0xcf8a4545U, 0x10e9f9f9U, 0x06040202U, 0x81fe7f7fU, 0xf0a05050U, 0x44783c3cU, 0xba259f9fU, 0xe34ba8a8U, 0xf3a25151U, 0xfe5da3a3U, 0xc0804040U, 0x8a058f8fU, 0xad3f9292U, 0xbc219d9dU, 0x48703838U, 0x04f1f5f5U, 0xdf63bcbcU, 0xc177b6b6U, 0x75afdadaU, 0x63422121U, 0x30201010U, 0x1ae5ffffU, 0x0efdf3f3U, 0x6dbfd2d2U, 0x4c81cdcdU, 0x14180c0cU, 0x35261313U, 0x2fc3ececU, 0xe1be5f5fU, 0xa2359797U, 0xcc884444U, 0x392e1717U, 0x5793c4c4U, 0xf255a7a7U, 0x82fc7e7eU, 0x477a3d3dU, 0xacc86464U, 0xe7ba5d5dU, 0x2b321919U, 0x95e67373U, 0xa0c06060U, 0x98198181U, 0xd19e4f4fU, 0x7fa3dcdcU, 0x66442222U, 0x7e542a2aU, 0xab3b9090U, 0x830b8888U, 0xca8c4646U, 0x29c7eeeeU, 0xd36bb8b8U, 0x3c281414U, 0x79a7dedeU, 0xe2bc5e5eU, 0x1d160b0bU, 0x76addbdbU, 0x3bdbe0e0U, 0x56643232U, 0x4e743a3aU, 0x1e140a0aU, 0xdb924949U, 0x0a0c0606U, 0x6c482424U, 0xe4b85c5cU, 0x5d9fc2c2U, 0x6ebdd3d3U, 0xef43acacU, 0xa6c46262U, 0xa8399191U, 0xa4319595U, 0x37d3e4e4U, 0x8bf27979U, 0x32d5e7e7U, 0x438bc8c8U, 0x596e3737U, 0xb7da6d6dU, 0x8c018d8dU, 0x64b1d5d5U, 0xd29c4e4eU, 0xe049a9a9U, 0xb4d86c6cU, 0xfaac5656U, 0x07f3f4f4U, 0x25cfeaeaU, 0xafca6565U, 0x8ef47a7aU, 0xe947aeaeU, 0x18100808U, 0xd56fbabaU, 0x88f07878U, 0x6f4a2525U, 0x725c2e2eU, 0x24381c1cU, 0xf157a6a6U, 0xc773b4b4U, 0x5197c6c6U, 0x23cbe8e8U, 0x7ca1ddddU, 0x9ce87474U, 0x213e1f1fU, 0xdd964b4bU, 0xdc61bdbdU, 0x860d8b8bU, 0x850f8a8aU, 0x90e07070U, 0x427c3e3eU, 0xc471b5b5U, 0xaacc6666U, 0xd8904848U, 0x05060303U, 0x01f7f6f6U, 0x121c0e0eU, 0xa3c26161U, 0x5f6a3535U, 0xf9ae5757U, 0xd069b9b9U, 0x91178686U, 0x5899c1c1U, 0x273a1d1dU, 0xb9279e9eU, 0x38d9e1e1U, 0x13ebf8f8U, 0xb32b9898U, 0x33221111U, 0xbbd26969U, 0x70a9d9d9U, 0x89078e8eU, 0xa7339494U, 0xb62d9b9bU, 0x223c1e1eU, 0x92158787U, 0x20c9e9e9U, 0x4987ceceU, 0xffaa5555U, 0x78502828U, 0x7aa5dfdfU, 0x8f038c8cU, 0xf859a1a1U, 0x80098989U, 0x171a0d0dU, 0xda65bfbfU, 0x31d7e6e6U, 0xc6844242U, 0xb8d06868U, 0xc3824141U, 0xb0299999U, 0x775a2d2dU, 0x111e0f0fU, 0xcb7bb0b0U, 0xfca85454U, 0xd66dbbbbU, 0x3a2c1616U, }; static const u32 Te2[256] = { 0x63a5c663U, 0x7c84f87cU, 0x7799ee77U, 0x7b8df67bU, 0xf20dfff2U, 0x6bbdd66bU, 0x6fb1de6fU, 0xc55491c5U, 0x30506030U, 0x01030201U, 0x67a9ce67U, 0x2b7d562bU, 0xfe19e7feU, 0xd762b5d7U, 0xabe64dabU, 0x769aec76U, 0xca458fcaU, 0x829d1f82U, 0xc94089c9U, 0x7d87fa7dU, 0xfa15effaU, 0x59ebb259U, 0x47c98e47U, 0xf00bfbf0U, 0xadec41adU, 0xd467b3d4U, 0xa2fd5fa2U, 0xafea45afU, 0x9cbf239cU, 0xa4f753a4U, 0x7296e472U, 0xc05b9bc0U, 0xb7c275b7U, 0xfd1ce1fdU, 0x93ae3d93U, 0x266a4c26U, 0x365a6c36U, 0x3f417e3fU, 0xf702f5f7U, 0xcc4f83ccU, 0x345c6834U, 0xa5f451a5U, 0xe534d1e5U, 0xf108f9f1U, 0x7193e271U, 0xd873abd8U, 0x31536231U, 0x153f2a15U, 0x040c0804U, 0xc75295c7U, 0x23654623U, 0xc35e9dc3U, 0x18283018U, 0x96a13796U, 0x050f0a05U, 0x9ab52f9aU, 0x07090e07U, 0x12362412U, 0x809b1b80U, 0xe23ddfe2U, 0xeb26cdebU, 0x27694e27U, 0xb2cd7fb2U, 0x759fea75U, 0x091b1209U, 0x839e1d83U, 0x2c74582cU, 0x1a2e341aU, 0x1b2d361bU, 0x6eb2dc6eU, 0x5aeeb45aU, 0xa0fb5ba0U, 0x52f6a452U, 0x3b4d763bU, 0xd661b7d6U, 0xb3ce7db3U, 0x297b5229U, 0xe33edde3U, 0x2f715e2fU, 0x84971384U, 0x53f5a653U, 0xd168b9d1U, 0x00000000U, 0xed2cc1edU, 0x20604020U, 0xfc1fe3fcU, 0xb1c879b1U, 0x5bedb65bU, 0x6abed46aU, 0xcb468dcbU, 0xbed967beU, 0x394b7239U, 0x4ade944aU, 0x4cd4984cU, 0x58e8b058U, 0xcf4a85cfU, 0xd06bbbd0U, 0xef2ac5efU, 0xaae54faaU, 0xfb16edfbU, 0x43c58643U, 0x4dd79a4dU, 0x33556633U, 0x85941185U, 0x45cf8a45U, 0xf910e9f9U, 0x02060402U, 0x7f81fe7fU, 0x50f0a050U, 0x3c44783cU, 0x9fba259fU, 0xa8e34ba8U, 0x51f3a251U, 0xa3fe5da3U, 0x40c08040U, 0x8f8a058fU, 0x92ad3f92U, 0x9dbc219dU, 0x38487038U, 0xf504f1f5U, 0xbcdf63bcU, 0xb6c177b6U, 0xda75afdaU, 0x21634221U, 0x10302010U, 0xff1ae5ffU, 0xf30efdf3U, 0xd26dbfd2U, 0xcd4c81cdU, 0x0c14180cU, 0x13352613U, 0xec2fc3ecU, 0x5fe1be5fU, 0x97a23597U, 0x44cc8844U, 0x17392e17U, 0xc45793c4U, 0xa7f255a7U, 0x7e82fc7eU, 0x3d477a3dU, 0x64acc864U, 0x5de7ba5dU, 0x192b3219U, 0x7395e673U, 0x60a0c060U, 0x81981981U, 0x4fd19e4fU, 0xdc7fa3dcU, 0x22664422U, 0x2a7e542aU, 0x90ab3b90U, 0x88830b88U, 0x46ca8c46U, 0xee29c7eeU, 0xb8d36bb8U, 0x143c2814U, 0xde79a7deU, 0x5ee2bc5eU, 0x0b1d160bU, 0xdb76addbU, 0xe03bdbe0U, 0x32566432U, 0x3a4e743aU, 0x0a1e140aU, 0x49db9249U, 0x060a0c06U, 0x246c4824U, 0x5ce4b85cU, 0xc25d9fc2U, 0xd36ebdd3U, 0xacef43acU, 0x62a6c462U, 0x91a83991U, 0x95a43195U, 0xe437d3e4U, 0x798bf279U, 0xe732d5e7U, 0xc8438bc8U, 0x37596e37U, 0x6db7da6dU, 0x8d8c018dU, 0xd564b1d5U, 0x4ed29c4eU, 0xa9e049a9U, 0x6cb4d86cU, 0x56faac56U, 0xf407f3f4U, 0xea25cfeaU, 0x65afca65U, 0x7a8ef47aU, 0xaee947aeU, 0x08181008U, 0xbad56fbaU, 0x7888f078U, 0x256f4a25U, 0x2e725c2eU, 0x1c24381cU, 0xa6f157a6U, 0xb4c773b4U, 0xc65197c6U, 0xe823cbe8U, 0xdd7ca1ddU, 0x749ce874U, 0x1f213e1fU, 0x4bdd964bU, 0xbddc61bdU, 0x8b860d8bU, 0x8a850f8aU, 0x7090e070U, 0x3e427c3eU, 0xb5c471b5U, 0x66aacc66U, 0x48d89048U, 0x03050603U, 0xf601f7f6U, 0x0e121c0eU, 0x61a3c261U, 0x355f6a35U, 0x57f9ae57U, 0xb9d069b9U, 0x86911786U, 0xc15899c1U, 0x1d273a1dU, 0x9eb9279eU, 0xe138d9e1U, 0xf813ebf8U, 0x98b32b98U, 0x11332211U, 0x69bbd269U, 0xd970a9d9U, 0x8e89078eU, 0x94a73394U, 0x9bb62d9bU, 0x1e223c1eU, 0x87921587U, 0xe920c9e9U, 0xce4987ceU, 0x55ffaa55U, 0x28785028U, 0xdf7aa5dfU, 0x8c8f038cU, 0xa1f859a1U, 0x89800989U, 0x0d171a0dU, 0xbfda65bfU, 0xe631d7e6U, 0x42c68442U, 0x68b8d068U, 0x41c38241U, 0x99b02999U, 0x2d775a2dU, 0x0f111e0fU, 0xb0cb7bb0U, 0x54fca854U, 0xbbd66dbbU, 0x163a2c16U, }; static const u32 Te3[256] = { 0x6363a5c6U, 0x7c7c84f8U, 0x777799eeU, 0x7b7b8df6U, 0xf2f20dffU, 0x6b6bbdd6U, 0x6f6fb1deU, 0xc5c55491U, 0x30305060U, 0x01010302U, 0x6767a9ceU, 0x2b2b7d56U, 0xfefe19e7U, 0xd7d762b5U, 0xababe64dU, 0x76769aecU, 0xcaca458fU, 0x82829d1fU, 0xc9c94089U, 0x7d7d87faU, 0xfafa15efU, 0x5959ebb2U, 0x4747c98eU, 0xf0f00bfbU, 0xadadec41U, 0xd4d467b3U, 0xa2a2fd5fU, 0xafafea45U, 0x9c9cbf23U, 0xa4a4f753U, 0x727296e4U, 0xc0c05b9bU, 0xb7b7c275U, 0xfdfd1ce1U, 0x9393ae3dU, 0x26266a4cU, 0x36365a6cU, 0x3f3f417eU, 0xf7f702f5U, 0xcccc4f83U, 0x34345c68U, 0xa5a5f451U, 0xe5e534d1U, 0xf1f108f9U, 0x717193e2U, 0xd8d873abU, 0x31315362U, 0x15153f2aU, 0x04040c08U, 0xc7c75295U, 0x23236546U, 0xc3c35e9dU, 0x18182830U, 0x9696a137U, 0x05050f0aU, 0x9a9ab52fU, 0x0707090eU, 0x12123624U, 0x80809b1bU, 0xe2e23ddfU, 0xebeb26cdU, 0x2727694eU, 0xb2b2cd7fU, 0x75759feaU, 0x09091b12U, 0x83839e1dU, 0x2c2c7458U, 0x1a1a2e34U, 0x1b1b2d36U, 0x6e6eb2dcU, 0x5a5aeeb4U, 0xa0a0fb5bU, 0x5252f6a4U, 0x3b3b4d76U, 0xd6d661b7U, 0xb3b3ce7dU, 0x29297b52U, 0xe3e33eddU, 0x2f2f715eU, 0x84849713U, 0x5353f5a6U, 0xd1d168b9U, 0x00000000U, 0xeded2cc1U, 0x20206040U, 0xfcfc1fe3U, 0xb1b1c879U, 0x5b5bedb6U, 0x6a6abed4U, 0xcbcb468dU, 0xbebed967U, 0x39394b72U, 0x4a4ade94U, 0x4c4cd498U, 0x5858e8b0U, 0xcfcf4a85U, 0xd0d06bbbU, 0xefef2ac5U, 0xaaaae54fU, 0xfbfb16edU, 0x4343c586U, 0x4d4dd79aU, 0x33335566U, 0x85859411U, 0x4545cf8aU, 0xf9f910e9U, 0x02020604U, 0x7f7f81feU, 0x5050f0a0U, 0x3c3c4478U, 0x9f9fba25U, 0xa8a8e34bU, 0x5151f3a2U, 0xa3a3fe5dU, 0x4040c080U, 0x8f8f8a05U, 0x9292ad3fU, 0x9d9dbc21U, 0x38384870U, 0xf5f504f1U, 0xbcbcdf63U, 0xb6b6c177U, 0xdada75afU, 0x21216342U, 0x10103020U, 0xffff1ae5U, 0xf3f30efdU, 0xd2d26dbfU, 0xcdcd4c81U, 0x0c0c1418U, 0x13133526U, 0xecec2fc3U, 0x5f5fe1beU, 0x9797a235U, 0x4444cc88U, 0x1717392eU, 0xc4c45793U, 0xa7a7f255U, 0x7e7e82fcU, 0x3d3d477aU, 0x6464acc8U, 0x5d5de7baU, 0x19192b32U, 0x737395e6U, 0x6060a0c0U, 0x81819819U, 0x4f4fd19eU, 0xdcdc7fa3U, 0x22226644U, 0x2a2a7e54U, 0x9090ab3bU, 0x8888830bU, 0x4646ca8cU, 0xeeee29c7U, 0xb8b8d36bU, 0x14143c28U, 0xdede79a7U, 0x5e5ee2bcU, 0x0b0b1d16U, 0xdbdb76adU, 0xe0e03bdbU, 0x32325664U, 0x3a3a4e74U, 0x0a0a1e14U, 0x4949db92U, 0x06060a0cU, 0x24246c48U, 0x5c5ce4b8U, 0xc2c25d9fU, 0xd3d36ebdU, 0xacacef43U, 0x6262a6c4U, 0x9191a839U, 0x9595a431U, 0xe4e437d3U, 0x79798bf2U, 0xe7e732d5U, 0xc8c8438bU, 0x3737596eU, 0x6d6db7daU, 0x8d8d8c01U, 0xd5d564b1U, 0x4e4ed29cU, 0xa9a9e049U, 0x6c6cb4d8U, 0x5656faacU, 0xf4f407f3U, 0xeaea25cfU, 0x6565afcaU, 0x7a7a8ef4U, 0xaeaee947U, 0x08081810U, 0xbabad56fU, 0x787888f0U, 0x25256f4aU, 0x2e2e725cU, 0x1c1c2438U, 0xa6a6f157U, 0xb4b4c773U, 0xc6c65197U, 0xe8e823cbU, 0xdddd7ca1U, 0x74749ce8U, 0x1f1f213eU, 0x4b4bdd96U, 0xbdbddc61U, 0x8b8b860dU, 0x8a8a850fU, 0x707090e0U, 0x3e3e427cU, 0xb5b5c471U, 0x6666aaccU, 0x4848d890U, 0x03030506U, 0xf6f601f7U, 0x0e0e121cU, 0x6161a3c2U, 0x35355f6aU, 0x5757f9aeU, 0xb9b9d069U, 0x86869117U, 0xc1c15899U, 0x1d1d273aU, 0x9e9eb927U, 0xe1e138d9U, 0xf8f813ebU, 0x9898b32bU, 0x11113322U, 0x6969bbd2U, 0xd9d970a9U, 0x8e8e8907U, 0x9494a733U, 0x9b9bb62dU, 0x1e1e223cU, 0x87879215U, 0xe9e920c9U, 0xcece4987U, 0x5555ffaaU, 0x28287850U, 0xdfdf7aa5U, 0x8c8c8f03U, 0xa1a1f859U, 0x89898009U, 0x0d0d171aU, 0xbfbfda65U, 0xe6e631d7U, 0x4242c684U, 0x6868b8d0U, 0x4141c382U, 0x9999b029U, 0x2d2d775aU, 0x0f0f111eU, 0xb0b0cb7bU, 0x5454fca8U, 0xbbbbd66dU, 0x16163a2cU, }; static const u32 Te4[256] = { 0x63636363U, 0x7c7c7c7cU, 0x77777777U, 0x7b7b7b7bU, 0xf2f2f2f2U, 0x6b6b6b6bU, 0x6f6f6f6fU, 0xc5c5c5c5U, 0x30303030U, 0x01010101U, 0x67676767U, 0x2b2b2b2bU, 0xfefefefeU, 0xd7d7d7d7U, 0xababababU, 0x76767676U, 0xcacacacaU, 0x82828282U, 0xc9c9c9c9U, 0x7d7d7d7dU, 0xfafafafaU, 0x59595959U, 0x47474747U, 0xf0f0f0f0U, 0xadadadadU, 0xd4d4d4d4U, 0xa2a2a2a2U, 0xafafafafU, 0x9c9c9c9cU, 0xa4a4a4a4U, 0x72727272U, 0xc0c0c0c0U, 0xb7b7b7b7U, 0xfdfdfdfdU, 0x93939393U, 0x26262626U, 0x36363636U, 0x3f3f3f3fU, 0xf7f7f7f7U, 0xccccccccU, 0x34343434U, 0xa5a5a5a5U, 0xe5e5e5e5U, 0xf1f1f1f1U, 0x71717171U, 0xd8d8d8d8U, 0x31313131U, 0x15151515U, 0x04040404U, 0xc7c7c7c7U, 0x23232323U, 0xc3c3c3c3U, 0x18181818U, 0x96969696U, 0x05050505U, 0x9a9a9a9aU, 0x07070707U, 0x12121212U, 0x80808080U, 0xe2e2e2e2U, 0xebebebebU, 0x27272727U, 0xb2b2b2b2U, 0x75757575U, 0x09090909U, 0x83838383U, 0x2c2c2c2cU, 0x1a1a1a1aU, 0x1b1b1b1bU, 0x6e6e6e6eU, 0x5a5a5a5aU, 0xa0a0a0a0U, 0x52525252U, 0x3b3b3b3bU, 0xd6d6d6d6U, 0xb3b3b3b3U, 0x29292929U, 0xe3e3e3e3U, 0x2f2f2f2fU, 0x84848484U, 0x53535353U, 0xd1d1d1d1U, 0x00000000U, 0xededededU, 0x20202020U, 0xfcfcfcfcU, 0xb1b1b1b1U, 0x5b5b5b5bU, 0x6a6a6a6aU, 0xcbcbcbcbU, 0xbebebebeU, 0x39393939U, 0x4a4a4a4aU, 0x4c4c4c4cU, 0x58585858U, 0xcfcfcfcfU, 0xd0d0d0d0U, 0xefefefefU, 0xaaaaaaaaU, 0xfbfbfbfbU, 0x43434343U, 0x4d4d4d4dU, 0x33333333U, 0x85858585U, 0x45454545U, 0xf9f9f9f9U, 0x02020202U, 0x7f7f7f7fU, 0x50505050U, 0x3c3c3c3cU, 0x9f9f9f9fU, 0xa8a8a8a8U, 0x51515151U, 0xa3a3a3a3U, 0x40404040U, 0x8f8f8f8fU, 0x92929292U, 0x9d9d9d9dU, 0x38383838U, 0xf5f5f5f5U, 0xbcbcbcbcU, 0xb6b6b6b6U, 0xdadadadaU, 0x21212121U, 0x10101010U, 0xffffffffU, 0xf3f3f3f3U, 0xd2d2d2d2U, 0xcdcdcdcdU, 0x0c0c0c0cU, 0x13131313U, 0xececececU, 0x5f5f5f5fU, 0x97979797U, 0x44444444U, 0x17171717U, 0xc4c4c4c4U, 0xa7a7a7a7U, 0x7e7e7e7eU, 0x3d3d3d3dU, 0x64646464U, 0x5d5d5d5dU, 0x19191919U, 0x73737373U, 0x60606060U, 0x81818181U, 0x4f4f4f4fU, 0xdcdcdcdcU, 0x22222222U, 0x2a2a2a2aU, 0x90909090U, 0x88888888U, 0x46464646U, 0xeeeeeeeeU, 0xb8b8b8b8U, 0x14141414U, 0xdedededeU, 0x5e5e5e5eU, 0x0b0b0b0bU, 0xdbdbdbdbU, 0xe0e0e0e0U, 0x32323232U, 0x3a3a3a3aU, 0x0a0a0a0aU, 0x49494949U, 0x06060606U, 0x24242424U, 0x5c5c5c5cU, 0xc2c2c2c2U, 0xd3d3d3d3U, 0xacacacacU, 0x62626262U, 0x91919191U, 0x95959595U, 0xe4e4e4e4U, 0x79797979U, 0xe7e7e7e7U, 0xc8c8c8c8U, 0x37373737U, 0x6d6d6d6dU, 0x8d8d8d8dU, 0xd5d5d5d5U, 0x4e4e4e4eU, 0xa9a9a9a9U, 0x6c6c6c6cU, 0x56565656U, 0xf4f4f4f4U, 0xeaeaeaeaU, 0x65656565U, 0x7a7a7a7aU, 0xaeaeaeaeU, 0x08080808U, 0xbabababaU, 0x78787878U, 0x25252525U, 0x2e2e2e2eU, 0x1c1c1c1cU, 0xa6a6a6a6U, 0xb4b4b4b4U, 0xc6c6c6c6U, 0xe8e8e8e8U, 0xddddddddU, 0x74747474U, 0x1f1f1f1fU, 0x4b4b4b4bU, 0xbdbdbdbdU, 0x8b8b8b8bU, 0x8a8a8a8aU, 0x70707070U, 0x3e3e3e3eU, 0xb5b5b5b5U, 0x66666666U, 0x48484848U, 0x03030303U, 0xf6f6f6f6U, 0x0e0e0e0eU, 0x61616161U, 0x35353535U, 0x57575757U, 0xb9b9b9b9U, 0x86868686U, 0xc1c1c1c1U, 0x1d1d1d1dU, 0x9e9e9e9eU, 0xe1e1e1e1U, 0xf8f8f8f8U, 0x98989898U, 0x11111111U, 0x69696969U, 0xd9d9d9d9U, 0x8e8e8e8eU, 0x94949494U, 0x9b9b9b9bU, 0x1e1e1e1eU, 0x87878787U, 0xe9e9e9e9U, 0xcecececeU, 0x55555555U, 0x28282828U, 0xdfdfdfdfU, 0x8c8c8c8cU, 0xa1a1a1a1U, 0x89898989U, 0x0d0d0d0dU, 0xbfbfbfbfU, 0xe6e6e6e6U, 0x42424242U, 0x68686868U, 0x41414141U, 0x99999999U, 0x2d2d2d2dU, 0x0f0f0f0fU, 0xb0b0b0b0U, 0x54545454U, 0xbbbbbbbbU, 0x16161616U, }; static const u32 Td0[256] = { 0x51f4a750U, 0x7e416553U, 0x1a17a4c3U, 0x3a275e96U, 0x3bab6bcbU, 0x1f9d45f1U, 0xacfa58abU, 0x4be30393U, 0x2030fa55U, 0xad766df6U, 0x88cc7691U, 0xf5024c25U, 0x4fe5d7fcU, 0xc52acbd7U, 0x26354480U, 0xb562a38fU, 0xdeb15a49U, 0x25ba1b67U, 0x45ea0e98U, 0x5dfec0e1U, 0xc32f7502U, 0x814cf012U, 0x8d4697a3U, 0x6bd3f9c6U, 0x038f5fe7U, 0x15929c95U, 0xbf6d7aebU, 0x955259daU, 0xd4be832dU, 0x587421d3U, 0x49e06929U, 0x8ec9c844U, 0x75c2896aU, 0xf48e7978U, 0x99583e6bU, 0x27b971ddU, 0xbee14fb6U, 0xf088ad17U, 0xc920ac66U, 0x7dce3ab4U, 0x63df4a18U, 0xe51a3182U, 0x97513360U, 0x62537f45U, 0xb16477e0U, 0xbb6bae84U, 0xfe81a01cU, 0xf9082b94U, 0x70486858U, 0x8f45fd19U, 0x94de6c87U, 0x527bf8b7U, 0xab73d323U, 0x724b02e2U, 0xe31f8f57U, 0x6655ab2aU, 0xb2eb2807U, 0x2fb5c203U, 0x86c57b9aU, 0xd33708a5U, 0x302887f2U, 0x23bfa5b2U, 0x02036abaU, 0xed16825cU, 0x8acf1c2bU, 0xa779b492U, 0xf307f2f0U, 0x4e69e2a1U, 0x65daf4cdU, 0x0605bed5U, 0xd134621fU, 0xc4a6fe8aU, 0x342e539dU, 0xa2f355a0U, 0x058ae132U, 0xa4f6eb75U, 0x0b83ec39U, 0x4060efaaU, 0x5e719f06U, 0xbd6e1051U, 0x3e218af9U, 0x96dd063dU, 0xdd3e05aeU, 0x4de6bd46U, 0x91548db5U, 0x71c45d05U, 0x0406d46fU, 0x605015ffU, 0x1998fb24U, 0xd6bde997U, 0x894043ccU, 0x67d99e77U, 0xb0e842bdU, 0x07898b88U, 0xe7195b38U, 0x79c8eedbU, 0xa17c0a47U, 0x7c420fe9U, 0xf8841ec9U, 0x00000000U, 0x09808683U, 0x322bed48U, 0x1e1170acU, 0x6c5a724eU, 0xfd0efffbU, 0x0f853856U, 0x3daed51eU, 0x362d3927U, 0x0a0fd964U, 0x685ca621U, 0x9b5b54d1U, 0x24362e3aU, 0x0c0a67b1U, 0x9357e70fU, 0xb4ee96d2U, 0x1b9b919eU, 0x80c0c54fU, 0x61dc20a2U, 0x5a774b69U, 0x1c121a16U, 0xe293ba0aU, 0xc0a02ae5U, 0x3c22e043U, 0x121b171dU, 0x0e090d0bU, 0xf28bc7adU, 0x2db6a8b9U, 0x141ea9c8U, 0x57f11985U, 0xaf75074cU, 0xee99ddbbU, 0xa37f60fdU, 0xf701269fU, 0x5c72f5bcU, 0x44663bc5U, 0x5bfb7e34U, 0x8b432976U, 0xcb23c6dcU, 0xb6edfc68U, 0xb8e4f163U, 0xd731dccaU, 0x42638510U, 0x13972240U, 0x84c61120U, 0x854a247dU, 0xd2bb3df8U, 0xaef93211U, 0xc729a16dU, 0x1d9e2f4bU, 0xdcb230f3U, 0x0d8652ecU, 0x77c1e3d0U, 0x2bb3166cU, 0xa970b999U, 0x119448faU, 0x47e96422U, 0xa8fc8cc4U, 0xa0f03f1aU, 0x567d2cd8U, 0x223390efU, 0x87494ec7U, 0xd938d1c1U, 0x8ccaa2feU, 0x98d40b36U, 0xa6f581cfU, 0xa57ade28U, 0xdab78e26U, 0x3fadbfa4U, 0x2c3a9de4U, 0x5078920dU, 0x6a5fcc9bU, 0x547e4662U, 0xf68d13c2U, 0x90d8b8e8U, 0x2e39f75eU, 0x82c3aff5U, 0x9f5d80beU, 0x69d0937cU, 0x6fd52da9U, 0xcf2512b3U, 0xc8ac993bU, 0x10187da7U, 0xe89c636eU, 0xdb3bbb7bU, 0xcd267809U, 0x6e5918f4U, 0xec9ab701U, 0x834f9aa8U, 0xe6956e65U, 0xaaffe67eU, 0x21bccf08U, 0xef15e8e6U, 0xbae79bd9U, 0x4a6f36ceU, 0xea9f09d4U, 0x29b07cd6U, 0x31a4b2afU, 0x2a3f2331U, 0xc6a59430U, 0x35a266c0U, 0x744ebc37U, 0xfc82caa6U, 0xe090d0b0U, 0x33a7d815U, 0xf104984aU, 0x41ecdaf7U, 0x7fcd500eU, 0x1791f62fU, 0x764dd68dU, 0x43efb04dU, 0xccaa4d54U, 0xe49604dfU, 0x9ed1b5e3U, 0x4c6a881bU, 0xc12c1fb8U, 0x4665517fU, 0x9d5eea04U, 0x018c355dU, 0xfa877473U, 0xfb0b412eU, 0xb3671d5aU, 0x92dbd252U, 0xe9105633U, 0x6dd64713U, 0x9ad7618cU, 0x37a10c7aU, 0x59f8148eU, 0xeb133c89U, 0xcea927eeU, 0xb761c935U, 0xe11ce5edU, 0x7a47b13cU, 0x9cd2df59U, 0x55f2733fU, 0x1814ce79U, 0x73c737bfU, 0x53f7cdeaU, 0x5ffdaa5bU, 0xdf3d6f14U, 0x7844db86U, 0xcaaff381U, 0xb968c43eU, 0x3824342cU, 0xc2a3405fU, 0x161dc372U, 0xbce2250cU, 0x283c498bU, 0xff0d9541U, 0x39a80171U, 0x080cb3deU, 0xd8b4e49cU, 0x6456c190U, 0x7bcb8461U, 0xd532b670U, 0x486c5c74U, 0xd0b85742U, }; static const u32 Td1[256] = { 0x5051f4a7U, 0x537e4165U, 0xc31a17a4U, 0x963a275eU, 0xcb3bab6bU, 0xf11f9d45U, 0xabacfa58U, 0x934be303U, 0x552030faU, 0xf6ad766dU, 0x9188cc76U, 0x25f5024cU, 0xfc4fe5d7U, 0xd7c52acbU, 0x80263544U, 0x8fb562a3U, 0x49deb15aU, 0x6725ba1bU, 0x9845ea0eU, 0xe15dfec0U, 0x02c32f75U, 0x12814cf0U, 0xa38d4697U, 0xc66bd3f9U, 0xe7038f5fU, 0x9515929cU, 0xebbf6d7aU, 0xda955259U, 0x2dd4be83U, 0xd3587421U, 0x2949e069U, 0x448ec9c8U, 0x6a75c289U, 0x78f48e79U, 0x6b99583eU, 0xdd27b971U, 0xb6bee14fU, 0x17f088adU, 0x66c920acU, 0xb47dce3aU, 0x1863df4aU, 0x82e51a31U, 0x60975133U, 0x4562537fU, 0xe0b16477U, 0x84bb6baeU, 0x1cfe81a0U, 0x94f9082bU, 0x58704868U, 0x198f45fdU, 0x8794de6cU, 0xb7527bf8U, 0x23ab73d3U, 0xe2724b02U, 0x57e31f8fU, 0x2a6655abU, 0x07b2eb28U, 0x032fb5c2U, 0x9a86c57bU, 0xa5d33708U, 0xf2302887U, 0xb223bfa5U, 0xba02036aU, 0x5ced1682U, 0x2b8acf1cU, 0x92a779b4U, 0xf0f307f2U, 0xa14e69e2U, 0xcd65daf4U, 0xd50605beU, 0x1fd13462U, 0x8ac4a6feU, 0x9d342e53U, 0xa0a2f355U, 0x32058ae1U, 0x75a4f6ebU, 0x390b83ecU, 0xaa4060efU, 0x065e719fU, 0x51bd6e10U, 0xf93e218aU, 0x3d96dd06U, 0xaedd3e05U, 0x464de6bdU, 0xb591548dU, 0x0571c45dU, 0x6f0406d4U, 0xff605015U, 0x241998fbU, 0x97d6bde9U, 0xcc894043U, 0x7767d99eU, 0xbdb0e842U, 0x8807898bU, 0x38e7195bU, 0xdb79c8eeU, 0x47a17c0aU, 0xe97c420fU, 0xc9f8841eU, 0x00000000U, 0x83098086U, 0x48322bedU, 0xac1e1170U, 0x4e6c5a72U, 0xfbfd0effU, 0x560f8538U, 0x1e3daed5U, 0x27362d39U, 0x640a0fd9U, 0x21685ca6U, 0xd19b5b54U, 0x3a24362eU, 0xb10c0a67U, 0x0f9357e7U, 0xd2b4ee96U, 0x9e1b9b91U, 0x4f80c0c5U, 0xa261dc20U, 0x695a774bU, 0x161c121aU, 0x0ae293baU, 0xe5c0a02aU, 0x433c22e0U, 0x1d121b17U, 0x0b0e090dU, 0xadf28bc7U, 0xb92db6a8U, 0xc8141ea9U, 0x8557f119U, 0x4caf7507U, 0xbbee99ddU, 0xfda37f60U, 0x9ff70126U, 0xbc5c72f5U, 0xc544663bU, 0x345bfb7eU, 0x768b4329U, 0xdccb23c6U, 0x68b6edfcU, 0x63b8e4f1U, 0xcad731dcU, 0x10426385U, 0x40139722U, 0x2084c611U, 0x7d854a24U, 0xf8d2bb3dU, 0x11aef932U, 0x6dc729a1U, 0x4b1d9e2fU, 0xf3dcb230U, 0xec0d8652U, 0xd077c1e3U, 0x6c2bb316U, 0x99a970b9U, 0xfa119448U, 0x2247e964U, 0xc4a8fc8cU, 0x1aa0f03fU, 0xd8567d2cU, 0xef223390U, 0xc787494eU, 0xc1d938d1U, 0xfe8ccaa2U, 0x3698d40bU, 0xcfa6f581U, 0x28a57adeU, 0x26dab78eU, 0xa43fadbfU, 0xe42c3a9dU, 0x0d507892U, 0x9b6a5fccU, 0x62547e46U, 0xc2f68d13U, 0xe890d8b8U, 0x5e2e39f7U, 0xf582c3afU, 0xbe9f5d80U, 0x7c69d093U, 0xa96fd52dU, 0xb3cf2512U, 0x3bc8ac99U, 0xa710187dU, 0x6ee89c63U, 0x7bdb3bbbU, 0x09cd2678U, 0xf46e5918U, 0x01ec9ab7U, 0xa8834f9aU, 0x65e6956eU, 0x7eaaffe6U, 0x0821bccfU, 0xe6ef15e8U, 0xd9bae79bU, 0xce4a6f36U, 0xd4ea9f09U, 0xd629b07cU, 0xaf31a4b2U, 0x312a3f23U, 0x30c6a594U, 0xc035a266U, 0x37744ebcU, 0xa6fc82caU, 0xb0e090d0U, 0x1533a7d8U, 0x4af10498U, 0xf741ecdaU, 0x0e7fcd50U, 0x2f1791f6U, 0x8d764dd6U, 0x4d43efb0U, 0x54ccaa4dU, 0xdfe49604U, 0xe39ed1b5U, 0x1b4c6a88U, 0xb8c12c1fU, 0x7f466551U, 0x049d5eeaU, 0x5d018c35U, 0x73fa8774U, 0x2efb0b41U, 0x5ab3671dU, 0x5292dbd2U, 0x33e91056U, 0x136dd647U, 0x8c9ad761U, 0x7a37a10cU, 0x8e59f814U, 0x89eb133cU, 0xeecea927U, 0x35b761c9U, 0xede11ce5U, 0x3c7a47b1U, 0x599cd2dfU, 0x3f55f273U, 0x791814ceU, 0xbf73c737U, 0xea53f7cdU, 0x5b5ffdaaU, 0x14df3d6fU, 0x867844dbU, 0x81caaff3U, 0x3eb968c4U, 0x2c382434U, 0x5fc2a340U, 0x72161dc3U, 0x0cbce225U, 0x8b283c49U, 0x41ff0d95U, 0x7139a801U, 0xde080cb3U, 0x9cd8b4e4U, 0x906456c1U, 0x617bcb84U, 0x70d532b6U, 0x74486c5cU, 0x42d0b857U, }; static const u32 Td2[256] = { 0xa75051f4U, 0x65537e41U, 0xa4c31a17U, 0x5e963a27U, 0x6bcb3babU, 0x45f11f9dU, 0x58abacfaU, 0x03934be3U, 0xfa552030U, 0x6df6ad76U, 0x769188ccU, 0x4c25f502U, 0xd7fc4fe5U, 0xcbd7c52aU, 0x44802635U, 0xa38fb562U, 0x5a49deb1U, 0x1b6725baU, 0x0e9845eaU, 0xc0e15dfeU, 0x7502c32fU, 0xf012814cU, 0x97a38d46U, 0xf9c66bd3U, 0x5fe7038fU, 0x9c951592U, 0x7aebbf6dU, 0x59da9552U, 0x832dd4beU, 0x21d35874U, 0x692949e0U, 0xc8448ec9U, 0x896a75c2U, 0x7978f48eU, 0x3e6b9958U, 0x71dd27b9U, 0x4fb6bee1U, 0xad17f088U, 0xac66c920U, 0x3ab47dceU, 0x4a1863dfU, 0x3182e51aU, 0x33609751U, 0x7f456253U, 0x77e0b164U, 0xae84bb6bU, 0xa01cfe81U, 0x2b94f908U, 0x68587048U, 0xfd198f45U, 0x6c8794deU, 0xf8b7527bU, 0xd323ab73U, 0x02e2724bU, 0x8f57e31fU, 0xab2a6655U, 0x2807b2ebU, 0xc2032fb5U, 0x7b9a86c5U, 0x08a5d337U, 0x87f23028U, 0xa5b223bfU, 0x6aba0203U, 0x825ced16U, 0x1c2b8acfU, 0xb492a779U, 0xf2f0f307U, 0xe2a14e69U, 0xf4cd65daU, 0xbed50605U, 0x621fd134U, 0xfe8ac4a6U, 0x539d342eU, 0x55a0a2f3U, 0xe132058aU, 0xeb75a4f6U, 0xec390b83U, 0xefaa4060U, 0x9f065e71U, 0x1051bd6eU, 0x8af93e21U, 0x063d96ddU, 0x05aedd3eU, 0xbd464de6U, 0x8db59154U, 0x5d0571c4U, 0xd46f0406U, 0x15ff6050U, 0xfb241998U, 0xe997d6bdU, 0x43cc8940U, 0x9e7767d9U, 0x42bdb0e8U, 0x8b880789U, 0x5b38e719U, 0xeedb79c8U, 0x0a47a17cU, 0x0fe97c42U, 0x1ec9f884U, 0x00000000U, 0x86830980U, 0xed48322bU, 0x70ac1e11U, 0x724e6c5aU, 0xfffbfd0eU, 0x38560f85U, 0xd51e3daeU, 0x3927362dU, 0xd9640a0fU, 0xa621685cU, 0x54d19b5bU, 0x2e3a2436U, 0x67b10c0aU, 0xe70f9357U, 0x96d2b4eeU, 0x919e1b9bU, 0xc54f80c0U, 0x20a261dcU, 0x4b695a77U, 0x1a161c12U, 0xba0ae293U, 0x2ae5c0a0U, 0xe0433c22U, 0x171d121bU, 0x0d0b0e09U, 0xc7adf28bU, 0xa8b92db6U, 0xa9c8141eU, 0x198557f1U, 0x074caf75U, 0xddbbee99U, 0x60fda37fU, 0x269ff701U, 0xf5bc5c72U, 0x3bc54466U, 0x7e345bfbU, 0x29768b43U, 0xc6dccb23U, 0xfc68b6edU, 0xf163b8e4U, 0xdccad731U, 0x85104263U, 0x22401397U, 0x112084c6U, 0x247d854aU, 0x3df8d2bbU, 0x3211aef9U, 0xa16dc729U, 0x2f4b1d9eU, 0x30f3dcb2U, 0x52ec0d86U, 0xe3d077c1U, 0x166c2bb3U, 0xb999a970U, 0x48fa1194U, 0x642247e9U, 0x8cc4a8fcU, 0x3f1aa0f0U, 0x2cd8567dU, 0x90ef2233U, 0x4ec78749U, 0xd1c1d938U, 0xa2fe8ccaU, 0x0b3698d4U, 0x81cfa6f5U, 0xde28a57aU, 0x8e26dab7U, 0xbfa43fadU, 0x9de42c3aU, 0x920d5078U, 0xcc9b6a5fU, 0x4662547eU, 0x13c2f68dU, 0xb8e890d8U, 0xf75e2e39U, 0xaff582c3U, 0x80be9f5dU, 0x937c69d0U, 0x2da96fd5U, 0x12b3cf25U, 0x993bc8acU, 0x7da71018U, 0x636ee89cU, 0xbb7bdb3bU, 0x7809cd26U, 0x18f46e59U, 0xb701ec9aU, 0x9aa8834fU, 0x6e65e695U, 0xe67eaaffU, 0xcf0821bcU, 0xe8e6ef15U, 0x9bd9bae7U, 0x36ce4a6fU, 0x09d4ea9fU, 0x7cd629b0U, 0xb2af31a4U, 0x23312a3fU, 0x9430c6a5U, 0x66c035a2U, 0xbc37744eU, 0xcaa6fc82U, 0xd0b0e090U, 0xd81533a7U, 0x984af104U, 0xdaf741ecU, 0x500e7fcdU, 0xf62f1791U, 0xd68d764dU, 0xb04d43efU, 0x4d54ccaaU, 0x04dfe496U, 0xb5e39ed1U, 0x881b4c6aU, 0x1fb8c12cU, 0x517f4665U, 0xea049d5eU, 0x355d018cU, 0x7473fa87U, 0x412efb0bU, 0x1d5ab367U, 0xd25292dbU, 0x5633e910U, 0x47136dd6U, 0x618c9ad7U, 0x0c7a37a1U, 0x148e59f8U, 0x3c89eb13U, 0x27eecea9U, 0xc935b761U, 0xe5ede11cU, 0xb13c7a47U, 0xdf599cd2U, 0x733f55f2U, 0xce791814U, 0x37bf73c7U, 0xcdea53f7U, 0xaa5b5ffdU, 0x6f14df3dU, 0xdb867844U, 0xf381caafU, 0xc43eb968U, 0x342c3824U, 0x405fc2a3U, 0xc372161dU, 0x250cbce2U, 0x498b283cU, 0x9541ff0dU, 0x017139a8U, 0xb3de080cU, 0xe49cd8b4U, 0xc1906456U, 0x84617bcbU, 0xb670d532U, 0x5c74486cU, 0x5742d0b8U, }; static const u32 Td3[256] = { 0xf4a75051U, 0x4165537eU, 0x17a4c31aU, 0x275e963aU, 0xab6bcb3bU, 0x9d45f11fU, 0xfa58abacU, 0xe303934bU, 0x30fa5520U, 0x766df6adU, 0xcc769188U, 0x024c25f5U, 0xe5d7fc4fU, 0x2acbd7c5U, 0x35448026U, 0x62a38fb5U, 0xb15a49deU, 0xba1b6725U, 0xea0e9845U, 0xfec0e15dU, 0x2f7502c3U, 0x4cf01281U, 0x4697a38dU, 0xd3f9c66bU, 0x8f5fe703U, 0x929c9515U, 0x6d7aebbfU, 0x5259da95U, 0xbe832dd4U, 0x7421d358U, 0xe0692949U, 0xc9c8448eU, 0xc2896a75U, 0x8e7978f4U, 0x583e6b99U, 0xb971dd27U, 0xe14fb6beU, 0x88ad17f0U, 0x20ac66c9U, 0xce3ab47dU, 0xdf4a1863U, 0x1a3182e5U, 0x51336097U, 0x537f4562U, 0x6477e0b1U, 0x6bae84bbU, 0x81a01cfeU, 0x082b94f9U, 0x48685870U, 0x45fd198fU, 0xde6c8794U, 0x7bf8b752U, 0x73d323abU, 0x4b02e272U, 0x1f8f57e3U, 0x55ab2a66U, 0xeb2807b2U, 0xb5c2032fU, 0xc57b9a86U, 0x3708a5d3U, 0x2887f230U, 0xbfa5b223U, 0x036aba02U, 0x16825cedU, 0xcf1c2b8aU, 0x79b492a7U, 0x07f2f0f3U, 0x69e2a14eU, 0xdaf4cd65U, 0x05bed506U, 0x34621fd1U, 0xa6fe8ac4U, 0x2e539d34U, 0xf355a0a2U, 0x8ae13205U, 0xf6eb75a4U, 0x83ec390bU, 0x60efaa40U, 0x719f065eU, 0x6e1051bdU, 0x218af93eU, 0xdd063d96U, 0x3e05aeddU, 0xe6bd464dU, 0x548db591U, 0xc45d0571U, 0x06d46f04U, 0x5015ff60U, 0x98fb2419U, 0xbde997d6U, 0x4043cc89U, 0xd99e7767U, 0xe842bdb0U, 0x898b8807U, 0x195b38e7U, 0xc8eedb79U, 0x7c0a47a1U, 0x420fe97cU, 0x841ec9f8U, 0x00000000U, 0x80868309U, 0x2bed4832U, 0x1170ac1eU, 0x5a724e6cU, 0x0efffbfdU, 0x8538560fU, 0xaed51e3dU, 0x2d392736U, 0x0fd9640aU, 0x5ca62168U, 0x5b54d19bU, 0x362e3a24U, 0x0a67b10cU, 0x57e70f93U, 0xee96d2b4U, 0x9b919e1bU, 0xc0c54f80U, 0xdc20a261U, 0x774b695aU, 0x121a161cU, 0x93ba0ae2U, 0xa02ae5c0U, 0x22e0433cU, 0x1b171d12U, 0x090d0b0eU, 0x8bc7adf2U, 0xb6a8b92dU, 0x1ea9c814U, 0xf1198557U, 0x75074cafU, 0x99ddbbeeU, 0x7f60fda3U, 0x01269ff7U, 0x72f5bc5cU, 0x663bc544U, 0xfb7e345bU, 0x4329768bU, 0x23c6dccbU, 0xedfc68b6U, 0xe4f163b8U, 0x31dccad7U, 0x63851042U, 0x97224013U, 0xc6112084U, 0x4a247d85U, 0xbb3df8d2U, 0xf93211aeU, 0x29a16dc7U, 0x9e2f4b1dU, 0xb230f3dcU, 0x8652ec0dU, 0xc1e3d077U, 0xb3166c2bU, 0x70b999a9U, 0x9448fa11U, 0xe9642247U, 0xfc8cc4a8U, 0xf03f1aa0U, 0x7d2cd856U, 0x3390ef22U, 0x494ec787U, 0x38d1c1d9U, 0xcaa2fe8cU, 0xd40b3698U, 0xf581cfa6U, 0x7ade28a5U, 0xb78e26daU, 0xadbfa43fU, 0x3a9de42cU, 0x78920d50U, 0x5fcc9b6aU, 0x7e466254U, 0x8d13c2f6U, 0xd8b8e890U, 0x39f75e2eU, 0xc3aff582U, 0x5d80be9fU, 0xd0937c69U, 0xd52da96fU, 0x2512b3cfU, 0xac993bc8U, 0x187da710U, 0x9c636ee8U, 0x3bbb7bdbU, 0x267809cdU, 0x5918f46eU, 0x9ab701ecU, 0x4f9aa883U, 0x956e65e6U, 0xffe67eaaU, 0xbccf0821U, 0x15e8e6efU, 0xe79bd9baU, 0x6f36ce4aU, 0x9f09d4eaU, 0xb07cd629U, 0xa4b2af31U, 0x3f23312aU, 0xa59430c6U, 0xa266c035U, 0x4ebc3774U, 0x82caa6fcU, 0x90d0b0e0U, 0xa7d81533U, 0x04984af1U, 0xecdaf741U, 0xcd500e7fU, 0x91f62f17U, 0x4dd68d76U, 0xefb04d43U, 0xaa4d54ccU, 0x9604dfe4U, 0xd1b5e39eU, 0x6a881b4cU, 0x2c1fb8c1U, 0x65517f46U, 0x5eea049dU, 0x8c355d01U, 0x877473faU, 0x0b412efbU, 0x671d5ab3U, 0xdbd25292U, 0x105633e9U, 0xd647136dU, 0xd7618c9aU, 0xa10c7a37U, 0xf8148e59U, 0x133c89ebU, 0xa927eeceU, 0x61c935b7U, 0x1ce5ede1U, 0x47b13c7aU, 0xd2df599cU, 0xf2733f55U, 0x14ce7918U, 0xc737bf73U, 0xf7cdea53U, 0xfdaa5b5fU, 0x3d6f14dfU, 0x44db8678U, 0xaff381caU, 0x68c43eb9U, 0x24342c38U, 0xa3405fc2U, 0x1dc37216U, 0xe2250cbcU, 0x3c498b28U, 0x0d9541ffU, 0xa8017139U, 0x0cb3de08U, 0xb4e49cd8U, 0x56c19064U, 0xcb84617bU, 0x32b670d5U, 0x6c5c7448U, 0xb85742d0U, }; static const u32 Td4[256] = { 0x52525252U, 0x09090909U, 0x6a6a6a6aU, 0xd5d5d5d5U, 0x30303030U, 0x36363636U, 0xa5a5a5a5U, 0x38383838U, 0xbfbfbfbfU, 0x40404040U, 0xa3a3a3a3U, 0x9e9e9e9eU, 0x81818181U, 0xf3f3f3f3U, 0xd7d7d7d7U, 0xfbfbfbfbU, 0x7c7c7c7cU, 0xe3e3e3e3U, 0x39393939U, 0x82828282U, 0x9b9b9b9bU, 0x2f2f2f2fU, 0xffffffffU, 0x87878787U, 0x34343434U, 0x8e8e8e8eU, 0x43434343U, 0x44444444U, 0xc4c4c4c4U, 0xdedededeU, 0xe9e9e9e9U, 0xcbcbcbcbU, 0x54545454U, 0x7b7b7b7bU, 0x94949494U, 0x32323232U, 0xa6a6a6a6U, 0xc2c2c2c2U, 0x23232323U, 0x3d3d3d3dU, 0xeeeeeeeeU, 0x4c4c4c4cU, 0x95959595U, 0x0b0b0b0bU, 0x42424242U, 0xfafafafaU, 0xc3c3c3c3U, 0x4e4e4e4eU, 0x08080808U, 0x2e2e2e2eU, 0xa1a1a1a1U, 0x66666666U, 0x28282828U, 0xd9d9d9d9U, 0x24242424U, 0xb2b2b2b2U, 0x76767676U, 0x5b5b5b5bU, 0xa2a2a2a2U, 0x49494949U, 0x6d6d6d6dU, 0x8b8b8b8bU, 0xd1d1d1d1U, 0x25252525U, 0x72727272U, 0xf8f8f8f8U, 0xf6f6f6f6U, 0x64646464U, 0x86868686U, 0x68686868U, 0x98989898U, 0x16161616U, 0xd4d4d4d4U, 0xa4a4a4a4U, 0x5c5c5c5cU, 0xccccccccU, 0x5d5d5d5dU, 0x65656565U, 0xb6b6b6b6U, 0x92929292U, 0x6c6c6c6cU, 0x70707070U, 0x48484848U, 0x50505050U, 0xfdfdfdfdU, 0xededededU, 0xb9b9b9b9U, 0xdadadadaU, 0x5e5e5e5eU, 0x15151515U, 0x46464646U, 0x57575757U, 0xa7a7a7a7U, 0x8d8d8d8dU, 0x9d9d9d9dU, 0x84848484U, 0x90909090U, 0xd8d8d8d8U, 0xababababU, 0x00000000U, 0x8c8c8c8cU, 0xbcbcbcbcU, 0xd3d3d3d3U, 0x0a0a0a0aU, 0xf7f7f7f7U, 0xe4e4e4e4U, 0x58585858U, 0x05050505U, 0xb8b8b8b8U, 0xb3b3b3b3U, 0x45454545U, 0x06060606U, 0xd0d0d0d0U, 0x2c2c2c2cU, 0x1e1e1e1eU, 0x8f8f8f8fU, 0xcacacacaU, 0x3f3f3f3fU, 0x0f0f0f0fU, 0x02020202U, 0xc1c1c1c1U, 0xafafafafU, 0xbdbdbdbdU, 0x03030303U, 0x01010101U, 0x13131313U, 0x8a8a8a8aU, 0x6b6b6b6bU, 0x3a3a3a3aU, 0x91919191U, 0x11111111U, 0x41414141U, 0x4f4f4f4fU, 0x67676767U, 0xdcdcdcdcU, 0xeaeaeaeaU, 0x97979797U, 0xf2f2f2f2U, 0xcfcfcfcfU, 0xcecececeU, 0xf0f0f0f0U, 0xb4b4b4b4U, 0xe6e6e6e6U, 0x73737373U, 0x96969696U, 0xacacacacU, 0x74747474U, 0x22222222U, 0xe7e7e7e7U, 0xadadadadU, 0x35353535U, 0x85858585U, 0xe2e2e2e2U, 0xf9f9f9f9U, 0x37373737U, 0xe8e8e8e8U, 0x1c1c1c1cU, 0x75757575U, 0xdfdfdfdfU, 0x6e6e6e6eU, 0x47474747U, 0xf1f1f1f1U, 0x1a1a1a1aU, 0x71717171U, 0x1d1d1d1dU, 0x29292929U, 0xc5c5c5c5U, 0x89898989U, 0x6f6f6f6fU, 0xb7b7b7b7U, 0x62626262U, 0x0e0e0e0eU, 0xaaaaaaaaU, 0x18181818U, 0xbebebebeU, 0x1b1b1b1bU, 0xfcfcfcfcU, 0x56565656U, 0x3e3e3e3eU, 0x4b4b4b4bU, 0xc6c6c6c6U, 0xd2d2d2d2U, 0x79797979U, 0x20202020U, 0x9a9a9a9aU, 0xdbdbdbdbU, 0xc0c0c0c0U, 0xfefefefeU, 0x78787878U, 0xcdcdcdcdU, 0x5a5a5a5aU, 0xf4f4f4f4U, 0x1f1f1f1fU, 0xddddddddU, 0xa8a8a8a8U, 0x33333333U, 0x88888888U, 0x07070707U, 0xc7c7c7c7U, 0x31313131U, 0xb1b1b1b1U, 0x12121212U, 0x10101010U, 0x59595959U, 0x27272727U, 0x80808080U, 0xececececU, 0x5f5f5f5fU, 0x60606060U, 0x51515151U, 0x7f7f7f7fU, 0xa9a9a9a9U, 0x19191919U, 0xb5b5b5b5U, 0x4a4a4a4aU, 0x0d0d0d0dU, 0x2d2d2d2dU, 0xe5e5e5e5U, 0x7a7a7a7aU, 0x9f9f9f9fU, 0x93939393U, 0xc9c9c9c9U, 0x9c9c9c9cU, 0xefefefefU, 0xa0a0a0a0U, 0xe0e0e0e0U, 0x3b3b3b3bU, 0x4d4d4d4dU, 0xaeaeaeaeU, 0x2a2a2a2aU, 0xf5f5f5f5U, 0xb0b0b0b0U, 0xc8c8c8c8U, 0xebebebebU, 0xbbbbbbbbU, 0x3c3c3c3cU, 0x83838383U, 0x53535353U, 0x99999999U, 0x61616161U, 0x17171717U, 0x2b2b2b2bU, 0x04040404U, 0x7e7e7e7eU, 0xbabababaU, 0x77777777U, 0xd6d6d6d6U, 0x26262626U, 0xe1e1e1e1U, 0x69696969U, 0x14141414U, 0x63636363U, 0x55555555U, 0x21212121U, 0x0c0c0c0cU, 0x7d7d7d7dU, }; static const u32 rcon[] = { 0x01000000, 0x02000000, 0x04000000, 0x08000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000, 0x1B000000, 0x36000000, /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */ }; #define SWAP(x) (_lrotl(x, 8) & 0x00ff00ff | _lrotr(x, 8) & 0xff00ff00) #ifdef _MSC_VER #define GETU32(p) SWAP(*((u32 *)(p))) #define PUTU32(ct, st) { *((u32 *)(ct)) = SWAP((st)); } #else #define GETU32(pt) (((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ ((u32)(pt)[2] << 8) ^ ((u32)(pt)[3])) #define PUTU32(ct, st) { (ct)[0] = (u8)((st) >> 24); (ct)[1] = (u8)((st) >> 16); (ct)[2] = (u8)((st) >> 8); (ct)[3] = (u8)(st); } #endif /** * Expand the cipher key into the encryption key schedule. * * @return the number of rounds for the given cipher key size. */ int rijndaelKeySetupEnc(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits) { int i = 0; u32 temp; rk[0] = GETU32(cipherKey ); rk[1] = GETU32(cipherKey + 4); rk[2] = GETU32(cipherKey + 8); rk[3] = GETU32(cipherKey + 12); if (keyBits == 128) { for (;;) { temp = rk[3]; rk[4] = rk[0] ^ (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ (Te4[(temp ) & 0xff] & 0x0000ff00) ^ (Te4[(temp >> 24) ] & 0x000000ff) ^ rcon[i]; rk[5] = rk[1] ^ rk[4]; rk[6] = rk[2] ^ rk[5]; rk[7] = rk[3] ^ rk[6]; if (++i == 10) { return 10; } rk += 4; } } rk[4] = GETU32(cipherKey + 16); rk[5] = GETU32(cipherKey + 20); if (keyBits == 192) { for (;;) { temp = rk[ 5]; rk[ 6] = rk[ 0] ^ (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ (Te4[(temp ) & 0xff] & 0x0000ff00) ^ (Te4[(temp >> 24) ] & 0x000000ff) ^ rcon[i]; rk[ 7] = rk[ 1] ^ rk[ 6]; rk[ 8] = rk[ 2] ^ rk[ 7]; rk[ 9] = rk[ 3] ^ rk[ 8]; if (++i == 8) { return 12; } rk[10] = rk[ 4] ^ rk[ 9]; rk[11] = rk[ 5] ^ rk[10]; rk += 6; } } rk[6] = GETU32(cipherKey + 24); rk[7] = GETU32(cipherKey + 28); if (keyBits == 256) { for (;;) { temp = rk[ 7]; rk[ 8] = rk[ 0] ^ (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ (Te4[(temp ) & 0xff] & 0x0000ff00) ^ (Te4[(temp >> 24) ] & 0x000000ff) ^ rcon[i]; rk[ 9] = rk[ 1] ^ rk[ 8]; rk[10] = rk[ 2] ^ rk[ 9]; rk[11] = rk[ 3] ^ rk[10]; if (++i == 7) { return 14; } temp = rk[11]; rk[12] = rk[ 4] ^ (Te4[(temp >> 24) ] & 0xff000000) ^ (Te4[(temp >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(temp >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(temp ) & 0xff] & 0x000000ff); rk[13] = rk[ 5] ^ rk[12]; rk[14] = rk[ 6] ^ rk[13]; rk[15] = rk[ 7] ^ rk[14]; rk += 8; } } return 0; } /** * Expand the cipher key into the decryption key schedule. * * @return the number of rounds for the given cipher key size. */ int rijndaelKeySetupDec(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits) { int Nr, i, j; u32 temp; /* expand the cipher key: */ Nr = rijndaelKeySetupEnc(rk, cipherKey, keyBits); /* invert the order of the round keys: */ for (i = 0, j = 4*Nr; i < j; i += 4, j -= 4) { temp = rk[i ]; rk[i ] = rk[j ]; rk[j ] = temp; temp = rk[i + 1]; rk[i + 1] = rk[j + 1]; rk[j + 1] = temp; temp = rk[i + 2]; rk[i + 2] = rk[j + 2]; rk[j + 2] = temp; temp = rk[i + 3]; rk[i + 3] = rk[j + 3]; rk[j + 3] = temp; } /* apply the inverse MixColumn transform to all round keys but the first and the last: */ for (i = 1; i < Nr; i++) { rk += 4; rk[0] = Td0[Te4[(rk[0] >> 24) ] & 0xff] ^ Td1[Te4[(rk[0] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[0] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[0] ) & 0xff] & 0xff]; rk[1] = Td0[Te4[(rk[1] >> 24) ] & 0xff] ^ Td1[Te4[(rk[1] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[1] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[1] ) & 0xff] & 0xff]; rk[2] = Td0[Te4[(rk[2] >> 24) ] & 0xff] ^ Td1[Te4[(rk[2] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[2] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[2] ) & 0xff] & 0xff]; rk[3] = Td0[Te4[(rk[3] >> 24) ] & 0xff] ^ Td1[Te4[(rk[3] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[3] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[3] ) & 0xff] & 0xff]; } return Nr; } void rijndaelEncrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 pt[16], u8 ct[16]) { u32 s0, s1, s2, s3, t0, t1, t2, t3; #ifndef FULL_UNROLL int r; #endif /* ?FULL_UNROLL */ /* * map byte array block to cipher state * and add initial round key: */ s0 = GETU32(pt ) ^ rk[0]; s1 = GETU32(pt + 4) ^ rk[1]; s2 = GETU32(pt + 8) ^ rk[2]; s3 = GETU32(pt + 12) ^ rk[3]; #ifdef FULL_UNROLL /* round 1: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[ 4]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[ 5]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[ 6]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[ 7]; /* round 2: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[ 8]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[ 9]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[10]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[11]; /* round 3: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[12]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[13]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[14]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[15]; /* round 4: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[16]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[17]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[18]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[19]; /* round 5: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[20]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[21]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[22]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[23]; /* round 6: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[24]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[25]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[26]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[27]; /* round 7: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[28]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[29]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[30]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[31]; /* round 8: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[32]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[33]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[34]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[35]; /* round 9: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[36]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[37]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[38]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[39]; if (Nr > 10) { /* round 10: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[40]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[41]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[42]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[43]; /* round 11: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[44]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[45]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[46]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[47]; if (Nr > 12) { /* round 12: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[48]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[49]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[50]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[51]; /* round 13: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[52]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[53]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[54]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[55]; } } rk += Nr << 2; #else /* !FULL_UNROLL */ /* * Nr - 1 full rounds: */ r = Nr >> 1; for (;;) { t0 = Te0[(s0 >> 24) ] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[(s3 ) & 0xff] ^ rk[4]; t1 = Te0[(s1 >> 24) ] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[(s0 ) & 0xff] ^ rk[5]; t2 = Te0[(s2 >> 24) ] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[(s1 ) & 0xff] ^ rk[6]; t3 = Te0[(s3 >> 24) ] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[(s2 ) & 0xff] ^ rk[7]; rk += 8; if (--r == 0) { break; } s0 = Te0[(t0 >> 24) ] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[(t3 ) & 0xff] ^ rk[0]; s1 = Te0[(t1 >> 24) ] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[(t0 ) & 0xff] ^ rk[1]; s2 = Te0[(t2 >> 24) ] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[(t1 ) & 0xff] ^ rk[2]; s3 = Te0[(t3 >> 24) ] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[(t2 ) & 0xff] ^ rk[3]; } #endif /* ?FULL_UNROLL */ /* * apply last round and * map cipher state to byte array block: */ s0 = (Te4[(t0 >> 24) ] & 0xff000000) ^ (Te4[(t1 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t2 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t3 ) & 0xff] & 0x000000ff) ^ rk[0]; PUTU32(ct , s0); s1 = (Te4[(t1 >> 24) ] & 0xff000000) ^ (Te4[(t2 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t3 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t0 ) & 0xff] & 0x000000ff) ^ rk[1]; PUTU32(ct + 4, s1); s2 = (Te4[(t2 >> 24) ] & 0xff000000) ^ (Te4[(t3 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t0 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t1 ) & 0xff] & 0x000000ff) ^ rk[2]; PUTU32(ct + 8, s2); s3 = (Te4[(t3 >> 24) ] & 0xff000000) ^ (Te4[(t0 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t1 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t2 ) & 0xff] & 0x000000ff) ^ rk[3]; PUTU32(ct + 12, s3); } void rijndaelDecrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 ct[16], u8 pt[16]) { u32 s0, s1, s2, s3, t0, t1, t2, t3; #ifndef FULL_UNROLL int r; #endif /* ?FULL_UNROLL */ /* * map byte array block to cipher state * and add initial round key: */ s0 = GETU32(ct ) ^ rk[0]; s1 = GETU32(ct + 4) ^ rk[1]; s2 = GETU32(ct + 8) ^ rk[2]; s3 = GETU32(ct + 12) ^ rk[3]; #ifdef FULL_UNROLL /* round 1: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[ 4]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[ 5]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[ 6]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[ 7]; /* round 2: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[ 8]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[ 9]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[10]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[11]; /* round 3: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[12]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[13]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[14]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[15]; /* round 4: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[16]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[17]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[18]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[19]; /* round 5: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[20]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[21]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[22]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[23]; /* round 6: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[24]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[25]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[26]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[27]; /* round 7: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[28]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[29]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[30]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[31]; /* round 8: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[32]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[33]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[34]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[35]; /* round 9: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[36]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[37]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[38]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[39]; if (Nr > 10) { /* round 10: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[40]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[41]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[42]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[43]; /* round 11: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[44]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[45]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[46]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[47]; if (Nr > 12) { /* round 12: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[48]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[49]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[50]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[51]; /* round 13: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[52]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[53]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[54]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[55]; } } rk += Nr << 2; #else /* !FULL_UNROLL */ /* * Nr - 1 full rounds: */ r = Nr >> 1; for (;;) { t0 = Td0[(s0 >> 24) ] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[(s1 ) & 0xff] ^ rk[4]; t1 = Td0[(s1 >> 24) ] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[(s2 ) & 0xff] ^ rk[5]; t2 = Td0[(s2 >> 24) ] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[(s3 ) & 0xff] ^ rk[6]; t3 = Td0[(s3 >> 24) ] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[(s0 ) & 0xff] ^ rk[7]; rk += 8; if (--r == 0) { break; } s0 = Td0[(t0 >> 24) ] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[(t1 ) & 0xff] ^ rk[0]; s1 = Td0[(t1 >> 24) ] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[(t2 ) & 0xff] ^ rk[1]; s2 = Td0[(t2 >> 24) ] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[(t3 ) & 0xff] ^ rk[2]; s3 = Td0[(t3 >> 24) ] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[(t0 ) & 0xff] ^ rk[3]; } #endif /* ?FULL_UNROLL */ /* * apply last round and * map cipher state to byte array block: */ s0 = (Td4[(t0 >> 24) ] & 0xff000000) ^ (Td4[(t3 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t2 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t1 ) & 0xff] & 0x000000ff) ^ rk[0]; PUTU32(pt , s0); s1 = (Td4[(t1 >> 24) ] & 0xff000000) ^ (Td4[(t0 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t3 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t2 ) & 0xff] & 0x000000ff) ^ rk[1]; PUTU32(pt + 4, s1); s2 = (Td4[(t2 >> 24) ] & 0xff000000) ^ (Td4[(t1 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t0 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t3 ) & 0xff] & 0x000000ff) ^ rk[2]; PUTU32(pt + 8, s2); s3 = (Td4[(t3 >> 24) ] & 0xff000000) ^ (Td4[(t2 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t1 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t0 ) & 0xff] & 0x000000ff) ^ rk[3]; PUTU32(pt + 12, s3); } #ifdef INTERMEDIATE_VALUE_KAT void rijndaelEncryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds) { int r; u32 s0, s1, s2, s3, t0, t1, t2, t3; /* * map byte array block to cipher state * and add initial round key: */ s0 = GETU32(block ) ^ rk[0]; s1 = GETU32(block + 4) ^ rk[1]; s2 = GETU32(block + 8) ^ rk[2]; s3 = GETU32(block + 12) ^ rk[3]; rk += 4; /* * Nr - 1 full rounds: */ for (r = (rounds < Nr ? rounds : Nr - 1); r > 0; r--) { t0 = Te0[(s0 >> 24) ] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[(s3 ) & 0xff] ^ rk[0]; t1 = Te0[(s1 >> 24) ] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[(s0 ) & 0xff] ^ rk[1]; t2 = Te0[(s2 >> 24) ] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[(s1 ) & 0xff] ^ rk[2]; t3 = Te0[(s3 >> 24) ] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[(s2 ) & 0xff] ^ rk[3]; s0 = t0; s1 = t1; s2 = t2; s3 = t3; rk += 4; } /* * apply last round and * map cipher state to byte array block: */ if (rounds == Nr) { t0 = (Te4[(s0 >> 24) ] & 0xff000000) ^ (Te4[(s1 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(s2 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(s3 ) & 0xff] & 0x000000ff) ^ rk[0]; t1 = (Te4[(s1 >> 24) ] & 0xff000000) ^ (Te4[(s2 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(s3 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(s0 ) & 0xff] & 0x000000ff) ^ rk[1]; t2 = (Te4[(s2 >> 24) ] & 0xff000000) ^ (Te4[(s3 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(s0 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(s1 ) & 0xff] & 0x000000ff) ^ rk[2]; t3 = (Te4[(s3 >> 24) ] & 0xff000000) ^ (Te4[(s0 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(s1 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(s2 ) & 0xff] & 0x000000ff) ^ rk[3]; s0 = t0; s1 = t1; s2 = t2; s3 = t3; } PUTU32(block , s0); PUTU32(block + 4, s1); PUTU32(block + 8, s2); PUTU32(block + 12, s3); } void rijndaelDecryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds) { int r; u32 s0, s1, s2, s3, t0, t1, t2, t3; /* * map byte array block to cipher state * and add initial round key: */ s0 = GETU32(block ) ^ rk[0]; s1 = GETU32(block + 4) ^ rk[1]; s2 = GETU32(block + 8) ^ rk[2]; s3 = GETU32(block + 12) ^ rk[3]; rk += 4; /* * Nr - 1 full rounds: */ for (r = (rounds < Nr ? rounds : Nr) - 1; r > 0; r--) { t0 = Td0[(s0 >> 24) ] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[(s1 ) & 0xff] ^ rk[0]; t1 = Td0[(s1 >> 24) ] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[(s2 ) & 0xff] ^ rk[1]; t2 = Td0[(s2 >> 24) ] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[(s3 ) & 0xff] ^ rk[2]; t3 = Td0[(s3 >> 24) ] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[(s0 ) & 0xff] ^ rk[3]; s0 = t0; s1 = t1; s2 = t2; s3 = t3; rk += 4; } /* * complete the last round and * map cipher state to byte array block: */ t0 = (Td4[(s0 >> 24) ] & 0xff000000) ^ (Td4[(s3 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(s2 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(s1 ) & 0xff] & 0x000000ff); t1 = (Td4[(s1 >> 24) ] & 0xff000000) ^ (Td4[(s0 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(s3 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(s2 ) & 0xff] & 0x000000ff); t2 = (Td4[(s2 >> 24) ] & 0xff000000) ^ (Td4[(s1 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(s0 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(s3 ) & 0xff] & 0x000000ff); t3 = (Td4[(s3 >> 24) ] & 0xff000000) ^ (Td4[(s2 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(s1 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(s0 ) & 0xff] & 0x000000ff); if (rounds == Nr) { t0 ^= rk[0]; t1 ^= rk[1]; t2 ^= rk[2]; t3 ^= rk[3]; } PUTU32(block , t0); PUTU32(block + 4, t1); PUTU32(block + 8, t2); PUTU32(block + 12, t3); } #endif /* INTERMEDIATE_VALUE_KAT */ bwctl_1.5.4+dfsg1.orig/bwlib/tools.c0000664000076500007710000005713312560414557014233 0ustar /* * ex: set tabstop=4 ai expandtab softtabstop=4 shiftwidth=4: * -*- mode: c-basic-indent: 4; tab-width: 4; indent-tabs-mode: nil -*- * $Id$ */ /* * File: tools.c * * Author: Jeff W. Boote * Internet2 * * Date: Fri Aug 31 13:48:52 MDT 2007 * * Description: * * This file is used to define the current set of understood/known * tester tools for bwctl. Currently there is no way for individuals to * add tools since the existance of a particular test program is * communicated by a bit-field. (It needs to be unique across all * clients/servers.) In the future, the protocol could be * changed to something more extensible (XML messages) at which point * it could be possible to communicate all kinds of extra information * if wanted. (Hey, throughput and memory are cheap these days - might as * well use them. But, this is work for another day.) Each tool would * still need to have a unique identifiable signature, but perhaps the * names 'iperf', 'nuttcp' would be enough... Probably need to include * a version indication as well. * * Currently, this is just setup to use the autoconf to compile in specific * tool 'drivers' or not. Additionally, when bwctl[d] is started it * will look to determine which testers are actually available in * the environment to cull-out this list. * * Much of the functionality to run multiple tools was initially * developed by Federico Montesino Pauzols as part of a thrulay Google * Summer of Code project mentored by Jeff W. Boote. That effort put * this functionality in-line within the existant structure. This * file is an effort to refactor that functionality into a more modular, * and hopefully extensible configuration. * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include static BWLBoolean _TasksetAvailable(BWLContext ctx); static BWLToolDefinitionRec BWLToolNone = { "", NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL }; static taskset_available = True; /* autoconf seletion of tools here... */ extern BWLToolDefinitionRec BWLToolOwamp; extern BWLToolDefinitionRec BWLToolPing; extern BWLToolDefinitionRec BWLToolTraceroute; extern BWLToolDefinitionRec BWLToolTracepath; extern BWLToolDefinitionRec BWLToolParisTraceroute; #ifdef TOOL_IPERF extern BWLToolDefinitionRec BWLToolIperf; #else #define BWLToolIperf BWLToolNone #endif extern BWLToolDefinitionRec BWLToolIperf3; #ifdef TOOL_NUTTCP extern BWLToolDefinitionRec BWLToolNuttcp; #else #define BWLToolNuttcp BWLToolNone #endif #ifdef TOOL_THRULAY extern BWLToolDefinitionRec BWLToolThrulay; #else #define BWLToolThrulay BWLToolNone #endif BWLToolRec tool_list[] = { {BWL_TOOL_OWAMP, &BWLToolOwamp}, {BWL_TOOL_TRACEPATH, &BWLToolTracepath}, {BWL_TOOL_TRACEROUTE, &BWLToolTraceroute}, {BWL_TOOL_PARIS_TRACEROUTE, &BWLToolParisTraceroute}, {BWL_TOOL_PING, &BWLToolPing}, {BWL_TOOL_IPERF, &BWLToolIperf}, {BWL_TOOL_IPERF3, &BWLToolIperf3}, {BWL_TOOL_NUTTCP, &BWLToolNuttcp}, {BWL_TOOL_THRULAY, &BWLToolThrulay}, {BWL_TOOL_UNDEFINED, &BWLToolNone} }; BWLBoolean _BWLToolInitialize( BWLContext ctx ) { uint32_t i,m,n; /* * If there is a reasonable way to 'register' the bit signature for * a tool... (Needed for ServerGreeting message.) * Then tools could eventually be dynamically registered. * Having an 'initialize' function instead of relying on static * config makes this a simple extension later. */ m = I2Number(tool_list); ctx->tool_list_size = 0; n = 0; for(i=0;iname)){ ctx->tool_list_size++; } } if(!ctx->tool_list_size){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"BWLToolInitialize: No tools compiled in"); return False; } if( !(ctx->tool_list = calloc(sizeof(BWLToolRec),ctx->tool_list_size))){ BWLError(ctx,BWLErrFATAL,errno,"BWLToolInitialize: calloc(): %M"); return False; } for(i=0,n=0;iname)){ ctx->tool_list[n++] = tool_list[i]; } } return True; } BWLToolType BWLToolGetID( BWLContext ctx, const char *name ) { uint32_t i; for(i=0;itool_list_size;i++){ if( (strncasecmp(ctx->tool_list[i].tool->name,name, strlen(ctx->tool_list[i].tool->name)+1) == 0)){ return ctx->tool_list[i].id; } } return BWL_TOOL_UNDEFINED; } uint32_t BWLToolGetNumTools( BWLContext ctx ) { return ctx->tool_list_size; } const char * BWLToolGetNameByID( BWLContext ctx, BWLToolType tool_id ) { uint32_t i; for(i=0;itool_list_size;i++){ if(tool_id == ctx->tool_list[i].id){ return ctx->tool_list[i].tool->name; } } return NULL; } BWLTestType BWLToolGetTestTypesByID( BWLContext ctx, BWLToolType tool_id ) { uint32_t i; for(i=0;itool_list_size;i++){ if(tool_id == ctx->tool_list[i].id){ return ctx->tool_list[i].tool->test_types; } } return BWL_TEST_UNDEFINED; } BWLTestSideData BWLToolGetResultsSideByID( BWLContext ctx, BWLToolType tool_id, BWLTestSpec *spec ) { uint32_t i; for(i=0;itool_list_size;i++){ if(tool_id == ctx->tool_list[i].id){ return ctx->tool_list[i].tool->results_side(ctx, spec); } } return BWL_DATA_UNKNOWN; } BWLBoolean BWLToolSupportsServerSendByID( BWLContext ctx, BWLToolType tool_id ) { uint32_t i; for(i=0;itool_list_size;i++){ if(tool_id == ctx->tool_list[i].id){ return ctx->tool_list[i].tool->supports_server_sends; } } return False; } const char * BWLToolGetNameByIndex( BWLContext ctx, uint32_t i ) { assert(i < ctx->tool_list_size); return ctx->tool_list[i].tool->name; } BWLTestType BWLToolGetTestTypesByIndex( BWLContext ctx, uint32_t i ) { assert(i < ctx->tool_list_size); return ctx->tool_list[i].tool->test_types; } const char * BWLToolGetToolNames( BWLContext ctx, BWLToolAvailability tools ) { static char names[BWL_MAX_TOOLNAME*10]; /* enough to hold all names */ char unknown[BWL_MAX_TOOLNAME]; uint32_t tid; const char *name; names[0] = '\0'; tid = 1; while ( tools != 0 ) { if ( tid & tools ) { name = BWLToolGetNameByID( ctx, tid ); if ( name == NULL ) { (void) sprintf( unknown, "unknown(id=%x)", tid ); name = unknown; } (void) strcat( names, name ); (void) strcat( names, " " ); } /* Remove tid from the tool mask and go to the next bit. */ tools &= ~tid; tid <<= 1; } return names; } int BWLToolParseArg( BWLContext ctx, const char *key, const char *val ) { uint32_t i; int err; for(i=0;itool_list_size;i++){ /* See if this key/val is valid for this tool */ err = ctx->tool_list[i].tool->parse(ctx,ctx->tool_list[i].tool,key,val); /* return success or failure, if recognized */ if(err){ return err; } } /* * Arg not found */ return False; } BWLErrSeverity BWLToolParseRequestParameters( BWLToolType id, BWLContext ctx, const uint8_t *buf, BWLTestSpec *tspec, BWLProtocolVersion protocol_version ) { uint32_t i; for(i=0;itool_list_size;i++){ if(ctx->tool_list[i].id == id){ if (ctx->tool_list[i].tool->parse_request) { return ctx->tool_list[i].tool->parse_request(ctx,buf,tspec,protocol_version); } else { return BWLErrOK; } } } /* * Arg not found */ return BWLErrFATAL; } BWLErrSeverity BWLToolUnparseRequestParameters( BWLToolType id, BWLContext ctx, uint8_t *buf, BWLTestSpec *tspec, BWLProtocolVersion protocol_version, BWLTestSession tsession ) { uint32_t i; for(i=0;itool_list_size;i++){ if(ctx->tool_list[i].id == id){ if (ctx->tool_list[i].tool->parse_request) { return ctx->tool_list[i].tool->unparse_request(ctx,buf,tspec,protocol_version,tsession); } else { return BWLErrOK; } } } /* * Arg not found */ return BWLErrFATAL; } /* * This must currently be called from the CheckTestPolicy function * that is registered with the daemon. This is because the 'policy' * portion of the code needs to succeed before initializing the test, * but, the 'policy' portion also wants to know what toolport is * actually used and I did not want to add another 'phase' to the * policy checking. */ BWLErrSeverity BWLToolInitTest( BWLContext ctx, BWLToolType id, uint16_t *toolport ) { uint32_t i; for(i=0;itool_list_size;i++){ if(ctx->tool_list[i].id == id){ return ctx->tool_list[i].tool->init_test(ctx,ctx->tool_list[i].tool, toolport); } } /* * Arg not found */ return BWLErrFATAL; } BWLBoolean BWLToolValidateTest( BWLContext ctx, BWLToolType id, BWLTestSpec test_spec ) { uint32_t i; for(i=0;itool_list_size;i++){ if(ctx->tool_list[i].id == id){ return ctx->tool_list[i].tool->validate_test(ctx,ctx->tool_list[i].tool, test_spec); } } return False; } BWLErrSeverity _BWLToolLookForTesters( BWLContext ctx ) { uint32_t i; BWLToolAvailability compiled_in; assert(!ctx->tool_avail); compiled_in = 0; for(i=0;itool_list_size;i++){ compiled_in |= ctx->tool_list[i].id; } BWLError(ctx,BWLErrDEBUG,BWLErrUNKNOWN, "Compiled-in tools: %s", BWLToolGetToolNames(ctx,compiled_in)); for(i=0;itool_list_size;i++){ char confkey[BWL_MAX_TOOLNAME + 20]; // Check if the tool is disabled in the configuration file snprintf(confkey, sizeof(confkey) - 1, "V.disable_%s", ctx->tool_list[i].tool->name); if (BWLContextConfigGetV(ctx,confkey)) { BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "Tool \"%s\" is disabled in the configuration file", ctx->tool_list[i].tool->name); continue; } if(ctx->tool_list[i].tool->tool_avail(ctx,ctx->tool_list[i].tool)){ ctx->tool_avail |= ctx->tool_list[i].id; } else{ BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "Couldn't initialize tool \"%s\". Disabling it.", ctx->tool_list[i].tool->name); } } if(!ctx->tool_avail){ BWLError(ctx,BWLErrFATAL,BWLErrUNSUPPORTED, "Unable to initialize *ANY* tools"); return BWLErrFATAL; } taskset_available = _TasksetAvailable(ctx); BWLError(ctx,BWLErrDEBUG,BWLErrUNKNOWN, "Available tools: %s", BWLToolGetToolNames(ctx,ctx->tool_avail)); return BWLErrOK; } /* * Function: _BWLToolGetDefinition * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLToolDefinition _BWLToolGetDefinition( BWLContext ctx, BWLToolType id) { uint32_t i; for(i=0;itool_list_size;i++){ if(ctx->tool_list[i].id == id){ return ctx->tool_list[i].tool; } } /* * Arg not found */ return NULL; } /* * Function: _BWLToolPreRunTest * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ void * _BWLToolPreRunTest( BWLContext ctx, BWLTestSession tsess ) { return tsess->tool->pre_run(ctx,tsess); } /* * Function: _BWLToolRunTest * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ void _BWLToolRunTest( BWLContext ctx, BWLTestSession tsess, void *closure ) { tsess->tool->run(ctx,tsess,closure); } /* * Function: _BWLToolGenericParse * * Description: * This function will handle: * ${TOOL}_cmd * ${TOOL}_server_cmd * ${TOOL}_port * disable_${TOOL} * * These are common to most tools - so providing a common implementation * is reasonable. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ int save_path( BWLContext ctx, const char *key, const char *val ) { char optname[BWL_MAX_TOOLNAME + 12]; char *str; if( !(str = strdup(val))){ BWLError(ctx,BWLErrFATAL,errno,"strdup(%s): %M",val); return -1; } if( !BWLContextRegisterMemory(ctx,str)){ BWLError(ctx,BWLErrFATAL,errno, "BWLToolGenericParse: BWLContextRegisterMemor(): %M"); return -1; } strcpy(optname,"V."); strncat(optname,key,sizeof(optname) - strlen(optname) - 1); if(BWLContextConfigSet(ctx,optname,str)){ return 1; } return -1; } static int save_ports( BWLContext ctx, const char *key, BWLPortRangeRec *portrangerec ) { char optname[BWL_MAX_TOOLNAME + 12]; BWLPortRange ports; if( !(ports = calloc(sizeof(BWLPortRangeRec),1))){ BWLError(ctx,BWLErrFATAL,errno, "BWLToolGenericParse: calloc(): %M"); return -1; } if( !BWLContextRegisterMemory(ctx,ports)){ BWLError(ctx,BWLErrFATAL,errno, "BWLToolGenericParse: BWLContextRegisterMemor(): %M"); return -1; } *ports = *portrangerec; strcpy(optname,"V."); strncat(optname,key,sizeof(optname) - strlen(optname) - 1); if(BWLContextConfigSet(ctx,optname,ports)){ return 1; } return -1; } int _BWLToolGenericParse( BWLContext ctx, BWLToolDefinition tool, const char *key, const char *val ) { char confkey[BWL_MAX_TOOLNAME + 20]; uint32_t len; strncpy(confkey,tool->name,sizeof(confkey)); len = strlen(confkey); /* * Check each configuration file 'key' that this tool supports, and * see if LoadConfig is currently loading one of these. */ strncpy(&confkey[len],"_cmd",sizeof(confkey)-len); if(!strncasecmp(key,confkey,strlen(confkey))){ return save_path(ctx,key,val); } strncpy(&confkey[len],"_server_cmd",sizeof(confkey)-len); if(!strncasecmp(key,confkey,strlen(confkey))){ return save_path(ctx,key,val); } strncpy(&confkey[len],"_port",sizeof(confkey)-len); if(!strncasecmp(key,confkey,strlen(confkey))){ BWLPortRangeRec portrange; if(!BWLPortsParse(ctx,val,&portrange)){ BWLError(ctx,BWLErrFATAL,errno, "BWLToolGenericParse: %s: \'%s\' - invalid port range", confkey,val); return -1; } return save_ports(ctx,key,&portrange); } snprintf(confkey, sizeof(confkey) - 1, "disable_%s", tool->name); if(!strncasecmp(key,confkey,strlen(confkey))){ return save_path(ctx,key,val); } snprintf(confkey, sizeof(confkey) - 1, "!disable_%s", tool->name); if(!strncasecmp(key,confkey,strlen(confkey))){ // don't save it, but acknowledge the variable return 1; } snprintf(confkey, sizeof(confkey) - 1, "%s_cpu_affinity", tool->name); if(!strncasecmp(key,confkey,strlen(confkey))){ if (!BWLParseCPUAffinityString(val)) { BWLError(ctx,BWLErrFATAL,errno, "BWLToolGenericParse: %s: \'%s\' - invalid cpu affinity string", confkey,val); return -1; } return save_path(ctx,key,val); } snprintf(confkey, sizeof(confkey) - 1, "test_cpu_affinity"); if(!strncasecmp(key,confkey,strlen(confkey))){ if (!BWLParseCPUAffinityString(val)) { BWLError(ctx,BWLErrFATAL,errno, "BWLToolGenericParse: %s: \'%s\' - invalid cpu affinity string", confkey,val); return -1; } return save_path(ctx,key,val); } snprintf(confkey, sizeof(confkey) - 1, "test_port"); if(!strncasecmp(key,confkey,strlen(confkey))){ BWLPortRangeRec portrange; if(!BWLPortsParse(ctx,val,&portrange)){ BWLError(ctx,BWLErrFATAL,errno, "BWLToolGenericParse: %s: \'%s\' - invalid port range", confkey,val); return -1; } return save_ports(ctx,key,&portrange); } /* key not handled */ return 0; } /* * Function: _BWLToolGenericInitTest * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLErrSeverity _BWLToolGenericInitTest( BWLContext ctx, BWLToolDefinition tool, uint16_t *toolport ) { char optname[BWL_MAX_TOOLNAME + 12]; uint32_t len; BWLPortRange prange=NULL; strcpy(optname,"V."); strncpy(&optname[2],tool->name,sizeof(optname)-2); len = strlen(optname); strncpy(&optname[len],"_port",sizeof(optname)-len); prange = (BWLPortRange)BWLContextConfigGetV(ctx,optname); // Check if a default "test_port" range is set if( !prange ) { prange = (BWLPortRange)BWLContextConfigGetV(ctx,"V.test_port"); } // If nothing has been specified for this tool, initialize it to a range of // 100 ports, starting with the tool's default port. This keeps it from // reusing the same port for every request, and potentially colliding. if( !prange ) { prange = calloc(1,sizeof(BWLPortRangeRec)); if(prange) { prange->low = 5001; prange->high = 5900; BWLPortsSetI(ctx,prange,5001); BWLContextConfigSet(ctx,"V.test_port",prange); } } if( prange ) { *toolport = BWLPortsNext(prange); } else{ *toolport = tool->def_port; } return BWLErrOK; } BWLTestSideData BWLToolServerSideData( BWLContext ctx, BWLTestSpec *spec ) { return BWL_DATA_ON_SERVER; } BWLTestSideData BWLToolClientSideData( BWLContext ctx, BWLTestSpec *spec ) { return BWL_DATA_ON_CLIENT; } char BWLToolGetParsableFormatByID( BWLContext ctx, uint32_t tool_id ) { int i; for(i=0;itool_list_size;i++){ if(tool_id == ctx->tool_list[i].id){ return ctx->tool_list[i].tool->parsable_format; } } return '\0'; } BWLTestSideData BWLToolSenderSideData( BWLContext ctx, BWLTestSpec *spec ) { if (spec->server_sends) { return BWL_DATA_ON_SERVER; } else { return BWL_DATA_ON_CLIENT; } } BWLToolAvailability BWLToolGetCommonTools( BWLContext ctx, BWLToolAvailability tools_1, BWLToolAvailability tools_2, BWLTestType test_type ) { BWLToolAvailability common_tools = tools_1 & tools_2; BWLToolAvailability tid; for (tid = 1; tid > 0; tid <<= 1) { if (BWLToolGetTestTypesByID(ctx, tid) == test_type) continue; common_tools &= ~tid; } return common_tools; } uint16_t BWLToolStandardTesterPort( BWLContext ctx, BWLTestSpec *spec ) { if (spec->server_sends) { return BWL_DATA_ON_SERVER; } else { return BWL_DATA_ON_CLIENT; } } uint16_t BWLToolStandardTesterPortByID( BWLContext ctx, BWLToolType tool_id ) { uint32_t i; for(i=0;itool_list_size;i++){ if(tool_id == ctx->tool_list[i].id){ return ctx->tool_list[i].tool->standard_tester_port; } } return 0; } BWLBoolean BWLToolSupportsEndpointlessTestsByID( BWLContext ctx, BWLToolType tool_id ) { uint32_t i; for(i=0;itool_list_size;i++){ if(tool_id == ctx->tool_list[i].id){ return ctx->tool_list[i].tool->supports_endpointless; } } return False; } BWLBoolean _BWLToolGenericValidateTest( BWLContext ctx, BWLToolDefinition tool, BWLTestSpec test_spec ) { if (test_spec.server_sends && !tool->supports_server_sends) { BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "%s does not support firewall mode", tool->name); return False; } if (test_spec.no_server_endpoint && !tool->supports_endpointless) { BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "%s does not support endpointless tests", tool->name); return False; } return True; } BWLBoolean _BWLToolGenericKillTest( BWLContext ctx, pid_t pid, int force ) { int signal = force?SIGKILL:SIGTERM; if(killpg(pid,signal) == 0){ return True; } else if (errno == ESRCH) { return True; } else { return False; } } static BWLBoolean _TasksetAvailable( BWLContext ctx ) { int len; char *cmd; char buf[1024]; int n; /* * Fetch 'tool' name */ if( !(cmd = (char *)BWLContextConfigGetV(ctx,"V.taskset_cmd"))){ cmd = "taskset"; } n = ExecCommand(ctx, buf, sizeof(buf), cmd, "-h", NULL); if(n == 0) { return True; } BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "_TasksetAvailable(): Unable to find 'taskset' command. Setting the CPU affinity will not be supported"); return False; } int BWLToolGenericFillCPUAffinityCommand( BWLContext ctx, BWLToolDefinition tool, char **cmdline ) { char confkey[1024]; char *cmd, *cpu_affinity; int i; if (!taskset_available) return 0; snprintf(confkey, sizeof(confkey) - 1, "V.%s_cpu_affinity", tool->name); cpu_affinity = (char*)BWLContextConfigGetV(ctx,confkey); if (!cpu_affinity) { cpu_affinity = (char*)BWLContextConfigGetV(ctx,"V.test_cpu_affinity"); } if (!cpu_affinity) return 0; if( !(cmd = (char *)BWLContextConfigGetV(ctx,"V.taskset_cmd"))){ cmd = "taskset"; } i = 0; cmdline[i++] = cmd; cmdline[i++] = "-c"; cmdline[i++] = cpu_affinity; return i; } bwctl_1.5.4+dfsg1.orig/bwlib/bwlibP.h0000664000076500007710000006347112560414557014321 0ustar /* * ex: set tabstop=4 ai expandtab softtabstop=4 shiftwidth=4: * -*- mode: c-basic-indent: 4; tab-width: 4; indent-tabls-mode: nil -*- * $Id$ */ /************************************************************************ * * * Copyright (C) 2003 * * Internet2 * * All Rights Reserved * * * ************************************************************************/ /* * File: bwlibP.h * * Author: Jeff Boote * Internet2 * * Date: Thu Sep 18 13:26:19 MDT 2003 * * Description: * This header file describes the internal-private bwlib API. * * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifndef IPCNTRLP_H #define IPCNTRLP_H #if defined(HAVE_STDINT_H) #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64 #endif #ifndef PATH_MAX #define PATH_MAX 1024 #endif #include #include /* ** Lengths (in 16-byte blocks) of various Control messages. */ #define _BWL_RIJNDAEL_BLOCK_SIZE 16 #define _BWL_TIME_REQUEST_BLK_LEN 2 #define _BWL_TEST_REQUEST_BLK_LEN 8 /* may be 7 or 8 */ #define _BWL_START_SESSIONS_BLK_LEN 2 #define _BWL_STOP_SESSIONS_BLK_LEN 2 #define _BWL_CONTROL_ACK_BLK_LEN 2 #define _BWL_MAX_MSG_BLK_LEN _BWL_TEST_REQUEST_BLK_LEN #define _BWL_MAX_MSG (_BWL_MAX_MSG_BLK_LEN*_BWL_RIJNDAEL_BLOCK_SIZE) #define _BWL_TEST_REQUEST_PREAMBLE_SIZE (_BWL_TEST_REQUEST_BLK_LEN*_BWL_RIJNDAEL_BLOCK_SIZE) #define _BWL_TESTREC_SIZE 24 /* * Control state constants. */ /* initial & invalid */ #define _BWLStateInitial (0x0000) #define _BWLStateInvalid (0x0000) /* during negotiation */ #define _BWLStateSetup (0x0001) #define _BWLStateUptime (_BWLStateSetup << 1) /* after negotiation ready for requests */ #define _BWLStateRequest (_BWLStateUptime << 1) /* test sessions are active */ #define _BWLStateTest (_BWLStateRequest << 1) /* * The following states are for partially read messages on the server. */ #define _BWLStateTestRequest (_BWLStateTest << 1) #define _BWLStateStartSession (_BWLStateTestRequest << 1) #define _BWLStateStopSession (_BWLStateStartSession << 1) #define _BWLStateTestAccept (_BWLStateStopSession << 1) #define _BWLStateStartAck (_BWLStateTestAccept << 1) #define _BWLStateTimeRequest (_BWLStateStartAck << 1) #define _BWLStateTimeResponse (_BWLStateTimeRequest << 1) /* Reading indicates partial read request-ReadRequestType without remainder */ #define _BWLStateReading (_BWLStateTestRequest|_BWLStateStartSession|_BWLStateStopSession|_BWLStateTimeRequest) /* * "Pending" indicates waiting for server response to a request. */ #define _BWLStatePending (_BWLStateTestAccept|_BWLStateStartAck|_BWLStateStopSession|_BWLStateTimeResponse) #define _BWLStateIsInitial(c) (!(c)->state) #define _BWLStateIsSetup(c) (!(_BWLStateSetup ^ (c)->state)) #define _BWLStateIs(teststate,c) ((teststate & (c)->state)) #define _BWLStateIsRequest(c) _BWLStateIs(_BWLStateRequest,c) #define _BWLStateIsReading(c) _BWLStateIs((_BWLStateReading),c) #define _BWLStateIsPending(c) _BWLStateIs(_BWLStatePending,c) #define _BWLStateIsTest(c) _BWLStateIs(_BWLStateTest,c) /* * other useful constants. */ #define _BWL_DEFAULT_ACCESSPRIO BWLErrINFO #define _BWL_DEFAULT_ERRORMASK BWLErrOK #define _BWL_DEFAULT_TMPDIR "/tmp" #define _BWL_DEV_NULL "/dev/null" #define _BWL_ERR_MAXSTRING (1024) #define _BWL_PATH_SEPARATOR "/" #define _BWL_TMPFILEFMT "bwctl-tmp.XXXXXX" #define _BWL_MAX_TOOLARGS (36) typedef struct BWLTestSessionRec BWLTestSessionRec, *BWLTestSession; /* * Tool Data structures. The ToolRec is used to keep track of the actual * tools compiled into the given binary. (An array of these is allocated * as part of the BWLContext. */ typedef struct BWLToolRec{ BWLToolType id; /* what bits define this tool in the protocol? */ BWLToolDefinition tool; } BWLToolRec, *BWLTool; /* * This function is used to parse config file options specific to the tool. * The 'context' hash is expected to hold the values from the config file. */ typedef int (*BWLToolParseArgFunc)( BWLContext ctx, BWLToolDefinition tool, const char *key, const char *val ); /* * This function is used to initialize a tool. * * Minimally, it should determine if the tool is available. If there * is any one-time initialization that should happen for all test instances * that tool might run, it can do those here as well. */ typedef BWLBoolean (*BWLToolAvailableFunc)( BWLContext ctx, BWLToolDefinition tool ); /* * This function is used to validate a given test specifications can be run by * the given tool. It is called by the client and the server to make sure that * invalid tests aren't being requested. */ typedef BWLBoolean (*BWLToolValidateTestFunc)( BWLContext ctx, BWLToolDefinition tool, BWLTestSpec test_spec ); /* * This function is used to initialize a test at the resource-broker * portion of the daemon. It is called once for each new 'test session' - * but it is called in the global portion of the daemon, not from the * child 'handlers' so it should not do 'real' resource allocations. * This is for simple sanity checking and for deciding what 'port' * should be used since that needs to be 'global' state. */ typedef BWLErrSeverity (*BWLToolInitTestFunc)( BWLContext ctx, BWLToolDefinition tool, uint16_t *toolport ); /* * This function is used to do any test initialization needed before * running. This is done so the 'run' function can do as little as * possible when it is run. (Basically just the exec in the iperf * case.) Returns a 'closure' pointer that if NULL indicates failure. * If non-NULL, this 'closure' is passed on to the 'run' function. */ typedef void * (*BWLToolPreRunTestFunc)( BWLContext ctx, BWLTestSession tsess ); /* * This function is used to actually run the test. In the iperf case, * this is just the exec. */ typedef BWLBoolean (*BWLToolRunTestFunc)( BWLContext ctx, BWLTestSession tsess, void *closure ); /* * Structure to hold complete 'tool' description */ /* * This function is used to parse the protocol parameters for the given tool. */ typedef BWLErrSeverity (*BWLToolParseRequestFunc)( BWLContext ctx, const uint8_t *buf, BWLTestSpec *tspec, BWLProtocolVersion protocol_version ); /* * This function is used to parse the protocol parameters for the given tool. */ typedef BWLErrSeverity (*BWLToolUnparseRequestFunc)( BWLContext ctx, uint8_t *buf, BWLTestSpec *tspec, BWLProtocolVersion protocol_version, BWLTestSession tsession ); /* * This function is used to parse the protocol parameters for the given tool. */ typedef BWLTestSideData (*BWLToolTestSideDataFunc)( BWLContext ctx, BWLTestSpec *tspec ); typedef BWLBoolean (*BWLToolKillTestFunc) ( BWLContext ctx, pid_t pid, int force ); /* * This structure is used to actually define the 'Tool' abstraction */ struct BWLToolDefinitionRec{ char name[BWL_MAX_TOOLNAME]; char *def_cmd; char *def_server_cmd; uint16_t def_port; BWLToolParseArgFunc parse; BWLToolParseRequestFunc parse_request; BWLToolUnparseRequestFunc unparse_request; BWLToolAvailableFunc tool_avail; BWLToolValidateTestFunc validate_test; BWLToolInitTestFunc init_test; BWLToolPreRunTestFunc pre_run; BWLToolRunTestFunc run; BWLToolKillTestFunc kill; BWLTestType test_types; BWLToolTestSideDataFunc results_side; BWLBoolean supports_server_sends; BWLBoolean supports_endpointless; uint16_t standard_tester_port; char parsable_format; }; typedef struct BWLContextRec BWLContextRec; typedef struct BWLControlRec BWLControlRec; #define _BWL_CONTEXT_TABLE_SIZE 64 #define _BWL_CONTEXT_MAX_KEYLEN 64 #define _BWL_CONTEXT_FLIST_SIZE 20 typedef struct BWLContextFreeList BWLContextFreeList; struct BWLContextFreeList{ uint32_t len; void *list[_BWL_CONTEXT_FLIST_SIZE]; BWLContextFreeList *next; }; struct BWLContextRec{ BWLBoolean valid; BWLBoolean lib_eh; I2ErrHandle eh; uint32_t errmaskprio; I2Table table; I2RandomSource rand_src; char tmpdir[PATH_MAX+1]; BWLControlRec *cntrl_list; uint32_t tool_list_size; BWLToolRec *tool_list; BWLToolAvailability tool_avail; BWLContextFreeList *flist; }; struct BWLControlRec{ /* * Application configuration information. */ BWLContext ctx; /* * Hash for maintaining Policy state data. */ I2Table table; /* * Control connection state information. */ BWLBoolean server; /* this record represents server */ int state; /* current state of connection */ BWLSessionMode mode; BWLProtocolVersion protocol_version; /* * Very rough upper bound estimate of * rtt. * Used by clients to estimate a * good "start" time for tests that * is just beyond the amount of time * it takes to request the test. */ BWLNum64 rtt_bound; /* * This field is initialized to zero and used for comparisons * to ensure AES is working. */ uint8_t zero[16]; /* area for peer's messages */ /* make uint32_t to get wanted alignment */ /* Usually cast to uint8_t when used... */ uint32_t msg[_BWL_MAX_MSG/sizeof(uint32_t)]; /* * Address specification and "network" information. * (Control socket addr information) */ I2Addr remote_addr; I2Addr local_addr; int sockfd; /* * Encryption fields */ /* null if not set - else userid_buffer */ char *userid; BWLUserID userid_buffer; keyInstance encrypt_key; keyInstance decrypt_key; uint8_t session_key[16]; uint8_t readIV[16]; uint8_t writeIV[16]; int *retn_on_intr; struct BWLControlRec *next; BWLTestSession tests; }; typedef struct BWLEndpointRec{ #ifndef NDEBUG BWLBoolean childwait; #endif BWLControl cntrl; /* To client */ BWLTestSession tsess; int ssockfd; BWLControl rcntrl; /* To other endpoint */ BWLAcceptType acceptval; pid_t child; int wopts; uint8_t exit_status; BWLBoolean dont_kill; BWLBoolean killed; } BWLEndpointRec, *BWLEndpoint; struct BWLTestSessionRec{ BWLControl cntrl; BWLSID sid; BWLTimeStamp localtime; BWLNum64 reserve_time; BWLNum64 fuzz; BWLToolDefinition tool; uint16_t tool_port; uint16_t local_tool_port; BWLBoolean conf_client; BWLBoolean conf_server; BWLTestSpec test_spec; FILE *localfp; FILE *remotefp; void *closure; /* per/test app data */ BWLEndpoint endpoint; }; /* * Private api.c prototypes */ extern BWLAcceptType _BWLGetAcceptType( BWLControl cntrl, uint8_t val ); extern BWLTestSession _BWLTestSessionAlloc( BWLControl cntrl, BWLBoolean sender_local, I2Addr client, I2Addr server, uint16_t recv_port, BWLTestSpec *test_spec ); extern BWLErrSeverity _BWLTestSessionFree( BWLContext ctx, BWLTestSession tsession, BWLAcceptType aval ); extern int _BWLCreateSID( BWLTestSession tsession ); #define _BWL_SESSION_FIN_ERROR 0 #define _BWL_SESSION_FIN_NORMAL 1 #define _BWL_SESSION_FIN_INCOMPLETE 2 extern int _BWLWriteDataHeaderFinished( BWLContext ctx, FILE *fp, uint32_t finished ); extern int _BWLReadDataHeaderInitial( BWLContext ctx, FILE *fp, uint32_t *ver, uint32_t *fin, /* only set if (*ver >= 2) */ off_t *hdr_off, struct stat *stat_buf ); /* * io.c prototypes */ extern int _BWLSendBlocksIntr( BWLControl cntrl, uint8_t *buf, int num_blocks, int *retn_on_intr ); extern int _BWLReceiveBlocksIntr( BWLControl cntrl, uint8_t *buf, int num_blocks, int *retn_on_intr ); extern int _BWLSendBlocks( BWLControl cntrl, uint8_t *buf, int num_blocks ); extern int _BWLReceiveBlocks( BWLControl cntrl, uint8_t *buf, int num_blocks ); extern int _BWLEncryptBlocks( BWLControl cntrl, uint8_t *in_buf, int num_blocks, uint8_t *out_buf ); extern int _BWLDecryptBlocks( BWLControl cntrl, uint8_t *in_buf, int num_blocks, uint8_t *out_buf ); extern void _BWLMakeKey( BWLControl cntrl, uint8_t *binKey ); extern int _BWLEncryptToken( uint8_t *binKey, uint8_t *token_in, uint8_t *token_out ); extern int _BWLDecryptToken( uint8_t *binKey, uint8_t *token_in, uint8_t *token_out ); /* * protocol.c */ extern BWLErrSeverity _BWLWriteServerGreeting( BWLControl cntrl, uint32_t avail_modes, uint8_t *challenge, /* [16] */ int *retn_on_intr ); extern BWLErrSeverity _BWLReadServerGreeting( BWLControl cntrl, uint32_t *mode, /* modes available - returned */ uint8_t *challenge /* [16] : challenge - returned */ ); extern BWLErrSeverity _BWLWriteClientGreeting( BWLControl cntrl, uint8_t *token /* [32] */ ); extern BWLErrSeverity _BWLReadClientGreeting( BWLControl cntrl, uint32_t *mode, uint8_t *token, /* [32] - return */ uint8_t *clientIV, /* [16] - return */ int *retn_on_intr ); extern BWLErrSeverity _BWLWriteServerOK( BWLControl cntrl, BWLAcceptType code, BWLNum64 uptime, BWLToolAvailability avail_tools, int *retn_on_intr ); extern BWLErrSeverity _BWLReadServerOK( BWLControl cntrl, BWLAcceptType *acceptval, /* ret */ BWLToolAvailability *avail /* ret */ ); extern BWLErrSeverity _BWLReadServerUptime( BWLControl cntrl, BWLNum64 *uptime_ret ); extern BWLErrSeverity _BWLWriteTimeRequest( BWLControl cntrl ); extern BWLErrSeverity _BWLReadTimeRequest( BWLControl cntrl, int *retn_on_intr ); extern BWLErrSeverity _BWLWriteTimeResponse( BWLControl cntrl, BWLTimeStamp *tstamp, int *retn_on_intr ); extern BWLErrSeverity _BWLReadTimeResponse( BWLControl cntrl, BWLTimeStamp *tstamp_ret ); #define _BWL_DYNAMIC_WINDOW_SIZE (0x1) extern BWLErrSeverity _BWLWriteTestRequest( BWLControl cntrl, BWLTestSession tsession ); extern BWLErrSeverity _BWLReadTestRequest( BWLControl cntrl, int *retn_on_intr, BWLTestSession *test_session, BWLAcceptType *accept_ret ); extern BWLErrSeverity _BWLWriteTestAccept( BWLControl cntrl, int *retn_on_intr, BWLAcceptType acceptval, BWLTestSession tsession ); extern BWLErrSeverity _BWLReadTestAccept( BWLControl cntrl, BWLAcceptType *acceptval, BWLTestSession tsession ); extern BWLErrSeverity _BWLWriteStartSession( BWLControl cntrl, uint16_t dataport ); extern BWLErrSeverity _BWLReadStartSession( BWLControl cntrl, uint16_t *dataport, int *retn_on_intr ); extern BWLErrSeverity _BWLWriteStartAck( BWLControl cntrl, int *retn_on_intr, uint16_t dataport, BWLAcceptType acceptval ); extern BWLErrSeverity _BWLReadStartAck( BWLControl cntrl, uint16_t *dataport, BWLAcceptType *acceptval ); extern BWLErrSeverity _BWLWriteStopSession( BWLControl cntrl, int *retn_on_intr, BWLAcceptType acceptval, FILE *fp ); extern BWLErrSeverity _BWLReadStopSession( BWLControl cntrl, int *retn_on_intr, BWLAcceptType *acceptval, FILE *fp ); /* * context.c */ extern BWLControl _BWLControlAlloc( BWLContext ctx, BWLErrSeverity *err_ret ); extern BWLBoolean _BWLCallGetAESKey( BWLContext ctx, /* context record */ const char *userid, /* identifies key */ uint8_t *key_ret, /* key - return */ BWLErrSeverity *err_ret /* error - return */ ); extern BWLBoolean _BWLCallCheckControlPolicy( BWLControl cntrl, /* control record */ BWLSessionMode mode, /* requested mode */ const char *userid, /* key identity */ struct sockaddr *local_sa_addr, /* local addr or NULL */ struct sockaddr *remote_sa_addr, /* remote addr */ BWLErrSeverity *err_ret /* error - return */ ); extern BWLBoolean _BWLCallCheckTestPolicy( BWLControl cntrl, /* control handle */ BWLTestSession tsession, /* test session description */ BWLErrSeverity *err_ret /* error - return */ ); extern void _BWLCallTestComplete( BWLTestSession tsession, BWLAcceptType aval ); extern BWLErrSeverity _BWLCallProcessResults( BWLTestSession tsession ); /* * non-NULL closure indicates "receiver" - NULL indicates R/O Fetch. */ extern FILE * _BWLCallOpenFile( BWLControl cntrl, /* control handle */ void *closure, /* app data/per test */ BWLSID sid, /* sid for datafile */ char fname_ret[PATH_MAX+1] ); extern void _BWLCallCloseFile( BWLControl cntrl, void *closure, FILE *fp, BWLAcceptType aval ); /* tools.c */ extern BWLBoolean _BWLToolInitialize( BWLContext ctx ); extern BWLErrSeverity _BWLToolLookForTesters( BWLContext ctx ); extern BWLToolDefinition _BWLToolGetDefinition( BWLContext ctx, BWLToolType id ); extern void * _BWLToolPreRunTest( BWLContext ctx, BWLTestSession tsess ); extern void _BWLToolRunTest( BWLContext ctx, BWLTestSession tsess, void *closure ); extern int _BWLToolGenericParse( BWLContext ctx, BWLToolDefinition tool, const char *key, const char *val ); extern BWLErrSeverity _BWLToolGenericInitTest( BWLContext ctx, BWLToolDefinition tool, uint16_t *toolport ); extern BWLBoolean _BWLToolGenericValidateTest( BWLContext ctx, BWLToolDefinition tool, BWLTestSpec test_spec ); BWLBoolean _BWLToolGenericKillTest( BWLContext ctx, pid_t pid, int force ); /* endpoint.c */ /* * EndpointStart: * 1) Open tmpfile for results/ open /dev/null for stderr * 2) If receiver - open serversock for endpoint2endpoint communication * If sender - connect to giving reciever control sock and send * timestamp packet and receive AOK. * 3) fork child * child: * dup stdout -> tmpfile * dup stdin -> /dev/null * dup stderr -> /dev/null * wait until start time to exec or signal to exit * parent: return AOK */ extern BWLBoolean _BWLEndpointStart( BWLTestSession tsession, uint16_t *dataport, BWLErrSeverity *err_ret ); /* * EndpointStatus: * Is child still alive? What was "exit" code of test? */ extern BWLBoolean _BWLEndpointStatus( BWLContext ctx, BWLTestSession tsession, BWLAcceptType *aval, BWLErrSeverity *err_ret ); extern BWLBoolean _BWLEndpointStop( BWLContext ctx, BWLTestSession tsession, BWLAcceptType aval, BWLErrSeverity *err_ret ); /* * error.c */ extern BWLErrSeverity _BWLFailControlSession( BWLControl cntrl, int err ); /* * time.c */ /* * En/DecodeTimeStamp functions do not assume any alignment requirements * for buf. (Most functions in protocol.c assume uint32_t alignment.) */ extern void _BWLEncodeTimeStamp( uint8_t buf[8], BWLTimeStamp *tstamp ); extern BWLBoolean _BWLEncodeTimeStampErrEstimate( uint8_t buf[2], BWLTimeStamp *tstamp ); extern void _BWLDecodeTimeStamp( BWLTimeStamp *tstamp, uint8_t buf[8] ); extern BWLBoolean _BWLDecodeTimeStampErrEstimate( BWLTimeStamp *tstamp, uint8_t buf[2] ); extern int _BWLInitNTP( BWLContext ctx ); extern struct timespec * _BWLGetTimespec( BWLContext ctx, struct timespec *ts, uint32_t *esterr, int *synchronized ); extern BWLToolDefinitionRec BWLToolPing; extern BWLErrSeverity BWLGenericParseThroughputParameters( BWLContext ctx, const uint8_t *buf, BWLTestSpec *tspec, BWLProtocolVersion protocol_version ); extern BWLErrSeverity BWLGenericParseTracerouteParameters( BWLContext ctx, const uint8_t *buf, BWLTestSpec *tspec, BWLProtocolVersion protocol_version ); extern BWLErrSeverity BWLGenericParsePingParameters( BWLContext ctx, const uint8_t *buf, BWLTestSpec *tspec, BWLProtocolVersion protocol_version ); extern BWLErrSeverity BWLGenericUnparseThroughputParameters( BWLContext ctx, uint8_t *buf, BWLTestSpec *tspec, BWLProtocolVersion protocol_version, BWLTestSession tsession ); extern BWLErrSeverity BWLGenericUnparseTracerouteParameters( BWLContext ctx, uint8_t *buf, BWLTestSpec *tspec, BWLProtocolVersion protocol_version, BWLTestSession tsession ); extern BWLErrSeverity BWLGenericUnparsePingParameters( BWLContext ctx, uint8_t *buf, BWLTestSpec *tspec, BWLProtocolVersion protocol_version, BWLTestSession tsession ); BWLErrSeverity BWLToolUnparseRequestParameters( BWLToolType id, BWLContext ctx, uint8_t *buf, BWLTestSpec *tspec, BWLProtocolVersion protocol_version, BWLTestSession tsession ); BWLErrSeverity BWLToolParseRequestParameters( BWLToolType id, BWLContext ctx, const uint8_t *buf, BWLTestSpec *tspec, BWLProtocolVersion protocol_version ); BWLBoolean BWLSockaddrCompare( struct sockaddr *sa, struct sockaddr *sb ); BWLBoolean BWLParseCPUAffinityString( const char *cpu_affinity ); #endif /* IPCNTRLP_H */ bwctl_1.5.4+dfsg1.orig/bwlib/api.c0000664000076500007710000002272712560414557013645 0ustar /* ** ex: set tabstop=4 ai expandtab softtabstop=4 shiftwidth=4: ** $Id$ */ /************************************************************************ * * * Copyright (C) 2003 * * Internet2 * * All Rights Reserved * * * ************************************************************************/ /* ** File: api.c ** ** Author: Jeff W. Boote ** ** Date: Tue Sep 16 14:24:49 MDT 2003 ** ** Description: * * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include #include #include #include #include #include #include "./bwlibP.h" #ifndef EFTYPE #define EFTYPE ENOSYS #endif /* * Function: BWLGetContext * * Description: * Returns the context pointer that was referenced when the * given control connection was created. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLContext BWLGetContext( BWLControl cntrl ) { return cntrl->ctx; } /* * Function: BWLGetMode * * Description: * Returns the "mode" of the control connection. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLSessionMode BWLGetMode( BWLControl cntrl ) { return cntrl->mode; } /* * Function: BWLControlFD * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ int BWLControlFD( BWLControl cntrl ) { return cntrl->sockfd; } /* * Function: BWLControlLocalAddr * * Description: * Returns a pointer to the address of the local end of the * control connection in an I2Addr struct. Does not make a copy of * the struct. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ I2Addr BWLControlLocalAddr( BWLControl cntrl ) { return cntrl->local_addr; } /* * Function: BWLControlRemoteAddr * * Description: * Returns a pointer to the address of the remote end of the * control connection in an I2Addr struct. Does not make a copy of * the struct. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ I2Addr BWLControlRemoteAddr( BWLControl cntrl ) { return cntrl->remote_addr; } /* * Function: BWLAddrByControl * * Description: * Wrapper for some I2Addr functions on the * control socket. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ I2Addr BWLAddrByControl( BWLControl cntrl ) { struct sockaddr *saddr; socklen_t saddrlen; if(!cntrl->remote_addr || !(saddr = I2AddrSAddr(cntrl->remote_addr,&saddrlen))){ return NULL; } return I2AddrBySAddr(BWLContextErrHandle(cntrl->ctx), saddr,saddrlen, I2AddrSocktype(cntrl->remote_addr), I2AddrProtocol(cntrl->remote_addr)); } /* * Function: BWLAddrByLocalControl * * Description: * Wrapper for some I2Addr functions on the * control socket. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ I2Addr BWLAddrByLocalControl( BWLControl cntrl ) { struct sockaddr *saddr; socklen_t saddrlen; if(!cntrl->local_addr || !(saddr = I2AddrSAddr(cntrl->local_addr,&saddrlen))){ return NULL; } return I2AddrBySAddr(BWLContextErrHandle(cntrl->ctx), saddr,saddrlen, I2AddrSocktype(cntrl->local_addr), I2AddrProtocol(cntrl->local_addr)); } /* * Function: BWLGetRTTBound * * Description: Returns a very rough estimate of the upper-bound rtt to * the server. * * In Args: * * Out Args: * * Scope: * Returns: * bound or 0 if unavailable * Side Effect: */ BWLNum64 BWLGetRTTBound( BWLControl cntrl ) { return cntrl->rtt_bound; } /* * Function: _BWLFailControlSession * * Description: * Simple convienience to set the state and return the failure at * the same time. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLErrSeverity _BWLFailControlSession( BWLControl cntrl, int level ) { cntrl->state = _BWLStateInvalid; return (BWLErrSeverity)level; } /* * Function: _BWLTestSessionAlloc * * Description: * * This function is used to allocate/initialize the memory record used * to maintain state information about a "configured" test. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLTestSession _BWLTestSessionAlloc( BWLControl cntrl, BWLBoolean is_client, I2Addr client, I2Addr server, uint16_t tool_port, BWLTestSpec *test_spec ) { BWLTestSession test; /* * Address records must exist. */ if(!client || !server){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrINVALID, "_BWLTestSessionAlloc:Invalid Addr arg"); return NULL; } if(!(test = calloc(1,sizeof(BWLTestSessionRec)))){ BWLError(cntrl->ctx,BWLErrFATAL,BWLErrUNKNOWN, "calloc(1,BWLTestSessionRec): %M"); return NULL; } /* * Initialize address records and test description record fields. */ test->cntrl = cntrl; memcpy(&test->test_spec,test_spec,sizeof(BWLTestSpec)); /* * Overwrite client/server with passed-in values */ test->test_spec.client = client; test->test_spec.server = server; test->conf_server = !is_client; test->conf_client = !test->conf_server; if(is_client){ test->conf_client = True; test->conf_server = False; test->tool_port = tool_port; } else{ test->conf_server = True; test->conf_client = False; test->tool_port = 0; } return test; } /* * Function: _BWLTestSessionFree * * Description: * This function is used to free the memory associated with a "configured" * test session. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLErrSeverity _BWLTestSessionFree( BWLContext ctx, BWLTestSession tsession, BWLAcceptType aval ) { BWLErrSeverity err=BWLErrOK; if(!tsession){ return BWLErrOK; } /* * remove this tsession from the cntrl->tests list. */ if(tsession->cntrl->tests == tsession){ tsession->cntrl->tests = NULL; } (void)_BWLEndpointStop(ctx,tsession,aval,&err); if(tsession->closure){ _BWLCallTestComplete(tsession,aval); } I2AddrFree(tsession->test_spec.client); I2AddrFree(tsession->test_spec.server); while(tsession->localfp && (fclose(tsession->localfp) < 0) && (errno == EINTR)); while(tsession->remotefp && (fclose(tsession->remotefp) < 0) && (errno == EINTR)); free(tsession); return err; } /* * Function: _BWLCreateSID * * Description: * Generate a "unique" SID from addr(4)/time(8)/random(4) values. * * In Args: * * Out Args: * * Scope: * Returns: * 0 on success * Side Effect: */ int _BWLCreateSID( BWLTestSession tsession ) { uint8_t *aptr; struct sockaddr *saddr = I2AddrSAddr(tsession->test_spec.server,NULL); if(!saddr){ BWLError(tsession->cntrl->ctx,BWLErrFATAL,BWLErrUNSUPPORTED, "_BWLCreateSID: Invalid socket address"); return 1; } switch(saddr->sa_family){ struct sockaddr_in *s4; #ifdef AF_INET6 struct sockaddr_in6 *s6; case AF_INET6: s6 = (struct sockaddr_in6*)saddr; /* point at last 4 bytes of addr */ aptr = &s6->sin6_addr.s6_addr[12]; break; #endif case AF_INET: s4 = (struct sockaddr_in*)saddr; aptr = (uint8_t*)&s4->sin_addr; break; default: BWLError(tsession->cntrl->ctx,BWLErrFATAL,BWLErrUNSUPPORTED, "_BWLCreateSID: Unknown address family"); return 1; break; } memcpy(&tsession->sid[0],aptr,4); _BWLEncodeTimeStamp(&tsession->sid[4],&tsession->localtime); if(I2RandomBytes(tsession->cntrl->ctx->rand_src,&tsession->sid[12],4) != 0){ return 1; } return 0; } bwctl_1.5.4+dfsg1.orig/bwlib/daemon.c0000664000076500007710000001203212560414557014323 0ustar /* * $Id$ */ /* * File: daemon.c * * Author: Jeff W. Boote * Internet2 * * Date: Thu Jan 17 23:03:59 MST 2008 * * Description: * * This file holds convenience functions that are * used to implement the request broker portion of the * daemon. (This is the portion that the bwctl client also * needs to implement if there is no 'local' bwctld.) * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include "bwlibP.h" /* * Function: BWLDaemonParseArg * * Description: * parse options common between client/server for providing * 'tester' functionality. * * In Args: * * Out Args: * * Scope: * Returns: 0 if opt not found, neg if error, pos if success * Side Effect: */ int BWLDaemonParseArg( BWLContext ctx, const char *key, char *val ) { BWLBoolean tc; if( (tc = BWLToolParseArg(ctx,key,val))){ return tc; } if(!strncasecmp(key,"access_priority",16)){ int prio = I2ErrLogSyslogPriority(val); if( (prio < 0) || !BWLContextConfigSet(ctx,BWLAccessPriority,(uint32_t)prio)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unable to set access_priority: \"%s\"",val); return -1; } return 1; } if(!strncasecmp(key,"peer_port",10)){ BWLPortRange pports; if( !(pports = calloc(1,sizeof(BWLPortRangeRec)))){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"calloc(1,%d): %M",sizeof(BWLPortRangeRec)); return -1; } if( !BWLPortsParse(ctx,val,pports) || !BWLContextConfigSet(ctx,BWLPeerPortRange,pports)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"Unable to set peer_port"); return -1; } if( !BWLContextRegisterMemory(ctx,pports)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"Failed to \"register\" peer_port cleanup"); return -1; } return 1; } if(!strncasecmp(key,"test_port",10)){ BWLPortRange pports; if( !(pports = calloc(1,sizeof(BWLPortRangeRec)))){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"calloc(1,%d): %M",sizeof(BWLPortRangeRec)); return -1; } if( !BWLPortsParse(ctx,val,pports) || !BWLContextConfigSet(ctx,BWLPeerPortRange,pports)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"Unable to set test_port"); return -1; } if( !BWLContextRegisterMemory(ctx,pports)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"Failed to \"register\" test_port cleanup"); return -1; } return 1; } if( !strncasecmp(key,"control_timeout",16)){ char *end=NULL; uint32_t tlng; errno = 0; tlng = strtoul(val,&end,10); if((end == val) || (errno == ERANGE)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Invalid control_timeout value: \"%s\"",val); return -1; } if( !BWLContextConfigSet(ctx,BWLControlTimeout,tlng)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unable to set control_timeout: \"%s\"",val); return -1; } return 1; } if( !strncasecmp(key,"bottleneck_capacity",20)){ I2numT bneck; if( I2StrToNum(&bneck,val) || !BWLContextConfigSet(ctx,BWLBottleNeckCapacity,bneck)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unable to set bottlenect_capacity: \"%s\"",val); return -1; } return 1; } if( !strncasecmp(key,"sync_fuzz",10)){ char *end=NULL; double tdbl; errno = 0; tdbl = strtod(val,&end); if((end == val) || (errno == ERANGE) || (tdbl < 0.0)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Invalid value sync_fuzz: \"%s\"", val); return -1; } if( !BWLContextConfigSet(ctx,BWLSyncFuzz,tdbl)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unable to set sync_fuzz: \"%s\"",val); return -1; } return 1; } if( !strncasecmp(key,"allow_unsync",13)){ if( !BWLContextConfigSet(ctx,BWLAllowUnsync,(void*)True)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unable to set allow_unsync: \"%s\"",val); return -1; } return 1; } return 0; } bwctl_1.5.4+dfsg1.orig/bwlib/paris-traceroute.c0000664000076500007710000002216212560414557016356 0ustar /* * ex: set tabstop=4 ai expandtab softtabstop=4 shiftwidth=4: * -*- mode: c-basic-indent: 4; tab-width: 4; indent-tabs-mode: nil -*- * $Id: paris-traceroute.c 599 2013-08-02 17:27:12Z aaron $ */ /* * File: paris-traceroute.c * * Author: Aaron Brown * Internet2 * * Date: 2013-09-02 * * Description: * * This file encapsulates the functionality required to run a * paris traceroute test in bwctl. * * License: * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include #define TRACEROUTE_DEFAULT_CMD "paris-traceroute" /* * Function: ParisTracerouteAvailable * * Description: * * In Args: * Out Args: * Scope: * * Returns: * * Side Effect: * */ static BWLBoolean ParisTracerouteAvailable( BWLContext ctx, BWLToolDefinition tool ) { BWLBoolean traceroute_available = False; char *traceroute_cmd; int n; char buf[1024]; /* * Fetch the 'traceroute' */ if( !(traceroute_cmd = (char *)BWLContextConfigGetV(ctx,"V.paris_traceroute_cmd"))){ BWLError(ctx,BWLErrDEBUG,BWLErrUNKNOWN, "ParisTracerouteAvailable(): %s unset, using \"%s\"", "traceroute_cmd",TRACEROUTE_DEFAULT_CMD); traceroute_cmd = TRACEROUTE_DEFAULT_CMD; } n = ExecCommand(ctx, buf, sizeof(buf), traceroute_cmd, "127.0.0.1", NULL); if (n == 0) { traceroute_available = True; } else { traceroute_available = False; BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "ParisTracerouteAvailable(): Unable to verify that '%s' is working. It may not be installed. exit status: %d: output: %s", traceroute_cmd, n, buf); } return traceroute_available; } /* * Function: ParisTraceroutePreRunTest * * Description: * Does all 'prep' work for running an traceroute test. * * Returns a 'closure' pointer. NULL indicates * failure. * This 'closure' pointer is passed on to the ParisTracerouteRunTest. * * (closure pointer is just the arg list for the exec) * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ /* This ParisTracerouteArgs can be a static because it is only used from within a * forked process. If bwctl ever goes to threads, this will need to be * made thread-local memory. */ static char *ParisTracerouteArgs[_BWL_MAX_TOOLARGS*2]; static void * ParisTraceroutePreRunTest( BWLContext ctx, BWLTestSession tsess ) { int len; char *cmd; int a = 0; I2Addr remote_side; I2Addr local_side; char addr_str[INET6_ADDRSTRLEN]; // If 'server sends' mode is in effect, the server runs the ping command, // because the client doesn't need to set anything up. It's a hack, but it // should work. if((tsess->conf_server && !tsess->test_spec.server_sends) || (tsess->conf_client && tsess->test_spec.server_sends)) { fprintf(tsess->localfp,"bwctl: nothing to exec for paris traceroute server\n"); ParisTracerouteArgs[0] = NULL; return (void *)ParisTracerouteArgs; } if (tsess->test_spec.server_sends) { local_side = tsess->test_spec.server; remote_side = tsess->test_spec.client; } else { local_side = tsess->test_spec.client; remote_side = tsess->test_spec.server; } /* Run paris-traceroute */ cmd = (char*)BWLContextConfigGetV(ctx,"V.paris_traceroute_cmd"); if(!cmd) cmd = TRACEROUTE_DEFAULT_CMD; /* * First figure out the args for traceroute */ ParisTracerouteArgs[a++] = cmd; if(tsess->test_spec.traceroute_first_ttl){ ParisTracerouteArgs[a++] = "-f"; if( !(ParisTracerouteArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.traceroute_first_ttl))){ return NULL; } } if(tsess->test_spec.traceroute_last_ttl){ ParisTracerouteArgs[a++] = "-m"; if( !(ParisTracerouteArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.traceroute_last_ttl))){ return NULL; } } #if 0 /* No TOS bits supported */ if(tsess->test_spec.tos){ ParisTracerouteArgs[a++] = "-t"; if( !(ParisTracerouteArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.tos))){ return NULL; } } #endif #if 0 // Bind to the specified address. Not supported currently. ParisTracerouteArgs[a++] = "-s"; if( BWLAddrNodeName(ctx, local_side, addr_str, sizeof(addr_str), NI_NUMERICHOST) == 0) { BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"ParisTraceroutePreRunTest():Problem resolving address"); return NULL; } if( !(ParisTracerouteArgs[a++] = strdup(addr_str))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"ParisTraceroutePreRunTest():strdup(): %M"); return NULL; } #endif #if 0 // unsupported if(tsess->test_spec.traceroute_packet_size){ if( !(ParisTracerouteArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.traceroute_packet_size))){ return NULL; } } #endif if( BWLAddrNodeName(ctx, remote_side, addr_str, sizeof(addr_str), NI_NUMERICHOST) == 0) { BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"ParisTraceroutePreRunTest():Problem resolving address"); return NULL; } if( !(ParisTracerouteArgs[a++] = strdup(addr_str))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"ParisTraceroutePreRunTest():strdup(): %M"); return NULL; } ParisTracerouteArgs[a++] = NULL; /* * Report what will be run in the output file */ // if (tsess->test_spec.verbose) { fprintf(tsess->localfp,"bwctl: exec_line:"); for(len=0;ParisTracerouteArgs[len];len++){ fprintf(tsess->localfp," %s",ParisTracerouteArgs[len]); } fprintf(tsess->localfp,"\n"); // } return (void *)ParisTracerouteArgs; } /* * Function: ParisTracerouteRunTest * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ static BWLBoolean ParisTracerouteRunTest( BWLContext ctx, BWLTestSession tsess, void *closure ) { char **ipargs = (char **)closure; if (ipargs[0] != NULL) { /* * Now run traceroute! */ execvp(ipargs[0],ipargs); BWLError(ctx,BWLErrFATAL,errno,"execvp(%s): %M",ipargs[0]); exit(BWL_CNTRL_FAILURE); } // Special case for the traceroute server. There isn't anything for the receive // side to run, so just sleep until duration is up. sleep(tsess->test_spec.duration); exit(0); } /* * Function: ParisTracerouteInitTest * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLErrSeverity ParisTracerouteInitTest( BWLContext ctx, BWLToolDefinition tool, uint16_t *toolport ) { return BWLErrOK; } int ParisTracerouteParse( BWLContext ctx, BWLToolDefinition tool, const char *key, const char *val ) { if(!strncasecmp(key,"paris_traceroute_cmd",strlen(key))){ return save_path(ctx,key,val); } return _BWLToolGenericParse(ctx, tool, key, val); } BWLToolDefinitionRec BWLToolParisTraceroute = { "paris-traceroute", /* name */ "paris-traceroute", /* def_cmd */ NULL, /* def_server_cmd */ 0, /* def_port */ ParisTracerouteParse, /* parse */ BWLGenericParseTracerouteParameters, /* parse_request */ BWLGenericUnparseTracerouteParameters, /* unparse_request */ ParisTracerouteAvailable, /* tool_avail */ _BWLToolGenericValidateTest, /* validate_test */ ParisTracerouteInitTest, /* init_test */ ParisTraceroutePreRunTest, /* pre_run */ ParisTracerouteRunTest, /* run */ _BWLToolGenericKillTest, /* kill */ BWL_TEST_TRACEROUTE, /* test_types */ BWLToolSenderSideData, /* results_side */ True, /* supports_server_sends */ True, /* supports_endpointless */ 0, /* The server port to use in endpointless tests */ 0, /* parsable format */ }; bwctl_1.5.4+dfsg1.orig/bwlib/context.c0000664000076500007710000006125412560414557014556 0ustar /* ** $Id$ */ /************************************************************************ * * * Copyright (C) 2003 * * Internet2 * * All Rights Reserved * * * ************************************************************************/ /* ** File: context.c ** ** Author: Jeff W. Boote ** ** Date: Tue Sep 16 14:25:42 MDT 2003 ** ** Description: * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "bwlibP.h" #include #include #include /* * Function: notmuch * * Description: * This is a "do nothing" signal handler. It is in place * to ensure this process recieves SIGCHLD events. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ static void notmuch( int signo ) { switch(signo){ case SIGCHLD: break; default: abort(); raise(SIGFPE); } } /* * Function: BWLContextErrHandle * * Description: * Returns the ErrHandle that was set for this context upon creation. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ I2ErrHandle BWLContextErrHandle( BWLContext ctx ) { return ctx->eh; } /* * Function: BWLContextSetErrMask * * Description: * Used to specify the least severe error level that should * be printed. To get all errors printed, specify BWLErrOK. * (a level of BWLErrOK specifically means don't print, so * these are NEVER printed anyway.) * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ void BWLContextSetErrMask( BWLContext ctx, BWLErrSeverity errmask ) { ctx->errmaskprio = errmask; return; } /* * Function: BWLContextErrMask * * Description: * Used to retrieve the current error level that will * actually be printed. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLErrSeverity BWLContextErrMask( BWLContext ctx ) { return ctx->errmaskprio; } typedef union _BWLContextHashValue{ void *value; void (*func)(void); uint32_t u32; int32_t i32; uint64_t u64; double dbl; } _BWLContextHashValue; struct _BWLContextHashRecord{ char key[_BWL_CONTEXT_MAX_KEYLEN+1]; _BWLContextHashValue val; }; struct _BWLFreeHashRecord{ BWLContext ctx; I2Table table; }; static I2Boolean free_hash_entries( I2Datum key, I2Datum value, void *app_data ) { struct _BWLFreeHashRecord *frec = (struct _BWLFreeHashRecord*)app_data; /* * Delete hash so key.dptr will not be referenced again. * (key.dptr is part of value.dptr alloc) */ if(I2HashDelete(frec->table,key) != 0){ BWLError(frec->ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unable to clean out Context hash?"); return False; } free(value.dptr); return True; } static void freefreelist( BWLContextFreeList *list ) { uint32_t i; if(!list) return; freefreelist(list->next); for(i=0;ilen;i++){ free(list->list[i]); } free(list); return; } void BWLContextFree( BWLContext ctx ) { struct _BWLFreeHashRecord frec; while(ctx->cntrl_list){ BWLControlClose(ctx->cntrl_list); } frec.ctx = ctx; frec.table = ctx->table; if(ctx->table){ I2HashIterate(ctx->table,free_hash_entries,(void*)&frec); I2HashClose(ctx->table); ctx->table = NULL; } if(ctx->rand_src){ I2RandomSourceClose(ctx->rand_src); ctx->rand_src = NULL; } if(ctx->lib_eh && ctx->eh){ I2ErrClose(ctx->eh); ctx->eh = NULL; } freefreelist(ctx->flist); ctx->flist = NULL; free(ctx->tool_list); free(ctx); return; } BWLErrSeverity BWLControlClose( BWLControl cntrl ) { BWLErrSeverity err = BWLErrOK; BWLErrSeverity lerr = BWLErrOK; struct _BWLFreeHashRecord frec; BWLControl *list = &cntrl->ctx->cntrl_list; /* * remove all test sessions */ while(cntrl->tests){ lerr = _BWLTestSessionFree(cntrl->ctx,cntrl->tests,BWL_CNTRL_FAILURE); err = MIN(err,lerr); } frec.ctx = cntrl->ctx; frec.table = cntrl->table; if(cntrl->table){ I2HashIterate(cntrl->table,free_hash_entries,(void*)&frec); I2HashClose(cntrl->table); } /* * Remove cntrl from ctx list. */ while(*list && (*list != cntrl)) list = &(*list)->next; if(*list == cntrl) *list = cntrl->next; /* * these functions will close the control socket if it is open. */ I2AddrFree(cntrl->remote_addr); I2AddrFree(cntrl->local_addr); free(cntrl); return err; } BWLControl _BWLControlAlloc( BWLContext ctx, BWLErrSeverity *err_ret ) { BWLControl cntrl; if( !(cntrl = calloc(1,sizeof(BWLControlRec)))){ BWLError(ctx,BWLErrFATAL,errno, ":calloc(1,%d)",sizeof(BWLControlRec)); *err_ret = BWLErrFATAL; return NULL; } /* * Init state fields */ cntrl->ctx = ctx; /* * Initialize control policy state hash. */ if( !(cntrl->table = I2HashInit(ctx->eh,_BWL_CONTEXT_TABLE_SIZE, NULL,NULL))){ *err_ret = BWLErrFATAL; free(cntrl); return NULL; } /* * Init addr fields */ cntrl->sockfd = -1; /* * Init I/O fields */ cntrl->retn_on_intr = (int *)BWLContextConfigGetV(ctx,BWLInterruptIO); /* * Init encryption fields */ memset(cntrl->userid_buffer,'\0',sizeof(cntrl->userid_buffer)); /* * Put this control record on the ctx list. */ cntrl->next = ctx->cntrl_list; ctx->cntrl_list = cntrl; return cntrl; } static BWLBoolean ConfigSetU( I2Table table, const char *key, _BWLContextHashValue val ) { struct _BWLContextHashRecord *rec,*trec; I2Datum k,v,t; assert(table); assert(key); assert(strlen(key) < _BWL_CONTEXT_MAX_KEYLEN); if(!(rec = calloc(1,sizeof(struct _BWLContextHashRecord)))){ return False; } /* ensure nul byte */ rec->key[_BWL_CONTEXT_MAX_KEYLEN] = '\0'; /* set key datum */ strncpy(rec->key,key,_BWL_CONTEXT_MAX_KEYLEN); rec->val = val; k.dptr = rec->key; k.dsize = strlen(rec->key); /* set value datum */ v.dptr = rec; v.dsize = sizeof(rec); /* * If there is already a key by this entry - free that record. */ if(I2HashFetch(table,k,&t)){ trec = (struct _BWLContextHashRecord*)t.dptr; I2HashDelete(table,k); free(trec); } if(I2HashStore(table,k,v) == 0){ return True; } free(rec); return False; } /* * Have to expand the va_arg in-line, so since I don't want to * duplicate this code in multilpe stdarg functions, I'm using * this ugly macro. */ #define ASSIGN_UNION(u,k,l,rc) \ do{ \ rc = True; \ if( !strncmp(k,"V.",2)){ \ u.value = (void *)va_arg(l, void*); \ } \ else if( !strncmp(k,"F.",2)){ \ u.func = (BWLFunc)va_arg(l, BWLFunc); \ } \ else if( !strncmp(k,"U32.",4)){ \ u.u32 = (uint32_t)va_arg(l, uint32_t); \ } \ else if( !strncmp(k,"I32.",4)){ \ u.i32 = (int32_t)va_arg(l, int32_t); \ } \ else if( !strncmp(k,"U64.",4)){ \ u.u64 = (int64_t)va_arg(l, uint64_t); \ } \ else if( !strncmp(k,"DBL.",4)){ \ u.dbl = (double)va_arg(l, double); \ } \ else{ \ rc = False; \ } \ } while(0) static BWLBoolean ConfigSetVA( I2Table table, const char *key, va_list ap ) { _BWLContextHashValue val; int ret; ASSIGN_UNION(val,key,ap,ret); if(!ret) return False; return ConfigSetU(table,key,val); } static BWLBoolean ConfigGetU( I2Table table, const char *key, _BWLContextHashValue *val ) { struct _BWLContextHashRecord *rec; I2Datum k,v; char kval[_BWL_CONTEXT_MAX_KEYLEN+1]; assert(key); kval[_BWL_CONTEXT_MAX_KEYLEN] = '\0'; strncpy(kval,key,_BWL_CONTEXT_MAX_KEYLEN); k.dptr = kval; k.dsize = strlen(kval); if(!I2HashFetch(table,k,&v)){ return False; } rec = (struct _BWLContextHashRecord*)v.dptr; *val = rec->val; return True; } static void * ConfigGetV( I2Table table, const char *key ) { _BWLContextHashValue val; if( strncmp(key,"V.",2)){ errno = EINVAL; return NULL; } if( !ConfigGetU(table,key,&val)){ return NULL; } return val.value; } static BWLBoolean ConfigGetU32( I2Table table, const char *key, uint32_t *ui32 ) { _BWLContextHashValue val; if( strncmp(key,"U32.",4)){ errno = EINVAL; return False; } if( !ConfigGetU(table,key,&val)){ return False; } *ui32 = val.u32; return True; } static BWLFunc ConfigGetF( I2Table table, const char *key ) { _BWLContextHashValue val; if( strncmp(key,"F.",2)){ errno = EINVAL; return NULL; } if( !ConfigGetU(table,key,&val)){ return NULL; } return val.func; } static BWLBoolean ConfigGetU64( I2Table table, const char *key, uint64_t *u64 ) { _BWLContextHashValue val; if( strncmp(key,"U64.",4)){ errno = EINVAL; return False; } if( !ConfigGetU(table,key,&val)){ return False; } *u64 = val.u64; return True; } static BWLBoolean ConfigGetDbl( I2Table table, const char *key, double *dbl ) { _BWLContextHashValue val; if( strncmp(key,"DBL.",4)){ errno = EINVAL; return False; } if( !ConfigGetU(table,key,&val)){ return False; } *dbl = val.dbl; return True; } static BWLBoolean ConfigDelete( I2Table table, const char *key ) { I2Datum k; char kval[_BWL_CONTEXT_MAX_KEYLEN+1]; assert(key); kval[_BWL_CONTEXT_MAX_KEYLEN] = '\0'; strncpy(kval,key,_BWL_CONTEXT_MAX_KEYLEN); k.dptr = kval; k.dsize = strlen(kval); if(I2HashDelete(table,k) == 0){ return True; } return False; } /* * Function: BWLContextCreate * * Description: * This function is used to initialize a "context" for the bwlib * library. The context is used to define how error reporting * and other semi-global state should be defined. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLContext BWLContextCreate( I2ErrHandle eh, ... ) { struct sigaction act; I2LogImmediateAttr ia; BWLContext ctx = calloc(1,sizeof(BWLContextRec)); char *tmpdir; va_list ap; char *key; if(!ctx){ I2ErrLogP(eh,ENOMEM,": calloc(1,%d): %M",sizeof(BWLContextRec)); return NULL; } ctx->errmaskprio = _BWL_DEFAULT_ERRORMASK; if(!eh){ ctx->lib_eh = True; ia.line_info = (I2NAME|I2MSG); ia.fp = stderr; ctx->eh = I2ErrOpen("bwlib",I2ErrLogImmediate,&ia,NULL,NULL); if(!ctx->eh){ BWLError(NULL,BWLErrFATAL,BWLErrUNKNOWN,"Cannot init error module"); free(ctx); return NULL; } } else{ ctx->lib_eh = False; ctx->eh = eh; } if(!_BWLToolInitialize(ctx)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"Cannot init tools module"); free(ctx); return NULL; } if( !(ctx->table = I2HashInit(ctx->eh,_BWL_CONTEXT_TABLE_SIZE,NULL,NULL))){ BWLContextFree(ctx); return NULL; } va_start(ap,eh); while( (key = (char *)va_arg(ap, char *)) != NULL){ _BWLContextHashValue val; int ret; ASSIGN_UNION(val,key,ap,ret); if( !ret || !ConfigSetU(ctx->table,key,val)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unable to set Context value for %s",key); BWLContextFree(ctx); return NULL; } } va_end(ap); if( !(ctx->rand_src = I2RandomSourceInit(ctx->eh,I2RAND_DEV,NULL))){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Failed to initialize randomness sources"); BWLContextFree(ctx); return NULL; } if( (tmpdir = getenv("TMPDIR"))) strncpy(ctx->tmpdir,tmpdir,PATH_MAX); else strncpy(ctx->tmpdir,_BWL_DEFAULT_TMPDIR,PATH_MAX); if(strlen(ctx->tmpdir) + strlen(_BWL_PATH_SEPARATOR) + strlen(_BWL_TMPFILEFMT) > PATH_MAX){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "TMPDIR too long"); BWLContextFree(ctx); return NULL; } /* * Do NOT exit on SIGPIPE. To defeat this in the least intrusive * way only set SIG_IGN if SIGPIPE is currently set to SIG_DFL. * Presumably if someone actually set a SIGPIPE handler, they * knew what they were doing... */ sigemptyset(&act.sa_mask); act.sa_handler = SIG_DFL; act.sa_flags = 0; if(sigaction(SIGPIPE,NULL,&act) != 0){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"sigaction(): %M"); BWLContextFree(ctx); return NULL; } if(act.sa_handler == SIG_DFL){ act.sa_handler = SIG_IGN; if(sigaction(SIGPIPE,&act,NULL) != 0){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "sigaction(): %M"); BWLContextFree(ctx); return NULL; } } /* * This library uses calls to select that are intended to * interrupt select in the case of SIGCHLD, so I must * ensure that the process is getting SIGCHLD events. */ memset(&act,0,sizeof(act)); sigemptyset(&act.sa_mask); act.sa_handler = SIG_DFL; /* fetch current handler */ if(sigaction(SIGCHLD,NULL,&act) != 0){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"sigaction(): %M"); BWLContextFree(ctx); return NULL; } /* If there is no current handler - set a "do nothing" one. */ if(act.sa_handler == SIG_DFL){ act.sa_handler = notmuch; if(sigaction(SIGCHLD,&act,NULL) != 0){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "sigaction(): %M"); BWLContextFree(ctx); return NULL; } } return ctx; } BWLBoolean BWLContextFinalize( BWLContext ctx ) { if(_BWLInitNTP(ctx) != 0){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unable to initialize clock interface."); return False; } ctx->valid = True; return True; } BWLBoolean BWLContextFindTools( BWLContext ctx ) { if( _BWLToolLookForTesters(ctx) != BWLErrOK){ return False; } return True; } /* * Function: BWLContextRegisterMemory * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLBoolean BWLContextRegisterMemory( BWLContext ctx, void *ptr ) { BWLContextFreeList **flptr; assert(ptr); assert(ctx); /* * fwd to the 'last' flist ptr record with room for more. */ for(flptr = &ctx->flist; *flptr && (*flptr)->len >= _BWL_CONTEXT_FLIST_SIZE; flptr = &((*flptr)->next)); /* * If fwd'd to a null ptr, alloc a new record. */ if( !*flptr){ if( !(*flptr = calloc(1,sizeof(BWLContextFreeList)))){ BWLError(ctx,BWLErrWARNING,ENOMEM, "BWLContextRegisterMemory(): calloc(1,%d): %M", sizeof(BWLContextFreeList)); return False; } } (*flptr)->list[(*flptr)->len++] = ptr; return True; } /* * Function: BWLContextConfigSet * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLBoolean BWLContextConfigSet( BWLContext ctx, const char *key, ... ) { BWLBoolean ret; va_list ap; assert(ctx); va_start(ap,key); ret = ConfigSetVA(ctx->table,key,ap); va_end(ap); return ret; } void * BWLContextConfigGetV( BWLContext ctx, const char *key ) { assert(ctx); return ConfigGetV(ctx->table,key); } BWLFunc BWLContextConfigGetF( BWLContext ctx, const char *key ) { assert(ctx); return ConfigGetF(ctx->table,key); } BWLBoolean BWLContextConfigGetU32( BWLContext ctx, const char *key, uint32_t *ui32 ) { assert(ctx); return ConfigGetU32(ctx->table,key,ui32); } BWLBoolean BWLContextConfigGetU64( BWLContext ctx, const char *key, uint64_t *u64 ) { assert(ctx); return ConfigGetU64(ctx->table,key,u64); } BWLBoolean BWLContextConfigGetDbl( BWLContext ctx, const char *key, double *dbl ) { assert(ctx); return ConfigGetDbl(ctx->table,key,dbl); } BWLBoolean BWLContextConfigDelete( BWLContext ctx, const char *key ) { assert(ctx); return ConfigDelete(ctx->table,key); } /* * Function: BWLControlConfigSet * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLBoolean BWLControlConfigSet( BWLControl cntrl, const char *key, ... ) { BWLBoolean ret; va_list ap; assert(cntrl); va_start(ap,key); ret = ConfigSetVA(cntrl->table,key,ap); va_end(ap); return ret; } void * BWLControlConfigGetV( BWLControl cntrl, const char *key ) { assert(cntrl); return ConfigGetV(cntrl->table,key); } BWLFunc BWLControlConfigGetF( BWLControl cntrl, const char *key ) { assert(cntrl); return ConfigGetF(cntrl->table,key); } BWLBoolean BWLControlConfigGetU32( BWLControl cntrl, const char *key, uint32_t *ui32 ) { assert(cntrl); return ConfigGetU32(cntrl->table,key,ui32); } BWLBoolean BWLControlConfigGetU64( BWLControl cntrl, const char *key, uint64_t *u64 ) { assert(cntrl); return ConfigGetU64(cntrl->table,key,u64); } BWLBoolean BWLControlConfigGetDbl( BWLControl cntrl, const char *key, double *dbl ) { assert(cntrl); return ConfigGetDbl(cntrl->table,key,dbl); } BWLBoolean BWLControlConfigDelete( BWLControl cntrl, const char *key ) { assert(cntrl); return ConfigDelete(cntrl->table,key); } /* * Function: _BWLCallGetAESKey * * Description: * Calls the get_key function that is defined by the application. * If the application didn't define the get_key function, then provide * the default response of False. */ BWLBoolean _BWLCallGetAESKey( BWLContext ctx, /* library context */ const BWLUserID userid, /* identifies key */ uint8_t *key_ret, /* key - return */ BWLErrSeverity *err_ret /* error - return */ ) { BWLGetAESKeyFunc func; *err_ret = BWLErrOK; func = (BWLGetAESKeyFunc)BWLContextConfigGetF(ctx,BWLGetAESKey); /* * Default action is no encryption support. */ if(!func){ return False; } return func(ctx,userid,key_ret,err_ret); } /* * Function: _BWLCallCheckControlPolicy * * Description: * Calls the check_control_func that is defined by the application. * If the application didn't define the check_control_func, then provide * the default response of True(allowed). */ BWLBoolean _BWLCallCheckControlPolicy( BWLControl cntrl, /* control record */ BWLSessionMode mode, /* requested mode */ const BWLUserID userid, /* key identity */ struct sockaddr *local_sa_addr, /* local addr or NULL */ struct sockaddr *remote_sa_addr,/* remote addr */ BWLErrSeverity *err_ret /* error - return */ ) { BWLCheckControlPolicyFunc func; *err_ret = BWLErrOK; func = (BWLCheckControlPolicyFunc)BWLContextConfigGetF(cntrl->ctx, BWLCheckControlPolicy); /* * Default action is to allow anything. */ if(!func){ return True; } return func(cntrl,mode,userid,local_sa_addr,remote_sa_addr,err_ret); } /* * Function: _BWLCallCheckTestPolicy * * Description: * Calls the check_test_func that is defined by the application. * If the application didn't define the check_test_func, then provide * the default response of True(allowed). */ BWLBoolean _BWLCallCheckTestPolicy( BWLControl cntrl, /* control handle */ BWLTestSession tsess, BWLErrSeverity *err_ret /* error - return */ ) { BWLCheckTestPolicyFunc func; struct sockaddr *lsaddr; struct sockaddr *rsaddr; socklen_t lsaddrlen; socklen_t rsaddrlen; *err_ret = BWLErrOK; func = (BWLCheckTestPolicyFunc)BWLContextConfigGetF(cntrl->ctx, BWLCheckTestPolicy); /* * Default action is to fail since the function needs to * return the reservation time and the port for the test. */ if(!func){ return False; } if(tsess->conf_client){ lsaddr = I2AddrSAddr(tsess->test_spec.client,&lsaddrlen); rsaddr = I2AddrSAddr(tsess->test_spec.server,&rsaddrlen); } else{ lsaddr = I2AddrSAddr(tsess->test_spec.server,&rsaddrlen); rsaddr = I2AddrSAddr(tsess->test_spec.client,&lsaddrlen); } return func(cntrl,tsess->sid,tsess->conf_client,lsaddr,rsaddr, lsaddrlen,&tsess->test_spec,tsess->fuzz,&tsess->reserve_time, &tsess->tool_port,&tsess->local_tool_port,&tsess->closure,err_ret); } /* * Function: _BWLCallTestComplete * * Description: * Calls the "BWLTestComplete" that is defined by the application. * If the application didn't define the "BWLTestComplete" function, then * this is a no-op. * * The primary use for this hook is to free memory and other resources * (bandwidth etc...) allocated on behalf of this test. */ void _BWLCallTestComplete( BWLTestSession tsession, BWLAcceptType aval ) { BWLTestCompleteFunc func; func = (BWLTestCompleteFunc)BWLContextConfigGetF(tsession->cntrl->ctx, BWLTestComplete); /* * Default action is nothing... */ if(!func){ return; } func(tsession->cntrl,tsession->closure,aval); return; } /* * Function: _BWLCallProcessResults * * Description: * Calls the BWLProcessResultsFunc that is defined by the application. * */ BWLErrSeverity _BWLCallProcessResults( BWLTestSession tsession ) { BWLProcessResultsFunc func; func = (BWLProcessResultsFunc)BWLContextConfigGetF(tsession->cntrl->ctx, BWLProcessResults); /* * Default action is to do nothing... */ if(!func){ return BWLErrOK; } if(tsession->conf_client){ return func(tsession->cntrl,True,&tsession->test_spec, tsession->localfp,tsession->remotefp); } else{ return func(tsession->cntrl,False,&tsession->test_spec, tsession->remotefp,tsession->localfp); } } bwctl_1.5.4+dfsg1.orig/bwlib/tracepath.c0000664000076500007710000002372512560414557015046 0ustar /* * ex: set tabstop=4 ai expandtab softtabstop=4 shiftwidth=4: * -*- mode: c-basic-indent: 4; tab-width: 4; indent-tabs-mode: nil -*- * $Id: tracepath.c 599 2013-08-02 17:27:12Z aaron $ */ /* * File: tracepath.c * * Author: Aaron Brown * Internet2 * * Date: 2013-09-02 * * Description: * * This file encapsulates the functionality required to run a * tracepath test in bwctl. * * License: * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include #define TRACEPATH_DEFAULT_CMD "tracepath" #define TRACEPATH6_DEFAULT_CMD "tracepath6" /* * Function: TracepathAvailable * * Description: * * In Args: * Out Args: * Scope: * * Returns: * * Side Effect: * */ static BWLBoolean TracepathAvailable( BWLContext ctx, BWLToolDefinition tool ) { BWLBoolean tracepath_available = False; BWLBoolean tracepath6_available = False; char *tracepath_cmd; char *tracepath6_cmd; int n; char buf[1024]; /* * Fetch the 'tracepath' */ if( !(tracepath_cmd = (char *)BWLContextConfigGetV(ctx,"V.tracepath_cmd"))){ BWLError(ctx,BWLErrDEBUG,BWLErrUNKNOWN, "TracepathAvailable(): %s unset, using \"%s\"", "tracepath_cmd",TRACEPATH_DEFAULT_CMD); tracepath_cmd = TRACEPATH_DEFAULT_CMD; } /* * Fetch the 'tracepath6' */ if( !(tracepath6_cmd = (char *)BWLContextConfigGetV(ctx,"V.tracepath6_cmd"))){ BWLError(ctx,BWLErrDEBUG,BWLErrUNKNOWN, "TracepathAvailable(): %s unset, using \"%s\"", "tracepath6_cmd",TRACEPATH6_DEFAULT_CMD); tracepath6_cmd = TRACEPATH6_DEFAULT_CMD; } n = ExecCommand(ctx, buf, sizeof(buf), tracepath_cmd, NULL); if (n == 255) { tracepath_available = True; } else { tracepath_available = False; BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "TracepathAvailable(): Unable to verify that '%s' is working. It may not be installed. exit status: %d: output: %s", tracepath_cmd, n, buf); } n = ExecCommand(ctx, buf, sizeof(buf), tracepath6_cmd, NULL); if (n == 255) { tracepath6_available = True; } else { tracepath6_available = False; BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "TracepathAvailable(): Unable to verify that '%s' is working. It may not be installed. exit status: %d: output: %s", tracepath6_cmd, n, buf); } return (tracepath_available || tracepath6_available); } static BWLBoolean TracepathValidateTest( BWLContext ctx, BWLToolDefinition tool, BWLTestSpec test_spec ) { if(test_spec.traceroute_first_ttl){ BWLError(ctx,BWLErrFATAL,EINVAL, "TracepathValidateTest(): Tracepath does not support setting the TTL"); return False; } if(test_spec.traceroute_last_ttl){ BWLError(ctx,BWLErrFATAL,EINVAL, "TracepathValidateTest(): Tracepath does not support setting the TTL"); return False; } if(test_spec.traceroute_packet_size){ BWLError(ctx,BWLErrFATAL,EINVAL, "TracepathValidateTest(): Tracepath does not support setting the packet size"); return False; } if(test_spec.outformat){ switch((char)test_spec.outformat){ case 'a': break; default: BWLError(ctx,BWLErrFATAL,EINVAL, "TracepathValidateTest(): Invalid out format (-y) specification %c", (char)test_spec.outformat); return False; } } return _BWLToolGenericValidateTest(ctx, tool, test_spec); } /* * Function: TracepathPreRunTest * * Description: * Does all 'prep' work for running an tracepath test. * * Returns a 'closure' pointer. NULL indicates * failure. * This 'closure' pointer is passed on to the TracepathRunTest. * * (closure pointer is just the arg list for the exec) * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ /* This TracepathArgs can be a static because it is only used from within a * forked process. If bwctl ever goes to threads, this will need to be * made thread-local memory. */ static char *TracepathArgs[_BWL_MAX_TOOLARGS*2]; static void * TracepathPreRunTest( BWLContext ctx, BWLTestSession tsess ) { int len; char *cmd; char *default_cmd; char *cmd_variable; int a = 0; char addr_str[INET6_ADDRSTRLEN]; I2Addr remote_side; // If 'server sends' mode is in effect, the server runs the tracepath command, // because the client doesn't need to set anything up. It's a hack, but it // should work. if((tsess->conf_server && !tsess->test_spec.server_sends) || (tsess->conf_client && tsess->test_spec.server_sends)) { fprintf(tsess->localfp,"bwctl: nothing to exec for tracepath server"); TracepathArgs[0] = NULL; return (void *)TracepathArgs; } if (tsess->test_spec.server_sends) { remote_side = tsess->test_spec.client; } else { remote_side = tsess->test_spec.server; } if (BWLAddrIsIPv6(ctx, remote_side)) { cmd_variable = "V.tracepath6_cmd"; default_cmd = TRACEPATH6_DEFAULT_CMD; } else { cmd_variable = "V.tracepath_cmd"; default_cmd = TRACEPATH_DEFAULT_CMD; } /* Run tracepath */ cmd = (char*)BWLContextConfigGetV(ctx,cmd_variable); if(!cmd) cmd = default_cmd; /* * First figure out the args for tracepath */ TracepathArgs[a++] = cmd; if(tsess->test_spec.outformat){ switch((char)tsess->test_spec.outformat){ case 'a': TracepathArgs[a++] = "-n"; break; default: break; } } if( BWLAddrNodeName(ctx, remote_side, addr_str, sizeof(addr_str), NI_NUMERICHOST) == 0) { BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"TracepathPreRunTest():Problem resolving address"); return NULL; } if( !(TracepathArgs[a++] = strdup(addr_str))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"TracepathPreRunTest():strdup(): %M"); return NULL; } TracepathArgs[a++] = NULL; /* * Report what will be run in the output file */ if (tsess->test_spec.verbose) { fprintf(tsess->localfp,"bwctl: exec_line:"); for(len=0;TracepathArgs[len];len++){ fprintf(tsess->localfp," %s",TracepathArgs[len]); } fprintf(tsess->localfp,"\n"); } return (void *)TracepathArgs; } /* * Function: TracepathRunTest * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ static BWLBoolean TracepathRunTest( BWLContext ctx, BWLTestSession tsess, void *closure ) { char **ipargs = (char **)closure; if (ipargs[0] != NULL) { /* * Now run tracepath! */ execvp(ipargs[0],ipargs); BWLError(ctx,BWLErrFATAL,errno,"execvp(%s): %M",ipargs[0]); exit(BWL_CNTRL_FAILURE); } // Special case for the tracepath server. There isn't anything for the receive // side to run, so just sleep until duration is up. sleep(tsess->test_spec.duration); exit(0); } /* * Function: TracepathInitTest * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLErrSeverity TracepathInitTest( BWLContext ctx, BWLToolDefinition tool, uint16_t *toolport ) { return BWLErrOK; } int TracepathParse( BWLContext ctx, BWLToolDefinition tool, const char *key, const char *val ) { if(!strncasecmp(key,"tracepath_cmd",strlen(key))){ return save_path(ctx,key,val); } if(!strncasecmp(key,"tracepath6_cmd",strlen(key))){ return save_path(ctx,key,val); } return _BWLToolGenericParse(ctx, tool, key, val); } BWLToolDefinitionRec BWLToolTracepath = { "tracepath", /* name */ "tracepath", /* def_cmd */ NULL, /* def_server_cmd */ 0, /* def_port */ TracepathParse, /* parse */ BWLGenericParseTracerouteParameters, /* parse_request */ BWLGenericUnparseTracerouteParameters, /* unparse_request */ TracepathAvailable, /* tool_avail */ TracepathValidateTest, /* validate_test */ TracepathInitTest, /* init_test */ TracepathPreRunTest, /* pre_run */ TracepathRunTest, /* run */ _BWLToolGenericKillTest, /* kill */ BWL_TEST_TRACEROUTE, /* test_types */ BWLToolSenderSideData, /* results_side */ True, /* supports_server_sends */ True, /* supports_endpointless */ 0, /* The server port to use in endpointless tests */ 0, /* parsable format */ }; bwctl_1.5.4+dfsg1.orig/bwlib/owamp.c0000664000076500007710000003163312560414557014213 0ustar /* * ex: set tabstop=4 ai expandtab softtabstop=4 shiftwidth=4: * -*- mode: c-basic-indent: 4; tab-width: 4; indent-tabs-mode: nil -*- * $Id: owamp.c 599 2013-08-02 17:27:12Z aaron $ */ /* * File: owamp.c * * Author: Aaron Brown * Internet2 * * Date: 2013-09-02 * * Description: * * This file encapsulates the functionality required to run a * owamp test in bwctl. * * License: * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include #include #include static int do_mkdir(const char *path, mode_t mode); const char *tmp_dir = "/tmp/bwctl_owamp"; /* * Function: OwampAvailable * * Description: * * In Args: * Out Args: * Scope: * * Returns: * * Side Effect: * */ static BWLBoolean OwampAvailable( BWLContext ctx, BWLToolDefinition tool ) { BWLBoolean owping_available = False; BWLBoolean owampd_available = False; char *owping_cmd; char *owampd_cmd; int n; char buf[1024]; /* * Fetch the 'owping' */ if( !(owping_cmd = (char *)BWLContextConfigGetV(ctx,"V.owamp_cmd"))){ BWLError(ctx,BWLErrDEBUG,BWLErrUNKNOWN, "OwampAvailable(): %s unset, using \"%s\"", "owamp_cmd",tool->def_cmd); owping_cmd = tool->def_cmd; } /* * Fetch the 'owampd' */ if( !(owampd_cmd = (char *)BWLContextConfigGetV(ctx,"V.owamp_server_cmd"))){ BWLError(ctx,BWLErrDEBUG,BWLErrUNKNOWN, "OwampAvailable(): %s unset, using \"%s\"", "owamp_server_cmd",tool->def_server_cmd); owampd_cmd = tool->def_server_cmd; } n = ExecCommand(ctx, buf, sizeof(buf), owping_cmd, "-h", NULL); if (n == 0) { owping_available = True; } else { owping_available = False; BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "OwampAvailable(): Unable to verify that '%s' is working. It may not be installed. exit status: %d: output: %s", owping_cmd, n, buf); } n = ExecCommand(ctx, buf, sizeof(buf), owampd_cmd, "-h", NULL); if (n == 0) { owampd_available = True; } else { owampd_available = False; BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "OwampAvailable(): Unable to verify that '%s' is working. It may not be installed. exit status: %d: output: %s", owampd_cmd, n, buf); } return (owping_available && owampd_available); } /* * Function: OwampPreRunTest * * Description: * Does all 'prep' work for running an owamp test. * * Returns a 'closure' pointer. NULL indicates * failure. * This 'closure' pointer is passed on to the OwampRunTest. * * (closure pointer is just the arg list for the exec) * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ /* This OwampArgs can be a static because it is only used from within a * forked process. If bwctl ever goes to threads, this will need to be * made thread-local memory. */ static char *OwampArgs[_BWL_MAX_TOOLARGS*2]; static void * OwampPreRunTest( BWLContext ctx, BWLTestSession tsess ) { int len; int a = 0; char addr_str[INET6_ADDRSTRLEN]; char server_str[1024]; char port_range[1024]; if( BWLAddrNodeName(ctx, tsess->test_spec.server, addr_str, sizeof(addr_str), NI_NUMERICHOST) == 0) { BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"OwampPreRunTest():Problem resolving address"); return NULL; } snprintf(server_str, sizeof(server_str), "[%s]:%u", addr_str, tsess->tool_port); /* * The test ports end up being "tool port + 1 -> tool port + 2", see in * the OwampInitTest for how we ensure that these ports are available. We * use the local_tool_port for this to handle the "--reverse" case for * owamp since owamp will be sending UDP packets from server -> client. */ snprintf(port_range, sizeof(port_range), "%u-%u", tsess->local_tool_port + 1, tsess->local_tool_port + 2); if(tsess->conf_server){ char buf[1024]; char *cmd = (char*)BWLContextConfigGetV(ctx,"V.owamp_server_cmd"); if(!cmd) cmd = tsess->tool->def_server_cmd; snprintf(buf, sizeof(buf), "%s/%d", tmp_dir, tsess->tool_port); if (do_mkdir(tmp_dir, 0700) != 0) { BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "OwampAvailable(): Unable to create temporary directory for owampd"); return NULL; } if (do_mkdir(buf, 0700) != 0) { BWLError(ctx,BWLErrWARNING,errno, "OwampPreRunTest(): Unable to create temporary directory: %M"); return NULL; } OwampArgs[a++] = cmd; OwampArgs[a++] = "-Z"; OwampArgs[a++] = "-R"; if( !(OwampArgs[a++] = strdup(buf))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"OwampPreRunTest():strdup(): %M"); return NULL; } OwampArgs[a++] = "-d"; if( !(OwampArgs[a++] = strdup(buf))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"OwampPreRunTest():strdup(): %M"); return NULL; } OwampArgs[a++] = "-S"; if( !(OwampArgs[a++] = strdup(server_str))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"OwampPreRunTest():strdup(): %M"); return NULL; } OwampArgs[a++] = "-P"; if( !(OwampArgs[a++] = strdup(port_range))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"OwampPreRunTest():strdup(): %M"); return NULL; } } else { char *cmd = (char*)BWLContextConfigGetV(ctx,"V.owping_cmd"); if(!cmd) cmd = tsess->tool->def_cmd; OwampArgs[a++] = cmd; if (tsess->test_spec.server_sends) { OwampArgs[a++] = "-f"; } else { OwampArgs[a++] = "-t"; } if(tsess->test_spec.outformat){ switch((char)tsess->test_spec.outformat){ case 'M': OwampArgs[a++] = "-M"; break; case 'R': OwampArgs[a++] = "-R"; break; default: fprintf(tsess->localfp, "bwctl: tool(owping): Invalid out format (-y) specification '%c'\n", (char)tsess->test_spec.outformat); return NULL; break; } } OwampArgs[a++] = "-c"; if( !(OwampArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.ping_packet_count))){ return NULL; } // XXX: need to divide the interpacket time by 1000 OwampArgs[a++] = "-i"; if( !(OwampArgs[a++] = BWLDoubleDup(ctx,(tsess->test_spec.ping_interpacket_time/1000.0)))){ return NULL; } if(tsess->test_spec.ping_packet_size){ OwampArgs[a++] = "-s"; if( !(OwampArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.ping_packet_size))){ return NULL; } } if(tsess->test_spec.ping_packet_ttl){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,EINVAL, "OwampPreRunTest(): owping does not support setting the TTL"); } OwampArgs[a++] = "-P"; if( !(OwampArgs[a++] = strdup(port_range))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"OwampPreRunTest():strdup(): %M"); return NULL; } if( !(OwampArgs[a++] = strdup(server_str))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"OwampPreRunTest():strdup(): %M"); return NULL; } OwampArgs[a++] = NULL; } /* * Report what will be run in the output file */ if (tsess->test_spec.verbose) { fprintf(tsess->localfp,"bwctl: exec_line:"); for(len=0;OwampArgs[len];len++){ fprintf(tsess->localfp," %s",OwampArgs[len]); } fprintf(tsess->localfp,"\n"); } return (void *)OwampArgs; } /* * Function: OwampRunTest * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ static BWLBoolean OwampRunTest( BWLContext ctx, BWLTestSession tsess, void *closure ) { char **ipargs = (char **)closure; /* * Now run owping! */ if(tsess->conf_server && tsess->test_spec.no_server_endpoint){ // Special case for the owamp server if we're under "no server // endpoint" mode. sleep(tsess->test_spec.duration); exit(0); } else { execvp(ipargs[0],ipargs); BWLError(ctx,BWLErrFATAL,errno,"execvp(%s): %M",ipargs[0]); exit(BWL_CNTRL_FAILURE); } } static int do_mkdir(const char *path, mode_t mode) { struct stat st; int retval = 0; if (stat(path, &st) != 0) { /* Directory does not exist. EEXIST for race condition */ if (mkdir(path, mode) != 0 && errno != EEXIST) retval = -1; } else if (!S_ISDIR(st.st_mode)) { retval = -1; } return retval; } BWLErrSeverity OwampInitTest( BWLContext ctx, BWLToolDefinition tool, uint16_t *toolport ) { BWLPortRange prange=NULL; BWLErrSeverity retval; // We need 2 ports for owamp's test range uint16_t min_port; uint16_t max_port; retval = _BWLToolGenericInitTest(ctx, tool, toolport); if (retval != BWLErrOK) { return retval; } /* * We need to make sure that "toolport, toolport + 1 and toolport + 2" are * available. toolport will be owamp's server control port, and toolport + * 1/toolport + 2 are the owamp test ports. The reason we do it this way is * that the only thing that gets passed between the various processes is * "toolport", and so when it comes time to run the test, we need to be * able to convert 'toolport' into all three ports. */ prange = (BWLPortRange)BWLContextConfigGetV(ctx,"V.owamp_port"); if( !prange ) { prange = (BWLPortRange)BWLContextConfigGetV(ctx,"V.test_port"); } if ( prange ) { // this should always be true... *toolport = BWLPortsNext(prange); min_port = BWLPortsNext(prange); max_port = BWLPortsNext(prange); // handle the wraparound case while (min_port != *toolport + 1 || max_port != min_port + 1) { *toolport = min_port; min_port = max_port; max_port = BWLPortsNext(prange); } } return BWLErrOK; } BWLBoolean OwampKillTest( BWLContext ctx, pid_t pid, int force ) { int signal = force?SIGKILL:SIGTERM; /* * When forcing, kill the process group instead of the top-level process. * We only send SIGTERM to the top-level process to ensure that owping will * get results. If we kill the entire process group, it won't receive * results. */ if (force) { pid = -pid; } if(kill(pid,signal) == 0){ return True; } else if (errno == ESRCH) { return True; } else { return False; } } BWLToolDefinitionRec BWLToolOwamp = { "owamp", /* name */ "owping", /* def_cmd */ "owampd", /* def_server_cmd */ 4000, /* def_port */ _BWLToolGenericParse, /* parse */ BWLGenericParsePingParameters, /* parse_request */ BWLGenericUnparsePingParameters, /* unparse_request */ OwampAvailable, /* tool_avail */ _BWLToolGenericValidateTest, /* validate_test */ OwampInitTest, /* init_test */ OwampPreRunTest, /* pre_run */ OwampRunTest, /* run */ OwampKillTest, /* kill */ BWL_TEST_LATENCY, /* test_types */ BWLToolClientSideData, /* results_side */ True, /* supports_server_sends */ True, /* supports_endpointless */ 861, /* The server port to use in endpointless tests */ 0, /* parsable format */ }; bwctl_1.5.4+dfsg1.orig/bwlib/traceroute.c0000664000076500007710000002472312560414557015247 0ustar /* * ex: set tabstop=4 ai expandtab softtabstop=4 shiftwidth=4: * -*- mode: c-basic-indent: 4; tab-width: 4; indent-tabs-mode: nil -*- * $Id: traceroute.c 599 2013-08-02 17:27:12Z aaron $ */ /* * File: traceroute.c * * Author: Aaron Brown * Internet2 * * Date: 2013-09-02 * * Description: * * This file encapsulates the functionality required to run a * traceroute test in bwctl. * * License: * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include #define TRACEROUTE_DEFAULT_CMD "traceroute" #define TRACEROUTE6_DEFAULT_CMD "traceroute6" /* * Function: TracerouteAvailable * * Description: * * In Args: * Out Args: * Scope: * * Returns: * * Side Effect: * */ static BWLBoolean TracerouteAvailable( BWLContext ctx, BWLToolDefinition tool ) { BWLBoolean traceroute_available = False; BWLBoolean traceroute6_available = False; char *traceroute_cmd; char *traceroute6_cmd; int n; char buf[1024]; /* * Fetch the 'traceroute' */ if( !(traceroute_cmd = (char *)BWLContextConfigGetV(ctx,"V.traceroute_cmd"))){ BWLError(ctx,BWLErrDEBUG,BWLErrUNKNOWN, "TracerouteAvailable(): %s unset, using \"%s\"", "traceroute_cmd",TRACEROUTE_DEFAULT_CMD); traceroute_cmd = TRACEROUTE_DEFAULT_CMD; } /* * Fetch the 'traceroute6' */ if( !(traceroute6_cmd = (char *)BWLContextConfigGetV(ctx,"V.traceroute6_cmd"))){ BWLError(ctx,BWLErrDEBUG,BWLErrUNKNOWN, "TracerouteAvailable(): %s unset, using \"%s\"", "traceroute6_cmd",TRACEROUTE6_DEFAULT_CMD); traceroute6_cmd = TRACEROUTE6_DEFAULT_CMD; } n = ExecCommand(ctx, buf, sizeof(buf), traceroute_cmd, "127.0.0.1", NULL); if (n == 0) { traceroute_available = True; } else { traceroute_available = False; BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "TracerouteAvailable(): Unable to verify that '%s' is working. It may not be installed. exit status: %d: output: %s", traceroute_cmd, n, buf); } n = ExecCommand(ctx, buf, sizeof(buf), traceroute6_cmd, "::1", NULL); if (n == 0) { traceroute6_available = True; } else { traceroute6_available = False; BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "TracerouteAvailable(): Unable to verify that '%s' is working. It may not be installed. exit status: %d: output: %s", traceroute6_cmd, n, buf); } return (traceroute_available || traceroute6_available); } /* * Function: TraceroutePreRunTest * * Description: * Does all 'prep' work for running an traceroute test. * * Returns a 'closure' pointer. NULL indicates * failure. * This 'closure' pointer is passed on to the TracerouteRunTest. * * (closure pointer is just the arg list for the exec) * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ /* This TracerouteArgs can be a static because it is only used from within a * forked process. If bwctl ever goes to threads, this will need to be * made thread-local memory. */ static char *TracerouteArgs[_BWL_MAX_TOOLARGS*2]; static void * TraceroutePreRunTest( BWLContext ctx, BWLTestSession tsess ) { int len; char *cmd; char *default_cmd; char *cmd_variable; int a = 0; I2Addr remote_side; I2Addr local_side; char addr_str[INET6_ADDRSTRLEN]; // If 'server sends' mode is in effect, the server runs the traceroute command, // because the client doesn't need to set anything up. It's a hack, but it // should work. if((tsess->conf_server && !tsess->test_spec.server_sends) || (tsess->conf_client && tsess->test_spec.server_sends)) { fprintf(tsess->localfp,"bwctl: nothing to exec for traceroute server\n"); TracerouteArgs[0] = NULL; return (void *)TracerouteArgs; } if (tsess->test_spec.server_sends) { local_side = tsess->test_spec.server; remote_side = tsess->test_spec.client; } else { local_side = tsess->test_spec.client; remote_side = tsess->test_spec.server; } if (BWLAddrIsIPv6(ctx, remote_side)) { cmd_variable = "V.traceroute6_cmd"; default_cmd = TRACEROUTE6_DEFAULT_CMD; } else { cmd_variable = "V.traceroute_cmd"; default_cmd = TRACEROUTE_DEFAULT_CMD; } /* Run traceroute */ cmd = (char*)BWLContextConfigGetV(ctx,cmd_variable); if(!cmd) cmd = default_cmd; /* * First figure out the args for traceroute */ TracerouteArgs[a++] = cmd; if(tsess->test_spec.traceroute_first_ttl){ TracerouteArgs[a++] = "-f"; if( !(TracerouteArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.traceroute_first_ttl))){ return NULL; } } if(tsess->test_spec.traceroute_last_ttl){ TracerouteArgs[a++] = "-m"; if( !(TracerouteArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.traceroute_last_ttl))){ return NULL; } } if(tsess->test_spec.tos){ TracerouteArgs[a++] = "-t"; if( !(TracerouteArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.tos))){ return NULL; } } if(tsess->test_spec.outformat){ switch((char)tsess->test_spec.outformat){ case 'a': TracerouteArgs[a++] = "-n"; break; default: fprintf(tsess->localfp, "bwctl: tool(traceroute): Invalid out format (-y) specification %c\n", (char)tsess->test_spec.outformat); return NULL; } } // Bind to the specified address TracerouteArgs[a++] = "-s"; if( BWLAddrNodeName(ctx, local_side, addr_str, sizeof(addr_str), NI_NUMERICHOST) == 0) { BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"TraceroutePreRunTest():Problem resolving address"); return NULL; } if( !(TracerouteArgs[a++] = strdup(addr_str))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"TraceroutePreRunTest():strdup(): %M"); return NULL; } if( BWLAddrNodeName(ctx, remote_side, addr_str, sizeof(addr_str), NI_NUMERICHOST) == 0) { BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"TraceroutePreRunTest():Problem resolving address"); return NULL; } if( !(TracerouteArgs[a++] = strdup(addr_str))){ BWLError(tsess->cntrl->ctx,BWLErrFATAL,errno,"TraceroutePreRunTest():strdup(): %M"); return NULL; } if(tsess->test_spec.traceroute_packet_size){ if( !(TracerouteArgs[a++] = BWLUInt32Dup(ctx,tsess->test_spec.traceroute_packet_size))){ return NULL; } } TracerouteArgs[a++] = NULL; /* * Report what will be run in the output file */ if (tsess->test_spec.verbose) { fprintf(tsess->localfp,"bwctl: exec_line:"); for(len=0;TracerouteArgs[len];len++){ fprintf(tsess->localfp," %s",TracerouteArgs[len]); } fprintf(tsess->localfp,"\n"); } return (void *)TracerouteArgs; } /* * Function: TracerouteRunTest * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ static BWLBoolean TracerouteRunTest( BWLContext ctx, BWLTestSession tsess, void *closure ) { char **ipargs = (char **)closure; if (ipargs[0] != NULL) { /* * Now run traceroute! */ execvp(ipargs[0],ipargs); BWLError(ctx,BWLErrFATAL,errno,"execvp(%s): %M",ipargs[0]); exit(BWL_CNTRL_FAILURE); } // Special case for the traceroute server. There isn't anything for the receive // side to run, so just sleep until duration is up. sleep(tsess->test_spec.duration); exit(0); } /* * Function: TracerouteInitTest * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLErrSeverity TracerouteInitTest( BWLContext ctx, BWLToolDefinition tool, uint16_t *toolport ) { return BWLErrOK; } int TracerouteParse( BWLContext ctx, BWLToolDefinition tool, const char *key, const char *val ) { if(!strncasecmp(key,"traceroute_cmd",strlen(key))){ return save_path(ctx,key,val); } if(!strncasecmp(key,"traceroute6_cmd",strlen(key))){ return save_path(ctx,key,val); } return _BWLToolGenericParse(ctx, tool, key, val); } BWLToolDefinitionRec BWLToolTraceroute = { "traceroute", /* name */ "traceroute", /* def_cmd */ NULL, /* def_server_cmd */ 0, /* def_port */ TracerouteParse, /* parse */ BWLGenericParseTracerouteParameters, /* parse_request */ BWLGenericUnparseTracerouteParameters, /* unparse_request */ TracerouteAvailable, /* tool_avail */ _BWLToolGenericValidateTest, /* validate_test */ TracerouteInitTest, /* init_test */ TraceroutePreRunTest, /* pre_run */ TracerouteRunTest, /* run */ _BWLToolGenericKillTest, /* kill */ BWL_TEST_TRACEROUTE, /* test_types */ BWLToolSenderSideData, /* results_side */ True, /* supports_server_sends */ True, /* supports_endpointless */ 0, /* The server port to use in endpointless tests */ 0, /* parsable format */ }; bwctl_1.5.4+dfsg1.orig/bwlib/rijndael-api-fst.h0000664000076500007710000000733212560414557016225 0ustar /** * rijndael-api-fst.h * * @version 2.9 (December 2000) * * Optimised ANSI C code for the Rijndael cipher (now AES) * * @author Vincent Rijmen * @author Antoon Bosselaers * @author Paulo Barreto * * This code is hereby placed in the public domain. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''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 AUTHORS 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. * * Acknowledgements: * * We are deeply indebted to the following people for their bug reports, * fixes, and improvement suggestions to this implementation. Though we * tried to list all contributions, we apologise in advance for any * missing reference. * * Andrew Bales * Markus Friedl * John Skodon */ #ifndef __RIJNDAEL_API_FST_H #define __RIJNDAEL_API_FST_H #include #include /* Generic Defines */ #define DIR_ENCRYPT 0 /* Are we encrpyting? */ #define DIR_DECRYPT 1 /* Are we decrpyting? */ #define MODE_ECB 1 /* Are we ciphering in ECB mode? */ #define MODE_CBC 2 /* Are we ciphering in CBC mode? */ #define MODE_CFB1 3 /* Are we ciphering in 1-bit CFB mode? */ #define TRUE 1 #define FALSE 0 #define BITSPERBLOCK 128 /* Default number of bits in a cipher block */ /* Error Codes */ #define BAD_KEY_DIR -1 /* Key direction is invalid, e.g., unknown value */ #define BAD_KEY_MAT -2 /* Key material not of correct length */ #define BAD_KEY_INSTANCE -3 /* Key passed is not valid */ #define BAD_CIPHER_MODE -4 /* Params struct passed to cipherInit invalid */ #define BAD_CIPHER_STATE -5 /* Cipher in wrong state (e.g., not initialized) */ #define BAD_BLOCK_LENGTH -6 #define BAD_CIPHER_INSTANCE -7 #define BAD_DATA -8 /* Data contents are invalid, e.g., invalid padding */ #define BAD_OTHER -9 /* Unknown error */ /* Algorithm-specific Defines */ #define MAX_KEY_SIZE 64 /* # of ASCII char's needed to represent a key */ #define MAX_IV_SIZE 16 /* # bytes needed to represent an IV */ /* Typedefs */ typedef unsigned char BYTE; /* The structure for key information */ typedef struct { /*BYTE direction;*/ /* Key used for encrypting or decrypting? */ int Nr; /* key-length-dependent number of rounds */ u32 rk[4*(MAXNR + 1)]; /* key schedule */ } keyInstance; /* Function prototypes */ int makeKey(keyInstance *key, BYTE direction, char *keyMaterial); void bytes2Key(keyInstance *key, BYTE *keyMaterial); int cipherInit(BYTE *binIV, char *hexIV); int blockEncrypt(BYTE *binIV, keyInstance *key, BYTE *input, int inputLen, BYTE *outBuffer); int blockDecrypt(BYTE *binIV, keyInstance *key, BYTE *input, int inputLen, BYTE *outBuffer); #endif /* __RIJNDAEL_API_FST_H */ bwctl_1.5.4+dfsg1.orig/bwctl/0000775000076500007710000000000012560414557012732 5ustar bwctl_1.5.4+dfsg1.orig/bwctl/bwctlP.h0000664000076500007710000001554312560414557014346 0ustar /* * $Id$ */ /* * File: bwctlP.h * * Author: Jeff Boote * Internet2 * * Date: Mon Sep 15 11:16:04 MDT 2003 * * Description: * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifndef _bwctlp_h_ #define _bwctlp_h_ #include /* * This estimate is used to give each reservation a 'buffer' around it. * It is basically a very conservative estimate of how long it will take * to fork/exec iperf on each endpoint. (Read conservative as we never want * it to take longer than this, but we need to tempor that with realizing * that people will want to run this application interactively and we * americans have very short attention spans...) */ #define SETUP_ESTIMATE 2 /* * Reasonable limits on these so dynamic memory is not needed. */ #define MAX_PASSPROMPT 256 #define MAX_PASSPHRASE 256 /* * Default for UDP tests. */ #define DEF_UDP_RATE 1000000 /* * Lock file name. This file is created in the output directory to ensure * there is not more than one bwctl process writing there. */ #define BWLOCK ".bwctllock" /* TSTAMP FMT YYYYMMDDTHHMMSS */ #define TSTAMPCHARS 15 #define SUMMARY_EXT ".sum" #define SEND_EXT ".send" #define RECV_EXT ".recv" /* * MAX(SEND_EXT,RECV_EXT) */ #define DIRECTION_EXT_LEN 5 typedef struct { /* * mode var */ uint32_t auth_mode; /* * AESKEY auth vars */ char *identity; char *keyfile; uint8_t *aeskey; uint8_t aesbuff[16]; } aeskey_auth_rec, *aeskey_auth; typedef struct schedule { BWLBoolean (*get_next_runtime) (struct schedule *schedule, struct timespec *tspec, BWLBoolean prev_test_failed); void *private; } Scheduler; typedef struct regular_intervals_schedule { uint32_t interval; uint32_t randomize_start; time_t last_run_time; } RegularIntervalsSchedule; typedef struct scheduled_times_schedule { uint32_t randomize_start; struct tm *times; int num_times; } ScheduledTimesSchedule; typedef struct{ char *host; aeskey_auth auth; BWLControl cntrl; int sockfd; BWLNum64 rttbound; BWLNum64 waketime; BWLBoolean is_client; BWLBoolean is_local; BWLBoolean is_receiver; BWLBoolean session_requested; BWLTestSpec tspec; BWLToolAvailability avail_tools; FILE *results_fp; char results_fname[PATH_MAX]; BWLTimeStamp host_time; BWLBoolean require_endpoint; BWLBoolean fake_daemon; BWLBoolean fake_daemon_pid; BWLBoolean fake_daemon_pipe; } ipsess_trec, *ipsess_t; /* * Application "context" structure */ typedef struct { /* ** Command line options */ struct { /* Flags */ char *srcaddr; /* -B (bind) */ #ifndef NDEBUG I2Boolean childwait; /* -W */ #endif I2Boolean log_to_stderr; /* -r */ int log_facility; /* -e */ I2Boolean v4only; /* -4 */ I2Boolean v6only; /* -6 */ I2Boolean printfiles; /* -p */ I2Boolean bidirectional_results; /* -x (xmit)*/ char *savedir; /* -d */ uint32_t seriesInterval; /* -I (seconds) */ I2Boolean streaming; /* --streaming */ char *schedule; /* --schedule */ uint32_t randomizeStart; /* -R (alpha[0-50]) */ uint32_t nIntervals; /* -n */ I2Boolean continuous; /* no intervals setup, but a seriesInterval or streaming option set */ uint32_t seriesWindow; /* -L (seconds) */ I2Boolean flip_direction; /* -o */ I2Boolean allow_one_sided; /* -E */ uint16_t tester_port; /* --tester_port */ /* Determines how far into * a seriesInterval a test * should be allowed to start. * If seriesInterval is in * place, default ensures test * will complete before next * interval, but no later than * 50% of seriesInterval. * If seriesInterval is not * being used, than defaults * to 2xtest duration. */ int facility; /* -e */ /* -r stderr too */ I2Boolean version; /* -V */ I2Boolean verbose; /* -v */ I2Boolean quiet; /* -q */ char *tools; uint32_t tool_ids[32]; /* -T iperf/nuttcp/thrulay */ uint32_t reportInterval; /* -i (seconds) */ I2numT lenBuffer; /* -l (bytes) */ I2Boolean udpTest; /* -u */ I2Boolean winset; /* -w/-W specified */ I2numT windowSize; /* -w */ I2Boolean dynamicWindowSize; /* -W used for -w */ I2numT bandWidth; /* -b (bits/sec) */ uint32_t timeDuration; /* -t (secs) */ uint8_t units; /* -f */ uint8_t outformat; /* -y */ BWLBoolean parsable; /* --parsable */ uint8_t timeOmit; /* -O (secs) */ uint32_t parallel; /* -P */ uint32_t tos; /* -S */ double allowUnsync; /* -a */ // Ping test parameters // 'duration' field is ping_packet_count * (ping_packet_count / 1000) // 'bandwidth' field is (ping_packet_count * ping_packet_size) * (1 / ping_interpacket_time) * 8 uint16_t ping_packet_count; uint16_t ping_interpacket_time; // in milliseconds uint16_t ping_packet_size; uint8_t ping_packet_ttl; // Traceroute test parameters // Maximum test duration is 'duration' field BWLBoolean traceroute_udp; uint16_t traceroute_packet_size; uint8_t traceroute_first_ttl; uint8_t traceroute_last_ttl; } opt; ipsess_t receiver_sess; ipsess_t sender_sess; ipsess_t server_sess; ipsess_t client_sess; aeskey_auth def_auth; Scheduler *scheduler; BWLScheduleContext sctx; BWLSID sid; BWLNum64 *sessionStart; BWLNum64 tstamp_mem; FILE *fp; FILE *testfp; char fname[PATH_MAX]; } ipapp_trec, *ipapp_t; enum option_type { OPTION_CONNECT, OPTION_SCHEDULING, OPTION_TEST, OPTION_OUTPUT, OPTION_MISC }; struct bwctl_option { int test_types; enum option_type option_type; struct option option; char *description; char *argument_description; }; #endif bwctl_1.5.4+dfsg1.orig/bwctl/bwctl.c0000664000076500007710000033153412560414557014222 0ustar /* * ex: set tabstop=4 ai expandtab softtabstop=4 shiftwidth=4: * -*- mode: c-basic-indent: 4; tab-width: 4; indent-tabls-mode: nil -*- * $Id$ */ /* * File: bwctl.c * * Author: Jeff Boote * Internet2 * * Date: Mon Sep 15 10:54:30 MDT 2003 * * Description: * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #define _GNU_SOURCE #include "config.h" #include #include #if defined(HAVE_STDINT_H) #include #endif #include #include #include #if defined(HAVE_GETOPT_H) #include #else #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined HAVE_DECL_OPTRESET && !HAVE_DECL_OPTRESET int optreset; #endif #include "./bwctlP.h" static BWLControl spawn_local_server(BWLContext lctx, ipsess_t sess, BWLToolAvailability *avail_tools); static BWLBoolean close_local_server(BWLContext ctx, ipsess_t sess); static BWLBoolean wait_for_next_test(BWLBoolean prev_test_failed); static BWLBoolean start_testing(ipsess_t server_sess, ipsess_t client_sess); static BWLBoolean negotiate_individual_test(ipsess_t sess, BWLSID sid, BWLTimeStamp *req_time, uint16_t *recv_port); static BWLBoolean negotiate_test(ipsess_t server_sess, ipsess_t client_sess, BWLTestSpec *test_options); static BWLBoolean wait_for_results(); static BWLBoolean setup_results_storage(ipsess_t sess); static BWLBoolean display_results(ipsess_t sess); static BWLBoolean establish_connection(ipsess_t current_sess, ipsess_t other_sess); static BWLBoolean getclientkey(BWLContext lctx, const BWLUserID userid, BWLKey key_ret, BWLErrSeverity *err_ret); static void usage(const char *msg); static void display_option_group(enum option_type option_type); /* * Scheduling functions */ static Scheduler *get_streaming_scheduler(); static Scheduler *get_regular_intervals_scheduler(uint32_t interval, uint32_t randomize_start); static Scheduler *get_scheduled_times_scheduler(const char *schedule, uint32_t randomize_start); static BWLBoolean streaming_scheduler_get_next_runtime(Scheduler *schedule, struct timespec *tspec, BWLBoolean prev_test_failed); static BWLBoolean regular_intervals_scheduler_get_next_runtime(Scheduler *schedule, struct timespec *tspec, BWLBoolean prev_test_failed); static BWLBoolean scheduled_times_scheduler_get_next_runtime(Scheduler *schedule, struct timespec *tspec, BWLBoolean prev_test_failed); static BWLBoolean parse_time_schedule(const char *schedule, struct tm **times, int *num_times); // The ordering here is the odering it will show when the usage is printed struct bwctl_option bwctl_options[] = { { BWL_TEST_ALL, OPTION_CONNECT, { "receiver", required_argument, 0, 'c' }, "The host that will act as the receiving side for a test", "address", }, { BWL_TEST_ALL, OPTION_CONNECT, { "sender", required_argument, 0, 's' }, "The host that will act as the sending side for a test", "address", }, { BWL_TEST_ALL, OPTION_CONNECT, { "ipv4", no_argument, 0, '4' }, "Use IPv4 only", }, { BWL_TEST_ALL, OPTION_CONNECT, { "ipv6", no_argument, 0, '6' }, "Use IPv6 only", }, { BWL_TEST_ALL, OPTION_CONNECT, { "local_address", required_argument, 0, 'B' }, "Use this as a local address for control connection and tests", "address", }, { BWL_TEST_ALL, OPTION_SCHEDULING, { "num_tests", required_argument, 0, 'n' }, "Number of tests to perform (Default: 1)", "num" }, { BWL_TEST_ALL, OPTION_SCHEDULING, { "test_interval", required_argument, 0, 'I' }, "Time between repeated bwctl tests", "seconds", }, { BWL_TEST_ALL, OPTION_SCHEDULING, { "streaming", no_argument, 0, 0 }, "Request the next test as soon as the current test finishes", }, { BWL_TEST_ALL, OPTION_SCHEDULING, { "schedule", required_argument, 0, 0 }, "Specify the specific times when a test should be run (e.g. --schedule 11:00,13:00,15:00)", "schedule" }, { BWL_TEST_ALL, OPTION_SCHEDULING, { "latest_time", required_argument, 0, 'L' }, "Latest time into an interval to allow a test to run", "seconds" }, { BWL_TEST_ALL, OPTION_SCHEDULING, { "randomize", required_argument, 0, 'R' }, "Randomize the start time within this percentage of the test's interval (Default: 10%)", "percent", }, { BWL_TEST_ALL, OPTION_TEST, { "tool", required_argument, 0, 'T' }, "The tool to use for the test", "tool", }, { BWL_TEST_ALL, OPTION_CONNECT, { "flip", no_argument, 0, 'o' }, "Have the receiver connect to the sender (Default: False)" }, { BWL_TEST_ALL, OPTION_CONNECT, { "no_endpoint", no_argument, 0, 'E' }, "Allow tests to occur when the receiver isn't running bwctl (Default: False)", }, { BWL_TEST_ALL, OPTION_TEST, { "tester_port", required_argument, 0, 0 }, "For an endpoint-less test, use this port as the server port (Default: tool specific)", "port" }, { BWL_TEST_ALL, OPTION_SCHEDULING, { "allow_ntp_unsync", required_argument, 0, 'a' }, "Allow unsynchronized clock - claim good within offset", "seconds" }, { BWL_TEST_ALL, OPTION_OUTPUT, { "units", required_argument, 0, 'f' }, "Type of measurement units to return (Default: tool specific)", "unit" }, { BWL_TEST_ALL, OPTION_OUTPUT, { "both", no_argument, 0, 'x' }, "Output both sender and receiver results", }, { BWL_TEST_ALL, OPTION_OUTPUT, { "format", required_argument, 0, 'y' }, "Output format to use (Default: tool specific)", "format", }, { BWL_TEST_ALL, OPTION_OUTPUT, { "parsable", no_argument, 0, 0 }, "Set the output format to the machine parsable version for the select tool, if available", }, { BWL_TEST_ALL, OPTION_TEST, { "tos", required_argument, 0, 'S' }, "Type-Of-Service for outgoing packets", "tos", }, // Latency/Traceroute-specific options { BWL_TEST_LATENCY | BWL_TEST_TRACEROUTE, OPTION_TEST, { "packet_length", required_argument, 0, 'l' }, "Length of packets", "bytes", }, // Latency-specific options { BWL_TEST_LATENCY, OPTION_TEST, { "num_packets", required_argument, 0, 'N' }, "Number of packets to send (Default: 10)", "num", }, { BWL_TEST_LATENCY, OPTION_TEST, { "ttl", required_argument, 0, 't' }, "TTL for the packets", "num", }, { BWL_TEST_LATENCY, OPTION_TEST, { "packet_interval", required_argument, 0, 'i' }, "Delay between packets (Default: 1.0)", "seconds", }, // Traceroute-specific options { BWL_TEST_TRACEROUTE, OPTION_TEST, { "first_ttl", required_argument, 0, 'F' }, "minimum TTL for traceroute (Default: none)", "num", }, { BWL_TEST_TRACEROUTE, OPTION_TEST, { "max_ttl", required_argument, 0, 'M' }, "maximum TTL for traceroute (Default: none)", "num", }, { BWL_TEST_TRACEROUTE, OPTION_TEST, { "test_duration", required_argument, 0, 't' }, "Maximum time to wait for traceroute to finish (Default: 10)", "seconds", }, // Throughput-specific options { BWL_TEST_THROUGHPUT, OPTION_TEST, { "bandwidth", required_argument, 0, 'b' }, "Bandwidth to use for tests (bits/sec KM) (Default: 1Mb for UDP tests, unlimited for TCP tests)", "bandwidth", }, { BWL_TEST_THROUGHPUT, OPTION_TEST, { "report_interval", required_argument, 0, 'i' }, "Tool reporting interval", "seconds", }, { BWL_TEST_THROUGHPUT, OPTION_TEST, { "buffer_length", required_argument, 0, 'l' }, "Length of read/write buffers", "bytes", }, { BWL_TEST_THROUGHPUT, OPTION_TEST, { "omit", required_argument, 0, 'O' }, "Omit time (currently only for iperf3)", "seconds", }, { BWL_TEST_THROUGHPUT, OPTION_TEST, { "parallel", required_argument, 0, 'P' }, "Number of concurrent connections", "num", }, { BWL_TEST_THROUGHPUT, OPTION_TEST, { "dscp", required_argument, 0, 'D' }, "RFC 2474-style DSCP value for TOS byte", "dscp", }, { BWL_TEST_THROUGHPUT, OPTION_TEST, { "test_duration", required_argument, 0, 't' }, "Duration for test (Default: 10)", "seconds", }, { BWL_TEST_THROUGHPUT, OPTION_TEST, { "udp", no_argument, 0, 'u' }, "Perform a UDP test", }, { BWL_TEST_THROUGHPUT, OPTION_TEST, { "window", required_argument, 0, 'w' }, "TCP window size (Default: system default)", "bytes" }, { BWL_TEST_THROUGHPUT, OPTION_TEST, { "dynamic_window", required_argument, 0, 'W' }, "Dynamic TCP window fallback size (Default: system default)", "bytes" }, // Lesser-used or minor options { BWL_TEST_ALL, OPTION_OUTPUT, { "verbose", no_argument, 0, 'v' }, "Display verbose output", }, { BWL_TEST_ALL, OPTION_OUTPUT, { "print", no_argument, 0, 'p' }, "Print results filenames to stdout (Default: False)", }, { BWL_TEST_ALL, OPTION_OUTPUT, { "output_dir", required_argument, 0, 'd' }, "Directory to save session files to (only if -p)", "directory" }, { BWL_TEST_ALL, OPTION_OUTPUT, { "facility", required_argument, 0, 'e' }, "Syslog facility to log to", "facility" }, { BWL_TEST_ALL, OPTION_OUTPUT, { "quiet", no_argument, 0, 'q' }, "Silent mode (Default: False)", }, { BWL_TEST_ALL, OPTION_OUTPUT, { "syslog_to_stderr", no_argument, 0, 'r' }, "Send syslog to stderr (Default: False)", }, { BWL_TEST_ALL, OPTION_MISC, { "version", no_argument, 0, 'V' }, "Show version number", }, { BWL_TEST_ALL, OPTION_MISC, { "help", no_argument, 0, 'h' }, "Display the help message", }, { BWL_TEST_UNDEFINED, }, }; /* * The bwctl context */ static ipapp_trec app; static char *progname; static BWLTestType test_type; static I2ErrHandle eh; static int ip_intr = 0; static int ip_chld = 0; static int ip_reset = 0; static int ip_exit = 0; static int ip_alrm = 0; static int ip_error = SIGCONT; static BWLContext ctx; static aeskey_auth current_auth=NULL; static BWLNum64 zero64; static BWLNum64 fuzz64; static int exit_val=0; static ipsess_trec sessions[2]; /* server == 0, client == 1 */ static I2RandomSource rsrc; static void version( void ) { if (PATCH_LEVEL) { fprintf(stderr, "\nVersion: %s-%d\n\n", PACKAGE_VERSION, PATCH_LEVEL); } else { fprintf(stderr, "\nVersion: %s\n",PACKAGE_VERSION); } return; } static int option_comp(const void *elem1, const void *elem2) { const struct bwctl_option *option1 = elem1; const struct bwctl_option *option2 = elem2; if (option1->option.val && option2->option.val) { if (toupper(option1->option.val) > toupper(option2->option.val)) { return 1; } else if (toupper(option1->option.val) < toupper(option2->option.val)) { return -1; } else { return 0; } } else if (option1->option.val) { return -1; } else if (option2->option.val) { return 1; } else { return strcmp(option1->option.name, option2->option.name); } } static void usage( const char *msg ) { // Do a dummy load of ctx to make sure we can print out the list of // available tools... if (!ctx) { if( !(ctx = BWLContextCreate(NULL, BWLInterruptIO, &ip_intr, BWLGetAESKey, getclientkey, NULL))){ fprintf(stderr, "Unable to initialize BWL library.\n"); exit(1); } } if(msg) fprintf(stderr, "%s: %s\n", progname, msg); fprintf(stderr,"usage: %s %s\n", progname, "[arguments]"); // sort the options so that they display nicely qsort(bwctl_options, sizeof(bwctl_options)/sizeof(bwctl_options[0]) - 1, sizeof(bwctl_options[0]), option_comp); fprintf(stderr,"\nConnection Arguments\n"); display_option_group(OPTION_CONNECT); fprintf(stderr,"\nScheduling Arguments\n"); display_option_group(OPTION_SCHEDULING); fprintf(stderr,"\nTest Arguments\n"); display_option_group(OPTION_TEST); fprintf(stderr,"\nOutput Arguments\n"); display_option_group(OPTION_OUTPUT); fprintf(stderr,"\nMisc Arguments\n"); display_option_group(OPTION_MISC); version(); return; } static void display_option_group( enum option_type option_type ) { int i; for(i = 0; bwctl_options[i].test_types != BWL_TEST_UNDEFINED; i++) { char buf[50]; if (!(bwctl_options[i].test_types & test_type)) continue; if (!(bwctl_options[i].option_type == option_type)) continue; if (bwctl_options[i].option.val) { snprintf(buf, sizeof(buf) - 1, "-%c|--%s", bwctl_options[i].option.val, bwctl_options[i].option.name); } else { snprintf(buf, sizeof(buf) - 1, "--%s", bwctl_options[i].option.name); } if (bwctl_options[i].option.has_arg == required_argument) { strncat(buf, " <", sizeof(buf) - strlen(buf) - 1); strncat(buf, bwctl_options[i].argument_description, sizeof(buf) - strlen(buf) - 1); strncat(buf, ">", sizeof(buf) - strlen(buf) - 1); } fprintf(stderr, "%-32.34s %s\n", buf, bwctl_options[i].description); // The -T option is a special case if (strcmp(bwctl_options[i].option.name, "tool") == 0) { int j, n; fprintf(stderr, "%-34s Available Tools:\n", ""); for(j=0,n = BWLToolGetNumTools(ctx);jidentity,userid,sizeof(BWLUserID))){ /* * If identity doesn't match, there are auth problems... */ BWLError(lctx,BWLErrFATAL,BWLErrUNKNOWN, "GetKey: auth identity mismatch"); *err_ret = BWLErrFATAL; return False; } memcpy(key_ret,current_auth->aesbuff,sizeof(current_auth->aesbuff)); return True; } /* * Function: parse_auth_args * * Description: * parses authentication style args using argv,argc,optind. * * In Args: * I2ErrHandle eh * * Out Args: * aeskey_auth *auth_ret * return a pointer to the structure that holds the * authentication information. * * Scope: * Returns: 0 on success * Side Effect: * updates optind so getopt is set to grab the next non-auth * opt from the commandline. */ static int parse_auth_args( I2ErrHandle leh, char **argv, int argc, const char *hostref, aeskey_auth *auth_ret ) { aeskey_auth auth; char *s; uint32_t auth_mode = 0; FILE *fp; int rc = 0; char *lbuf=NULL; size_t lbuf_max=0; *auth_ret = NULL; /* * If there are no options, then return success. */ if(optind >= argc) return 0; /* * Verify/decode auth options. */ s = argv[optind]; while(*s != '\0'){ switch (toupper(*s)){ case 'O': auth_mode |= BWL_MODE_OPEN; break; case 'A': auth_mode |= BWL_MODE_AUTHENTICATED; break; case 'E': auth_mode |= BWL_MODE_ENCRYPTED; break; default: /* * arg doesn't match a autmode string, * return 0 and let getopt grab this arg. */ return 0; } s++; } /* * This was an auth_mode argument - move the optind past it. */ optind++; if(!(auth = (aeskey_auth)calloc(1,sizeof(aeskey_auth_rec)))){ I2ErrLog(leh,"malloc:%M"); return 1; } *auth_ret = auth; auth->auth_mode = auth_mode; /* * If there are no more options, then return success. */ if(optind >= argc) return 0; /* * See if the AESKEY authscheme is selected. In the future, will * need to check for multiple scheme's, and may even need to turn * the aeskey_auth_rec into a union or something like that, but for * now it is simple enough to just look for AESKEY. :) */ if(strncasecmp(argv[optind],"aeskey",7)){ /* * If strncasecmp != 0, then argv[optind] is not what * we are looking for. */ return 0; } optind++; /* * The remainder of this function pulls AESKEY scheme options out. */ if(optind >= argc){ I2ErrLog(leh,"Invalid AESKEY schemeopts"); return 1; } if(!(auth->identity = strdup(argv[optind]))){ I2ErrLog(leh,"malloc: %m"); return 1; } optind++; /* If there are no more args, or the next arg starts with '-' * it is assumed that the optional keyfile is not being specified. */ if(optind < argc){ s = argv[optind]; if(s[0] != '-'){ if(!(auth->keyfile = strdup(argv[optind]))){ I2ErrLog(leh,"malloc: %m"); return 1; } optind++; } } /* * keyfile specified, attempt to get key from there. */ if(auth->keyfile){ if(!(fp = fopen(auth->keyfile,"r"))){ I2ErrLog(leh,"Unable to open %s: %M",auth->keyfile); return 1; } rc = I2ParseKeyFile(leh,fp,0,&lbuf,&lbuf_max,NULL, auth->identity,NULL,auth->aesbuff); if(lbuf){ free(lbuf); } lbuf = NULL; lbuf_max = 0; fclose(fp); if(rc <= 0){ I2ErrLog(leh, "Unable to find key for id=\"%s\" from keyfile=\"%s\"", auth->identity,auth->keyfile); return 1; } }else{ /* * Do passphrase: * open tty and get passphrase. * (md5 the passphrase to create an aes key.) */ char *passphrase; char ppbuf[MAX_PASSPHRASE]; char prompt[MAX_PASSPROMPT]; I2MD5_CTX mdc; size_t pplen; if(snprintf(prompt,MAX_PASSPROMPT, "Enter passphrase for host '%s', identity '%s': ", hostref,auth->identity) >= MAX_PASSPROMPT){ I2ErrLog(leh,"Invalid identity"); return 1; } if(!(passphrase = I2ReadPassPhrase(prompt,ppbuf, sizeof(ppbuf),I2RPP_ECHO_OFF))){ I2ErrLog(leh,"I2ReadPassPhrase(): %M"); return 1; } pplen = strlen(passphrase); I2MD5Init(&mdc); I2MD5Update(&mdc,(unsigned char *)passphrase,pplen); I2MD5Final(auth->aesbuff,&mdc); } auth->aeskey = auth->aesbuff; return 0; } static void CloseSessions( void ) { /* TODO: Handle clearing other state. Canceling tests nicely? */ if (app.client_sess->cntrl) { BWLControlClose(app.client_sess->cntrl); app.client_sess->cntrl = NULL; app.client_sess->sockfd = 0; app.client_sess->tspec.req_time.tstamp = zero64; close_local_server(ctx, app.client_sess); } if (app.server_sess->cntrl) { BWLControlClose(app.server_sess->cntrl); app.server_sess->cntrl = NULL; app.server_sess->sockfd = 0; app.server_sess->tspec.req_time.tstamp = zero64; close_local_server(ctx, app.server_sess); } return; } static void sig_catch( int signo ) { switch(signo){ case SIGINT: case SIGTERM: ip_exit++; break; case SIGCHLD: ip_chld++; break; case SIGHUP: ip_reset++; break; case SIGALRM: ip_alrm++; break; default: ip_error = signo; break; } ip_intr++; return; } static int sig_check( void ) { if(ip_error != SIGCONT){ I2ErrLog(eh,"sig_catch(%d):UNEXPECTED SIGNAL NUMBER",ip_error); return 1; } if(ip_exit || ip_reset){ return 1; } ip_intr = 0; if(ip_reset){ ip_reset = 0; return 1; } return 0; } /* * CheckTestPolicy for client faux-daemon. Always say yes, but do * scheduling and tool initialization check. */ static BWLBoolean CheckTestPolicy( BWLControl cntrl, BWLSID lsid __attribute__((unused)), BWLBoolean local_client, struct sockaddr *local_sa_addr __attribute__((unused)), struct sockaddr *remote_sa_addr __attribute__((unused)), socklen_t sa_len __attribute__((unused)), BWLTestSpec *tspec, BWLNum64 fuzz_time, BWLNum64 *reservation_ret, uint16_t *tool_port_ret, uint16_t *local_tool_port_ret, void **closure, BWLErrSeverity *err_ret ) { BWLContext lctx = BWLGetContext(cntrl); BWLTimeStamp currtime; BWLNum64 start; BWLNum64 minstart; uint16_t tool_port_loc; *err_ret = BWLErrOK; if(!BWLGetTimeStamp(lctx,&currtime)){ BWLError(lctx,BWLErrFATAL,BWLErrUNKNOWN,"BWLGetTimeStamp(): %M"); *err_ret = BWLErrFATAL; return False; } /* * Start time as defined by request. */ start = BWLNum64Sub(tspec->req_time.tstamp,fuzz_time); /* * Determine earliest time test can happen. (See comments in * bwctl/bwctld.c:ChldReservationDemand() ) */ minstart = BWLNum64Add(currtime.tstamp,BWLNum64Mult( BWLNum64Add(BWLGetRTTBound(cntrl),fuzz_time), BWLULongToNum64(2)) ); /* * If start is less than min start, then reset the start time to * one second past the min start. (Again see comments in bwctld.c) */ if(BWLNum64Cmp(start,minstart) < 0){ start = BWLNum64Add(minstart,BWLULongToNum64(1)); } /* * reservation time is fuzz_time after start time. */ *reservation_ret = BWLNum64Add(start,fuzz_time); /* * Initialize the tool if this is the first time CheckTest was called. * (closure is kept to maintain state between calls to CheckTest, * no information is needed so just set it to any non-NULL value * for this logic test.) */ if(!*closure){ if( BWLErrOK != (*err_ret = BWLToolInitTest(lctx,tspec->tool_id,&tool_port_loc))){ BWLError(lctx,*err_ret,BWLErrINVALID, "CheckTestPolicy(): Tool initialization failed"); return False; } *closure = NOTNULL; /* * Only update the tool port if configuring the receiver */ if(!local_client){ *tool_port_ret = tool_port_loc; } *local_tool_port_ret = tool_port_loc; } return True; } static BWLBoolean close_local_server( BWLContext ctx, ipsess_t sess ) { BWLBoolean func_retval = True; if(sess->fake_daemon_pipe > -1){ BWLError(ctx,BWLErrDEBUG,BWLErrUNKNOWN,"close_local_server(): shutting down daemon pipe"); while((close(sess->fake_daemon_pipe) < 0) && (errno == EINTR)); sess->fake_daemon_pipe = -1; } if(sess->fake_daemon_pid > 0){ int status = 0; int killed=0; struct timeval tv; BWLError(ctx,BWLErrDEBUG,BWLErrUNKNOWN,"close_local_server(): killing daemon process"); tv.tv_sec = 2; tv.tv_usec = 0; while (1) { int retval = select(0, NULL, NULL, NULL, &tv); int select_errno = errno; pid_t rc = waitpid(sess->fake_daemon_pid,&status,WNOHANG); if (rc > 0) { if (app.opt.verbose) { I2ErrLog(eh, "Local server has exited"); } // child pid has exited break; } if (rc < 0) { // No children are around... break; } if ((retval == -1 && select_errno == EINTR) || (retval == 0 && killed)) { I2ErrLog(eh, "Problem killing local server"); func_retval = False; break; } else if (retval == 0) { (void)kill(sess->fake_daemon_pid,SIGTERM); tv.tv_sec = 2; tv.tv_usec = 0; killed = 1; } } sess->fake_daemon_pid = -1; } return func_retval; } static BWLControl spawn_local_server( BWLContext lctx, ipsess_t sess, BWLToolAvailability *avail_tools ) { int new_pipe[2]; pid_t pid; BWLErrSeverity err = BWLErrOK; uint32_t controltimeout = 7200; BWLTimeStamp currtime; struct itimerval itval; BWLControl cntrl; BWLRequestType msgtype = BWLReqInvalid; void *childwait; /* * This socket is the 'control' connection to the mock-daemon */ if(socketpair(AF_UNIX,SOCK_STREAM,0,new_pipe) < 0){ I2ErrLog(eh,"socketpair(): %M"); } /* * Now spawn the child process to be the mock-daemon */ pid = fork(); /* fork error */ if(pid < 0){ I2ErrLog(eh,"fork(): %M"); return NULL; } /* parent */ if(pid > 0){ I2Addr servaddr; while((close(new_pipe[1]) < 0) && (errno == EINTR)); if(!(servaddr = I2AddrBySockFD(eh,new_pipe[0],True))){ I2ErrLog(eh,"Failed to create local-server address: %M"); return NULL; } cntrl = BWLControlOpen(lctx,NULL,servaddr, BWL_MODE_OPEN,NULL,NULL,avail_tools,&err); if(!cntrl){ I2ErrLog(eh,"Failed to connect to local-server: %M"); return NULL; } sess->fake_daemon_pipe = new_pipe[0]; sess->fake_daemon_pid = pid; sess->fake_daemon = True; return cntrl; } /* Now implement child "server" */ if(ip_exit){ I2ErrLog(eh,"Child exiting from signal"); _exit(0); } /* Close the write side of the pipe */ while((close(new_pipe[0]) < 0) && (errno == EINTR)); /* * Make access log stuff be quiet in child server if !verbose. */ if(!app.opt.verbose){ if(!BWLContextConfigSet(lctx,BWLAccessPriority,BWLErrOK)){ I2ErrLog(eh,"BWLContextconfigSet(BWLAccessPriority,BWLErrOK): %M"); _exit(1); } BWLContextSetErrMask(lctx,BWLErrWARNING); } /* * Wait for the debugger? */ if( (childwait = BWLContextConfigGetV(lctx,BWLChildWait))){ I2ErrLog(eh,"Waiting for Debugger(%d)",getpid()); while(childwait); /* * Set childwait back to non-zero in debugger before * executing the next line to make sub children 'wait' * as well. */ if( !BWLContextConfigSet(lctx,BWLChildWait,(void*)childwait)){ I2ErrLog(eh,"BWLContextConfigSet(ChildWait): %M"); _exit(1); } } if(!BWLContextConfigSet(lctx,BWLCheckTestPolicy,CheckTestPolicy)){ I2ErrLog(eh,"BWLContextConfigSet(\"CheckTestPolicy\")"); _exit(1); } if( !BWLContextFindTools(lctx)){ I2ErrLog(eh,"BWLContextFindTools failed."); _exit(1); } /* * Initialize interval timer */ memset(&itval,0,sizeof(itval)); itval.it_value.tv_sec = controltimeout; if(setitimer(ITIMER_REAL,&itval,NULL) != 0){ I2ErrLog(eh,"setitimer(%d): %M",controltimeout); _exit(1); } /* * Get current time for server greeting. */ if(!BWLGetTimeStamp(lctx,&currtime)){ I2ErrLog(eh,"BWLGetTimeStamp: %M"); _exit(1); } /* * Accept connection and send server greeting. */ cntrl = BWLControlAccept(lctx,new_pipe[1],NULL,0,BWL_MODE_OPEN, currtime.tstamp,&ip_exit,&err); if(!cntrl){ I2ErrLog(eh,"BWLControlAccept() failed"); _exit((int)err); } /* * TODO?: Figure out a way to share the event-loop with bwctld * * Process all requests - return when complete. */ while(1){ BWLErrSeverity rc; int wstate; rc = BWLErrOK; if(ip_exit) goto done; /* * reset signal vars * TODO: If there is a pending reservation, * timer should be reduced to: * MIN(time-util-start,reserve-timeout) */ itval.it_value.tv_sec = controltimeout; if(setitimer(ITIMER_REAL,&itval,NULL) != 0){ I2ErrLog(eh,"setitimer(): %M"); goto done; } msgtype = BWLReadRequestType(cntrl,&ip_exit); if(ip_exit) goto done; switch (msgtype){ case BWLReqTest: rc = BWLProcessTestRequest(cntrl,&ip_exit); break; case BWLReqTime: rc = BWLProcessTimeRequest(cntrl,&ip_exit); break; case BWLReqStartSession: rc = BWLProcessStartSession(cntrl,&ip_exit); if(rc < BWLErrOK){ break; } /* * Test session started - unset timer - wait * until all sessions are complete, then * reset the timer and wait for stopsessions * to complete. */ itval.it_value.tv_sec = 0; if(setitimer(ITIMER_REAL,&itval,NULL) != 0){ I2ErrLog(eh,"setitimer(): %M"); goto done; } if(ip_exit) goto done; rc = BWLErrOK; wstate = BWLStopSessionWait(cntrl,NULL, &ip_exit,NULL,&rc); if(ip_exit || (wstate != 0)){ goto done; } /* * Sessions are complete, but StopSession * message has not been exchanged - set the * timer and trade StopSession messages */ itval.it_value.tv_sec = controltimeout; if(setitimer(ITIMER_REAL,&itval,NULL) != 0){ I2ErrLog(eh,"setitimer(): %M"); goto done; } rc = BWLStopSession(cntrl,&ip_exit,NULL); break; case BWLReqSockClose: default: rc = BWLErrFATAL; break; } if(rc < BWLErrWARNING){ break; } } done: BWLControlClose(cntrl); if(ip_exit){ _exit(0); } /* * Normal socket close */ if(msgtype == BWLReqSockClose){ _exit(0); } I2ErrLog(eh,"Control session terminated abnormally..."); _exit(1); } #define BWCTL_DEFAULT_RCNAME ".bwctlrc" static BWLBoolean LoadConfig( BWLContext lctx ) { FILE *conf; char conf_filebuf[MAXPATHLEN+1]; char *conf_file; char keybuf[MAXPATHLEN],valbuf[MAXPATHLEN]; char *key = keybuf; char *val = valbuf; int rc; int dc; char *lbuf=NULL; size_t lbuf_max=0; if( !(conf_file = getenv("BWCTLRC"))){ char *home; if( !(home = getenv("HOME"))){ struct passwd *pw; if( !(pw = getpwuid(getuid()))){ BWLError(lctx,BWLErrFATAL,errno,"LoadConfig: getpwuid(): %M"); return False; } home = pw->pw_dir; } rc = strlen(home) + strlen(BWL_PATH_SEPARATOR) + strlen(BWCTL_DEFAULT_RCNAME); if(rc > MAXPATHLEN){ BWLError(lctx,BWLErrFATAL,errno,"strlen(BWCTLRC) > MAXPATHLEN"); return False; } conf_file = conf_filebuf; strcpy(conf_file,home); strcat(conf_file,BWL_PATH_SEPARATOR); strcat(conf_file,BWCTL_DEFAULT_RCNAME); } if( !(conf = fopen(conf_file, "r"))){ /* * TODO?: * No local config - just go with the defaults * Set something in the ctx so this can be seen later? * Perhaps better to set something if it is opened - to indicate * what rc files is used... * */ /* no conf file, success */ return True; } /* * Now parse the file */ rc=0; while((rc = I2ReadConfVar(conf,rc,key,val,MAXPATHLEN,&lbuf,&lbuf_max)) >0){ /* * Add any client specific conf vars first * (none yet, but could provide defaults for command-line opts...) */ /* * Now, daemon functionality */ if( (dc = BWLDaemonParseArg(lctx,key,val))){ if(dc < 0){ rc = -rc; break; } } else{ BWLError(lctx,BWLErrFATAL,BWLErrINVALID,"Unknown key=%s",key); rc = -rc; break; } } /* * Done with line buffer. */ if(lbuf){ free(lbuf); } lbuf = NULL; lbuf_max = 0; if(rc < 0){ BWLError(lctx,BWLErrFATAL,BWLErrUNKNOWN,"%s:%d Problem parsing config file",conf_file,-rc); return False; } return True; } static BWLBoolean parse_typeP( const char *tspec ) { const char *tstr; char *endptr; unsigned long tlng; uint8_t tosbyte = 0; if(!tspec) return False; tstr = tspec; endptr = NULL; while(isspace((int)*tstr)) tstr++; tlng = strtoul(tspec,&endptr,0); /* * Try interpreting as hex DSCP value. * Verify user only sets * last 6 bits (DSCP must fit in 6 bits - RFC 2474.) */ if((*endptr == '\0') && !(tlng & (unsigned)~0x3F)){ /* save in tosbyte - uses high-order 6 bits instead of low */ tosbyte = tlng << 2; tstr = endptr; } /* * It is useful to define some symbolic constants for the -D (DSCP) * value. RFC 4594 seemed a reasonable collection of these useful * constants. * * Table of constants from RFC 4594: * * ********************************************************************* ------------------------------------------------------------------ | Service | DSCP | DSCP | Application | | Class Name | Name | Value | Examples | |===============+=========+=============+==========================| |Network Control| CS6 | 110000 | Network routing | |---------------+---------+-------------+--------------------------| | Telephony | EF | 101110 | IP Telephony bearer | |---------------+---------+-------------+--------------------------| | Signaling | CS5 | 101000 | IP Telephony signaling | |---------------+---------+-------------+--------------------------| | Multimedia |AF41,AF42|100010,100100| H.323/V2 video | | Conferencing | AF43 | 100110 | conferencing (adaptive) | |---------------+---------+-------------+--------------------------| | Real-Time | CS4 | 100000 | Video conferencing and | | Interactive | | | Interactive gaming | |---------------+---------+-------------+--------------------------| | Multimedia |AF31,AF32|011010,011100| Streaming video and | | Streaming | AF33 | 011110 | audio on demand | |---------------+---------+-------------+--------------------------| |Broadcast Video| CS3 | 011000 |Broadcast TV & live events| |---------------+---------+-------------+--------------------------| | Low-Latency |AF21,AF22|010010,010100|Client/server transactions| | Data | AF23 | 010110 | Web-based ordering | |---------------+---------+-------------+--------------------------| | OAM | CS2 | 010000 | OAM&P | |---------------+---------+-------------+--------------------------| |High-Throughput|AF11,AF12|001010,001100| Store and forward | | Data | AF13 | 001110 | applications | |---------------+---------+-------------+--------------------------| | Standard | DF (CS0)| 000000 | Undifferentiated | | | | | applications | |---------------+---------+-------------+--------------------------| | Low-Priority | CS1 | 001000 | Any flow that has no BW | | Data | | | assurance | ------------------------------------------------------------------ Figure 3. DSCP to Service Class Mapping ********************************************************************* * * Mapping this to the full binary tos byte, and including CS? and * EF symbolic names... * * * Symbolic constants 6-bit DSCP * * none/default/CS0 000 000 * CS1 001 000 * AF11 001 010 * AF12 001 100 * AF13 001 110 * CS2 010 000 * AF21 010 010 * AF22 010 100 * AF23 010 110 * CS3 011 000 * AF31 011 010 * AF32 011 100 * AF33 011 110 * CS4 100 000 * AF41 100 010 * AF42 100 100 * AF43 100 110 * CS5 101 000 * EF 101 110 * CS6 110 000 * CS7 111 000 */ else if(!strncasecmp(tstr,"none",5)){ /* standard */ tstr += 4; } else if(!strncasecmp(tstr,"default",8)){ /* standard */ tstr += 7; } else if(!strncasecmp(tstr,"df",3)){ /* standard */ tstr += 2; } else if(!strncasecmp(tstr,"ef",3)){ /* Expedited Forwarding */ tosbyte = 0xB8; tstr += 2; } else if((toupper(tstr[0]) == 'C') && (toupper(tstr[1]) == 'S')){ switch(tstr[2]){ case '0': break; case '1': tosbyte = 0x20; break; case '2': tosbyte = 0x40; break; case '3': tosbyte = 0x60; break; case '4': tosbyte = 0x80; break; case '5': tosbyte = 0xA0; break; case '6': tosbyte = 0xC0; break; case '7': tosbyte = 0xE0; break; default: goto FAILED; break; } /* forward tstr to end of accepted pattern */ tstr += 3; } else if(toupper(tstr[0] == 'A') && (toupper(tstr[1]) == 'F')){ switch(tstr[2]){ case '1': tosbyte = 0x20; break; case '2': tosbyte = 0x40; break; case '3': tosbyte = 0x60; break; case '4': tosbyte = 0x80; break; default: goto FAILED; break; } switch(tstr[3]){ case '1': tosbyte |= 0x08; break; case '2': tosbyte |= 0x10; break; case '3': tosbyte |= 0x18; break; default: goto FAILED; break; } /* forward tstr to end of accepted pattern */ tstr += 4; } /* * Forward past any whitespace and make sure arg is clean. */ while(isspace((int)*tstr)) tstr++; if(*tstr != '\0'){ goto FAILED; } app.opt.tos = tosbyte; return True; FAILED: I2ErrLogP(eh,EINVAL,"Invalid DSCP value (-D): %M"); return False; } static BWLBoolean handle_conn_arg(const char arg, const char *long_name, const char *value, char **argv, int argc) { BWLBoolean handled = True; switch (arg) { case '4': app.opt.v4only = True; break; case '6': app.opt.v6only = True; break; case 'A': /* parse auth */ if((parse_auth_args(eh,argv,argc,"BOTH",&app.def_auth) != 0) || !app.def_auth){ usage("invalid default authentication"); exit(1); } break; case 'B': if (!(app.opt.srcaddr = strdup(value))) { fprintf(stderr,"malloc failed\n"); exit(1); } break; default: handled = False; } return handled; } static BWLBoolean handle_output_arg(const char arg, const char *long_name, const char *value) { BWLBoolean handled = True; switch (arg) { case 'd': if (!(app.opt.savedir = strdup(value))) { fprintf(stderr,"malloc failed\n"); exit(1); } break; case 'f': if(strlen(value) != 1){ usage("Invalid value. (-f) Single character expected"); exit(1); } app.opt.units = value[0]; break; case 'p': app.opt.printfiles = True; break; case 'x': app.opt.bidirectional_results = True; break; default: handled = False; } if (!handled) { if (strcmp(long_name, "parsable") == 0) { app.opt.parsable = True; handled = True; } } return handled; } static BWLBoolean handle_misc_arg(const char arg, const char *long_name, const char *value) { BWLBoolean handled = True; int fac; switch (arg) { case 'e': if((fac = I2ErrLogSyslogFacility(value)) == -1){ fprintf(stderr, "Invalid -e: Unknown syslog facility"); exit(1); } app.opt.log_facility = fac; break; case 'v': app.opt.verbose++; app.opt.log_to_stderr = True; break; case 'r': app.opt.log_to_stderr = True; break; case 'q': app.opt.quiet = True; break; case 'V': version(); exit(0); case 'h': case '?': usage(""); exit(0); default: handled = False; } return handled; } static BWLBoolean handle_scheduling_arg(const char arg, const char *long_name, const char *value) { BWLBoolean handled = True; char *tstr; switch (arg) { case 'a': app.opt.allowUnsync = strtod(value,&tstr); if((value == tstr) || (errno == ERANGE) || (app.opt.allowUnsync < 0.0)){ usage("Invalid value \'-a\'. Positive float expected"); exit(1); } break; case 'I': app.opt.seriesInterval =strtoul(value, &tstr, 10); if (*tstr != '\0') { usage("Invalid value. (-I) Positive integer expected"); exit(1); } break; case 'R': app.opt.randomizeStart = strtoul(value,&tstr,10); if(*tstr != '\0'){ usage("Invalid value. (-R) Positive integer expected"); exit(1); } if(app.opt.randomizeStart > 50){ usage("Invalid value. (-R) Value must be <= 50"); exit(1); } break; case 'n': app.opt.nIntervals =strtoul(value, &tstr, 10); if (*tstr != '\0') { usage("Invalid value. Positive integer expected"); exit(1); } break; case 'L': app.opt.seriesWindow = strtoul(value,&tstr,10); if(*tstr != '\0'){ usage("Invalid value. Positive integer expected"); exit(1); } break; default: handled = False; } if (!handled) { if (strcmp(long_name, "streaming") == 0) { app.opt.streaming = True; handled = True; } else if (strcmp(long_name, "schedule") == 0) { if (!(app.opt.schedule = strdup(value))) { fprintf(stderr,"malloc failed\n"); exit(1); } handled = True; } } return handled; } static BWLBoolean handle_generic_test_arg(const char arg, const char *long_name, const char *value, char **argv, int argc) { BWLBoolean handled = True; char *tstr; switch (arg) { case 'c': if(app.receiver_sess->host){ usage("-c flag can only be specified once"); exit(1); } if (!(app.receiver_sess->host = strdup(value))) { fprintf(stderr,"malloc failed\n"); exit(1); } if(parse_auth_args(eh,argv,argc,value,&app.receiver_sess->auth) != 0){ usage("invalid \'receiver\' authentication"); exit(1); } break; case 's': if(app.sender_sess->host){ usage("-s flag can only be specified once"); exit(1); } if (!(app.sender_sess->host = strdup(value))) { fprintf(stderr,"malloc failed\n"); exit(1); } if(parse_auth_args(eh,argv,argc,value,&app.sender_sess->auth) != 0){ usage("invalid \'sender\' authentication"); exit(1); } break; case 'o': app.opt.flip_direction = True; break; case 'T': if (!(app.opt.tools = strdup(value))) { fprintf(stderr,"malloc failed\n"); exit(1); } break; case 'D': if(app.opt.tos){ usage("Invalid option \'-D\'. TOS byte already specified"); exit(1); } if(!parse_typeP(value)){ exit(1); } break; case 'S': if(app.opt.tos){ usage("Invalid option \'-S\'. TOS byte already specified"); exit(1); } app.opt.tos = strtoul(value, &tstr, 0); if((*tstr != '\0') || (app.opt.tos > 0xff) || (app.opt.tos & 0x01)){ usage("Invalid value for TOS. (-S)"); exit(1); } break; case 'y': if(strlen(value) != 1){ usage("Invalid value. (-y) Single character expected"); exit(1); } app.opt.outformat = value[0]; break; case 'E': app.opt.allow_one_sided = True; break; default: handled = False; } if (!handled) { if (strcmp(long_name, "tester_port") == 0) { app.opt.tester_port = strtoul(value,&tstr,10); if(*tstr != '\0') { usage("Invalid value. (--tester_port) positive integer expected"); exit(1); } handled = True; } } return handled; } static BWLBoolean handle_throughput_test_arg(const char arg, const char *long_name, const char *value) { BWLBoolean handled = True; char *tstr; switch (arg) { case 'b': if( !(tstr = strdup(value))){ I2ErrLog(eh, "strdup(): %M"); exit(1); } if(I2StrToNum(&app.opt.bandWidth,tstr) != 0){ usage("Invalid value. (-b) Positive integer expected"); exit(1); } free(tstr); tstr = NULL; break; case 'i': app.opt.reportInterval = strtod(value,&tstr) * 1000; if((value == tstr) || (errno == ERANGE) || (app.opt.reportInterval < 0.0)){ usage("Invalid value. (-i) positive float expected"); exit(1); } break; case 'l': if( !(tstr = strdup(value))){ I2ErrLog(eh, "strdup(): %M"); exit(1); } if(I2StrToByte(&app.opt.lenBuffer,tstr) != 0){ usage("Invalid value. (-l) positive integer expected"); exit(1); } free(tstr); tstr = NULL; break; case 'O': app.opt.timeOmit = strtoul(value,&tstr,10); if(*tstr != '\0'){ usage("Invalid value. (-O) positive integer expected"); exit(1); } if(app.opt.timeOmit > 60){ usage("Invalid value. (-O) integer from 0 to 60 expected"); exit(1); } break; case 'P': app.opt.parallel =strtoul(value, &tstr, 10); if (*tstr != '\0') { usage("Invalid value. Positive integer expected"); exit(1); } break; case 't': app.opt.timeDuration = strtoul(value, &tstr, 10); if((*tstr != '\0') || (app.opt.timeDuration == 0)){ usage("Invalid value \'-t\'. Positive integer expected"); exit(1); } break; case 'u': app.opt.udpTest = True; break; case 'W': app.opt.dynamicWindowSize = True; case 'w': if(app.opt.winset){ usage("Invalid args. Only one -w or -W may be set"); exit(1); } app.opt.winset++; if( !(tstr = strdup(value))){ I2ErrLog(eh, "strdup(): %M"); exit(1); } if(I2StrToByte(&app.opt.windowSize,tstr) != 0){ usage("Invalid value. (-w/-W) positive integer expected"); exit(1); } free(tstr); tstr = NULL; break; default: handled = False; } return handled; } static BWLBoolean handle_ping_test_arg(const char arg, const char *long_name, const char *value) { BWLBoolean handled = True; char *tstr; switch (arg) { case 'N': app.opt.ping_packet_count = strtoul(value,&tstr,10); if(*tstr != '\0') { usage("Invalid value. (-N) positive integer expected"); exit(1); } break; case 'i': app.opt.ping_interpacket_time = strtod(value,&tstr) * 1000; if((value == tstr) || (errno == ERANGE) || (app.opt.ping_interpacket_time < 0.0)){ usage("Invalid value. (-i) positive float expected"); exit(1); } break; case 'l': app.opt.ping_packet_size = strtoul(value,&tstr,10); if(*tstr != '\0') { usage("Invalid value. (-l) positive integer expected"); exit(1); } break; case 't': app.opt.ping_packet_ttl = strtoul(value,&tstr,10); if(*tstr != '\0') { usage("Invalid value. (-t) integer between 0 and 255 expected"); exit(1); } break; default: handled = False; } return handled; } static BWLBoolean handle_traceroute_test_arg(const char arg, const char *long_name, const char *value) { BWLBoolean handled = True; char *tstr; long v; switch (arg) { case 't': v = strtol(value,&tstr,10); if(*tstr != '\0' || v < 0) { usage("Invalid value. (-t) positive integer expected"); exit(1); } app.opt.timeDuration = v; break; case 'F': v = strtol(value,&tstr,10); if(*tstr != '\0' || v < 0 || v > 255) { usage("Invalid value. (-F) integer between 0 and 255 expected"); exit(1); } app.opt.traceroute_first_ttl = v; break; case 'l': v = strtol(value,&tstr,10); if(*tstr != '\0' || v < 0) { usage("Invalid value. (-l) positive integer expected"); exit(1); } app.opt.traceroute_packet_size = v; break; case 'M': v = strtol(value,&tstr,10); if(*tstr != '\0' || v < 0 || v > 255) { usage("Invalid value. (-M) integer between 0 and 255 expected"); exit(1); } app.opt.traceroute_last_ttl = v; break; default: handled = False; } return handled; } static void build_arguments(char *buf, struct option *options) { int i, buf_i, opt_i; buf_i = 0; opt_i = 0; // build the option string/list for(i = 0; bwctl_options[i].test_types != BWL_TEST_UNDEFINED; i++) { if (!(bwctl_options[i].test_types & test_type)) continue; // Add the long option options[opt_i] = bwctl_options[i].option; opt_i++; if (bwctl_options[i].option.val == 0) continue; // Add the short option buf[buf_i] = (char) bwctl_options[i].option.val; buf_i++; if (bwctl_options[i].option.has_arg == required_argument) { buf[buf_i] = ':'; buf_i++; } } buf[buf_i] = '\0'; options[opt_i].name = NULL; options[opt_i].has_arg = 0; options[opt_i].flag = 0; options[opt_i].val = 0; return; } int main( int argc, char **argv ) { int lockfd; char lockpath[PATH_MAX]; int rc; I2ErrLogSyslogAttr syslogattr; int fname_len; int ch; int opt_index; char opt_str[128]; struct option opt_list[128]; char cwd[PATH_MAX]; static char *posixly_correct="POSIXLY_CORRECT=True"; char dirpath[PATH_MAX]; struct flock flk; struct sigaction act; sigset_t sigs; double syncfuzz; BWLTestSpec test_options; I2Boolean prev_test_failed; /* * Make sure the signal mask is UNBLOCKING TERM/HUP/INT */ sigemptyset(&sigs); sigaddset(&sigs,SIGTERM); sigaddset(&sigs,SIGINT); sigaddset(&sigs,SIGHUP); sigaddset(&sigs,SIGALRM); sigaddset(&sigs,SIGCHLD); if(sigprocmask(SIG_UNBLOCK,&sigs,NULL) != 0){ I2ErrLog(eh,"sigprocmask(): %M"); exit(1); } if((progname = strrchr(argv[0], '/'))){ progname++; }else{ progname = *argv; } if (strcmp(progname, "bwping") == 0) { test_type = BWL_TEST_LATENCY; } else if (strcmp(progname, "bwtraceroute") == 0) { test_type = BWL_TEST_TRACEROUTE; } else { test_type = BWL_TEST_THROUGHPUT; } syslogattr.ident = progname; syslogattr.logopt = 0; syslogattr.facility = LOG_USER; syslogattr.priority = LOG_ERR; syslogattr.line_info = I2MSG; /* Set default options. */ memset(&app,0,sizeof(app)); app.opt.timeDuration = 10; app.opt.randomizeStart = 10; app.opt.savedir = getcwd(cwd, sizeof(cwd)); memset(&sessions[0],0,sizeof(sessions[0])); memset(&sessions[1],0,sizeof(sessions[1])); memset(&test_options,0,sizeof(test_options)); app.receiver_sess = &(sessions[0]); app.sender_sess = &(sessions[1]); /* * Fix getopt if the brain-dead GNU version is being used. */ if(putenv(posixly_correct) != 0){ fprintf(stderr,"Unable to set POSIXLY_CORRECT getopt mode"); exit(1); } // build the option string/list build_arguments(opt_str, opt_list); opt_index = 0; #if defined(HAVE_GETOPT_H) while((ch = getopt_long(argc, argv, opt_str, opt_list, &opt_index)) != -1){ #else while((ch = missing_getopt_long(argc, argv, opt_str, opt_list, &opt_index)) != -1){ #endif const char *long_name = opt_list[opt_index].name; opt_index = 0; if (handle_conn_arg(ch, long_name, optarg, argv, argc)) continue; if (handle_output_arg(ch, long_name, optarg)) continue; if (handle_misc_arg(ch, long_name, optarg)) continue; if (handle_scheduling_arg(ch, long_name, optarg)) continue; if (handle_generic_test_arg(ch, long_name, optarg, argv, argc)) continue; if (test_type == BWL_TEST_THROUGHPUT) { if (handle_throughput_test_arg(ch, long_name, optarg)) continue; } else if (test_type == BWL_TEST_TRACEROUTE) { if (handle_traceroute_test_arg(ch, long_name, optarg)) continue; } else if (test_type == BWL_TEST_LATENCY) { if (handle_ping_test_arg(ch, long_name, optarg)) continue; } usage(""); exit(0); } if(app.opt.verbose && app.opt.quiet){ fprintf(stderr,"Ignoring -q (-v specified)\n"); app.opt.quiet = False; } if(!app.opt.quiet){ syslogattr.logopt |= LOG_PERROR; } if(app.opt.verbose > 1){ syslogattr.logopt |= LOG_PID; syslogattr.line_info |= I2FILE | I2LINE; } /* * Start an error logging session for reporting errors to the * standard error */ eh = I2ErrOpen(progname, I2ErrLogSyslog, &syslogattr, NULL, NULL); if(! eh) { fprintf(stderr, "%s : Couldn't init error module\n", progname); exit(1); } if(app.opt.verbose){ fprintf(stderr, "Messages being sent to syslog(%s,%s)\n", I2ErrLogSyslogFacilityName(syslogattr.facility), I2ErrLogSyslogPriorityName(syslogattr.priority)); } /* * Initialize library with configuration functions. */ if( !(ctx = BWLContextCreate(eh, BWLInterruptIO, &ip_intr, BWLGetAESKey, getclientkey, NULL))){ fprintf(stderr, "Unable to initialize BWL library.\n"); exit(1); } /* * Currently mostly for daemon config options, but allowing this to * set defaults for the client could be nice. */ if( !LoadConfig(ctx)){ I2ErrLog(eh, "Unable to initialize configuration."); exit(1); } if(optind < argc) { usage(""); exit(1); } if(!app.receiver_sess->host && !app.sender_sess->host){ usage("At least one of -s or -c must be specified."); exit(1); } if(!app.receiver_sess->host) { if (!(app.receiver_sess->host = strdup("localhost"))){ I2ErrLog(eh,"malloc:%M"); exit(1); } app.receiver_sess->is_local = True; } if(!app.sender_sess->host) { if (!(app.sender_sess->host = strdup("localhost"))){ I2ErrLog(eh,"malloc:%M"); exit(1); } app.sender_sess->is_local = True; } app.sender_sess->is_receiver = False; app.receiver_sess->is_receiver = True; if (app.opt.flip_direction) { app.receiver_sess->is_client = True; app.client_sess = app.receiver_sess; app.server_sess = app.sender_sess; } else { app.sender_sess->is_client = True; app.client_sess = app.sender_sess; app.server_sess = app.receiver_sess; } app.opt.tool_ids[0] = BWL_TOOL_UNDEFINED; app.client_sess->require_endpoint = True; if (app.opt.allow_one_sided) { if (app.opt.verbose) { I2ErrLog(eh,"Server side does not require an endpoint"); } app.server_sess->require_endpoint = False; } else { app.server_sess->require_endpoint = True; } if (!app.opt.allow_one_sided && app.opt.tester_port) { I2ErrLog(eh,"--tester_port flag can only be used with --no_endpoint flag"); exit(1); } /* * -4/-6 sanity check */ if(app.opt.v4only && app.opt.v6only){ I2ErrLog(eh,"-4 and -6 flags cannot be used together."); exit(1); } if((app.opt.v4only) && !BWLContextConfigSet(ctx,BWLIPv4Only,(void*)True)){ I2ErrLog(eh,"BWLContextconfigSet(IPv4Only): %M"); exit(1); } if((app.opt.v6only) && !BWLContextConfigSet(ctx,BWLIPv6Only,(void*)True)){ I2ErrLog(eh,"BWLContextconfigSet(IPv6Only): %M"); exit(1); } /* * Useful constant */ zero64 = BWLULongToNum64(0); /* * Check savedir option. Make sure it will not make fnames * exceed PATH_MAX even with the nul byte. * Also set file_offset and ext_offset to the lengths needed. */ fname_len = BWL_TSTAMPCHARS + DIRECTION_EXT_LEN + strlen(BWL_FILE_EXT); assert((fname_len+1) PATH_MAX){ usage("-d: pathname too long."); exit(1); } strcpy(dirpath,app.opt.savedir); strcat(dirpath,BWL_PATH_SEPARATOR); }else{ dirpath[0] = '\0'; } /* * Possibly over-ride .bwctlrc allow_unsync and sync_fuzz options * with command-line. */ syncfuzz = app.opt.allowUnsync; /* * Set configurable constants for library */ if(app.opt.verbose){ BWLContextSetErrMask(ctx,BWLErrOK); } else{ BWLContextSetErrMask(ctx,BWLErrINFO); } if( !BWLContextConfigGetV(ctx,BWLAllowUnsync)){ if( !BWLContextConfigSet(ctx,BWLAllowUnsync,(syncfuzz != 0.0))){ I2ErrLog(eh,"BWLContextconfigSet(AllowUnsync): %M"); exit(1); } } if((syncfuzz != 0.0) && !BWLContextConfigSet(ctx,BWLSyncFuzz,syncfuzz)){ I2ErrLog(eh,"BWLContextconfigSet(SyncFuzz): %M"); exit(1); } if(getenv("BWCTL_DEBUG_CHILDWAIT")){ if( !BWLContextConfigSet(ctx,BWLChildWait,NOTNULL)){ I2ErrLog(eh,"BWLContextconfigSet(ChildWait): %M"); exit(1); } } /* * Initialize logging and clock issues, now that configuration complete. */ if( !BWLContextFinalize(ctx)){ I2ErrLog(eh,"BWLContextFinalize failed."); exit(1); } /* * Set default test parameters if they're not already set. */ if (test_type == BWL_TEST_TRACEROUTE) { if(!app.opt.timeDuration){ app.opt.timeDuration = 10; } } else if (test_type == BWL_TEST_LATENCY) { if(!app.opt.ping_packet_count){ app.opt.ping_packet_count = 10; } if(!app.opt.ping_interpacket_time){ app.opt.ping_interpacket_time = 1000; } app.opt.timeDuration = app.opt.ping_packet_count * (app.opt.ping_interpacket_time / 1000.0) + 5; } else { if(!app.opt.timeDuration){ app.opt.timeDuration = 10; } /* * UDP bandwidth checks. */ if(app.opt.udpTest && !app.opt.bandWidth){ app.opt.bandWidth = DEF_UDP_RATE; } if (!app.opt.tools) { app.opt.tools = strdup("iperf,iperf3,nuttcp"); } } if( !(rsrc = I2RandomSourceInit(eh,I2RAND_DEV,NULL))){ I2ErrLog(eh,"Failed to initialize Random Numbers"); exit(1); } if (app.opt.seriesInterval && app.opt.streaming) { usage("-I cannot be used with --streaming"); exit(1); } else if (app.opt.seriesInterval && app.opt.schedule) { usage("-I cannot be used with --schedule"); exit(1); } else if (app.opt.streaming && app.opt.schedule) { usage("--streaming cannot be used with --schedule"); exit(1); } /* * If seriesInterval is in use, verify the args and pick a * resonable default for seriesWindow if needed. */ if(app.opt.seriesInterval){ if(app.opt.seriesInterval < (app.opt.timeDuration + SETUP_ESTIMATE)){ usage("-I: interval too small relative to -t"); exit(1); } /* * If nIntervals not set, continuous tests are requested. */ if(!app.opt.nIntervals){ app.opt.continuous = True; } /* * Make sure tests start before 50% of the 'interval' is * gone. */ if(!app.opt.seriesWindow){ app.opt.seriesWindow = (uint32_t)MIN( app.opt.seriesInterval-app.opt.timeDuration, app.opt.seriesInterval * 0.5); } } else{ /* * Make sure tests start within 2 test durations. (But * no less than 5 minutes for the default.) */ if(!app.opt.seriesWindow){ app.opt.seriesWindow = MAX(app.opt.timeDuration * 2,600); } /* * If nIntervals not set, and streaming is not set * a single test is requested. */ if(!app.opt.nIntervals){ if(!app.opt.streaming && !app.opt.schedule) { app.opt.nIntervals = 1; } else { app.opt.continuous = True; } } } if (app.opt.tools) { int i; char *tool; char *tmp_str; i = 0; tmp_str = app.opt.tools; while((tool = strtok(tmp_str, ",")) != NULL) { tmp_str = NULL; if( (app.opt.tool_ids[i] = BWLToolGetID(ctx,tool)) == BWL_TOOL_UNDEFINED){ char buf[BWL_MAX_TOOLNAME + 20]; snprintf(buf,sizeof(buf)-1,"Invalid tool (-T): %s",tool); usage(buf); exit(1); } if( test_type != BWLToolGetTestTypesByID(ctx,app.opt.tool_ids[i]) ) { char buf[1024]; char *proper_cmd_name = "?"; if (BWLToolGetTestTypesByID(ctx,app.opt.tool_ids[i]) == BWL_TEST_TRACEROUTE) { proper_cmd_name = "bwtraceroute"; } else if (BWLToolGetTestTypesByID(ctx,app.opt.tool_ids[i]) == BWL_TEST_LATENCY) { proper_cmd_name = "bwping"; } else if (BWLToolGetTestTypesByID(ctx,app.opt.tool_ids[i]) == BWL_TEST_THROUGHPUT) { proper_cmd_name = "bwctl"; } snprintf(buf,sizeof(buf)-1,"Invalid tool (-T): %s. Tool should be used with %s",tool, proper_cmd_name); usage(buf); exit(1); } i++; } app.opt.tool_ids[i] = BWL_TOOL_UNDEFINED; } /* * Seed the RNG using the pid and the time since multiple bwctl instances * get started simultaneously, and we don't want them running in lockstep. */ srand( (unsigned) time(NULL) * getpid()); if (app.opt.schedule) { app.scheduler = get_scheduled_times_scheduler(app.opt.schedule, app.opt.randomizeStart); if (!app.scheduler) { I2ErrLog(eh,"Failed to initialize scheduler"); exit(1); } } else if (app.opt.streaming) { app.scheduler = get_streaming_scheduler(); if (!app.scheduler) { I2ErrLog(eh,"Failed to initialize scheduler"); exit(1); } } else { app.scheduler = get_regular_intervals_scheduler(app.opt.seriesInterval, app.opt.randomizeStart); if (!app.scheduler) { I2ErrLog(eh,"Failed to initialize scheduler"); exit(1); } } /* * Lock the directory for bwctl if it is in printfiles mode. */ if(app.opt.printfiles){ strcpy(lockpath,dirpath); strcat(lockpath,BWLOCK); lockfd = open(lockpath,O_RDWR|O_CREAT,S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); if(lockfd < 0){ I2ErrLog(eh,"open(%s): %M",lockpath); exit(1); } flk.l_start = 0; flk.l_len = 0; flk.l_type = F_WRLCK; flk.l_whence = SEEK_SET; while((rc = fcntl(lockfd,F_SETLK,&flk)) < 0 && errno == EINTR); if(rc < 0){ I2ErrLog(eh,"Unable to lock file %s: %M",lockpath); if(I2Readn(lockfd,&ch,sizeof(ch)) == sizeof(ch)){ I2ErrLog(eh,"Possibly locked by pid(%d)",ch); } exit(1); } ch = getpid(); if(I2Writen(lockfd,&ch,sizeof(ch)) != sizeof(ch)){ I2ErrLog(eh,"Unable to write to lockfile:%M"); exit(1); } } /* * Initialize session records */ /* skip req_time/latest_time - set per/test */ test_options.tool_id = BWL_TOOL_UNDEFINED; test_options.verbose = app.opt.verbose > 0 ? 1 : 0; test_options.duration = app.opt.timeDuration; test_options.outformat = app.opt.outformat; test_options.tos = app.opt.tos; if (app.opt.flip_direction) { test_options.server_sends = True; } if (test_type == BWL_TEST_TRACEROUTE) { test_options.traceroute_udp = app.opt.traceroute_udp; test_options.traceroute_packet_size = app.opt.traceroute_packet_size; test_options.traceroute_first_ttl = app.opt.traceroute_first_ttl; test_options.traceroute_last_ttl = app.opt.traceroute_last_ttl; } else if (test_type == BWL_TEST_LATENCY) { test_options.ping_packet_count = app.opt.ping_packet_count; test_options.ping_packet_size = app.opt.ping_packet_size; test_options.ping_packet_ttl = app.opt.ping_packet_ttl; test_options.ping_interpacket_time = app.opt.ping_interpacket_time; } else { test_options.udp = app.opt.udpTest; test_options.bandwidth = app.opt.bandWidth; test_options.window_size = (uint32_t)app.opt.windowSize; if(app.opt.windowSize != (I2numT)test_options.window_size){ test_options.window_size = (uint32_t)~0; I2ErrLog(eh,"Requested -w/-W option (%llu) too large: max supported size: (%llu)",app.opt.windowSize,test_options.window_size); exit(1); } test_options.dynamic_window_size = app.opt.dynamicWindowSize; test_options.len_buffer = (uint32_t)app.opt.lenBuffer; if(app.opt.lenBuffer != (I2numT)test_options.len_buffer){ test_options.len_buffer = (uint32_t)~0; I2ErrLog(eh,"Requested -l option (%llu) too large: max supported size: (%llu)",app.opt.lenBuffer,test_options.len_buffer); exit(1); } test_options.report_interval = app.opt.reportInterval; test_options.units = app.opt.units; test_options.omit = app.opt.timeOmit; test_options.parallel_streams = app.opt.parallel; } /* * setup sighandlers */ ip_chld = ip_reset = ip_exit = 0; act.sa_handler = sig_catch; sigemptyset(&act.sa_mask); act.sa_flags = SA_NOCLDSTOP; if( (sigaction(SIGCHLD,&act,NULL) != 0) || (sigaction(SIGTERM,&act,NULL) != 0) || (sigaction(SIGALRM,&act,NULL) != 0) || (sigaction(SIGINT,&act,NULL) != 0) || (sigaction(SIGHUP,&act,NULL) != 0)){ I2ErrLog(eh,"sigaction(): %M"); exit(1); } sigemptyset(&act.sa_mask); act.sa_flags = 0; act.sa_handler = SIG_IGN; if( (sigaction(SIGPIPE,&act,NULL) != 0)){ I2ErrLog(eh,"sigaction(): %M"); exit(1); } prev_test_failed = False; while(app.opt.continuous || app.opt.nIntervals) { app.opt.nIntervals--; if(sig_check()){ exit_val = 1; goto finish; } if (!wait_for_next_test(prev_test_failed)) { goto finish; } prev_test_failed = True; /* * Check if NTP is synchronized, and if not, verify that we're running * allow_unsync. If not, wait until the next test interval to see if * we're synchronized then. */ if (BWLNTPIsSynchronized(ctx) == False) { if( !BWLContextConfigGetV(ctx,BWLAllowUnsync)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"NTP is unsynchronized. Skipping test. Use -a to run anyway."); goto next_test; } } if (!establish_connection(app.receiver_sess, app.sender_sess)) { if (exit_val) goto finish; else goto next_test; } if (!establish_connection(app.sender_sess, app.receiver_sess)) { if (exit_val) goto finish; else goto next_test; } if (!negotiate_test(app.server_sess, app.client_sess, &test_options)) { if (exit_val) goto finish; else goto next_test; } if (!setup_results_storage(app.server_sess)) { if (exit_val) goto finish; else goto next_test; } if (!setup_results_storage(app.client_sess)) { if (exit_val) goto finish; else goto next_test; } if (!start_testing(app.server_sess, app.client_sess)) { if (exit_val) goto finish; else goto next_test; } if (!wait_for_results()) { if (exit_val) goto finish; else goto next_test; } if (!display_results(app.server_sess)) { if (exit_val) goto finish; else goto next_test; } if (!display_results(app.client_sess)) { if (exit_val) goto finish; else goto next_test; } prev_test_failed = False; next_test: if(sig_check()){ exit_val = 1; goto finish; } // Close the session between runs CloseSessions(); } finish: CloseSessions(); BWLContextFree(ctx); ctx = NULL; exit(exit_val); } static BWLBoolean establish_connection(ipsess_t current_sess, ipsess_t other_sess) { BWLErrSeverity err_ret = BWLErrOK; char *host_address; char temp[1024]; if (current_sess->cntrl) { return True; } if (current_sess->is_local) { current_sess->fake_daemon = False; host_address = BWLDiscoverSourceAddr(ctx, other_sess->host, NULL, temp, sizeof(temp)); if (!host_address) { I2ErrLog(eh, "Couldn't figure out address to use to connect to %s", other_sess->host); goto error_exit; } } else if (BWLIsInterface(current_sess->host)) { current_sess->fake_daemon = False; host_address = BWLDiscoverSourceAddr(ctx, other_sess->host, current_sess->host, temp, sizeof(temp)); if (!host_address) { I2ErrLog(eh, "Couldn't figure out address to use to connect to %s", other_sess->host); goto error_exit; } } else { host_address = current_sess->host; } current_auth = ((current_sess->auth)?current_sess->auth:app.def_auth); /* * If the session host is specified, a bwctld * process is required. */ current_sess->cntrl = BWLControlOpen(ctx, app.opt.srcaddr, I2AddrByNode(eh,host_address), ((current_auth)? current_auth->auth_mode: BWL_MODE_OPEN), ((current_auth)? current_auth->identity:NULL), NULL,¤t_sess->avail_tools,&err_ret); if(sig_check()){ exit_val = 1; goto error_exit; } if(!current_sess->cntrl) { if(current_sess->is_local){ /* * No local daemon - spawn something. */ if (app.opt.verbose) { I2ErrLog(eh, "Unable to contact a local bwctld: Spawning local tool controller"); } if( !(current_sess->cntrl = spawn_local_server(ctx,current_sess,¤t_sess->avail_tools))){ I2ErrLog(eh,"Unable to spawn local tool controller"); } } else if (current_sess->require_endpoint == False) { if (app.opt.verbose) { I2ErrLog(eh,"Spawning endpoint to handle remote side"); } if( !(current_sess->cntrl = spawn_local_server(ctx,current_sess,¤t_sess->avail_tools))){ I2ErrLog(eh,"Unable to spawn local tool controller"); } } } if(sig_check()){ exit_val = 1; goto error_exit; } if(!current_sess->cntrl){ I2ErrLog(eh,"Unable to connect to %s",host_address); goto error_exit; } /* * Get sockfd for later 'select' usage */ current_sess->sockfd = BWLControlFD(current_sess->cntrl); /* * Query time error and update round-trip bound. */ if(BWLControlTimeCheck(current_sess->cntrl,¤t_sess->host_time) != BWLErrOK){ I2ErrLogP(eh,errno,"BWLControlTimeCheck: %M"); goto error_exit; } if(sig_check()){ exit_val = 1; goto error_exit; } current_sess->rttbound = BWLGetRTTBound(current_sess->cntrl); BWLSetTimeStampError(¤t_sess->host_time, BWLNum64Add(current_sess->rttbound, BWLGetTimeStampError(¤t_sess->host_time) ) ); return True; error_exit: return False; } static I2Addr get_session_address(ipsess_t current_sess, ipsess_t other_sess) { I2Addr address; char *session_address; char buf[1024]; if (current_sess->is_local) { session_address = BWLDiscoverSourceAddr(ctx, other_sess->host, NULL, buf, sizeof(buf)); } else if (BWLIsInterface(current_sess->host)) { session_address = BWLDiscoverSourceAddr(ctx, other_sess->host, current_sess->host, buf, sizeof(buf)); } else { session_address = current_sess->host; } if (!session_address) { I2ErrLog(eh,"Couldn't figure out address to use to connect to %s as %s.", other_sess->host, (current_sess->is_client?"client":"server")); return NULL; } address = I2AddrByNode(eh, session_address); if (BWLAddrIsLoopback(address)) { session_address = BWLDiscoverSourceAddr(ctx, other_sess->host, NULL, buf, sizeof(buf)); I2ErrLog(eh,"Hostname '%s' resolves to a loopback address, using %s instead.", current_sess->host, session_address); address = I2AddrByNode(eh, session_address); } if (app.opt.verbose) { I2ErrLog(eh,"Using %s as the address for %s %s", session_address, (current_sess->is_local?"local":"remote"), (current_sess->is_receiver?"receiver":"sender")); } return address; } static BWLBoolean negotiate_test(ipsess_t server_sess, ipsess_t client_sess, BWLTestSpec *test_options) { BWLToolAvailability common_tools; BWLNum64 time_offset; BWLTimeStamp req_time; BWLErrSeverity err_ret = BWLErrOK; uint16_t recv_port = 0; BWLSID sid; BWLAcceptType acceptval; test_options->client = get_session_address(client_sess, server_sess); test_options->server = get_session_address(server_sess, client_sess); if(!test_options->client){ I2ErrLog(eh,"Unable to determine client address: %M"); exit_val = 1; goto error_exit; } if(!test_options->server){ I2ErrLog(eh,"Unable to determine server address: %M"); exit_val = 1; goto error_exit; } /* Pick tool */ /* Check if the requested tool is available at both servers. */ common_tools = BWLToolGetCommonTools(ctx, client_sess->avail_tools, server_sess->avail_tools, test_type); if(!common_tools){ I2ErrLog(eh,"No tools in common"); goto error_exit; } if (app.opt.verbose) { I2ErrLog( eh, "Available in-common: %s", BWLToolGetToolNames( ctx, common_tools ) ); } if ( app.opt.tool_ids[0] == BWL_TOOL_UNDEFINED ) { uint32_t tid; const char *req_name; /* Pick the first common tool to use. */ tid = 1; for ( tid = 1; tid > 0; tid <<= 1 ) { if (!( tid & common_tools )) continue; if (BWLToolValidateTest(ctx, tid, *test_options) == False) { if (app.opt.verbose) { I2ErrLog( eh, "Skipping %s because it doesn't support the requested options", BWLToolGetNameByID( ctx, tid )); } continue; } if ( tid & common_tools ) break; } test_options->tool_id = tid; req_name = BWLToolGetNameByID( ctx, test_options->tool_id ); I2ErrLog( eh, "Using tool: %s", req_name ); } else { const char *req_name; int i; for( i = 0; app.opt.tool_ids[i] != BWL_TOOL_UNDEFINED; i++ ) { if (!( app.opt.tool_ids[i] & common_tools )) continue; if (BWLToolValidateTest(ctx, app.opt.tool_ids[i], *test_options) == False) { if (app.opt.verbose) { I2ErrLog( eh, "Skipping %s because it doesn't support the requested options", BWLToolGetNameByID( ctx, app.opt.tool_ids[i] )); } common_tools &= ~(app.opt.tool_ids[i]); continue; } test_options->tool_id = app.opt.tool_ids[i]; req_name = BWLToolGetNameByID( ctx, test_options->tool_id ); I2ErrLog( eh, "Using tool: %s", req_name ); break; } if ( test_options->tool_id == BWL_TOOL_UNDEFINED ) { I2ErrLog( eh, "Requested tools supporting the requested options not available by both servers. See the \'-T\' option" ); I2ErrLog( eh, "Available tools that support the requested options: %s", BWLToolGetToolNames( ctx, common_tools ) ); goto error_exit; } } // now that the tool has been selected, if the user wants the parsable // format, select it. if (app.opt.parsable) { test_options->outformat = BWLToolGetParsableFormatByID(ctx, test_options->tool_id ); } else { test_options->outformat = app.opt.outformat; } /* * Now caluculate how far into the future the test * request should be made for. * * The protocol messages that must happen are: * client -> first request * client -> first start * client -> second request * client -> second start * Then, there are 3 round trips between the server systems * for a peer connection setup. In the worst case, the * server two server rtt can be estimated as the sum of * the client->first and client->second rtts. So, we would * expect the amount of time required to setup a test to * be (rtt(c->first)+rtt(c->second))x7. * */ /* initialize */ time_offset = BWLNum64Mult( BWLNum64Add(client_sess->rttbound,server_sess->rttbound), BWLULongToNum64(7)); /* * Add a small constant value to this... Will need to experiment * to find the right number. All the previous values were * basically estimates for how long it would take to make * the request. This is roughly the time into the future we * want to make the request for above and beyond the amount * of time it takes to actually make the request. It should * be short enough to not be annoying for interactive use, but * long enough to account for most random delays. * (The larger this value is, the more likely the two servers * will be able to accomidate the request initially - the * smaller, the more TestRequests will probably need to be made. * ) * TODO: Come up with a *real* value here! * (Actually - make this an option?) */ time_offset = BWLNum64Add(time_offset,BWLDoubleToNum64(.25)); /* * Wait this long after a test should be complete before * poking the servers. It should be long enough to allow * the servers to declare the session complete before the * client does. * (Again 1 seconds is just a guess - I'm making a lot of * guesses due to time constrants. If these values cause * problems they can be revisited.) */ fuzz64 = BWLNum64Add(BWLULongToNum64(1), BWLNum64Max(client_sess->rttbound,server_sess->rttbound)); /* * req_time currently holds a reasonable relative amount of * time from 'now' that a test could be held. Get the current * time and add to make that an 'absolute' value. */ if(!BWLGetTimeStamp(ctx,&req_time)){ I2ErrLogP(eh,errno,"BWLGetTimeOfDay: %M"); goto error_exit; } req_time.tstamp = BWLNum64Add(req_time.tstamp, time_offset); /* * Get a reservation: * s[0] == server * s[1] == client * initialize req_time/latest_time * keep querying each server in turn until satisfied, * or denied. */ test_options->latest_time = BWLNum64Add(req_time.tstamp, BWLULongToNum64(app.opt.seriesWindow)); memset(sid,0,sizeof(sid)); if(app.opt.verbose > 1){ I2ErrLog(eh,"Requested Time: %lf", BWLNum64ToTimestampDouble(req_time.tstamp)); I2ErrLog(eh,"Latest Acceptable Time: %lf", BWLNum64ToTimestampDouble(test_options->latest_time)); } memcpy(&client_sess->tspec,test_options,sizeof(*test_options)); memcpy(&server_sess->tspec,test_options,sizeof(*test_options)); if (server_sess->fake_daemon && !server_sess->is_local) { client_sess->tspec.no_server_endpoint = True; server_sess->tspec.no_server_endpoint = True; } /* * Since we are doing a third party test, the "time" we're sending to each * host theoretically corresponds to the time from the other host, meaning * the timestamp error we send with each request should be the timestamp * error from the other host. */ BWLSetTimeStampError(&client_sess->tspec.req_time, BWLGetTimeStampError(&server_sess->host_time)); BWLSetTimeStampError(&server_sess->tspec.req_time, BWLGetTimeStampError(&client_sess->host_time)); client_sess->session_requested = False; server_sess->session_requested = False; do { server_sess->tspec.req_time.tstamp = req_time.tstamp; if (!negotiate_individual_test(server_sess, sid, &req_time, &recv_port)) { goto error_exit; } if(sig_check()){ exit_val = 1; goto error_exit; } if(app.opt.verbose){ I2ErrLog(eh, "Server \'%s\' accepted test request at time %lf", server_sess->host, BWLNum64ToTimestampDouble(req_time.tstamp)); } if (!client_sess->session_requested || BWLNum64Cmp(client_sess->tspec.req_time.tstamp, server_sess->tspec.req_time.tstamp) != 0) { client_sess->tspec.req_time.tstamp = req_time.tstamp; if (client_sess->tspec.no_server_endpoint) { // If they've specified a port, use that. Otherwise, default to // whatever the default port is for the given tester. if (app.opt.tester_port) { recv_port = app.opt.tester_port; } else { recv_port = BWLToolStandardTesterPortByID(ctx, client_sess->tspec.tool_id); } } if (!negotiate_individual_test(client_sess, sid, &req_time, &recv_port)) { goto error_exit; } if(sig_check()){ exit_val = 1; goto error_exit; } if(app.opt.verbose){ I2ErrLog(eh, "Client \'%s\' accepted test request at time %lf", client_sess->host, BWLNum64ToTimestampDouble(req_time.tstamp)); } } if (app.opt.verbose) { if (BWLNum64Cmp(client_sess->tspec.req_time.tstamp, server_sess->tspec.req_time.tstamp) != 0) { I2ErrLog(eh, "Tests accepted at different times re-requesting test with new time"); } } } while (BWLNum64Cmp(client_sess->tspec.req_time.tstamp, server_sess->tspec.req_time.tstamp) != 0); return True; error_exit: if (client_sess->session_requested) { I2ErrLog(eh, "Cancelling requested test for %s", client_sess->host); client_sess->tspec.req_time.tstamp = zero64; if(!BWLSessionRequest( client_sess->cntrl, client_sess->is_client, &client_sess->tspec, &req_time, &recv_port, sid, &acceptval, &err_ret)){ I2ErrLog(eh, "Problem cancelling requested test for \'%s\'", client_sess->host); } } if (server_sess->session_requested) { I2ErrLog(eh, "Cancelling requested test for %s", server_sess->host); server_sess->tspec.req_time.tstamp = zero64; if(!BWLSessionRequest( server_sess->cntrl, server_sess->is_client, &server_sess->tspec, &req_time, &recv_port, sid, &acceptval, &err_ret)){ I2ErrLog(eh, "Problem cancelling requested test for \'%s\'", server_sess->host); } } return False; } static BWLBoolean negotiate_individual_test(ipsess_t sess, BWLSID sid, BWLTimeStamp *req_time, uint16_t *recv_port) { BWLErrSeverity err_ret = BWLErrOK; BWLAcceptType acceptval = BWL_CNTRL_ACCEPT; // presume that the request time is right /* * Make the request */ if(!BWLSessionRequest(sess->cntrl,sess->is_client, &sess->tspec,req_time,recv_port, sid,&acceptval,&err_ret)){ /* * Session was not accepted. */ /* * If control connection is not ok... */ if(err_ret != BWLErrOK){ I2ErrLog(eh, "SessionRequest Control connection failure for \'%s\'. Skipping...", sess->host); } else if(acceptval == BWL_CNTRL_UNSUPPORTED) { I2ErrLog(eh,"SessionRequest: Requested test options unsupported by %s", sess->host); } else if(req_time->tstamp != zero64){ /* * Request is ok, but server * is too busy. Skip this test * and proceed to next session * interval. */ I2ErrLog(eh,"SessionRequest: %s busy. (Try -L flag): %d", sess->host, err_ret); } else{ /* * Don't know why it was * denied. */ I2ErrLog(eh,"SessionRequest: Denied by %s", sess->host); } goto error_exit; } if(sig_check()){ exit_val = 1; goto error_exit; } sess->session_requested = True; if(app.opt.verbose > 1){ I2ErrLog(eh,"Reservation(%s): %lf",sess->host, BWLNum64ToTimestampDouble(req_time->tstamp)); } if(BWLNum64Cmp(req_time->tstamp, sess->tspec.latest_time) > 0){ I2ErrLog(eh, "SessionRequest: \'%s\' returned bad reservation time", sess->host); goto error_exit; } /* save new time for res */ sess->tspec.req_time.tstamp = req_time->tstamp; return True; error_exit: return False; } static BWLBoolean wait_for_next_test(BWLBoolean prev_test_failed) { struct timespec sleep_time; struct timespec remaining_time; int retval; app.scheduler->get_next_runtime(app.scheduler, &sleep_time, prev_test_failed); /* * If the next period is more than 3 seconds from * now, say something. */ if(!app.opt.quiet && sleep_time.tv_sec > 3){ BWLError(ctx,BWLErrINFO,BWLErrUNKNOWN, "%lu seconds until next testing period", sleep_time.tv_sec); } while ((retval = nanosleep(&sleep_time, &remaining_time)) && errno == EINTR) { if(sig_check()){ exit_val = 1; goto error_exit; } sleep_time = remaining_time; } if (retval < 0) { BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"nanosleep(): %M"); goto error_exit; } return True; error_exit: return False; } static BWLBoolean start_testing(ipsess_t server_sess, ipsess_t client_sess) { uint16_t dataport; /* Start server */ if(BWLStartSession(server_sess->cntrl,&dataport) < BWLErrINFO){ I2ErrLog(eh,"BWLStartSessions: Failed"); goto error_exit; } if(sig_check()){ exit_val = 1; goto error_exit; } /* Start client */ if(BWLStartSession(client_sess->cntrl,&dataport) < BWLErrINFO){ I2ErrLog(eh,"BWLStartSessions: Failed"); goto error_exit; } if(sig_check()){ exit_val = 1; goto error_exit; } return True; error_exit: return False; } static BWLBoolean wait_for_results() { struct timeval reltime; BWLNum64 endtime; BWLTimeStamp currtime; BWLAcceptType atype; BWLErrSeverity err_ret; endtime = app.client_sess->tspec.req_time.tstamp; endtime = BWLNum64Add(endtime, BWLULongToNum64(app.client_sess->tspec.duration)); endtime = BWLNum64Add(endtime, BWLULongToNum64(app.client_sess->tspec.omit)); endtime = BWLNum64Add(endtime,fuzz64); /* * WaitForStopSessions */ if(!BWLGetTimeStamp(ctx,&currtime)){ I2ErrLogP(eh,errno,"BWLGetTimeOfDay: %M"); goto error_exit; } BWLNum64ToTimeval(&reltime, BWLNum64Sub(endtime,currtime.tstamp)); if(!app.opt.quiet){ BWLError(ctx,BWLErrINFO,BWLErrUNKNOWN, "%lu seconds until test results available", reltime.tv_sec); } while(1){ int rc; fd_set readfds,exceptfds; FD_ZERO(&readfds); FD_SET(app.client_sess->sockfd,&readfds); FD_SET(app.server_sess->sockfd,&readfds); exceptfds = readfds; /* * Wait until endtime, or until one of the sockets * is readable. */ rc = select(MAX(app.client_sess->sockfd,app.server_sess->sockfd)+1, &readfds,NULL,&exceptfds,&reltime); if(!BWLGetTimeStamp(ctx,&currtime)){ I2ErrLogP(eh,errno,"BWLGetTimeOfDay: %M"); goto error_exit; } BWLNum64ToTimeval(&reltime, BWLNum64Sub(endtime,currtime.tstamp)); if(sig_check()){ exit_val = 1; goto error_exit; } if(rc > 0 || BWLNum64Cmp(currtime.tstamp, endtime) >= 0){ /* * Either One of the sockets is readable. (Any i/o on either of * these sockets indicates it is time to terminate the test.) Or * we've run out of time. */ break; } } /* * Send TerminateSession */ // Set an alarm so that the client doesn't hang waiting for results ip_alrm = 0; alarm(60); atype = BWL_CNTRL_ACCEPT; if( (err_ret =BWLEndSession(app.client_sess->cntrl, &ip_intr,&atype,app.client_sess->results_fp)) < BWLErrWARNING){ goto error_exit; } if(atype != BWL_CNTRL_ACCEPT && app.client_sess->results_fp){ fprintf(app.client_sess->results_fp,"bwctl: Session ended abnormally\n"); } app.client_sess->session_requested = False; if(sig_check()){ exit_val = 1; goto error_exit; } // Set an alarm so that the client doesn't hang waiting for results ip_alrm = 0; alarm(60); atype = BWL_CNTRL_ACCEPT; if( (err_ret =BWLEndSession(app.server_sess->cntrl, &ip_intr,&atype,app.server_sess->results_fp)) < BWLErrWARNING){ goto error_exit; } if(atype != BWL_CNTRL_ACCEPT && app.server_sess->results_fp){ fprintf(app.server_sess->results_fp,"bwctl: Session ended abnormally\n"); } app.server_sess->session_requested = False; // unset the timeout alarm(0); return True; error_exit: if(ip_alrm) { BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Timed out waiting for results"); } return False; } static BWLBoolean setup_results_storage(ipsess_t sess) { BWLTestSideData test_results_side = BWLToolGetResultsSideByID(ctx, sess->tspec.tool_id, &(sess->tspec)); if (app.opt.bidirectional_results || (test_results_side == BWL_DATA_ON_CLIENT && sess->is_client) || (test_results_side == BWL_DATA_ON_SERVER && !sess->is_client && !sess->tspec.no_server_endpoint) || (test_results_side == BWL_DATA_ON_SERVER && sess->is_client && sess->tspec.no_server_endpoint)) { if(app.opt.printfiles){ char dirpath[PATH_MAX]; uint32_t file_offset,ext_offset; strcpy(dirpath,app.opt.savedir); strcat(dirpath,BWL_PATH_SEPARATOR); file_offset = strlen(dirpath); ext_offset = file_offset + BWL_TSTAMPCHARS; strcpy(sess->results_fname,dirpath); sprintf(&sess->results_fname[file_offset],BWL_TSTAMPFMT, (unsigned long long)sess->tspec.req_time.tstamp); if(sess->is_receiver) { sprintf(&sess->results_fname[ext_offset],"%s%s", RECV_EXT,BWL_FILE_EXT); } else { sprintf(&sess->results_fname[ext_offset],"%s%s", SEND_EXT,BWL_FILE_EXT); } if(!(sess->results_fp = fopen(sess->results_fname,"w"))){ I2ErrLog(eh,"Unable to write to %s %M", sess->results_fname); goto error_exit; } } else { if(!(sess->results_fp = tmpfile())){ I2ErrLog(eh,"Unable to create temporary file"); goto error_exit; } } } return True; error_exit: return False; } static BWLBoolean display_results(ipsess_t sess) { if (sess->results_fp) { if(app.opt.printfiles){ fflush(sess->results_fp); fclose(sess->results_fp); fprintf(stdout,"%s\n",sess->results_fname); fflush(stdout); } else { char tmpbuf[1024]; int n; if (sess->is_receiver) { fprintf(stdout,"\nRECEIVER START\n"); } else { fprintf(stdout,"\nSENDER START\n"); } fseek(sess->results_fp, SEEK_SET, 0); while((n = fread(tmpbuf, 1, sizeof(tmpbuf), sess->results_fp)) > 0) { fwrite(tmpbuf, n, 1, stdout); } if (sess->is_receiver) { fprintf(stdout,"\nRECEIVER END\n"); } else { fprintf(stdout,"\nSENDER END\n"); } } sess->results_fp = NULL; sess->results_fname[0] = '\0'; } return True; error_exit: return False; } static Scheduler *get_streaming_scheduler() { Scheduler *schedule; schedule = calloc(1, sizeof(Scheduler)); if (!schedule) { return NULL; } schedule->get_next_runtime = streaming_scheduler_get_next_runtime; return schedule; } static Scheduler *get_regular_intervals_scheduler(uint32_t interval, uint32_t randomize_start) { Scheduler *schedule; RegularIntervalsSchedule *regular_intervals_schedule; schedule = calloc(1, sizeof(Scheduler)); if (!schedule) goto error_exit; regular_intervals_schedule = calloc(1, sizeof(RegularIntervalsSchedule)); if (!regular_intervals_schedule) goto error_exit_schedule; regular_intervals_schedule->interval = interval; regular_intervals_schedule->randomize_start = randomize_start; schedule->get_next_runtime = regular_intervals_scheduler_get_next_runtime; schedule->private = regular_intervals_schedule; return schedule; error_exit_schedule: free(schedule); error_exit: return NULL; } static Scheduler *get_scheduled_times_scheduler(const char *time_schedule, uint32_t randomize_start) { Scheduler *schedule; ScheduledTimesSchedule *scheduled_times_schedule; schedule = calloc(1, sizeof(Scheduler)); if (!schedule) goto error_exit; scheduled_times_schedule = calloc(1, sizeof(ScheduledTimesSchedule)); if (!scheduled_times_schedule) goto error_exit_scheduled_times; if (parse_time_schedule(time_schedule, &(scheduled_times_schedule->times), &(scheduled_times_schedule->num_times)) == False) goto error_exit_schedule; schedule->get_next_runtime = scheduled_times_scheduler_get_next_runtime; schedule->private = scheduled_times_schedule; return schedule; error_exit_scheduled_times: free(scheduled_times_schedule); error_exit_schedule: free(schedule); error_exit: return NULL; } static BWLBoolean parse_time_schedule(const char *schedule, struct tm **times, int *num_times) { char temp_str[1024]; char *time; char *temp; int i, n; struct tm *ret_times; strncpy(temp_str, schedule, sizeof(temp_str) - 1); n = 0; time = strtok_r(temp_str, ",", &temp); while (time != NULL) { char *ret_str; struct tm wildcard_tm; ret_str = strptime(time, "*:%M", &wildcard_tm); if (ret_str != NULL && *ret_str == '\0') { n += 24; // a wildcard slot, add 24 entries } else { n++; // not a wildcard slot, just add 1 entry } time = strtok_r(NULL, ",", &temp); } if (n <= 0) { I2ErrLog(eh, "No times specified in schedule"); goto error_out; } ret_times = calloc(n, sizeof(struct tm)); if (!ret_times) { I2ErrLog(eh, "Problem allocating schedule"); goto error_out; } strncpy(temp_str, schedule, sizeof(temp_str) - 1); for(i = 0, time = strtok_r(temp_str, ",", &temp); time != NULL; i++, time = strtok_r(NULL, ",", &temp)) { char *ret_str; ret_str = strptime(time, "*:%M", &(ret_times[i])); if (ret_str != NULL && *ret_str == '\0') { int hour; // add 24 hours worth of time specs to the queue for(hour = 0; hour <= 23; hour++, i++) { strptime(time, "*:%M", &(ret_times[i])); ret_times[i].tm_hour = hour; } // push back the i pointer since it will be incremented by the // outer for loop. i--; continue; } ret_str = strptime(time, "%H:%M:%S", &(ret_times[i])); if (ret_str != NULL && *ret_str == '\0') continue; ret_str = strptime(time, "%H:%M", &(ret_times[i])); if (ret_str != NULL && *ret_str == '\0') continue; ret_str = strptime(time, "%H", &(ret_times[i])); if (ret_str != NULL && *ret_str == '\0') continue; I2ErrLog(eh, "Invalid time specification: %s", time); goto error_out_tm; } *num_times = n; *times = ret_times; return True; error_out_tm: free(ret_times); error_out: return False; } // streaming doesn't wait static BWLBoolean streaming_scheduler_get_next_runtime(Scheduler *scheduler, struct timespec *tspec, BWLBoolean prev_test_failed) { if (prev_test_failed) { tspec->tv_nsec = 0; tspec->tv_sec = 60; } else { tspec->tv_nsec = 0; tspec->tv_sec = 0; } return True; } static BWLBoolean regular_intervals_scheduler_get_next_runtime(Scheduler *scheduler, struct timespec *tspec, BWLBoolean prev_test_failed) { RegularIntervalsSchedule *schedule = scheduler->private; double r, alpha; double wait_time; time_t curr_time; curr_time = time(NULL); r = ((double) rand() / (RAND_MAX)); alpha = schedule->interval * schedule->randomize_start / 100.0; if (schedule->last_run_time == 0) { wait_time = alpha * r; } else { wait_time = schedule->interval - alpha + 2 * r * alpha; wait_time -= difftime(curr_time, schedule->last_run_time); } if (wait_time <= 0) { tspec->tv_sec = 0; tspec->tv_nsec = 0; } else { tspec->tv_sec = (long) wait_time; tspec->tv_nsec = (wait_time / 1000000); } schedule->last_run_time = curr_time + tspec->tv_sec; return True; } static BWLBoolean scheduled_times_scheduler_get_next_runtime(Scheduler *scheduler, struct timespec *tspec, BWLBoolean prev_test_failed) { ScheduledTimesSchedule *schedule = scheduler->private; time_t curr_time; struct tm now; int i; double min_diff; curr_time = time(NULL); localtime_r(&curr_time, &now); min_diff = -1; for(i = 0; i < schedule->num_times; i++) { double diff; struct tm schedule_time; schedule_time = now; schedule_time.tm_hour = schedule->times[i].tm_hour; schedule_time.tm_min = schedule->times[i].tm_min; schedule_time.tm_sec = schedule->times[i].tm_sec; diff = difftime(mktime(&schedule_time), curr_time); if (diff < 0) { diff += 86400; // add a day for times that have already passed } if (diff < min_diff || min_diff == -1) min_diff = diff; } tspec->tv_sec = (int) min_diff; tspec->tv_nsec = 0; return True; } bwctl_1.5.4+dfsg1.orig/bwctl/Makefile.am0000664000076500007710000000350012560414557014764 0ustar # # $Id$ # ######################################################################### # # # Copyright (C) 2003 # # Internet2 # # All Rights Reserved # # # ######################################################################### # # File: Makefile.am # # Author: Jeff Boote # Internet2 # # Date: Fri Sep 12 13:33:27 MDT 2003 # # Description: bin_PROGRAMS = bwctl bwctl_SOURCES = bwctl.c bwctlP.h bwctl_CFLAGS = -I.. if TOOL_THRULAY if USE_SYS_THRULAY BWLIBTHRULAY = -lthrulay else BWLIBTHRULAY = ../thrulay/thrulay/libthrulay.la endif else BWLIBTHRULAY = endif bwctl_LDADD = -L../bwlib -lbwlib $(BWLIBTHRULAY) -lI2util bwctl_LINKS = bwtraceroute$(exeext) bwping$(exeext) bwtraceroute$(exeext): bwctl$(exeext) @if test -f $@; then $(RM) $@; fi; \ $(LN_S) bwctl $@; bwping$(exeext): bwctl$(exeext) @if test -f $@; then $(RM) $@; fi; \ $(LN_S) bwctl $@; all-local: $(bwctl_LINKS) CLEANFILES = $(bwctl_LINKS) # # Someday perhaps this will be generated by automake... # install-exec-hook: @cd $(DESTDIR)$(bindir) && \ if test -f bwctl; then \ for l in $(bwctl_LINKS); do \ if test -f $$l; then $(RM) $$l; fi; \ echo "$(LN_S) $(DESTDIR)$(bindir)/bwctl $(DESTDIR)$(bindir)/$$l"; \ $(LN_S) bwctl $$l; \ done; \ fi # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # bwctl_1.5.4+dfsg1.orig/bwctl/Makefile.in0000664000076500007710000004620012560414557015001 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$ # ######################################################################### # # # Copyright (C) 2003 # # Internet2 # # All Rights Reserved # # # ######################################################################### # # File: Makefile.am # # Author: Jeff Boote # Internet2 # # Date: Fri Sep 12 13:33:27 MDT 2003 # # Description: 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@ bin_PROGRAMS = bwctl$(EXEEXT) subdir = bwctl DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/c-attribute.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/bwlib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_bwctl_OBJECTS = bwctl-bwctl.$(OBJEXT) bwctl_OBJECTS = $(am_bwctl_OBJECTS) @TOOL_THRULAY_TRUE@@USE_SYS_THRULAY_FALSE@am__DEPENDENCIES_1 = ../thrulay/thrulay/libthrulay.la bwctl_DEPENDENCIES = $(am__DEPENDENCIES_1) bwctl_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(bwctl_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/bwlib depcomp = $(SHELL) $(top_srcdir)/config/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 = $(bwctl_SOURCES) DIST_SOURCES = $(bwctl_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 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@ 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@ MAN2HTML = @MAN2HTML@ 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_VERSION = @PACKAGE_VERSION@ PATCH_LEVEL = @PATCH_LEVEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TOP_BUILD_DIRS = @TOP_BUILD_DIRS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_aux_dir = @ac_aux_dir@ 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@ lt_ECHO = @lt_ECHO@ 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@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ bwctl_SOURCES = bwctl.c bwctlP.h bwctl_CFLAGS = -I.. @TOOL_THRULAY_FALSE@BWLIBTHRULAY = @TOOL_THRULAY_TRUE@@USE_SYS_THRULAY_FALSE@BWLIBTHRULAY = ../thrulay/thrulay/libthrulay.la @TOOL_THRULAY_TRUE@@USE_SYS_THRULAY_TRUE@BWLIBTHRULAY = -lthrulay bwctl_LDADD = -L../bwlib -lbwlib $(BWLIBTHRULAY) -lI2util bwctl_LINKS = bwtraceroute$(exeext) bwping$(exeext) CLEANFILES = $(bwctl_LINKS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bwctl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign bwctl/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 $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || 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)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || 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)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_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 bwctl$(EXEEXT): $(bwctl_OBJECTS) $(bwctl_DEPENDENCIES) @rm -f bwctl$(EXEEXT) $(bwctl_LINK) $(bwctl_OBJECTS) $(bwctl_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bwctl-bwctl.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 $@ $< bwctl-bwctl.o: bwctl.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bwctl_CFLAGS) $(CFLAGS) -MT bwctl-bwctl.o -MD -MP -MF $(DEPDIR)/bwctl-bwctl.Tpo -c -o bwctl-bwctl.o `test -f 'bwctl.c' || echo '$(srcdir)/'`bwctl.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/bwctl-bwctl.Tpo $(DEPDIR)/bwctl-bwctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bwctl.c' object='bwctl-bwctl.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) $(bwctl_CFLAGS) $(CFLAGS) -c -o bwctl-bwctl.o `test -f 'bwctl.c' || echo '$(srcdir)/'`bwctl.c bwctl-bwctl.obj: bwctl.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bwctl_CFLAGS) $(CFLAGS) -MT bwctl-bwctl.obj -MD -MP -MF $(DEPDIR)/bwctl-bwctl.Tpo -c -o bwctl-bwctl.obj `if test -f 'bwctl.c'; then $(CYGPATH_W) 'bwctl.c'; else $(CYGPATH_W) '$(srcdir)/bwctl.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/bwctl-bwctl.Tpo $(DEPDIR)/bwctl-bwctl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bwctl.c' object='bwctl-bwctl.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) $(bwctl_CFLAGS) $(CFLAGS) -c -o bwctl-bwctl.obj `if test -f 'bwctl.c'; then $(CYGPATH_W) 'bwctl.c'; else $(CYGPATH_W) '$(srcdir)/bwctl.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; 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) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; }; }'`; \ 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) @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 check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) all-local installdirs: for dir in "$(DESTDIR)$(bindir)"; 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) -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-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ 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-binPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook 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 -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-binPROGRAMS .MAKE: install-am install-exec-am install-strip .PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-exec-hook install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS bwtraceroute$(exeext): bwctl$(exeext) @if test -f $@; then $(RM) $@; fi; \ $(LN_S) bwctl $@; bwping$(exeext): bwctl$(exeext) @if test -f $@; then $(RM) $@; fi; \ $(LN_S) bwctl $@; all-local: $(bwctl_LINKS) # # Someday perhaps this will be generated by automake... # install-exec-hook: @cd $(DESTDIR)$(bindir) && \ if test -f bwctl; then \ for l in $(bwctl_LINKS); do \ if test -f $$l; then $(RM) $$l; fi; \ echo "$(LN_S) $(DESTDIR)$(bindir)/bwctl $(DESTDIR)$(bindir)/$$l"; \ $(LN_S) bwctl $$l; \ done; \ fi # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # 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: bwctl_1.5.4+dfsg1.orig/Makefile.am0000664000076500007710000000277712560414557013670 0ustar # # $Id$ # ######################################################################### # # # Copyright (C) 2002 # # Internet2 # # All Rights Reserved # # # ######################################################################### # # File: Makefile.am # # Author: Jeff Boote # Internet2 # # Date: Wed Apr 17 13:37:24 EDT 2002 # # Description: toplevel build for bwctl # SUBDIRS = @TOP_BUILD_DIRS@ bwlib bwctld bwctl conf doc contrib RPM_FLAGS=--define "_topdir ${PWD}" --define "_specdir ${PWD}" --define "_sourcedir ${PWD}" --define "_srcrpmdir ${PWD}" --define "_rpmdir ${PWD}" --define "_builddir ${PWD}" # uncomment this when we stop using broken automake 1.5 # (then remove from DIST_EXTRA in subdir) #nobase_include_HEADERS = bwlib/bwlib.h #EXTRA_DIST = bootstrap #MAINTAINERCLEANFILES = aclocal.m4 Makefile.in configure config.log \ # config.status EXTRA_DIST = LICENSE srpm: dist @rpmbuild -bs ${RPM_FLAGS} bwctl.spec # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # bwctl_1.5.4+dfsg1.orig/bwctl.spec.in0000664000076500007710000000760612560414557014224 0ustar Name: bwctl Summary: bwctl - network throughput tester Version: @VERSION@ Release: @PATCH_LEVEL@%{?dist} License: Apache License v2.0 Group: *Development/Libraries* URL: http://e2epi.internet2.edu/bwctl/ Source: %{name}-%{version}.tar.gz Packager: Aaron Brown BuildRequires: libtool, I2util Requires: bwctl-client, bwctl-server, iperf3 >= 3.0.11 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %description BWCTL is a command line client application and a scheduling and policy daemon that wraps Iperf, Thrulay or nuttcp. %files %package client Summary: bwctl client Group: Applications/Network Requires: iperf, iperf3 >= 3.0.11 %description client bwctl command line tool for scheduling bandwidth measurements with a bwctl server. %package server Summary: bwctl server Group: Applications/Network Requires: I2util, chkconfig, initscripts, shadow-utils, coreutils Requires: iperf, iperf3 >= 3.0.11 %description server bwctl server %package devel Group: Development/Libraries Summary: bwctl library headers. %description devel This package includes header files, and static link libraries for building applications that use the bwctl library. # Thrulay and I2Util get installed, but really, shouldn't be instaled. #%define _unpackaged_files_terminate_build 0 %prep %setup -q %build # The CFLAGS defined here enable some hardening options for gcc # -fstack-protector-all -Wstack-protector: # Put numbers at the beginning of each stack frame and check that they # are the same. If a stack buffer if overflowed, it writes over the # canary number and then on return when that number is checked, it won't # be the same and the program will exit with a "Stack smashing detected" # error instead of being exploited. # -D_FORTIFY_SOURCE=2 # Does some checking for potentially exploitable code patterns in the # source such overflowing a statically defined buffer. CFLAGS="-fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2" %configure --prefix=%{_prefix} --with-thrulay=no --with-I2util=no --with-iperf3 --enable-nuttcp --enable-debug make %install %makeinstall %{__install} -D -p -m 0755 conf/bwctld.init %{buildroot}%{_sysconfdir}/rc.d/init.d/bwctld %{__install} -D -p -m 0755 conf/bwctld.limits %{buildroot}%{_sysconfdir}/bwctld/bwctld.limits %{__install} -D -p -m 0755 conf/bwctld.limits %{buildroot}%{_sysconfdir}/bwctld/bwctld.limits.default %{__install} -D -p -m 0755 conf/bwctld.conf %{buildroot}%{_sysconfdir}/bwctld/bwctld.conf %{__install} -D -p -m 0755 conf/bwctld.conf %{buildroot}%{_sysconfdir}/bwctld/bwctld.conf.default %clean rm -rf $RPM_BUILD_ROOT %post server if [ "$1" = "1" ]; then # If this is a first time install, add the users and enable it by default /sbin/chkconfig --add bwctld /usr/sbin/useradd -r -s /bin/nologin -d /tmp bwctl || : else /sbin/service bwctld cond-restart fi %preun server if [ "$1" = "0" ]; then # If this is an actual uninstall, stop the service and remove its links /sbin/chkconfig --del bwctld /sbin/service bwctld stop fi %postun server if [ "$1" = "0" ]; then # If this is an actual uninstall, delete the user after the software has been removed /usr/sbin/userdel bwctl || : fi %files client %defattr(-,root,root,0755) %doc README %{_bindir}/bwctl %{_bindir}/bwping %{_bindir}/bwtraceroute %{_mandir}/man1/bwctl.1.gz %{_mandir}/man1/bwping.1.gz %{_mandir}/man1/bwtraceroute.1.gz %files server %defattr(-,root,root,0755) %doc README contrib/sample_hook.pl %{_bindir}/bwctld %{_mandir}/man5/* %{_mandir}/man8/* %{_sysconfdir}/rc.d/init.d/bwctld %config(noreplace) %{_sysconfdir}/bwctld/* %files devel %defattr(-,root,root,0755) %{_libdir}/libbwlib.a %{_includedir}/bwctl/* %changelog * Fri Aug 20 2010 Tom Throckmorton - 1.3-4 - minor spec changes to enable rebuilds via mock - disable I2util, thrulay at buildtime; enable nuttcp * Fri Jan 11 2008 aaron@internet2.edu 1.0-1 - Initial RPM bwctl_1.5.4+dfsg1.orig/aclocal.m40000664000076500007710000115246012560414557013470 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.63],, [m4_warning([this file was generated for autoconf 2.63. 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 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 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 56 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_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 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 "X$cc_temp" | $Xsed -e 's%.*/%%' -e "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 _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_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])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 _LT_PROG_ECHO_BACKSLASH 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 # Sed substitution that helps us do robust quoting. It backslashifies # 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' # 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_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 "X$][$1" | $Xsed -e "$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 "X$" | $Xsed -e "$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' # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$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 "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\[$]0 --fallback-echo"')dnl " lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` ;; esac _LT_OUTPUT_LIBTOOL_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]) cat >"$CONFIG_LT" <<_LTEOF #! $SHELL # Generated by $as_me. # Run this file to recreate a libtool stub with the current configuration. lt_cl_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 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) 2008 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. if test "$no_create" != yes; then 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) fi ])# 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_XSI_SHELLFNS sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) 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)]) 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], []) # _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" ]) 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" != ":"; 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 _LT_TAGVAR(whole_archive_flag_spec, $1)='' _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=echo _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 # ----------------------- # 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. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' 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 "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. m4_defun([_LT_PROG_ECHO_BACKSLASH], [_LT_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac ECHO=${lt_ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF [$]* _LT_EOF exit 0 fi # 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 if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(lt_ECHO) ]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that does not interpret backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _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 __oline__ "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_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [AC_CHECK_TOOL(AR, ar, false) test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1]) 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 _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_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:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi 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; ;; 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"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$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 __oline__ "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 void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } 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:__oline__: $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:__oline__: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_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 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 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # 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 -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # 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; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` 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=`$ECHO "X$lib" | $Xsed -e '\''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,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 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="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. 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 ;; 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 ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # 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 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' ;; 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) 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 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], [shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir # 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 # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # 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;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $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' ;; 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([], [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 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 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 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 ;; 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]) 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) lt_cv_deplibs_check_method=pass_all ;; netbsd*) 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_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_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. AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) 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:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: $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:__oline__: 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_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-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 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' _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([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 # 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 #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. */ 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_save_LIBS="$LIBS" lt_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_save_LIBS" CFLAGS="$lt_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 _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_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)= AC_MSG_CHECKING([for $compiler option to produce PIC]) 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)= ;; 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 ;; 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) 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*) # IBM XL 8.0 on PPC _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*) ;; *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*) # 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' ;; 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 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) 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' ;; pgcc* | pgf77* | pgf90* | pgf95*) # 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*) # IBM XL C 8.0/Fortran 10.1 on PPC _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)='-Wl,' ;; *Sun\ F*) # 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)='' ;; 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*) _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_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # 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]) # # 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_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' 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 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")) && ([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*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ 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 ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = 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 *\ [[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.9.1, 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 modify your PATH *** so that a non-GNU linker is found, and then restart. _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(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/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' 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 ;; 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) 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= 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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # 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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; 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; $ECHO \"$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*) # 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 $compiler_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 $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) 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 $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' 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 $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 ;; 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 $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 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 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")) && ([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 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 _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; 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 _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' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _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. _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 `$ECHO "X$deplibs" | $Xsed -e '\''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(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; 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 -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 -fPIC ${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 -a "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${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 -a "$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 -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _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' ;; *) _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 $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE(int foo(void) {}, _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ) LDFLAGS="$save_LDFLAGS" else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -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" && $ECHO "X-set_version $verstring" | $Xsed` -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*) 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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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" && $ECHO "X-set_version $verstring" | $Xsed` -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} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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" && $ECHO "X-set_version $verstring" | $Xsed` -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 "X-set_version $verstring" | $Xsed` -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 ${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 ${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_MSG_CHECKING([whether -lc should be explicitly linked in]) $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_TAGVAR(archive_cmds_need_lc, $1)=no else _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* AC_MSG_RESULT([$_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([], [fix_srcfile_path], [1], [Fix the shell variable $srcfile for the compiler]) _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([], [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_PROG_CXX # ------------ # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ # compiler, we have our own version here. m4_defun([_LT_PROG_CXX], [ pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) AC_PROG_CXX if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_CXX dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_CXX], []) # _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], [AC_REQUIRE([_LT_PROG_CXX])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl 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(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_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++"} 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 -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -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 "\-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 _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; 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 _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' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _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*) # _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(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 ;; 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*) ;; 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; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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; $ECHO "X$list" | $Xsed' ;; *) 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 -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; 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" && $ECHO "X-set_version $verstring" | $Xsed` -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 -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -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) 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; $ECHO "X$list" | $Xsed' _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 | $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 | $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 | $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 | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will 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; $ECHO \"$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=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; xl*) # 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; $ECHO \"$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='echo' # 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=echo 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" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -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" && $ECHO "X-set_version $verstring" | $Xsed` -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 "X-set_version $verstring" | $Xsed` -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=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) 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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${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 "\-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*) # 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='echo' # 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 -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 -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 "\-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 "\-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(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 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_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 # 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 ]) 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 $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 else prev= fi if test "$pre_test_object_deps_done" = no; then case $p 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 ;; *.$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 # 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*) # 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_PROG_F77 # ------------ # Since AC_PROG_F77 is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_F77], [ pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) AC_PROG_F77 if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_F77 dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_F77], []) # _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_REQUIRE([_LT_PROG_F77])dnl AC_LANG_PUSH(Fortran 77) _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(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 CC=${F77-"f77"} 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" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_PROG_FC # ----------- # Since AC_PROG_FC is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_FC], [ pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) AC_PROG_FC if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_FC dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_FC], []) # _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_REQUIRE([_LT_PROG_FC])dnl AC_LANG_PUSH(Fortran) _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(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 CC=${FC-"f95"} 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" 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_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} 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 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" ])# _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_GCC=$GCC GCC= CC=${RC-"windres"} 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" ])# _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_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"}, \ = c,a/b,, \ && 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_XSI_SHELLFNS # --------------------- # Bourne and XSI compatible variants of some useful shell functions. m4_defun([_LT_PROG_XSI_SHELLFNS], [case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # 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 () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # 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 () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # 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_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}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $[*] )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # 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 () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -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 file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } dnl func_dirname_and_basename dnl A portable version of this function is already defined in general.m4sh dnl so there is no need for it here. # 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 "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[[^=]]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$[@]"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]+=\$[2]" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]=\$$[1]\$[2]" } _LT_EOF ;; esac ]) # Helper functions for option handling. -*- 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 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], [0], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [0], [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. # Generated from ltversion.in. # serial 3017 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.2.6b]) m4_define([LT_PACKAGE_REVISION], [1.3017]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.2.6b' macro_revision='1.3017' _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 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 4 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_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) 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])]) # 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 m4_include([config/c-attribute.m4]) bwctl_1.5.4+dfsg1.orig/config/0000775000076500007710000000000012560414557013064 5ustar bwctl_1.5.4+dfsg1.orig/config/config.guess0000755000076500007710000012761512560414557015416 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 # Free Software Foundation, Inc. timestamp='2009-11-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., 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 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'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; 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:*:[456]) 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 echo ${UNAME_MACHINE}-unknown-linux-gnueabi 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 ;; 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 ;; 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: bwctl_1.5.4+dfsg1.orig/config/config.sub0000755000076500007710000010316712560414557015055 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 # Free Software Foundation, Inc. timestamp='2009-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., 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 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-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 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | 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 | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-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 ;; # 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-* | c54x-* | c55x-* | c6x-* \ | 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-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | 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-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | 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 ;; 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) 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 ;; 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) 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 ;; 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 ;; 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 ;; 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 ;; 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-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 ;; -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 ;; # 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: bwctl_1.5.4+dfsg1.orig/config/install-sh0000755000076500007710000003253712560414557015100 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: bwctl_1.5.4+dfsg1.orig/config/ltmain.sh0000755000076500007710000073306012560414557014716 0ustar # Generated from ltmain.m4sh. # ltmain.sh (GNU libtool) 2.2.6b # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 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 # --tag=TAG use configuration variables from tag TAG # -v, --verbose print informational messages (default) # --version print version information # -h, --help print short or long 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. # 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.2.6b # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . PROGRAM=ltmain.sh PACKAGE=libtool VERSION=2.2.6b TIMESTAMP="" package_revision=1.3017 # 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 # NLS nuisances: We save the old values to restore during execute mode. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). 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 $lt_unset CDPATH : ${CP="cp -f"} : ${ECHO="echo"} : ${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_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 "X${1}" | $Xsed -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 "X${1}" | $Xsed -e "$basename"` } # Generated shell functions inserted here. # 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" # The name of this program: # In the unlikely event $progname began with a '-', it would play havoc with # func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result case $progname in -*) progname=./$progname ;; esac # 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' # 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${mode+: }$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_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname${mode+: }$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 "X$my_directory_path" | $Xsed -e "$dirname"` done my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e '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 "X$my_tmpdir" | $Xsed } # 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 "X$1" | $Xsed -e "$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 "X$1" | $Xsed \ -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_version # Echo version message to standard output and exit. func_version () { $SED -n '/^# '$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 () { $SED -n '/^# Usage:/,/# -h/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" $ECHO $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help # Echo long help message to standard output and exit. func_help () { $SED -n '/^# Usage:/,/# Report bugs to/ { 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 }' < "$progpath" exit $? } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { func_error "missing argument for $1" exit_cmd=exit } exit_cmd=: # Check that we have a working $ECHO. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then # Yippee, $ECHO works! : else # Restart under the correct shell, and then maybe $ECHO will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </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 } # Parse options once, thoroughly. This comes as soon as possible in # the script to make things like `libtool --version' happen quickly. { # 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 # Parse non-mode specific arguments: while test "$#" -gt 0; do opt="$1" shift case $opt in --config) func_config ;; --debug) preserve_args="$preserve_args $opt" func_echo "enabling shell trace mode" opt_debug='set -x' $opt_debug ;; -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break execute_dlfiles="$execute_dlfiles $1" shift ;; --dry-run | -n) opt_dry_run=: ;; --features) func_features ;; --finish) mode="finish" ;; --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break case $1 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 mode="$1" shift ;; --preserve-dup-deps) opt_duplicate_deps=: ;; --quiet|--silent) preserve_args="$preserve_args $opt" opt_silent=: ;; --verbose| -v) preserve_args="$preserve_args $opt" opt_silent=false ;; --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break preserve_args="$preserve_args $opt $1" func_enable_tag "$1" # tagname is set here shift ;; # Separate optargs to long options: -dlopen=*|--mode=*|--tag=*) func_opt_split "$opt" set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} shift ;; -\?|-h) func_usage ;; --help) opt_help=: ;; --version) func_version ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) nonopt="$opt" break ;; esac done 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_duplicate_deps ;; esac # Having warned about all mis-specified options, bail out if # anything was wrong. $exit_cmd $EXIT_FAILURE } # 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 } ## ----------- ## ## Main. ## ## ----------- ## $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 test -z "$mode" && func_fatal_error "error: you must specify a MODE." # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$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=$mode' for more information." } # 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_ltwrapper_scriptname_result="" if func_ltwrapper_executable_p "$1"; then func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" fi } # 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_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_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done 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 "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; # 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_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case "$@ " in " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) # 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 <?"'"'"' &()|`$[]' \ && 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 "X$srcfile" | $Xsed -e 's%^.*/%%' -e '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 removelist="$removelist $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist removelist="$removelist $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi 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 command="$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 command="$command -o $obj" fi # Suppress compiler output if we already did a PIC compilation. command="$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 "$mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $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 building PIC objects only -prefer-non-pic try to building 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 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 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 -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 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 \`$mode'" ;; esac $ECHO $ECHO "Try \`$progname --help' for more information about other modes." exit $? } # Now that we've collected a possible --mode arg, show help if necessary $opt_help && func_mode_help # 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 $execute_dlfiles; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) # 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 dir="$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 -*) ;; *) # 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_quote_for_eval "$file" args="$args $func_quote_for_eval_result" 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 "$mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done 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" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS $ECHO "X----------------------------------------------------------------------" | $Xsed $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 "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS } test "$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. $ECHO "X$nonopt" | $GREP shtool >/dev/null; 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" install_prog="$install_prog$func_quote_for_eval_result" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" install_prog="$install_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 -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. staticlibs="$staticlibs $file" ;; *.la) # 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 "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -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 "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "X$relink_command" | $Xsed -e "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_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" && staticlibs="$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 "X$lib" | $Xsed -e '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 "X$relink_command" | $Xsed -e '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 "X$file$stripped_ext" | $Xsed -e "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 "$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 /* 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 "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for progfile in $progfiles; do func_verbose "extracting global C symbols from \`$progfile'" $opt_dry_run || eval "$NM $progfile | $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" $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" } 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; " case $host in *cygwin* | *mingw* | *cegcc* ) $ECHO >> "$output_objdir/$my_dlsyms" "\ /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */" lt_dlsym_const= ;; *osf5*) echo >> "$output_objdir/$my_dlsyms" "\ /* This system does not cope well with relocations in const data */" lt_dlsym_const= ;; *) lt_dlsym_const=const ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ 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) ;; *) symtab_cflags="$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 "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "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 "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "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. 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 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | $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_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' 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 | $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 | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper_part1 [arg=no] # # Emit the first part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part1 () { func_emit_wrapper_part1_arg1=no if test -n "$1" ; then func_emit_wrapper_part1_arg1=$1 fi $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. Xsed='${SED} -e 1s/^X//' 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 ECHO=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then # Yippee, \$ECHO works! : else # Restart under the correct shell, and then maybe \$ECHO will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $ECHO "\ # Find the directory that this script lives in. thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e '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 \"X\$file\" | \$Xsed -e '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 \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done " } # end: func_emit_wrapper_part1 # func_emit_wrapper_part2 [arg=no] # # Emit the second part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part2 () { func_emit_wrapper_part2_arg1=no if test -n "$1" ; then func_emit_wrapper_part2_arg1=$1 fi $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_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 \"X\$thisdir\" | \$Xsed -e '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" # 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 \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 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\ " } # end: func_emit_wrapper_part2 # 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=no if test -n "$1" ; then func_emit_wrapper_arg1=$1 fi # split this up so that func_emit_cwrapperexe_src # can call each part independently. func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" } # func_to_host_path arg # # Convert paths to host format when used with build tools. # Intended for use with "native" mingw (where libtool itself # is running under the msys shell), or in the following cross- # build environments: # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # where wine is equipped with the `winepath' executable. # In the native mingw case, the (msys) shell automatically # converts paths for any non-msys applications it launches, # but that facility isn't available from inside the cwrapper. # Similar accommodations are necessary for $host mingw and # $build cygwin. Calling this function does no harm for other # $host/$build combinations not listed above. # # ARG is the path (on $build) that should be converted to # the proper representation for $host. The result is stored # in $func_to_host_path_result. func_to_host_path () { func_to_host_path_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' case $build in *mingw* ) # actually, msys # awkward: cmd appends spaces to result lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_path_tmp1=`( cmd //c echo "$1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_path_tmp1=`cygpath -w "$1"` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # Unfortunately, winepath does not exit with a non-zero # error code, so we are forced to check the contents of # stdout. On the other hand, if the command is not # found, the shell will set an exit code of 127 and print # *an error message* to stdout. So we must check for both # error code of zero AND non-empty stdout, which explains # the odd construction: func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` else # Allow warning below. func_to_host_path_result="" fi ;; esac if test -z "$func_to_host_path_result" ; then func_error "Could not determine host path corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_path_result="$1" fi ;; esac fi } # end: func_to_host_path # func_to_host_pathlist arg # # Convert pathlists to host format when used with build tools. # See func_to_host_path(), above. This function supports the # following $build/$host combinations (but does no harm for # combinations not listed here): # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # # 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. # # ARG is a pathlist (on $build) that should be converted to # the proper representation on $host. The result is stored # in $func_to_host_pathlist_result. func_to_host_pathlist () { func_to_host_pathlist_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # 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_to_host_pathlist_tmp2="$1" # Once set for this call, this variable should not be # reassigned. It is used in tha fallback case. func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e 's|^:*||' -e 's|:*$||'` case $build in *mingw* ) # Actually, msys. # Awkward: cmd appends spaces to result. lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # unfortunately, winepath doesn't convert pathlists func_to_host_pathlist_result="" func_to_host_pathlist_oldIFS=$IFS IFS=: for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do IFS=$func_to_host_pathlist_oldIFS if test -n "$func_to_host_pathlist_f" ; then func_to_host_path "$func_to_host_pathlist_f" if test -n "$func_to_host_path_result" ; then if test -z "$func_to_host_pathlist_result" ; then func_to_host_pathlist_result="$func_to_host_path_result" else func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" fi fi fi IFS=: done IFS=$func_to_host_pathlist_oldIFS ;; esac if test -z "$func_to_host_pathlist_result" ; then func_error "Could not determine the host path(s) corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This may break if $1 contains DOS-style drive # specifications. The fix is not to complicate the expression # below, but for the user to provide a working wine installation # with winepath so that path translation in the cross-to-mingw # case works properly. lt_replace_pathsep_nix_to_dos="s|:|;|g" func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_replace_pathsep_nix_to_dos"` fi # Now, add the leading and trailing path separators back case "$1" in :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" ;; esac case "$1" in *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" ;; esac ;; esac fi } # end: func_to_host_pathlist # 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 # define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include # define HAVE_SETENV # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif # endif #endif #include #include #include #include #include #include #include #include #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 #ifdef _MSC_VER # define S_IXUSR _S_IEXEC # define stat _stat # ifndef _INTPTR_T_DEFINED # define intptr_t int # endif #endif #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 */ #ifdef __CYGWIN__ # define FOPEN_WB "wb" #endif #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) #undef LTWRAPPER_DEBUGPRINTF #if defined DEBUGWRAPPER # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args static void ltwrapper_debugprintf (const char *fmt, ...) { va_list args; va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } #else # define LTWRAPPER_DEBUGPRINTF(args) #endif const char *program_name = NULL; 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_fatal (const char *message, ...); 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_opt_process_env_set (const char *arg); void lt_opt_process_env_prepend (const char *arg); void lt_opt_process_env_append (const char *arg); int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); static const char *script_text_part1 = EOF func_emit_wrapper_part1 yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ "/' -e 's/$/\\n"/' echo ";" cat <"))); for (i = 0; i < newargc; i++) { LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); } EOF case $host_os in mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); return 127; } return rval; EOF ;; *) cat <<"EOF" execv (lt_argv_zero, newargz); return rval; /* =127, but avoids unused variable warning */ EOF ;; esac cat <<"EOF" } void * xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable (const char *path) { struct stat st; LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 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; LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); 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; LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); 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 ("getcwd failed"); 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 ("getcwd failed"); 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) { LTWRAPPER_DEBUGPRINTF (("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 { char *errstr = strerror (errno); lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal ("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; } static void lt_error_core (int exit_status, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } void lt_setenv (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", (name ? name : ""), (value ? 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; } int lt_split_name_value (const char *arg, char** name, char** value) { const char *p; int len; if (!arg || !*arg) return 1; p = strchr (arg, (int)'='); if (!p) return 1; *value = xstrdup (++p); len = strlen (arg) - strlen (*value); *name = XMALLOC (char, len); strncpy (*name, arg, len-1); (*name)[len - 1] = '\0'; return 0; } void lt_opt_process_env_set (const char *arg) { char *name = NULL; char *value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); } lt_setenv (name, value); XFREE (name); XFREE (value); } void lt_opt_process_env_prepend (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); } new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_opt_process_env_append (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); } new_value = lt_extend_str (getenv (name), value, 1); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_update_exe_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? 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) { LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? 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 } # end: func_emit_cwrapperexe_src # 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 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 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 dlfiles="$dlfiles $arg" else dlprefiles="$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 "*) ;; *) deplibs="$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 # moreargs="$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 dlfiles="$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. dlprefiles="$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 "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) weak_libs="$weak_libs $arg" prev= continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$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 ;; -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" dir=$func_stripname_result if test -z "$dir"; 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 # 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 "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$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*) # 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 deplibs="$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 deplibs="$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) compiler_flags="$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) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) new_inherited_linker_flags="$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_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$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" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$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" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" linker_flags="$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" ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" compiler_flags="$compiler_flags $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. objs="$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 dlfiles="$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. dlprefiles="$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. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" 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 \"X\${$shlibpath_var}\" \| \$Xsed -e \'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" # 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_duplicate_deps ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$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 "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$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% $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= case $lib in *.la) func_source "$lib" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` case " $weak_libs " in *" $deplib_base "*) ;; *) deplibs="$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 compiler_flags="$compiler_flags $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$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 "*) ;; * ) new_inherited_linker_flags="$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" newlib_search_path="$newlib_search_path $func_stripname_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" newlib_search_path="$newlib_search_path $func_stripname_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" dir=$func_stripname_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$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 \"X$deplib\"" 2>/dev/null | $Xsed -e 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. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$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 "X$inherited_linker_flags" | $Xsed -e '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 "*) ;; *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e '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" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$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. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done 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. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$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 "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$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 notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$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 # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$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" && \ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi 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 newlib_search_path="$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" newlib_search_path="$newlib_search_path $func_stripname_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_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$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:"*) ;; *) temp_rpath="$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 "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$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 notinst_deplibs="$notinst_deplibs $lib" need_relink=no ;; *) if test "$installed" = no; then notinst_deplibs="$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 "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$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 "$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 [\\/]*) add_dir="$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:"*) ;; *) compile_shlibpath="$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:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$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:"*) ;; *) finalize_shlibpath="$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 [\\/]*) add_dir="$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 "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$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" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) 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 compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" linker_flags="$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 "X $new_inherited_linker_flags" | $Xsed -e '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 "*) ;; *) lib_search_path="$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 "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$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 tmp_libs="$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" objs="$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!" libobjs="$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|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 ;; 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. verstring="$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" libobjs="$libobjs $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$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 removelist="$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 oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "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 temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$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 "*) ;; *) dlfiles="$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 "*) ;; *) dlprefiles="$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*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$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 deplibs="$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` 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 "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$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. newdeplibs="$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 "*) newdeplibs="$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 \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$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. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ -e 's/ -lc$//' -e '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 "X $tmp_deplibs" | $Xsed -e "s,$i,,"` done fi if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | $GREP . >/dev/null; then $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 fi ;; 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 "X $newdeplibs" | $Xsed -e '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 "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO "X $deplibs" | $Xsed -e '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 "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$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 "$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 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"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$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 rpath="$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 "$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 linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$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" delfiles="$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 cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" func_len " $cmd" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then func_show_eval "$cmd" 'exit $?' 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 "X$include_expsyms" | $Xsed | $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 delfiles="$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 "*) ;; *) tmp_deplibs="$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" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$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\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$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 output_la=`$ECHO "X$output" | $Xsed -e "$basename"` # 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 $ECHO "$obj" >> $output done $ECHO ')' >> $output delfiles="$delfiles $output" 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 $ECHO "$obj" >> $output done delfiles="$delfiles $output" output=$firstobj\"$file_list_spec$output\" 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. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$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~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi delfiles="$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 "$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 "X$include_expsyms" | $Xsed | $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 delfiles="$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" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles libobjs="$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 "$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 "$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 "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$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 "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e '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]) compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e '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 "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$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 "*) ;; *) finalize_rpath="$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"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$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;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$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"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$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 "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$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 *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *cegcc) # Disable wrappers for cegcc, we are cross compiling anyway. wrappers_required=no ;; *) 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 "X$compile_command" | $Xsed -e '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=$?' # 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 rpath="$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 rpath="$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 "X$link_command" | $Xsed -e '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 $?' 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 "X$compile_var$compile_command$compile_rpath" | $Xsed -e '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 "X$link_command" | $Xsed -e '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 $?' # 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 "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $ECHO for shipping. if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$ECHO "X$ECHO" | $Xsed -e "$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 oldobjs="$oldobjs $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$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" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles oldobjs="$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" generated="$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" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$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 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 "X$relink_command" | $Xsed -e "$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" newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$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" newdlfiles="$newdlfiles $libdir/$name" ;; *) newdlfiles="$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" newdlprefiles="$newdlprefiles $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 newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; 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 "$mode" = link || test "$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) RM="$RM $arg"; rmforce=yes ;; -*) RM="$RM $arg" ;; *) files="$files $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi func_basename "$file" name="$func_basename_result" test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; 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 rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${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 rmfiles="$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 rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$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 rmfiles="$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 rmfiles="$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 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done objdir="$origobjdir" # 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 "$mode" = uninstall || test "$mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$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 bwctl_1.5.4+dfsg1.orig/config/c-attribute.m40000664000076500007710000000214012560414557015546 0ustar dnl dnl $Id$ dnl dnl dnl This macro is used to test for the gcc __attribute__ keyword. dnl dnl dnl Licensed under the Apache License, Version 2.0 (the "License"); dnl you may not use this file except in compliance with the License. dnl You may obtain a copy of the License at dnl dnl http://www.apache.org/licenses/LICENSE-2.0 dnl dnl Unless required by applicable law or agreed to in writing, software dnl distributed under the License is distributed on an "AS IS" BASIS, dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. dnl See the License for the specific language governing permissions and dnl limitations under the License. dnl AC_DEFUN([I2_C___ATTRIBUTE__], [ AC_MSG_CHECKING(for __attribute__) AC_CACHE_VAL(ac_cv___attribute__, [ AC_COMPILE_IFELSE([ #include static void foo(void) __attribute__ ((noreturn)); static void foo(void) { exit(1); } ], ac_cv___attribute__=yes, ac_cv___attribute__=no)]) if test "$ac_cv___attribute__" = "yes"; then AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__]) fi AC_MSG_RESULT($ac_cv___attribute__) ]) bwctl_1.5.4+dfsg1.orig/config/missing0000755000076500007710000002623312560414557014467 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: bwctl_1.5.4+dfsg1.orig/config/depcomp0000755000076500007710000004426712560414557014454 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: bwctl_1.5.4+dfsg1.orig/README0000664000076500007710000000537512560414557012511 0ustar = Summary = bwctl is a scheduling and policy daemon that wraps iperf, traceroute, owamp and a few other measurement tools. It works by contacting a bwctld process on the remote system and on the local system and requests that those daemons perform a specific iperf test between them. The bwctl software uses the "autoconf" tools to prepare a build process. It is distributed with a pre-built "configure" script - so the "autoconf" tools should not be needed. (gnumake may be required... I have not tried using other versions of make.) bwctl does require a reasonably synchronized clock. (It is scheduling tests and needs to be sure it has the same general concept of when a test should take place as the peer system the test is being done with.) Therefore bwctl requires ntp be installed and used to synchronize the system clock. = Building bwctl = == Prerequisites: == * I2util: You can install it via RPM, or download the source from http://software.internet2.edu/sources/I2util/ * iperf3 (optional): You can install it via RPM, or download the source from https://github.com/esnet/iperf/ == Building == ./configure; make; make install (Note: If configure fails, try running ./bootstrap.sh first) = Latest version = To check out the most recent code, do: git clone https://github.com/perfsonar/bwctl.git = Running = == Daemon == To run the daemon: % bwctld -c /path/to/directory/with/bwctld.conf The daemon will run without a bwctld configuration file if you use enough of the command-line flags - but it is much easier to use the config file. There is an example configuration file in conf/bwctld.conf. To get the list of available options use: % bwctld -h [bwctld -h will give you the list of options. Specifically, if you have problems you may want to use the -Z flag to run it in the foreground and have error messages come to the console in addition to syslog.] == Client == To run the client: % bwctl [options] [-c catchhost] [-s sendhost] At least a -c or a -s must be specified to indicate the direction of the test. If only one of them is specified, the local host is assumed to be the other one. If a local bwctld is not running, then bwctl will execute the bwctld functionality required to run the test. To get the list of available options use: % bwctl -h The bwctl program will allow you to run bandwidth tests like iperf, iperf3 and nuttcp. To run traceroute/tracepath, use the 'bwtraceroute' program, and to use ping/owamp, use the 'bwping' program. = Bug Reports = Before submitting a bug report, try checking out the latest version of the code, and confirm that its not already fixed. Then submit to: https://github.com/perfsonar/bwctl/issues For more information see: https://github.com/perfsonar/bwctl/ bwctl_1.5.4+dfsg1.orig/bwctld/0000775000076500007710000000000012560414557013076 5ustar bwctl_1.5.4+dfsg1.orig/bwctld/policy.c0000664000076500007710000017076412560414557014560 0ustar /* ** $Id$ */ /* * File: policy.c * * Author: Jeff W. Boote * * Date: Tue Sep 9 16:08:44 MDT 2003 * * Description: * Default policy functions used by BWLIB applications. * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "policy.h" /* * Function: parsekeys * * Description: * Read all keys from the keyfile and populate the * keys hash with the mappings from users to keys. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ static int parsekeys( BWLDPolicy policy, FILE *fp, char **lbuf, size_t *lbuf_max ) { int rc=0; BWLUserID username; BWLKey tkey; I2Datum key,val; I2ErrHandle eh = BWLContextErrHandle(policy->ctx); /* * TODO: Replace with an autoconf test */ { size_t tsize; tsize = sizeof(username); assert(I2MAXIDENTITYLEN <= tsize); tsize = sizeof(BWLKey); assert(I2KEYLEN == tsize); } if(!fp){ return 0; } while((rc = I2ParseKeyFile(eh,fp,rc,lbuf,lbuf_max,NULL,NULL, username,tkey)) > 0){ /* * Make sure the username is not already in the hash. */ key.dptr = username; key.dsize = strlen(username); if(I2HashFetch(policy->keys,key,&val)){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "username \"%s\" duplicated",username); return -rc; } /* * alloc memory for the username key. */ if(!(key.dptr = strdup(username))){ BWLError(policy->ctx,BWLErrFATAL,errno, "strdup(username): %M"); return -rc; } /* * alloc memory for AESkey value. */ if(!(val.dptr = malloc(sizeof(tkey)))){ free(key.dptr); BWLError(policy->ctx,BWLErrFATAL,errno, "malloc(AESKEY): %M"); return -rc; } memcpy(val.dptr,tkey,sizeof(tkey)); val.dsize = sizeof(tkey); if(I2HashStore(policy->keys,key,val) != 0){ free(key.dptr); free(val.dptr); BWLError(policy->ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unable to store AESKey for %s", username); return -rc; } } return rc; } /* * INTVAL are consumables that are tracked in the "used" limits of * each node. The other limits are fixed values with a yes/no at each * level of the tree. */ enum limtype{LIMINT,LIMBOOL,LIMFIXEDINT,LIMNOT}; struct limdesc{ BWLDMesgT limit; char *lname; enum limtype ltype; BWLDLimitT def_value; }; static struct limdesc limkeys[] = { {BWLDLimParent, "parent", LIMNOT, 0}, {BWLDLimBandwidth, "bandwidth", LIMFIXEDINT, 0}, {BWLDLimPending, "pending", LIMINT, 0}, {BWLDLimEventHorizon, "event_horizon", LIMFIXEDINT, 0}, {BWLDLimDuration, "duration", LIMFIXEDINT, 0}, {BWLDLimAllowOpenMode, "allow_open_mode", LIMBOOL, 1}, {BWLDLimAllowTCP, "allow_tcp", LIMBOOL, 1}, {BWLDLimAllowUDP, "allow_udp", LIMBOOL, 0}, {BWLDLimMaxTimeError, "max_time_error", LIMFIXEDINT, 0}, {BWLDLimMinimumTTL, "minimum_ttl", LIMFIXEDINT, 0}, {BWLDLimAllowNoEndpoint, "allow_no_endpoint", LIMBOOL, 0} }; static BWLDLimitT GetDefLimit( BWLDMesgT lim ) { size_t i; for(i=0;i BWLDMAXCLASSLEN){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "classname \"%s\" too long - max length = %u",cname, BWLDMAXCLASSLEN); return 1; } if(I2HashFetch(policy->limits,key,&val)){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "classname \"%s\" duplicated",cname); return 1; } /* * parse "with" */ if(!(line = strtok(NULL,I2WSPACESET))){ return 1; } /* compare strings INCLUDING the '\0' */ if(strncasecmp(line,"with",5)){ return 1; } memset(&tnode,0,sizeof(tnode)); memset(limtemp,0,sizeof(limtemp)); tnode.policy = policy; /* * Process key/value pairs delimited by ',' */ while((line = strtok(NULL,","))){ char *limname,*limval; BWLBoolean found; if(tnode.ilim >= maxlim){ BWLError(policy->ctx,BWLErrFATAL, BWLErrINVALID, "Too many limit declarations"); return 1; } /* * Grab the keyname off the front. */ while(isspace((int)*line)){line++;} limname = line; while(!isspace((int)*line) && (*line != '=')){ line++; } *line++ = '\0'; /* * Grab the valname */ while(isspace((int)*line) || (*line == '=')){ line++; } limval = line; while(!isspace((int)*line) && (*line != '\0')){ line++; } /* * Look for bogus trailing stuff... */ if(*line != '\0'){ *line++ = '\0'; while(isspace((int)*line)){ line++; } if(*line != '\0'){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "\"%s\" value can not contain white-space.",limname); return 1; } } if(!strncasecmp(limname,"parent",7)){ if(!policy->root){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "\"parent\" specified for root node."); return 1; } if(tnode.parent){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "multiple parents specified."); return 1; } /* validate and fetch parent */ key.dptr = limval; key.dsize = strlen(limval); if(!I2HashFetch(policy->limits,key,&val)){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "parent \"%s\" undefined",limval); return 1; } tnode.parent = val.dptr; continue; } found = False; for(i=0;i < I2Number(limkeys);i++){ /* skip "special" limit types */ if(limkeys[i].ltype == LIMNOT){ continue; } /* skip non-matching limit names */ if(strncasecmp(limname,limkeys[i].lname, strlen(limkeys[i].lname)+1)){ continue; } /* i now points at correct record in limkeys */ found=True; break; } if(!found){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "Unknown limit name \"%s\".",limname); return 1; } /* check for a multiple definition */ for(j=0;jctx,BWLErrFATAL,BWLErrINVALID, "multiple %s values specified.", limname); return 1; } } /* * Set the next record in limtemp with this limname/limvalue. */ limtemp[tnode.ilim].limit = limkeys[i].limit; switch(limkeys[i].ltype){ case LIMINT: case LIMFIXEDINT: if(I2StrToNum(&limtemp[tnode.ilim].value,limval)){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "Invalid value specified for \"%s\".", limname); return 1; } break; case LIMBOOL: if(!strncasecmp(limval,"on",3)){ limtemp[tnode.ilim].value = 1; }else if(strncasecmp(limval,"off",4)){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "Invalid value specified for \"%s\".", limname); return 1; } break; default: /* NOTREACHED */ BWLError(policy->ctx,BWLErrFATAL,BWLErrUNKNOWN, "limkeys array is invalid!"); } tnode.ilim++; } /* * Now copy the parent parameters that were not overridden. */ if(tnode.parent){ for(i=0;iilim;i++){ for(j=0;jlimits[i].limit == limtemp[j].limit){ goto override; } } limtemp[tnode.ilim++] = tnode.parent->limits[i]; continue; override: /* * For integer limits, only allowed to override * with smaller values. */ for(k=0;k < I2Number(limkeys);k++){ /* * Go to the next limkey unless it matches * the current parent limit. */ if(tnode.parent->limits[i].limit != limkeys[k].limit) continue; /* * If this limit is not an Integer limit, * we don't care, so break out. */ if((limkeys[k].ltype != LIMFIXEDINT) && (limkeys[k].ltype != LIMINT)) break; /* * If this limit is Inf in the parent, then * it is valid to limit it in the child, * so break out. */ if(!tnode.parent->limits[i].value) break; /* * If the parents limit is larger, then it * is valid to further restrict in the * child. */ if(tnode.parent->limits[i].value >= limtemp[j].value) break; BWLError(policy->ctx,BWLErrWARNING, BWLErrUNKNOWN, "WARNING: %s: Using parents more restrictive limits for %s.", cname,limkeys[k].lname); limtemp[j].value = tnode.parent->limits[i].value; } } } /* * No parent - if root has been set, this is invalid. */ else if(policy->root){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "\"parent\" must be specified for non-root node"); return 1; } /* * Now alloc memory and insert this node into the hash. */ if(!(node = malloc(sizeof(*node))) || !(tnode.nodename = strdup(cname)) || !(tnode.limits = calloc(maxlim,sizeof(BWLDLimRec))) || !(tnode.used = calloc(maxlim,sizeof(BWLDLimRec)))){ BWLError(policy->ctx,BWLErrFATAL,errno,"alloc(): %M"); return 1; } memcpy(node,&tnode,sizeof(*node)); if(tnode.ilim){ memcpy(node->limits,limtemp,sizeof(BWLDLimRec)*tnode.ilim); memcpy(node->used,limtemp,sizeof(BWLDLimRec)*tnode.ilim); for(i=0;iused[i].value = 0; } } key.dptr = node->nodename; key.dsize = strlen(node->nodename); val.dptr = node; val.dsize = sizeof(*node); if(I2HashStore(policy->limits,key,val) != 0){ BWLError(policy->ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unable to store limit description!"); return 1; } if(!policy->root){ policy->root = node; } return 0; } static int parseassignline( BWLDPolicy policy, char *line ) { BWLDPidRec tpid; BWLDPid pid; I2Datum key,val; memset(&tpid,0,sizeof(tpid)); /* * Grab assign "type" */ if(!(line = strtok(line,I2WSPACESET))){ return 1; } if(!strncasecmp(line,"default",8)){ tpid.id_type = BWLDPidDefaultType; key.dptr = &tpid; key.dsize = sizeof(tpid); if(I2HashFetch(policy->idents,key,&val)){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "Invalid multiple \"assign default\" lines."); return 1; } } else if(!strncasecmp(line,"net",4)){ int tint; char *mask, *end; struct addrinfo hints, *res; uint8_t nbytes,nbits,*ptr; tpid.id_type = BWLDPidNetmaskType; /* * Grab addr/mask */ if(!(line = strtok(NULL,I2WSPACESET))){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "Invalid \"assign net\" argument."); return 1; } if((mask = strchr(line,'/'))){ *mask++ = '\0'; if(*mask == '\0'){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "Invalid address mask."); return 1; } } memset(&hints,0,sizeof(hints)); hints.ai_flags = AI_NUMERICHOST; hints.ai_family = PF_UNSPEC; hints.ai_socktype= SOCK_STREAM; res = NULL; if((tint = getaddrinfo(line,NULL,&hints,&res)) < 0){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "Invalid address \"%s\": %s",line, gai_strerror(tint)); return 1; } else if(!res){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "Invalid address \"%s\".",line); return 1; } switch(res->ai_family){ struct sockaddr_in *saddr4; #ifdef AF_INET6 struct sockaddr_in6 *saddr6; case AF_INET6: saddr6 = (struct sockaddr_in6*)res->ai_addr; /* * If this is a v4 mapped address - save as v4 address. */ if(IN6_IS_ADDR_V4MAPPED(&saddr6->sin6_addr)){ tpid.net.addrsize = 4; memcpy(tpid.net.addrval, &saddr6->sin6_addr.s6_addr[12],4); } else{ tpid.net.addrsize = 16; memcpy(tpid.net.addrval, saddr6->sin6_addr.s6_addr,16); } break; #endif case AF_INET: saddr4 = (struct sockaddr_in*)res->ai_addr; tpid.net.addrsize = 4; memcpy(tpid.net.addrval,&saddr4->sin_addr.s_addr,4); break; default: freeaddrinfo(res); BWLError(policy->ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unknown address protocol family."); return 1; break; } freeaddrinfo(res); res = NULL; if(mask){ unsigned long tlng; tlng = (int)strtoul(mask,&end,10); if((*end != '\0') || (tlng < 1) || (tlng > (tpid.net.addrsize*8))){ BWLError(policy->ctx,BWLErrFATAL,BWLErrUNKNOWN, "Invalid address mask \"%s\".",mask); return 1; } tpid.net.mask_len = tlng; } else{ tpid.net.mask_len = tpid.net.addrsize*8; } /* * ensure addr part of addr/mask doesn't set any bits. */ nbytes = tpid.net.mask_len/8; nbits = tpid.net.mask_len%8; ptr = &tpid.net.addrval[nbytes]; /* * Check bits in byte following last complete one. */ if(nbytes < tpid.net.addrsize){ if(*ptr & ~(0xFF << (8-nbits))){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "Invalid address/mask combination."); return 1; } } /* * Check remaining bytes following the partial one. */ nbytes++; ptr++; while(nbytes < tpid.net.addrsize){ if(*ptr){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "Invalid address/mask combination."); return 1; } nbytes++; ptr++; } } else if(!strncasecmp(line,"user",5)){ /* * Grab username */ if(!(line = strtok(NULL,I2WSPACESET))){ return 1; } key.dptr = line; key.dsize = strlen(line); if((key.dsize >= sizeof(tpid.user.userid)) || !I2HashFetch(policy->keys,key,&val)){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "Invalid user \"%s\".",line); return 1; } tpid.id_type = BWLDPidUserType; strcpy(tpid.user.userid,line); } else{ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "Unknown \"assign\" specification."); return 1; } /* * The Pid is valid - now parse and check for limits for * the "classname". */ if(!(line = strtok(NULL,I2WSPACESET))){ return 1; } key.dptr = line; key.dsize = strlen(line); if(!I2HashFetch(policy->limits,key,&val)){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "Unknown limitclass name \"%s\".",line); return 1; } if(!(pid = malloc(sizeof(*pid)))){ BWLError(policy->ctx,BWLErrFATAL,errno, "malloc(BWLDPidRec): %M"); return 1; } memcpy(pid,&tpid,sizeof(*pid)); key.dptr = pid; key.dsize = sizeof(*pid); if(I2HashStore(policy->idents,key,val) != 0){ BWLError(policy->ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unable to store assign description!"); return 1; } return 0; } static int parselimits( BWLDPolicy policy, FILE *fp, char **lbuf, size_t *lbuf_max ) { int rc = 0; size_t i; size_t maxlim = 0; char *line; I2ErrHandle eh = BWLContextErrHandle(policy->ctx); /* * Count number of possible limit parameters */ for(i=0;i < I2Number(limkeys);i++){ if(limkeys[i].ltype != LIMNOT){ maxlim++; } } /* * parse the file, one line at a time. */ while(fp && ((rc = I2GetConfLine(eh,fp,rc,lbuf,lbuf_max)) > 0)){ line = *lbuf; /* * parse limit lines. (These create the "user classes" and * specify the "authorization" level of that authenticated * "user class". */ if(!strncasecmp(line,"limit",5)){ line += 5; while(isspace((int)*line)){ line++; } if(parselimitline(policy,line,maxlim) != 0){ return -rc; } } /* * parse "assign" lines. These are used to determine the * identity of a connection. i.e. authenticate a particular * connection as a particular identity/user class. */ else if(!strncasecmp(line,"assign",6)){ line += 6; while(isspace((int)*line)){ line++; } if(parseassignline(policy,line) != 0){ return -rc; } } else{ rc = -rc; break; } } /* * Add a "default" class if none was specified. */ if((rc == 0) && !policy->root){ char defline[] = "default with duration=30, max_time_error=10"; BWLError(policy->ctx,BWLErrWARNING,BWLErrUNKNOWN, "WARNING: No limits specified."); line = *lbuf; if(sizeof(defline) > *lbuf_max){ *lbuf_max += I2LINEBUFINC; *lbuf = realloc(line,sizeof(char) * *lbuf_max); if(!*lbuf){ if(line){ free(line); } BWLError(policy->ctx,BWLErrFATAL,errno, "realloc(%u): %M",*lbuf_max); return -1; } line = *lbuf; } strcpy(line,defline); if(parselimitline(policy,line,maxlim) != 0){ BWLError(policy->ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unable to install default (open) limits"); return -1; } } return rc; } /* * Function: BWLDPolicyInstall * * Description: * This function installs the functions defined in this file as * the "policy" hooks within the bwlib application. * * The main reason for defining the policy in the bwlib library * like this was that it made it possible to share the policy * code between client/server applications such as bwctl and * bwctld. Also, it is a good example of how this can be done for * custom appliations. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: * This function does no clean-up of memory it allocates in the event * of failure. It is expected that the application will report * an error and exit if this function fails. * * TODO: I really should fix this - it is lazy, and makes looking for * memory leaks more difficult. */ BWLDPolicy BWLDPolicyInstall( BWLContext ctx, char *confdir, int *retn_on_intr, char **lbuf, size_t *lbuf_max ) { BWLDPolicy policy; I2ErrHandle eh; char fname[MAXPATHLEN+1]; int len; FILE *fp; int rc; /* row count */ /* * use variables for the func pointers so the compiler can give * type-mismatch warnings. */ BWLGetAESKeyFunc getaeskey = BWLDGetAESKey; BWLCheckControlPolicyFunc checkcontrolfunc = BWLDCheckControlPolicy; BWLCheckTestPolicyFunc checktestfunc = BWLDCheckTestPolicy; BWLTestCompleteFunc testcompletefunc = BWLDTestComplete; eh = BWLContextErrHandle(ctx); /* * Alloc main policy record */ if(!(policy = calloc(1,sizeof(*policy)))){ BWLError(ctx,BWLErrFATAL,errno,"calloc(policy rec): %M"); return NULL; } policy->ctx = ctx; policy->retn_on_intr = retn_on_intr; /* * Alloc hashes. */ if(!(policy->limits = I2HashInit(eh,0,NULL,NULL)) || !(policy->idents = I2HashInit(eh,0,NULL,NULL)) || !(policy->keys = I2HashInit(eh,0,NULL,NULL))){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "BWLDPolicyInstall: Unable to allocate hashes"); return NULL; } /* * Open the keys file. */ fname[0] = '\0'; len = strlen(BWL_KEY_FILE); if(len > MAXPATHLEN){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "strlen(BWL_KEY_FILE > MAXPATHLEN)"); return NULL; } len += strlen(confdir) + strlen(BWL_PATH_SEPARATOR); if(len > MAXPATHLEN){ BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "Path to %s > MAXPATHLEN",BWL_KEY_FILE); return NULL; } strcpy(fname,confdir); strcat(fname,BWL_PATH_SEPARATOR); strcat(fname,BWL_KEY_FILE); if(!(fp = fopen(fname,"r")) && (errno != ENOENT)){ BWLError(ctx,BWLErrFATAL,errno,"Unable to open %s: %M",fname); return NULL; } /* * lbuf is a char buffer that grows as needed in I2GetConfLine * lbuf will be realloc'd repeatedly as needed. Once conf file * parsing is complete - it is free'd from this function. */ if((rc = parsekeys(policy,fp,lbuf,lbuf_max)) < 0){ goto BADLINE; } if(fp && (fclose(fp) != 0)){ BWLError(ctx,BWLErrFATAL,errno,"fclose(%s): %M",fname); return NULL; } /* * Open the limits file. */ fname[0] = '\0'; len = strlen(BWL_LIMITS_FILE); if(len > MAXPATHLEN){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "strlen(BWL_LIMITS_FILE > MAXPATHLEN)"); return NULL; } len += strlen(confdir) + strlen(BWL_PATH_SEPARATOR); if(len > MAXPATHLEN){ BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "Path to %s > MAXPATHLEN",BWL_LIMITS_FILE); return NULL; } strcpy(fname,confdir); strcat(fname,BWL_PATH_SEPARATOR); strcat(fname,BWL_LIMITS_FILE); if(!(fp = fopen(fname,"r"))){ if(errno != ENOENT){ BWLError(ctx,BWLErrFATAL,errno,"Unable to open %s: %M", fname); return NULL; } } rc = parselimits(policy,fp,lbuf,lbuf_max); BADLINE: if(rc < 0){ BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "%s:%d Invalid file syntax",fname,-rc); return NULL; } /* * Policy files were parsed and loaded ok. Now, install policy * hook functions that will use it. * * Use func pointers to ensure we have functions of the correct * type. */ if(!BWLContextConfigSet(ctx,BWLDPOLICY,policy)){ return NULL; } if(!BWLContextConfigSet(ctx,BWLGetAESKey,(BWLFunc)getaeskey)){ return NULL; } if(!BWLContextConfigSet(ctx,BWLCheckControlPolicy,(BWLFunc)checkcontrolfunc)){ return NULL; } if(!BWLContextConfigSet(ctx,BWLCheckTestPolicy,(BWLFunc)checktestfunc)){ return NULL; } if(!BWLContextConfigSet(ctx,BWLTestComplete,(BWLFunc)testcompletefunc)){ return NULL; } return policy; } /* * Function: BWLDGetAESKey * * Description: * Fetch the 128 bit AES key for a given userid and return it. * * Returns True if successful. * If False is returned err_ret can be checked to determine if * the key store had a problem(ErrFATAL) or if the userid is * invalid(ErrOK). * * In Args: * * Out Args: * * Scope: * Returns: T/F * Side Effect: */ extern BWLBoolean BWLDGetAESKey( BWLContext ctx, const BWLUserID userid, BWLKey key_ret, BWLErrSeverity *err_ret ) { BWLDPolicy policy; I2Datum key,val; *err_ret = BWLErrOK; if(!(policy = (BWLDPolicy)BWLContextConfigGetV(ctx,BWLDPOLICY))){ BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "BWLDGetAESKey: BWLDPOLICY not set"); *err_ret = BWLErrFATAL; return False; } key.dptr = (void*)userid; key.dsize = strlen(userid); if(!I2HashFetch(policy->keys,key,&val)){ BWLError(policy->ctx,BWLErrFATAL,BWLErrPOLICY, "userid \"%s\" unknown",userid); return False; } memcpy(key_ret,val.dptr,val.dsize); return True; } static BWLDPolicyNode GetNodeDefault( BWLDPolicy policy ) { BWLDPidRec tpid; I2Datum key,val; memset(&tpid,0,sizeof(tpid)); tpid.id_type = BWLDPidDefaultType; key.dptr = &tpid; key.dsize = sizeof(tpid); if(I2HashFetch(policy->idents,key,&val)){ return (BWLDPolicyNode)val.dptr; } return policy->root; } static BWLDPolicyNode GetNodeFromUserID( BWLDPolicy policy, const BWLUserID userid /* MUST POINT TO VALID MEMORY */ ) { BWLDPidRec pid; I2Datum key,val; memset(&pid,0,sizeof(pid)); pid.id_type = BWLDPidUserType; key.dptr = &pid; key.dsize = sizeof(pid); memcpy(pid.user.userid,userid,sizeof(pid.user.userid)); if(I2HashFetch(policy->idents,key,&val)){ return (BWLDPolicyNode)val.dptr; } return NULL; } static BWLDPolicyNode GetNodeFromAddr( BWLDPolicy policy, struct sockaddr *remote_sa_addr ) { BWLDPidRec pid; uint8_t nbytes,nbits,*ptr; I2Datum key,val; memset(&pid,0,sizeof(pid)); pid.id_type = BWLDPidNetmaskType; key.dptr = &pid; key.dsize = sizeof(pid); switch(remote_sa_addr->sa_family){ struct sockaddr_in *saddr4; #ifdef AF_INET6 struct sockaddr_in6 *saddr6; case AF_INET6: saddr6 = (struct sockaddr_in6*)remote_sa_addr; /* * If this is a v4 mapped address - match it as a v4 address. */ if(IN6_IS_ADDR_V4MAPPED(&saddr6->sin6_addr)){ memcpy(pid.net.addrval, &saddr6->sin6_addr.s6_addr[12],4); pid.net.addrsize = 4; } else{ memcpy(pid.net.addrval,saddr6->sin6_addr.s6_addr,16); pid.net.addrsize = 16; } break; #endif case AF_INET: saddr4 = (struct sockaddr_in*)remote_sa_addr; memcpy(pid.net.addrval,&saddr4->sin_addr.s_addr,4); pid.net.addrsize = 4; break; default: BWLError(policy->ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unknown address protocol family."); return NULL; break; } /* * Start with the max mask size (full address) and keep decreasing * the mask size until all possible address masks have been checked * for the given address. */ for(pid.net.mask_len=pid.net.addrsize*8; pid.net.mask_len > 0; pid.net.mask_len--){ /* * nbytes is number of complete bytes in "mask". * nbits is number of bits in the following byte that * are part of the "mask". */ nbytes = pid.net.mask_len/8; nbits = pid.net.mask_len%8; ptr = &pid.net.addrval[nbytes]; /* * Zero out one more bit each time through the loop. * (The "if" skips the "max" case.) */ if(nbytes < pid.net.addrsize){ *ptr &= (0xFF << (8-nbits)); } if(I2HashFetch(policy->idents,key,&val)){ return (BWLDPolicyNode)val.dptr; } } return GetNodeDefault(policy); } static BWLDLimitT GetLimit( BWLDPolicyNode node, BWLDMesgT lim ) { size_t i; for(i=0;iilim;i++){ if(lim == node->limits[i].limit){ return node->limits[i].value; } } return GetDefLimit(lim); } static BWLDLimitT GetUsed( BWLDPolicyNode node, BWLDMesgT lim ) { size_t i; for(i=0;iilim;i++){ if(lim == node->limits[i].limit){ return node->used[i].value; } } return 0; } static BWLBoolean IntegerResourceDemand( BWLDPolicyNode node, BWLDMesgT query, BWLDLimRec lim, enum limtype limkind ) { float fudge = (float)1.0; size_t i; /* * terminate recursion */ if(!node){ return True; } for(i=0;iilim;i++){ if(node->limits[i].limit == lim.limit){ goto found; } } /* * If there is no limit record, then the default must be 0 or the * logic breaks. */ assert(!GetDefLimit(lim.limit)); /* * No reason to keep track if this resource is unlimited all the * way up the tree - so just return true. */ return True; found: /* * Ok - found the resource limits */ /* * If no limit at this level, go on to next. */ if(!node->limits[i].value){ return IntegerResourceDemand(node->parent,query,lim,limkind); } /* * Deal with resource releases. */ else if(query == BWLDMESGRELEASE){ /* * don't need to release fixed limits - so shortcut. */ if(limkind == LIMFIXEDINT) return True; if(lim.value > node->used[i].value){ BWLError(node->policy->ctx,BWLErrFATAL,BWLErrPOLICY, "Request to release unallocated resouces: " "%s:%s (currently allocated = %u, " "release amount = %u)",node->nodename, GetLimName(lim.limit),node->used[i].value, lim.value); return False; } if(!IntegerResourceDemand(node->parent,query,lim,limkind)){ return False; } node->used[i].value -= lim.value; return True; } /* * The rest deals with resource requests. */ /* * If this is a BWLDMESGCLAIM request - apply the fudge factor. * TODO: This was used to increase the amount of disk *actually* * used by the test, but may not be needed for iperf... I will * leave the MESGCLAIM message as valid for now, and just report * an invalid claim request so I can easily add fudged limits if * needed. */ if(query == BWLDMESGCLAIM){ switch(lim.limit){ default: BWLError(node->policy->ctx,BWLErrFATAL,BWLErrPOLICY, "Invalid \"CLAIM\" request"); return False; } } else if(query != BWLDMESGREQUEST){ BWLError(node->policy->ctx,BWLErrFATAL,BWLErrPOLICY, "Unknown resource request type: %u",query); return False; } /* * If this level doesn't have the resources available - return false. * (If LIMFIXEDINT, then "used" value will be 0.) */ if((lim.value+node->used[i].value) > (node->limits[i].value * fudge)){ return False; } /* * Are the resource available the next level up? */ if(!IntegerResourceDemand(node->parent,query,lim,limkind)){ return False; } if(limkind == LIMINT) node->used[i].value += lim.value; return True; } BWLBoolean BWLDGetFixedLimit( BWLDPolicyNode node, BWLDMesgT limname, BWLDLimitT *ret_val ) { size_t maxdef = I2Number(limkeys); size_t i; enum limtype limkind = LIMNOT; for(i=0;ipolicy->ctx,BWLErrFATAL,BWLErrINVALID, "BWLDResourceDemand: Invalid limit kind: " "node(%s),limname(%d),limkind(%d)", node->nodename,limname,limkind); return False; } BWLBoolean BWLDResourceDemand( BWLDPolicyNode node, BWLDMesgT query, BWLDLimRec lim ) { size_t maxdef = I2Number(limkeys); size_t i; enum limtype limkind = LIMNOT; BWLDLimitT val; BWLBoolean ret; for(i=0;ipolicy->ctx,BWLErrFATAL,BWLErrINVALID, "BWLDResourceDemand: Invalid limit kind."); ret = False; } else{ ret = IntegerResourceDemand(node,query,lim,limkind); } /* * These messages are printed to DEBUG so they can be selected * as non-interesting. */ for(;node;node = node->parent){ BWLError(node->policy->ctx,BWLErrDEBUG,BWLErrPOLICY, "ResReq %s: %s:%s:%s = %llu (result = %llu, limit = %llu)", (ret)?"ALLOWED":"DENIED", node->nodename, (query == BWLDMESGRELEASE)?"release":"request", GetLimName(lim.limit), lim.value, GetUsed(node,lim.limit), GetLimit(node,lim.limit)); } return ret; } /* * Function: BWLDSendResponse * * Description: * This function is called from the parent perspective. * * It is used to respond to a child request/release of resources. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ int BWLDSendResponse( int fd, int *retn_on_intr, BWLDMesgT mesg ) { BWLDMesgT buf[3]; int fail_on_intr=1; int *intr = &fail_on_intr; if(retn_on_intr) intr = retn_on_intr; buf[0] = buf[2] = BWLDMESGMARK; buf[1] = mesg; if(I2Writeni(fd,&buf[0],12,intr) != 12){ return 1; } return 0; } /* * Function: BWLDReadResponse * * Description: * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ static BWLDMesgT BWLDReadResponse( int fd, int *retn_on_intr ) { BWLDMesgT buf[3]; int fail_on_intr=1; int *intr = &fail_on_intr; if(retn_on_intr) intr = retn_on_intr; if(I2Readni(fd,&buf[0],12,intr) != 12){ return BWLDMESGINVALID; } if((buf[0] != BWLDMESGMARK) || (buf[2] != BWLDMESGMARK)){ return BWLDMESGINVALID; } return buf[1]; } /* * Function: BWLDReadClass * * Description: * This function is called from the parent perspective. * * It is used to read the initial message from a child to determine * the "user class" of the given connection. * * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLDPolicyNode BWLDReadClass( BWLDPolicy policy, int fd, int *retn_on_intr, int *err ) { ssize_t i; const BWLDMesgT mark=BWLDMESGMARK; const BWLDMesgT mclass=BWLDMESGCLASS; uint8_t buf[BWLDMAXCLASSLEN+1 + sizeof(BWLDMesgT)*3]; I2Datum key,val; int fail_on_intr=1; int *intr = &fail_on_intr; if(retn_on_intr) intr = retn_on_intr; *err = 1; /* * Read message header */ if((i = I2Readni(fd,&buf[0],8,intr)) != 8){ if(i == 0){ *err = 0; } return NULL; } if(memcmp(&buf[0],&mark,sizeof(BWLDMesgT)) || memcmp(&buf[4],&mclass,sizeof(BWLDMesgT))){ return NULL; } /* * read classname */ for(i=0;i<= BWLDMAXCLASSLEN;i++){ if(I2Readni(fd,&buf[i],1,intr) != 1){ return NULL; } if(buf[i] == '\0'){ break; } } if(i > BWLDMAXCLASSLEN){ return NULL; } key.dptr = &buf[0]; key.dsize = i; /* * read message trailer. */ i++; if((I2Readni(fd,&buf[i],4,intr) != 4) || memcmp(&buf[i],&mark,sizeof(BWLDMesgT))){ return NULL; } if(I2HashFetch(policy->limits,key,&val)){ if(BWLDSendResponse(fd,intr,BWLDMESGOK) != 0){ return NULL; } *err = 0; return val.dptr; } (void)BWLDSendResponse(fd,intr,BWLDMESGDENIED); return NULL; } static BWLDMesgT BWLDSendClass( BWLDPolicy policy, BWLDPolicyNode node ) { uint8_t buf[BWLDMAXCLASSLEN+1 + sizeof(BWLDMesgT)*3]; BWLDMesgT mesg; ssize_t len; int fail_on_intr=1; int *intr = &fail_on_intr; if(policy->retn_on_intr) intr = policy->retn_on_intr; mesg = BWLDMESGMARK; memcpy(&buf[0],&mesg,4); mesg = BWLDMESGCLASS; memcpy(&buf[4],&mesg,4); len = strlen(node->nodename); len++; strncpy((char*)&buf[8],node->nodename,(size_t)len); len += 8; mesg = BWLDMESGMARK; memcpy(&buf[len],&mesg,4); len += 4; if(I2Writeni(policy->fd,buf,(size_t)len,intr) != len){ BWLError(policy->ctx,BWLErrFATAL,BWLErrUNKNOWN, "BWLDCheckControlPolicy: Unable to contact parent"); return BWLDMESGINVALID; } return BWLDReadResponse(policy->fd,intr); } /* * return the request type, or 0. * err will be 0 for a 0 length read. (i.e. no error) */ int BWLDReadReqType( int fd, int *retn_on_intr, int *err ) { ssize_t i; BWLDMesgT buf[2]; int fail_on_intr=1; int *intr = &fail_on_intr; if(retn_on_intr) intr = retn_on_intr; *err = 1; /* * Read message header */ if((i = I2Readni(fd,&buf[0],8,intr)) != 8){ if(i == 0){ *err = 0; } return 0; } if(buf[0] != BWLDMESGMARK){ return 0; } *err = 0; return buf[1]; } /* * True if the request is read without error */ BWLBoolean BWLDReadQuery( int fd, int *retn_on_intr, BWLDMesgT *query, BWLDLimRec *lim_ret, int *err ) { ssize_t i; BWLDMesgT buf[5]; int fail_on_intr=1; int *intr = &fail_on_intr; if(retn_on_intr) intr = retn_on_intr; *err = 1; /* * Read message header */ if((i = I2Readni(fd,&buf[0],20,intr)) != 20) return False; if(buf[4] != BWLDMESGMARK) return False; switch(buf[0]){ case BWLDMESGREQUEST: case BWLDMESGRELEASE: case BWLDMESGCLAIM: *query = buf[0]; break; default: return False; } lim_ret->limit = buf[1]; memcpy(&lim_ret->value,&buf[2],8); *err = 0; return True; } static BWLDMesgT BWLDQuery( BWLDPolicy policy, BWLDMesgT mesg, /* BWLDMESGREQUEST or BWLDMESGRELEASE */ BWLDLimRec lim ) { BWLDMesgT buf[7]; int fail_on_intr=1; int *intr = &fail_on_intr; if(policy->retn_on_intr) intr = policy->retn_on_intr; buf[0] = buf[6] = BWLDMESGMARK; buf[1] = BWLDMESGRESOURCE; buf[2] = mesg; buf[3] = lim.limit; memcpy(&buf[4],&lim.value,8); if(I2Writeni(policy->fd,buf,28,intr) != 28){ BWLError(policy->ctx,BWLErrFATAL,BWLErrUNKNOWN, "BWLDQuery: Unable to contact parent"); return BWLDMESGINVALID; } return BWLDReadResponse(policy->fd,intr); } /* * True if the request is read without error */ BWLBoolean BWLDReadReservationQuery( int fd, int *retn_on_intr, BWLSID sid, BWLNum64 *req_time, BWLNum64 *fuzz_time, BWLNum64 *last_time, uint32_t *duration, BWLNum64 *rtt_time, uint16_t *recv_port, BWLToolType *tool_id, char *sender, char *receiver, int *err ) { BWLDMesgT mark; ssize_t i; char buf[156]; int fail_on_intr=1; int *intr = &fail_on_intr; if(retn_on_intr) intr = retn_on_intr; *err = 1; /* * Read message header */ if((i = I2Readni(fd,&buf[0],156,intr)) != 156) return False; memcpy(&mark,&buf[152],4); if(mark != BWLDMESGMARK) return False; memcpy(sid,&buf[0],16); memcpy(req_time,&buf[16],8); memcpy(fuzz_time,&buf[24],8); memcpy(last_time,&buf[32],8); memcpy(duration,&buf[40],4); memcpy(rtt_time,&buf[44],8); memcpy(recv_port,&buf[52],2); memcpy(tool_id,&buf[56],4); memcpy(sender,&buf[60],46); memcpy(receiver,&buf[106],46); *err = 0; return True; } /* * Function: BWLDSendReservationResponse * * Description: * This function is called from the parent perspective. * * It is used to respond to a child request for reservation. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ int BWLDSendReservationResponse( int fd, int *retn_on_intr, BWLDMesgT mesg, BWLNum64 reservation, uint16_t toolport ) { BWLDMesgT mark = BWLDMESGMARK; char buf[24]; int fail_on_intr=1; int *intr = &fail_on_intr; if(retn_on_intr) intr = retn_on_intr; /* message mark */ memcpy(&buf[0],&mark,4); memcpy(&buf[20],&mark,4); /* message type */ memcpy(&buf[4],&mesg,4); /* real data */ memcpy(&buf[8],&reservation,8); memcpy(&buf[16],&toolport,2); bzero (&buf[18],2); if(I2Writeni(fd,&buf[0],24,intr) != 24){ return 1; } return 0; } static BWLDMesgT BWLDReadReservationResponse( int fd, int *retn_on_intr, BWLNum64 *reservation_ret, uint16_t *tool_port_ret ) { ssize_t i; BWLDMesgT mesg = BWLDMESGMARK; char buf[24]; int fail_on_intr=1; int *intr = &fail_on_intr; if(retn_on_intr) intr = retn_on_intr; /* * Read message header */ if((i = I2Readni(fd,&buf[0],24,intr)) != 24) return False; if(memcmp(&buf[0],&mesg,4) || memcmp(&buf[20],&mesg,4)){ return False; } memcpy(&mesg,&buf[4],4); memcpy(reservation_ret,&buf[8],8); memcpy(tool_port_ret,&buf[16],2); return mesg; } static BWLDMesgT BWLDReservationQuery( BWLDPolicy policy, BWLSID sid, BWLNum64 req_time, BWLNum64 fuzz_time, BWLNum64 last_time, uint32_t duration, BWLNum64 rtt_time, BWLNum64 *reservation_ret, uint16_t *toolport, uint32_t tool, I2Addr sender, I2Addr receiver ) { BWLDMesgT val; char buf[164]; int fail_on_intr=1; int *intr = &fail_on_intr; char sender_str[46]; // INET6_ADDRSTRLEN char receiver_str[46]; bzero(sender_str, sizeof(sender_str)); bzero(receiver_str, sizeof(receiver_str)); BWLAddrNodeName(policy->ctx, sender, sender_str, sizeof(sender_str), NI_NUMERICHOST); BWLAddrNodeName(policy->ctx, receiver, receiver_str, sizeof(receiver_str), NI_NUMERICHOST); if(policy->retn_on_intr) intr = policy->retn_on_intr; val = BWLDMESGMARK; memcpy(&buf[0],&val,4); memcpy(&buf[160],&val,4); val = BWLDMESGRESERVATION; memcpy(&buf[4],&val,4); memcpy(&buf[8],sid,16); memcpy(&buf[24],&req_time,8); memcpy(&buf[32],&fuzz_time,8); memcpy(&buf[40],&last_time,8); memcpy(&buf[48],&duration,4); memcpy(&buf[52],&rtt_time,8); memcpy(&buf[60],toolport,2); bzero (&buf[62],2); memcpy(&buf[64],&tool,4); memcpy(&buf[68],sender_str,46); memcpy(&buf[114],receiver_str,46); if(I2Writeni(policy->fd,buf,164,intr) != 164){ BWLError(policy->ctx,BWLErrFATAL,BWLErrUNKNOWN, "BWLDQuery: Unable to contact parent"); return BWLDMESGINVALID; } return BWLDReadReservationResponse(policy->fd,intr,reservation_ret, toolport); } /* * True if the request is read without error */ BWLBoolean BWLDReadTestComplete( int fd, int *retn_on_intr, BWLSID sid, BWLAcceptType *aval, int *err ) { ssize_t i; BWLDMesgT buf[6]; int fail_on_intr=1; int *intr = &fail_on_intr; if(retn_on_intr) intr = retn_on_intr; *err = 1; /* * Read message header */ if((i = I2Readni(fd,&buf[0],24,intr)) != 24) return False; if(buf[5] != BWLDMESGMARK) return False; memcpy(sid,&buf[0],16); *aval = buf[4]; *err = 0; return True; } static BWLDMesgT BWLDSendTestComplete( BWLDPolicy policy, BWLSID sid, BWLAcceptType aval ) { BWLDMesgT buf[8]; int fail_on_intr=1; int *intr = &fail_on_intr; if(policy->retn_on_intr) intr = policy->retn_on_intr; buf[0] = buf[7] = BWLDMESGMARK; buf[1] = BWLDMESGCOMPLETE; memcpy(&buf[2],sid,16); memcpy(&buf[6],&aval,4); if(I2Writeni(policy->fd,buf,32,intr) != 32){ BWLError(policy->ctx,BWLErrFATAL,BWLErrUNKNOWN, "BWLDQuery: Unable to contact parent"); return BWLDMESGINVALID; } return BWLDReadResponse(policy->fd,intr); } /* * Function: BWLDAllowOpenMode * * Description: * check if the given address is allowed to have open_mode communication. * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLBoolean BWLDAllowOpenMode( BWLDPolicy policy, struct sockaddr *remote_sa_addr, BWLErrSeverity *err_ret /* error - return */ ) { BWLDPolicyNode node; *err_ret = BWLErrOK; if(!(node = GetNodeFromAddr(policy,remote_sa_addr))){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "BWLDAllowOpenMode: Invalid policy"); *err_ret = BWLErrFATAL; return False; } return (GetLimit(node,BWLDLimAllowOpenMode) != 0); } /* * Function: BWLDCheckControlPolicy * * Description: * Determines the "user class" of the given connection and * sends that information to the "parent" so the parent can * approve future resource requests. * * Returns False and sets err_ret if the "user class" cannot be * determined or if there is an error communicating with the parent. * (The parent communication is necessary to keep track of resource * allocations on a "global" basis instead of per-connection.) * * In Args: * * Out Args: * * Scope: * Returns: * Side Effect: */ BWLBoolean BWLDCheckControlPolicy( BWLControl cntrl, BWLSessionMode mode, /* requested mode */ const BWLUserID userid, /* identity */ struct sockaddr *local_sa_addr __attribute__((unused)), /* local addr or NULL */ struct sockaddr *remote_sa_addr, /* remote addr */ BWLErrSeverity *err_ret /* error - return */ ) { BWLContext ctx; BWLDPolicy policy; BWLDPolicyNode node=NULL; BWLDMesgT ret; *err_ret = BWLErrOK; ctx = BWLGetContext(cntrl); if(!(policy = (BWLDPolicy)BWLContextConfigGetV(ctx,BWLDPOLICY))){ BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "BWLDCheckControlPolicy: BWLDPOLICY not set"); *err_ret = BWLErrFATAL; return False; } /* * Determine userclass and send that to the parent. * (First try based on userid.) */ if(((mode & BWL_MODE_DOCIPHER) && userid) && !(node = GetNodeFromUserID(policy,userid))){ BWLError(policy->ctx,BWLErrDEBUG,BWLErrUNKNOWN, "BWLDCheckControlPolicy: No policy match for userid(%s) - using netmask match",userid); } /* * If we don't get a userclass from the userid, then get one * based on the address. (This returns the default if no * address matched.) */ if(!node && !(node = GetNodeFromAddr(policy,remote_sa_addr))){ BWLError(policy->ctx,BWLErrFATAL,BWLErrINVALID, "BWLDCheckControlPolicy: Invalid policy"); *err_ret = BWLErrFATAL; return False; } /* * Initialize the communication with the parent resource broker * process. */ if((ret = BWLDSendClass(policy,node)) == BWLDMESGOK){ /* * Success - now save the node in the control config * for later hook functions to access. */ if(!BWLControlConfigSet(cntrl,BWLDPOLICY_NODE,node)){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "BWLDCheckControlPolicy: Unable to save \"class\" for connection"); *err_ret = BWLErrFATAL; return False; } return True; } /* * If ret wasn't BWLDMESGDENIED - there was some kind of error. */ if(ret != BWLDMESGDENIED){ *err_ret = BWLErrFATAL; } return False; } /* * This structure is returned in the "closure" pointer of the CheckTestPolicy * pointer - and provided to the Open/Close file functions as well as the * TestComplete function. */ typedef struct BWLDTestInfoRec{ BWLDPolicyNode node; BWLSID sid; BWLDLimRec res[1]; /* keep track of "consumable" resources * resouces listed here will be "released" * in TestComplete. */ } BWLDTestInfoRec, *BWLDTestInfo; BWLBoolean BWLDCheckTestPolicy( BWLControl cntrl, BWLSID sid, BWLBoolean local_client, struct sockaddr *local_sa_addr __attribute__((unused)), struct sockaddr *remote_sa_addr __attribute__((unused)), socklen_t sa_len __attribute__((unused)), BWLTestSpec *tspec, BWLNum64 fuzz_time, BWLNum64 *reservation_ret, uint16_t *tool_port_ret, uint16_t *local_tool_port_ret, void **closure, BWLErrSeverity *err_ret ) { BWLContext ctx = BWLGetContext(cntrl); BWLDPolicyNode node; BWLDTestInfo tinfo; BWLDMesgT ret; BWLDLimRec lim; BWLToolAvailability allowed_tools; uint16_t tool_port_loc = *tool_port_ret; double td; uint32_t access_prio = BWLErrINFO; I2numT minimum_ttl; *err_ret = BWLErrOK; tinfo = (BWLDTestInfo)*closure; (void) BWLContextConfigGetU32(ctx,BWLAccessPriority,&access_prio); /* * If this is just an update to the reservation... */ if(tinfo){ node = tinfo->node; goto reservation; } /* * this is an new request */ /* * Fetch the "user class" for this connection. */ if(!(node = (BWLDPolicyNode)BWLControlConfigGetV(cntrl, BWLDPOLICY_NODE))){ BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "BWLDCheckTestPolicy: BWLDPOLICY_NODE not set"); *err_ret = BWLErrFATAL; return False; } if(!(tinfo = calloc(1,sizeof(BWLDTestInfoRec)))){ BWLError(ctx,BWLErrFATAL,errno,"calloc(1,BWLDTestInfoRec): %M"); *err_ret = BWLErrFATAL; return False; } tinfo->node = node; memcpy(tinfo->sid,sid,sizeof(BWLSID)); /* VALIDATE THE REQUEST! */ /* * If allow_unsync is unset, check whether we're synchronized, and the * client is synchronized. */ if( !BWLContextConfigGetV(ctx,BWLAllowUnsync)){ if (BWLNTPIsSynchronized(ctx) == False) { BWLError(ctx,access_prio,BWLErrPOLICY, "BWLDCheckTestPolicy: Local server isn't synchronized. Server administrator needs to set 'allow_unsync' to allow anyway."); goto done; } /* else if (!tspec->req_time.sync) { BWLError(ctx,access_prio,BWLErrPOLICY, "BWLDCheckTestPolicy: Requesting client isn't synchronized. Server administrator needs to set 'allow_unsync' to allow anyway."); goto done; } */ } lim.limit = BWLDLimDuration; lim.value = tspec->duration + tspec->omit; if(!BWLDResourceDemand(node,BWLDMESGREQUEST,lim)){ BWLError(ctx,access_prio,BWLErrPOLICY, "BWLDCheckTestPolicy: Requested test duration denied"); goto done; } /* * First check fixed limits that don't need to be communicated * with the parent for global state. */ /* duration */ lim.limit = BWLDLimDuration; lim.value = tspec->duration + tspec->omit; if(!BWLDResourceDemand(node,BWLDMESGREQUEST,lim)){ BWLError(ctx,access_prio,BWLErrPOLICY, "BWLDCheckTestPolicy: Requested test duration denied"); goto done; } /* * time synchronization * Make sure clocks are synchronized to within max_time_error */ lim.limit = BWLDLimMaxTimeError; td = ceil(BWLNum64ToDouble(fuzz_time)); lim.value = (BWLDLimitT)td; if(!BWLDResourceDemand(node,BWLDMESGREQUEST,lim)){ BWLError(ctx,access_prio,BWLErrPOLICY, "BWLDCheckTestPolicy: Clock synchronization not sufficient: %f", BWLNum64ToDouble(fuzz_time)); goto done; } /* * Make sure the requested tool is allowed. */ /* TODO: really check this if the `tool' key or something similar if finally kept. */ allowed_tools = 0xffffffff; if(!(tspec->tool_id & allowed_tools)) goto done; /* * TCP/UDP */ if(tspec->udp){ lim.limit = BWLDLimAllowUDP; lim.value = True; if(!BWLDResourceDemand(node,BWLDMESGREQUEST,lim)){ BWLError(ctx,access_prio,BWLErrPOLICY, "BWLDCheckTestPolicy: UDP test not allowed"); goto done; } lim.limit = BWLDLimBandwidth; lim.value = tspec->bandwidth; if(!BWLDResourceDemand(node,BWLDMESGREQUEST,lim)){ BWLError(ctx,access_prio,BWLErrPOLICY, "BWLDCheckTestPolicy: UDP bandwidth request exceeds limits"); goto done; } } else{ lim.limit = BWLDLimAllowTCP; lim.value = True; if(!BWLDResourceDemand(node,BWLDMESGREQUEST,lim)){ BWLError(ctx,access_prio,BWLErrPOLICY, "BWLDCheckTestPolicy: TCP test not allowed"); goto done; } } if (local_client && tspec->no_server_endpoint) { if (BWLCntrlIsLocal(cntrl) == False) { lim.limit = BWLDLimAllowNoEndpoint; lim.value = True; if(!BWLDResourceDemand(node,BWLDMESGREQUEST,lim)){ BWLError(ctx,access_prio,BWLErrPOLICY, "BWLDCheckTestPolicy: Endpoint-less tests not allowed"); goto done; } } } // The minimum TTL is only applicable on the client side if ((local_client && !tspec->server_sends) || (!local_client && tspec->server_sends)) { // Get the minimum TTL, and if they haven't specified it in the request // (i.e. the traceroute_first_ttl is 0), set the TTL to it. if (BWLDGetFixedLimit(node,BWLDLimMinimumTTL,&minimum_ttl)) { if (minimum_ttl > 0 && tspec->traceroute_first_ttl > 0 && tspec->traceroute_first_ttl < minimum_ttl) { BWLError(ctx,access_prio,BWLErrPOLICY, "BWLDCheckTestPolicy: Specified TTL is too low"); goto done; } if (tspec->traceroute_first_ttl == 0) tspec->traceroute_first_ttl = minimum_ttl; } } /* * Now request consumable resources */ tinfo->res[0].limit = BWLDLimPending; tinfo->res[0].value = 1; if((ret = BWLDQuery(node->policy,BWLDMESGREQUEST,tinfo->res[0])) != BWLDMESGOK){ BWLError(ctx,access_prio,BWLErrPOLICY, "BWLDCheckTestPolicy: Too many outstanding reservations for group"); goto done; } reservation: /* * Request a reservation. */ if( (ret = BWLDReservationQuery(node->policy,tinfo->sid, tspec->req_time.tstamp,fuzz_time, tspec->latest_time,tspec->duration + tspec->omit, BWLGetRTTBound(cntrl), reservation_ret,&tool_port_loc,tspec->tool_id, (tspec->server_sends?tspec->server:tspec->client), (tspec->server_sends?tspec->client:tspec->server) )) != BWLDMESGOK){ BWLError(ctx,access_prio,BWLErrPOLICY, "BWLDCheckTestPolicy: No reservation time available"); goto done; } /* * Share the parents idea of a good port to use, if this is the * receiver. (The sender MUST use what the reciever specifies, so * ignore the parents suggestion in this case.) */ if(!local_client){ *tool_port_ret = tool_port_loc; } *local_tool_port_ret = tool_port_loc; *closure = tinfo; return True; done: *closure = NULL; free(tinfo); return False; } extern void BWLDTestComplete( BWLControl cntrl __attribute__((unused)), void *closure, /* closure from CheckTestPolicy */ BWLAcceptType aval ) { BWLDTestInfo tinfo = (BWLDTestInfo)closure; unsigned int i,n; n = I2Number(tinfo->res); for(i=0;ires[i].limit){ continue; } (void)BWLDQuery(tinfo->node->policy,BWLDMESGRELEASE, tinfo->res[i]); } (void)BWLDSendTestComplete(tinfo->node->policy,tinfo->sid,aval); free(tinfo); return; } bwctl_1.5.4+dfsg1.orig/bwctld/policy.h0000664000076500007710000004021212560414557014545 0ustar /* * $Id$ */ /* * File: policy.h * * Author: Jeff W. Boote * Internet2 * * Date: Tue Sep 16 14:29:07 MDT 2003 * * Description: * This file declares the types needed by applications * to use the "default" * * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifndef _BWL_DEFAULTS_H #define _BWL_DEFAULTS_H #include #include #ifndef BWL_KEY_FILE #define BWL_KEY_FILE "bwctld.keys" #endif #ifndef BWL_LIMITS_FILE #define BWL_LIMITS_FILE "bwctld.limits" #endif /* * Holds the policy record that was parsed and contains all the "limits" * and identity information. * * type: (owp_policy_data*) - defined in access.h * location: Context Config */ #define BWLDPOLICY "V.BWLDPOLICY" /* * Holds the identifying "node" from the policy tree that contains the * class and limits information for the given control connection. * * type: (owp_tree_node_ptr) - defined in access.h * location: Control Config */ #define BWLDPOLICY_NODE "V.BWLDPOLICY_NODE" /* * Types used by policy functions */ #define BWLDMAXCLASSLEN (80) typedef struct BWLDPolicyRec BWLDPolicyRec, *BWLDPolicy; typedef struct BWLDPolicyNodeRec BWLDPolicyNodeRec, *BWLDPolicyNode; typedef struct BWLDPolicyKeyRec BWLDPolicyKeyRec, *BWLDPolicyKey; struct BWLDPolicyRec{ BWLContext ctx; int fd; /* socket to parent. */ int *retn_on_intr; /* If one, exit I/O on sigs */ BWLDPolicyNode root; /* limits: * key = char* (classname from "limit" lines) * val = BWLDPolicyNode */ I2Table limits; /* idents: * key = BWLDPid * val = BWLDPolicyNode */ I2Table idents; /* keys: * key = uint8_t[16] (username from bwlib protocol) * val = BWLKey */ I2Table keys; }; typedef I2numT BWLDLimitT; /* values */ typedef uint32_t BWLDMesgT; typedef struct BWLDLimRec{ BWLDMesgT limit; BWLDLimitT value; } BWLDLimRec; /* parent cname */ /* bandwidth uint (bits/sec)*/ /* allow_open_mode (on)/off */ #define BWLDLimParent 0 #define BWLDLimBandwidth 1 #define BWLDLimPending 2 #define BWLDLimEventHorizon 3 #define BWLDLimDuration 4 #define BWLDLimAllowOpenMode 5 #define BWLDLimAllowTCP 6 #define BWLDLimAllowUDP 7 #define BWLDLimMaxTimeError 8 #define BWLDLimMinimumTTL 9 #define BWLDLimAllowNoEndpoint 10 struct BWLDPolicyNodeRec{ BWLDPolicy policy; char *nodename; BWLDPolicyNode parent; size_t ilim; BWLDLimRec *limits; BWLDLimRec *used; }; typedef enum{ BWLDPidInvalid=0, BWLDPidDefaultType, BWLDPidNetmaskType, BWLDPidUserType } BWLDPidType; typedef struct{ BWLDPidType id_type; uint8_t mask_len; size_t addrsize; uint8_t addrval[16]; } BWLDPidNetmask; typedef struct{ BWLDPidType id_type; BWLUserID userid; } BWLDPidUser; typedef union BWLDPidUnion{ BWLDPidType id_type; BWLDPidNetmask net; BWLDPidUser user; } BWLDPidRec, *BWLDPid; /* * The following section defines the message tags used to communicate * from the children processes to the parent to request/release * resources on a global basis. * * All message "type" defines will be of type BWLDMesgT. */ #define BWLDMESGMARK 0xfefefefe #define BWLDMESGCLASS 0xcdef #define BWLDMESGRESOURCE 0xbeef #define BWLDMESGRESERVATION 0xdeadbeef #define BWLDMESGCOMPLETE 0xabcdefab #define BWLDMESGREQUEST 0xfeed #define BWLDMESGRELEASE 0xdead #define BWLDMESGCLAIM 0x1feed1 /* * "parent" response messages will be one of: */ #define BWLDMESGINVALID 0x0 #define BWLDMESGOK 0x1 #define BWLDMESGDENIED 0x2 /* * After forking, the new "server" process (called "child" in the following) * should determine the "usage class" the given connection should belong to. * The first message to the "parent" master process should communicate this * information so that all further resource requests/releases are relative * to that "usage class". The format of this message should be as follows: * * (All integers are in host order since this is expected to be ipc * communication on a single host. It could be a future enhancement to * allow a "single" distributed bwctld BWLIB-Control server to manage * multiple test endpoints at which time it might be worth the overhead * to deal with byte ordering issues.) * * Initial child->parent message: * * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00| BWLDMESGMARK | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 04| BWLDMESGCLASS | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * [nul terminated ascii string of classname] * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00| BWLDMESGMARK | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * This is a child message format that is used to request or release resources. * (The parent should release all "temporary" resources (i.e. bandwidth) * on exit of the child if the child does not explicitly release the resource. * More "permenent" resources should only be released explicitly * (i.e. disk-space). * * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00| BWLDMESGMARK | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 04| BWLDMESGRESOURCE | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 08| BWLDMESGWANT|BWLDMESGRELEASE|BWLDMESGCLAIM | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 12| BWLDMesgT(limit name) | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 16| BWLDLimitT | * 20| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 24| BWLDMESGMARK | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * This is a child message format that is used to declare a test complete. * (The Accept Value will be 0 if the test was successful.) * * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00| BWLDMESGMARK | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 04| BWLDMESGCOMPLETE | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 08| | * 12| SID | * 16| | * 20| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 24| Accept Value | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 28| BWLDMESGMARK | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * * Parent responses to the previous two messages are of the format: * * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00| BWLDMESGMARK | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 04| BWLDMESGOK|BWLDMESGDENIED | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 08| BWLDMESGMARK | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * This is a child message format that is used to request reservations. * * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00| BWLDMESGMARK | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 04| BWLDMESGRESERVATION | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 08| | * 12| SID | * 16| | * 20| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 24| Request Time | * 28| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 32| Fuzz TIME | * 36| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 40| Latest Time | * 44| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 48| Duration | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 52| RTT TIME | * 56| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 60| Recv Port | Unused | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 64| Tool_id | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 68| BWLDMESGMARK | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * Parent responses to the reservation request are of the format: * * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 00| BWLDMESGMARK | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 04| BWLDMESGOK|BWLDMESGDENIED | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 08| Request Time | * 12| | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 16| Recv Port | Unused | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * 20| BWLDMESGMARK | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * */ /* * The following api convienence functions are defined to make the child/parent * communication easier. (These are the functions needed by the parent in * the master bwctld "resource broker" process.) */ extern BWLDPolicyNode BWLDReadClass( BWLDPolicy policy, int fd, int *retn_on_intr, int *err ); /* * Returns the request type or 0. */ extern int BWLDReadReqType( int fd, int *retn_on_intr, int *err); /* * returns True on success - query/lim_ret will contain request * err will be non-zero on error. 0 on empty read. */ extern BWLBoolean BWLDReadQuery( int fd, int *retn_on_intr, BWLDMesgT *query, BWLDLimRec *lim_ret, int *err ); extern BWLBoolean BWLDReadReservationQuery( int fd, int *retn_on_intr, BWLSID sid, BWLNum64 *req_time, BWLNum64 *fuzz_time, BWLNum64 *last_time, uint32_t *duration, BWLNum64 *rtt_time, uint16_t *toolport, BWLToolType *tool_id, char *sender, char *receiver, int *err ); extern BWLBoolean BWLDReadTestComplete( int fd, int *retn_on_intr, BWLSID sid, BWLAcceptType *aval, int *err ); extern int BWLDSendResponse( int fd, int *retn_on_intr, BWLDMesgT mesg ); extern int BWLDSendReservationResponse( int fd, int *retn_on_intr, BWLDMesgT mesg, BWLNum64 reservation, uint16_t toolport ); /* * This function is used to add/subtract resource allocations from the * current tree of resource usage. (It is also used for "fixed" value * resouces to determine if the request is valid or not. For "fixed" * value resources, the current "usage" is not tracked.) */ extern BWLBoolean BWLDResourceDemand( BWLDPolicyNode node, BWLDMesgT query, BWLDLimRec lim ); /* * This function is used to return the "fixed" limit defined for a * given node for a particular resource. It returns True if it was * able to fetch the value. (It should only return False if called * for a non-fixed value resource.) */ extern BWLBoolean BWLDGetFixedLimit( BWLDPolicyNode node, BWLDMesgT limname, BWLDLimitT *ret_val ); /* * Functions called directly from bwctld regarding "policy" decisions * (If false, check err_ret to determine if it is an "error" condition, * or if open_mode is simply denied.) */ extern BWLBoolean BWLDAllowOpenMode( BWLDPolicy policy, struct sockaddr *peer_addr, BWLErrSeverity *err_ret ); /* * Functions actually used to install policy hooks into libbwlib. */ extern BWLBoolean BWLDGetAESKey( BWLContext ctx, const BWLUserID userid, uint8_t *key_ret, BWLErrSeverity *err_ret ); extern BWLBoolean BWLDCheckControlPolicy( BWLControl cntrl, BWLSessionMode mode, const BWLUserID userid, struct sockaddr *local_saddr, struct sockaddr *remote_saddr, BWLErrSeverity *err_ret ); extern BWLBoolean BWLDCheckTestPolicy( BWLControl cntrl, BWLSID sid, BWLBoolean local_sender, struct sockaddr *local_saddr, struct sockaddr *remote_saddr, socklen_t sa_len, BWLTestSpec *tspec, BWLNum64 fuzz_time, BWLNum64 *reservation_ret, uint16_t *tool_port_ret, uint16_t *local_tool_port_ret, void **closure, BWLErrSeverity *err_ret ); extern void BWLDTestComplete( BWLControl cntrl, void *closure, BWLAcceptType aval ); extern BWLDPolicy BWLDPolicyInstall( BWLContext ctx, char *confdir, /* conf dir for policy */ int *retn_on_intr, char **lbuf, size_t *lbuf_max ); #endif /* _BWL_DEFAULTS_H */ bwctl_1.5.4+dfsg1.orig/bwctld/Makefile.am0000664000076500007710000000240612560414557015134 0ustar # # $Id$ # ######################################################################### # # # Copyright (C) 2003 # # Internet2 # # All Rights Reserved # # # ######################################################################### # # File: Makefile.am # # Author: Jeff Boote # Internet2 # # Date: Tue Sep 16 14:28:33 MDT 2003 # # Description: bwctld build description bin_PROGRAMS = bwctld bwctld_SOURCES = bwctldP.h bwctld.c policy.h policy.c missing_queue.h bwctld_CFLAGS = -I.. if TOOL_THRULAY if USE_SYS_THRULAY BWLIBTHRULAY = -lthrulay else BWLIBTHRULAY = ../thrulay/thrulay/libthrulay.la endif else BWLIBTHRULAY = endif bwctld_LDADD = -L../bwlib -lbwlib $(BWLIBTHRULAY) -lI2util # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # bwctl_1.5.4+dfsg1.orig/bwctld/bwctldP.h0000664000076500007710000000475512560414557014661 0ustar /* * $Id$ */ /* * File: bwctldP.h * * Author: Jeff W. Boote * Internet2 * * Date: Tue Sep 9 16:07:42 MDT 2003 * * Description: * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifndef _BWCTLDP_H_ #define _BWCTLDP_H_ #ifndef BWCTLD_CONF_FILE #define BWCTLD_CONF_FILE "bwctld.conf" #endif #define BWCTLD_IPERF_DEF_TESTPORT (5001) #define BWCTLD_THRULAYD_DEF_TESTPORT (5003) #if defined(HAVE_SYS_QUEUE_H) #include #else #include "missing_queue.h" #endif #include "policy.h" /* * Types */ typedef struct { I2Boolean verbose; I2Boolean help; char cwd[MAXPATHLEN]; char *confdir; char *vardir; char *authmode; uint32_t auth_mode; /* cooked version of authmode */ char *srcnode; char *user; char *group; I2Boolean allowRoot; uint32_t dieby; uint32_t controltimeout; I2Boolean daemon; char **posthook; int posthook_count; } bwctld_opts; typedef struct ReservationRec ReservationRec, *Reservation; struct ReservationRec{ BWLToolType tool; BWLSID sid; BWLNum64 restime; BWLNum64 start; /* fuzz applied */ BWLNum64 end; /* fuzz applied */ BWLNum64 fuzz; char *sender; char *receiver; uint32_t duration; uint16_t toolport; Reservation next; }; typedef struct ChldStateRec ChldStateRec, *ChldState; struct ChldStateRec{ BWLDPolicy policy; pid_t pid; int fd; BWLDPolicyNode node; Reservation res; }; typedef enum { SLOT_ANY, SLOT_BANDWIDTH, SLOT_LATENCY } time_slot_types; typedef struct TimeSlotRec *TimeSlot; struct TimeSlotRec { TAILQ_ENTRY(TimeSlotRec) entries; time_slot_types type; time_t start; time_t end; int num_reservations; int max_reservations; }; static void DisplayTimeSlots(); #endif /* _BWCTLDP_H_ */ bwctl_1.5.4+dfsg1.orig/bwctld/missing_queue.h0000664000076500007710000005066312560414557016136 0ustar /* $OpenBSD: queue.h,v 1.22 2001/06/23 04:39:35 angelos Exp $ */ /* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. 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. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 */ #ifndef _SYS_QUEUE_H_ #define _SYS_QUEUE_H_ /* * This file defines five types of data structures: singly-linked lists, * lists, simple queues, tail queues, and circular queues. * * * A singly-linked list is headed by a single forward pointer. The elements * are singly linked for minimum space and pointer manipulation overhead at * the expense of O(n) removal for arbitrary elements. New elements can be * added to the list after an existing element or at the head of the list. * Elements being removed from the head of the list should use the explicit * macro for this purpose for optimum efficiency. A singly-linked list may * only be traversed in the forward direction. Singly-linked lists are ideal * for applications with large datasets and few or no removals or for * implementing a LIFO queue. * * A list is headed by a single forward pointer (or an array of forward * pointers for a hash table header). The elements are doubly linked * so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before * or after an existing element or at the head of the list. A list * may only be traversed in the forward direction. * * A simple queue is headed by a pair of pointers, one the head of the * list and the other to the tail of the list. The elements are singly * linked to save space, so elements can only be removed from the * head of the list. New elements can be added to the list before or after * an existing element, at the head of the list, or at the end of the * list. A simple queue may only be traversed in the forward direction. * * A tail queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly * linked so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before or * after an existing element, at the head of the list, or at the end of * the list. A tail queue may be traversed in either direction. * * A circle queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly * linked so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before or after * an existing element, at the head of the list, or at the end of the list. * A circle queue may be traversed in either direction, but has a more * complex end of list detection. * * For details on the use of these macros, see the queue(3) manual page. */ /* * Singly-linked List definitions. */ #define SLIST_HEAD(name, type) \ struct name { \ struct type *slh_first; /* first element */ \ } #define SLIST_HEAD_INITIALIZER(head) \ { NULL } #define SLIST_ENTRY(type) \ struct { \ struct type *sle_next; /* next element */ \ } /* * Singly-linked List access methods. */ #define SLIST_FIRST(head) ((head)->slh_first) #define SLIST_END(head) NULL #define SLIST_EMPTY(head) (SLIST_FIRST(head) == SLIST_END(head)) #define SLIST_NEXT(elm, field) ((elm)->field.sle_next) #define SLIST_FOREACH(var, head, field) \ for((var) = SLIST_FIRST(head); \ (var) != SLIST_END(head); \ (var) = SLIST_NEXT(var, field)) /* * Singly-linked List functions. */ #define SLIST_INIT(head) { \ SLIST_FIRST(head) = SLIST_END(head); \ } #define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ (elm)->field.sle_next = (slistelm)->field.sle_next; \ (slistelm)->field.sle_next = (elm); \ } while (0) #define SLIST_INSERT_HEAD(head, elm, field) do { \ (elm)->field.sle_next = (head)->slh_first; \ (head)->slh_first = (elm); \ } while (0) #define SLIST_REMOVE_HEAD(head, field) do { \ (head)->slh_first = (head)->slh_first->field.sle_next; \ } while (0) #define SLIST_REMOVE(head, elm, type, field) do { \ if ((head)->slh_first == (elm)) { \ SLIST_REMOVE_HEAD((head), field); \ } \ else { \ struct type *curelm = (head)->slh_first; \ while( curelm->field.sle_next != (elm) ) \ curelm = curelm->field.sle_next; \ curelm->field.sle_next = \ curelm->field.sle_next->field.sle_next; \ } \ } while (0) /* * List definitions. */ #define LIST_HEAD(name, type) \ struct name { \ struct type *lh_first; /* first element */ \ } #define LIST_HEAD_INITIALIZER(head) \ { NULL } #define LIST_ENTRY(type) \ struct { \ struct type *le_next; /* next element */ \ struct type **le_prev; /* address of previous next element */ \ } /* * List access methods */ #define LIST_FIRST(head) ((head)->lh_first) #define LIST_END(head) NULL #define LIST_EMPTY(head) (LIST_FIRST(head) == LIST_END(head)) #define LIST_NEXT(elm, field) ((elm)->field.le_next) #define LIST_FOREACH(var, head, field) \ for((var) = LIST_FIRST(head); \ (var)!= LIST_END(head); \ (var) = LIST_NEXT(var, field)) /* * List functions. */ #define LIST_INIT(head) do { \ LIST_FIRST(head) = LIST_END(head); \ } while (0) #define LIST_INSERT_AFTER(listelm, elm, field) do { \ if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \ (listelm)->field.le_next->field.le_prev = \ &(elm)->field.le_next; \ (listelm)->field.le_next = (elm); \ (elm)->field.le_prev = &(listelm)->field.le_next; \ } while (0) #define LIST_INSERT_BEFORE(listelm, elm, field) do { \ (elm)->field.le_prev = (listelm)->field.le_prev; \ (elm)->field.le_next = (listelm); \ *(listelm)->field.le_prev = (elm); \ (listelm)->field.le_prev = &(elm)->field.le_next; \ } while (0) #define LIST_INSERT_HEAD(head, elm, field) do { \ if (((elm)->field.le_next = (head)->lh_first) != NULL) \ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\ (head)->lh_first = (elm); \ (elm)->field.le_prev = &(head)->lh_first; \ } while (0) #define LIST_REMOVE(elm, field) do { \ if ((elm)->field.le_next != NULL) \ (elm)->field.le_next->field.le_prev = \ (elm)->field.le_prev; \ *(elm)->field.le_prev = (elm)->field.le_next; \ } while (0) #define LIST_REPLACE(elm, elm2, field) do { \ if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \ (elm2)->field.le_next->field.le_prev = \ &(elm2)->field.le_next; \ (elm2)->field.le_prev = (elm)->field.le_prev; \ *(elm2)->field.le_prev = (elm2); \ } while (0) /* * Simple queue definitions. */ #define SIMPLEQ_HEAD(name, type) \ struct name { \ struct type *sqh_first; /* first element */ \ struct type **sqh_last; /* addr of last next element */ \ } #define SIMPLEQ_HEAD_INITIALIZER(head) \ { NULL, &(head).sqh_first } #define SIMPLEQ_ENTRY(type) \ struct { \ struct type *sqe_next; /* next element */ \ } /* * Simple queue access methods. */ #define SIMPLEQ_FIRST(head) ((head)->sqh_first) #define SIMPLEQ_END(head) NULL #define SIMPLEQ_EMPTY(head) (SIMPLEQ_FIRST(head) == SIMPLEQ_END(head)) #define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) #define SIMPLEQ_FOREACH(var, head, field) \ for((var) = SIMPLEQ_FIRST(head); \ (var) != SIMPLEQ_END(head); \ (var) = SIMPLEQ_NEXT(var, field)) /* * Simple queue functions. */ #define SIMPLEQ_INIT(head) do { \ (head)->sqh_first = NULL; \ (head)->sqh_last = &(head)->sqh_first; \ } while (0) #define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \ if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \ (head)->sqh_last = &(elm)->field.sqe_next; \ (head)->sqh_first = (elm); \ } while (0) #define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ (elm)->field.sqe_next = NULL; \ *(head)->sqh_last = (elm); \ (head)->sqh_last = &(elm)->field.sqe_next; \ } while (0) #define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\ (head)->sqh_last = &(elm)->field.sqe_next; \ (listelm)->field.sqe_next = (elm); \ } while (0) #define SIMPLEQ_REMOVE_HEAD(head, elm, field) do { \ if (((head)->sqh_first = (elm)->field.sqe_next) == NULL) \ (head)->sqh_last = &(head)->sqh_first; \ } while (0) /* * Tail queue definitions. */ #define TAILQ_HEAD(name, type) \ struct name { \ struct type *tqh_first; /* first element */ \ struct type **tqh_last; /* addr of last next element */ \ } #define TAILQ_HEAD_INITIALIZER(head) \ { NULL, &(head).tqh_first } #define TAILQ_ENTRY(type) \ struct { \ struct type *tqe_next; /* next element */ \ struct type **tqe_prev; /* address of previous next element */ \ } /* * tail queue access methods */ #define TAILQ_FIRST(head) ((head)->tqh_first) #define TAILQ_END(head) NULL #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) #define TAILQ_LAST(head, headname) \ (*(((struct headname *)((head)->tqh_last))->tqh_last)) /* XXX */ #define TAILQ_PREV(elm, headname, field) \ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) #define TAILQ_EMPTY(head) \ (TAILQ_FIRST(head) == TAILQ_END(head)) #define TAILQ_FOREACH(var, head, field) \ for((var) = TAILQ_FIRST(head); \ (var) != TAILQ_END(head); \ (var) = TAILQ_NEXT(var, field)) #define TAILQ_FOREACH_REVERSE(var, head, field, headname) \ for((var) = TAILQ_LAST(head, headname); \ (var) != TAILQ_END(head); \ (var) = TAILQ_PREV(var, headname, field)) /* * Tail queue functions. */ #define TAILQ_INIT(head) do { \ (head)->tqh_first = NULL; \ (head)->tqh_last = &(head)->tqh_first; \ } while (0) #define TAILQ_COPY(dst, src, field) do { \ *(dst) = *(src); \ if (((dst)->tqh_first) != NULL) \ (dst)->tqh_first->field.tqe_prev = &(dst)->tqh_first; \ else \ (dst)->tqh_last = &(dst)->tqh_first; \ } while (0) #define TAILQ_INSERT_HEAD(head, elm, field) do { \ if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \ (head)->tqh_first->field.tqe_prev = \ &(elm)->field.tqe_next; \ else \ (head)->tqh_last = &(elm)->field.tqe_next; \ (head)->tqh_first = (elm); \ (elm)->field.tqe_prev = &(head)->tqh_first; \ } while (0) #define TAILQ_INSERT_TAIL(head, elm, field) do { \ (elm)->field.tqe_next = NULL; \ (elm)->field.tqe_prev = (head)->tqh_last; \ *(head)->tqh_last = (elm); \ (head)->tqh_last = &(elm)->field.tqe_next; \ } while (0) #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\ (elm)->field.tqe_next->field.tqe_prev = \ &(elm)->field.tqe_next; \ else \ (head)->tqh_last = &(elm)->field.tqe_next; \ (listelm)->field.tqe_next = (elm); \ (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ } while (0) #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ (elm)->field.tqe_next = (listelm); \ *(listelm)->field.tqe_prev = (elm); \ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ } while (0) #define TAILQ_REMOVE(head, elm, field) do { \ if (((elm)->field.tqe_next) != NULL) \ (elm)->field.tqe_next->field.tqe_prev = \ (elm)->field.tqe_prev; \ else \ (head)->tqh_last = (elm)->field.tqe_prev; \ *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ } while (0) #define TAILQ_REPLACE(head, elm, elm2, field) do { \ if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != NULL) \ (elm2)->field.tqe_next->field.tqe_prev = \ &(elm2)->field.tqe_next; \ else \ (head)->tqh_last = &(elm2)->field.tqe_next; \ (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \ *(elm2)->field.tqe_prev = (elm2); \ } while (0) /* * Circular queue definitions. */ #define CIRCLEQ_HEAD(name, type) \ struct name { \ struct type *cqh_first; /* first element */ \ struct type *cqh_last; /* last element */ \ } #define CIRCLEQ_HEAD_INITIALIZER(head) \ { CIRCLEQ_END(&head), CIRCLEQ_END(&head) } #define CIRCLEQ_ENTRY(type) \ struct { \ struct type *cqe_next; /* next element */ \ struct type *cqe_prev; /* previous element */ \ } /* * Circular queue access methods */ #define CIRCLEQ_FIRST(head) ((head)->cqh_first) #define CIRCLEQ_LAST(head) ((head)->cqh_last) #define CIRCLEQ_END(head) ((void *)(head)) #define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) #define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) #define CIRCLEQ_EMPTY(head) \ (CIRCLEQ_FIRST(head) == CIRCLEQ_END(head)) #define CIRCLEQ_FOREACH(var, head, field) \ for((var) = CIRCLEQ_FIRST(head); \ (var) != CIRCLEQ_END(head); \ (var) = CIRCLEQ_NEXT(var, field)) #define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ for((var) = CIRCLEQ_LAST(head); \ (var) != CIRCLEQ_END(head); \ (var) = CIRCLEQ_PREV(var, field)) /* * Circular queue functions. */ #define CIRCLEQ_INIT(head) do { \ (head)->cqh_first = CIRCLEQ_END(head); \ (head)->cqh_last = CIRCLEQ_END(head); \ } while (0) #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ (elm)->field.cqe_next = (listelm)->field.cqe_next; \ (elm)->field.cqe_prev = (listelm); \ if ((listelm)->field.cqe_next == CIRCLEQ_END(head)) \ (head)->cqh_last = (elm); \ else \ (listelm)->field.cqe_next->field.cqe_prev = (elm); \ (listelm)->field.cqe_next = (elm); \ } while (0) #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ (elm)->field.cqe_next = (listelm); \ (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \ if ((listelm)->field.cqe_prev == CIRCLEQ_END(head)) \ (head)->cqh_first = (elm); \ else \ (listelm)->field.cqe_prev->field.cqe_next = (elm); \ (listelm)->field.cqe_prev = (elm); \ } while (0) #define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ (elm)->field.cqe_next = (head)->cqh_first; \ (elm)->field.cqe_prev = CIRCLEQ_END(head); \ if ((head)->cqh_last == CIRCLEQ_END(head)) \ (head)->cqh_last = (elm); \ else \ (head)->cqh_first->field.cqe_prev = (elm); \ (head)->cqh_first = (elm); \ } while (0) #define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ (elm)->field.cqe_next = CIRCLEQ_END(head); \ (elm)->field.cqe_prev = (head)->cqh_last; \ if ((head)->cqh_first == CIRCLEQ_END(head)) \ (head)->cqh_first = (elm); \ else \ (head)->cqh_last->field.cqe_next = (elm); \ (head)->cqh_last = (elm); \ } while (0) #define CIRCLEQ_REMOVE(head, elm, field) do { \ if ((elm)->field.cqe_next == CIRCLEQ_END(head)) \ (head)->cqh_last = (elm)->field.cqe_prev; \ else \ (elm)->field.cqe_next->field.cqe_prev = \ (elm)->field.cqe_prev; \ if ((elm)->field.cqe_prev == CIRCLEQ_END(head)) \ (head)->cqh_first = (elm)->field.cqe_next; \ else \ (elm)->field.cqe_prev->field.cqe_next = \ (elm)->field.cqe_next; \ } while (0) #define CIRCLEQ_REPLACE(head, elm, elm2, field) do { \ if (((elm2)->field.cqe_next = (elm)->field.cqe_next) == \ CIRCLEQ_END(head)) \ (head).cqh_last = (elm2); \ else \ (elm2)->field.cqe_next->field.cqe_prev = (elm2); \ if (((elm2)->field.cqe_prev = (elm)->field.cqe_prev) == \ CIRCLEQ_END(head)) \ (head).cqh_first = (elm2); \ else \ (elm2)->field.cqe_prev->field.cqe_next = (elm2); \ } while (0) #endif /* !_SYS_QUEUE_H_ */ bwctl_1.5.4+dfsg1.orig/bwctld/Makefile.in0000664000076500007710000005025112560414557015146 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$ # ######################################################################### # # # Copyright (C) 2003 # # Internet2 # # All Rights Reserved # # # ######################################################################### # # File: Makefile.am # # Author: Jeff Boote # Internet2 # # Date: Tue Sep 16 14:28:33 MDT 2003 # # Description: bwctld build description 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@ bin_PROGRAMS = bwctld$(EXEEXT) subdir = bwctld DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/c-attribute.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/bwlib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_bwctld_OBJECTS = bwctld-bwctld.$(OBJEXT) bwctld-policy.$(OBJEXT) bwctld_OBJECTS = $(am_bwctld_OBJECTS) @TOOL_THRULAY_TRUE@@USE_SYS_THRULAY_FALSE@am__DEPENDENCIES_1 = ../thrulay/thrulay/libthrulay.la bwctld_DEPENDENCIES = $(am__DEPENDENCIES_1) bwctld_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(bwctld_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/bwlib depcomp = $(SHELL) $(top_srcdir)/config/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 = $(bwctld_SOURCES) DIST_SOURCES = $(bwctld_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 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@ 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@ MAN2HTML = @MAN2HTML@ 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_VERSION = @PACKAGE_VERSION@ PATCH_LEVEL = @PATCH_LEVEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TOP_BUILD_DIRS = @TOP_BUILD_DIRS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_aux_dir = @ac_aux_dir@ 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@ lt_ECHO = @lt_ECHO@ 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@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ bwctld_SOURCES = bwctldP.h bwctld.c policy.h policy.c missing_queue.h bwctld_CFLAGS = -I.. @TOOL_THRULAY_FALSE@BWLIBTHRULAY = @TOOL_THRULAY_TRUE@@USE_SYS_THRULAY_FALSE@BWLIBTHRULAY = ../thrulay/thrulay/libthrulay.la @TOOL_THRULAY_TRUE@@USE_SYS_THRULAY_TRUE@BWLIBTHRULAY = -lthrulay bwctld_LDADD = -L../bwlib -lbwlib $(BWLIBTHRULAY) -lI2util all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bwctld/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign bwctld/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 $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || 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)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || 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)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_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 bwctld$(EXEEXT): $(bwctld_OBJECTS) $(bwctld_DEPENDENCIES) @rm -f bwctld$(EXEEXT) $(bwctld_LINK) $(bwctld_OBJECTS) $(bwctld_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bwctld-bwctld.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bwctld-policy.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 $@ $< bwctld-bwctld.o: bwctld.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bwctld_CFLAGS) $(CFLAGS) -MT bwctld-bwctld.o -MD -MP -MF $(DEPDIR)/bwctld-bwctld.Tpo -c -o bwctld-bwctld.o `test -f 'bwctld.c' || echo '$(srcdir)/'`bwctld.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/bwctld-bwctld.Tpo $(DEPDIR)/bwctld-bwctld.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bwctld.c' object='bwctld-bwctld.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) $(bwctld_CFLAGS) $(CFLAGS) -c -o bwctld-bwctld.o `test -f 'bwctld.c' || echo '$(srcdir)/'`bwctld.c bwctld-bwctld.obj: bwctld.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bwctld_CFLAGS) $(CFLAGS) -MT bwctld-bwctld.obj -MD -MP -MF $(DEPDIR)/bwctld-bwctld.Tpo -c -o bwctld-bwctld.obj `if test -f 'bwctld.c'; then $(CYGPATH_W) 'bwctld.c'; else $(CYGPATH_W) '$(srcdir)/bwctld.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/bwctld-bwctld.Tpo $(DEPDIR)/bwctld-bwctld.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bwctld.c' object='bwctld-bwctld.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) $(bwctld_CFLAGS) $(CFLAGS) -c -o bwctld-bwctld.obj `if test -f 'bwctld.c'; then $(CYGPATH_W) 'bwctld.c'; else $(CYGPATH_W) '$(srcdir)/bwctld.c'; fi` bwctld-policy.o: policy.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bwctld_CFLAGS) $(CFLAGS) -MT bwctld-policy.o -MD -MP -MF $(DEPDIR)/bwctld-policy.Tpo -c -o bwctld-policy.o `test -f 'policy.c' || echo '$(srcdir)/'`policy.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/bwctld-policy.Tpo $(DEPDIR)/bwctld-policy.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='policy.c' object='bwctld-policy.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) $(bwctld_CFLAGS) $(CFLAGS) -c -o bwctld-policy.o `test -f 'policy.c' || echo '$(srcdir)/'`policy.c bwctld-policy.obj: policy.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bwctld_CFLAGS) $(CFLAGS) -MT bwctld-policy.obj -MD -MP -MF $(DEPDIR)/bwctld-policy.Tpo -c -o bwctld-policy.obj `if test -f 'policy.c'; then $(CYGPATH_W) 'policy.c'; else $(CYGPATH_W) '$(srcdir)/policy.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/bwctld-policy.Tpo $(DEPDIR)/bwctld-policy.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='policy.c' object='bwctld-policy.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) $(bwctld_CFLAGS) $(CFLAGS) -c -o bwctld-policy.obj `if test -f 'policy.c'; then $(CYGPATH_W) 'policy.c'; else $(CYGPATH_W) '$(srcdir)/policy.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; 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) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; }; }'`; \ 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) @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 check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; 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-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ 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-binPROGRAMS 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 -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-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # 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: bwctl_1.5.4+dfsg1.orig/bwctld/bwctld.c0000664000076500007710000023103312560414557014523 0ustar /* * ex: set tabstop=4 ai expandtab softtabstop=4 shiftwidth=4: * -*- mode: c-basic-indent: 4; tab-width: 4; indent-tabls-mode: nil -*- * $Id$ */ /* * File: bwctld.c * * Author: Jeff Boote * Internet2 * * Date: Tue Sep 9 16:05:50 MDT 2003 * * Description: * * License: * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined(HAVE_SYS_QUEUE_H) #include #else #include "missing_queue.h" #endif #include #include #include #include "bwctldP.h" /* Global variable - the total number of allowed Control connections. */ static pid_t mypid; static int ipfd_chld = 0; static int ipfd_exit = 0; static int ipfd_alrm = 0; static int ipfd_intr = 0; static bwctld_opts opts; static I2ErrLogSyslogAttr syslogattr; static I2ErrHandle errhand; static I2Table fdtable=NULL; static I2Table pidtable=NULL; static BWLNum64 uptime; static BWLContext ctx; static TAILQ_HEAD(timeslots_head, TimeSlotRec) time_slots = TAILQ_HEAD_INITIALIZER(time_slots); struct timeslots_head *time_slots_head; #if defined HAVE_DECL_OPTRESET && !HAVE_DECL_OPTRESET int optreset; #endif static void DisplayReservationStatus(Reservation res, const char *action); static void FreeReservation(Reservation res); static void version(void){ if (PATCH_LEVEL) { fprintf(stderr, "\nVersion: %s-%d\n\n", PACKAGE_VERSION, PATCH_LEVEL); } else { fprintf(stderr, "\nVersion: %s\n\n", PACKAGE_VERSION); } return; } static void usage( const char *progname, const char *msg __attribute__((unused)) ) { fprintf(stderr, "\nUsage: %s [options]\n\n", progname); fprintf(stderr, "Where \"options\" are:\n\n"); fprintf(stderr, " -a authmode Default supported authmodes:[E]ncrypted,[A]uthenticated,[O]pen\n" " -c confdir Configuration directory\n" " -e facility syslog facility to log errors\n" " -f Allow daemon to run as \"root\" (folly!)\n" " -G group Run as group \"group\" :-gid also valid\n" " -h Print this message and exit\n" " -R vardir Location for pid file\n" ); fprintf(stderr, " -S nodename:port Srcaddr to bind to\n" " -U/-G options only used if run as root\n" " -U user Run as user \"user\" :-uid also valid\n" " -V version\n" #ifndef NDEBUG " -w Debugging: busy-wait children after fork to allow attachment\n" " -Z Debugging: Run in foreground\n" #endif "\n" ); version(); return; } /* ** Handler function for SIG_CHLD. */ static void signal_catch( int signo ) { switch(signo){ case SIGTERM: case SIGINT: case SIGHUP: case SIGUSR1: case SIGUSR2: if(!ipfd_exit){ ipfd_exit = 1; } break; case SIGCHLD: ipfd_chld = 1; break; case SIGALRM: ipfd_alrm = 1; break; default: I2ErrLog(errhand,"signal_catch(): Invalid signal(%d)", signo); _exit(BWL_CNTRL_FAILURE); } ipfd_intr++; return; } static BWLBoolean TimeSlotAddReservation( TimeSlot slot, Reservation res ) { BWLTestType test_type = BWLToolGetTestTypesByID(ctx,res->tool); if (test_type == BWL_TEST_THROUGHPUT) { slot->type = SLOT_BANDWIDTH; } else if (test_type == BWL_TEST_LATENCY) { slot->type = SLOT_LATENCY; } slot->num_reservations++; return True; } static TimeSlot TimeSlotCreate( Reservation res, time_t start, time_t end ) { TimeSlot new_slot = calloc(1, sizeof(struct TimeSlotRec)); if (!new_slot) return NULL; new_slot->type = SLOT_ANY; new_slot->start = start; new_slot->end = end; new_slot->num_reservations = 0; new_slot->max_reservations = 30; TimeSlotAddReservation(new_slot, res); return new_slot; } static TimeSlot TimeSlotSplit( TimeSlot slot, time_t time ) { TimeSlot new_slot = calloc(1, sizeof(struct TimeSlotRec)); if (!new_slot) return NULL; new_slot->start = time; new_slot->end = slot->end; new_slot->num_reservations = slot->num_reservations; new_slot->max_reservations = slot->max_reservations; slot->end = time - 1; return new_slot; } static BWLBoolean TimeSlotHasReservation( TimeSlot slot, Reservation res ) { time_t res_start; time_t res_end; /* * Convert the res start/end to a 'second' instead of the sub-second * resolution. The slots are all on second 'granularity'. */ res_start = BWLNum64ToTimestamp(res->start); res_end = BWLNum64ToTimestamp(res->end) + 1; if (difftime(slot->start, res_end) > 0) return False; if (difftime(slot->end, res_start) < 0) return False; return True; } static BWLBoolean TimeSlotRemoveReservation( TimeSlot slot, Reservation res ) { slot->num_reservations--; return True; } static Reservation AllocReservation( ChldState cstate, BWLSID sid, BWLToolType tool_id, uint16_t *toolport, const char *sender, const char *receiver ) { BWLErrSeverity err = BWLErrOK; Reservation res = NULL; if(cstate->res){ BWLError(ctx,BWLErrFATAL,BWLErrINVALID, "AllocReservation: cstate->res != NULL"); goto error_exit; } if( !(res = calloc(1,sizeof(*res)))){ BWLError(ctx,BWLErrFATAL,ENOMEM,"malloc(): %M"); goto error_exit; } res->sender = strdup(sender); if (!res->sender) { BWLError(ctx,err,BWLErrINVALID,"AllocReservation: strdup() failed"); goto error_exit; } res->receiver = strdup(receiver); if (!res->receiver) { BWLError(ctx,err,BWLErrINVALID,"AllocReservation: strdup() failed"); goto error_exit; } memcpy(res->sid,sid,sizeof(BWLSID)); /* * Invoke 'tool' one-time initialization phase * Sets *toolport * * Done here so there is daemon-wide state for the 'last' port allocated. */ if( BWLErrOK != (err = BWLToolInitTest(ctx,tool_id,toolport))){ BWLError(ctx,err,BWLErrINVALID, "AllocReservation: Tool initialization failed"); goto error_exit; } res->toolport = *toolport; res->tool = tool_id; cstate->res = res; return res; error_exit: if (res) { FreeReservation(res); } return NULL; } static void FreeReservation( Reservation res ) { if(!res) return; /* * If there are any extended resources in a res record, free them here. * (There were in previous versions of the code, so I just left this * here when I removed those parts. If I really cared about cleaning * this up, I could replace this with free().) */ if (res->receiver) free(res->receiver); if (res->sender) free(res->sender); free(res); return; } static BWLBoolean ResRemove( Reservation res ) { TimeSlot slot; TimeSlot slot_temp; for(slot = TAILQ_FIRST(&time_slots); slot; slot = slot_temp ) { slot_temp = TAILQ_NEXT(slot, entries); if (TimeSlotHasReservation(slot, res) == False) continue; TimeSlotRemoveReservation(slot, res); if (slot->num_reservations == 0) { TAILQ_REMOVE(&time_slots, slot, entries); free(slot); } } return True; } static void DeleteReservation( ChldState cstate, char *action ) { if(!cstate->res) return; DisplayReservationStatus(cstate->res, action); ResRemove(cstate->res); FreeReservation(cstate->res); cstate->res = NULL; return; } static BWLBoolean ReservationCanUseSlot( Reservation res, TimeSlot slot ) { BWLTestType test_type = BWLToolGetTestTypesByID(ctx,res->tool); if (test_type == BWL_TEST_THROUGHPUT) { // There is already a throughput test here. if (slot->type == SLOT_BANDWIDTH) { return False; } else if (slot->type == SLOT_LATENCY) { return False; } } else if (test_type == BWL_TEST_LATENCY) { // There is already a throughput test here. if (slot->type == SLOT_BANDWIDTH) { return False; } } if (slot->num_reservations == slot->max_reservations) { return False; } return True; } static void DisplayReservationStatus( Reservation res, const char *action ) { BWLTimeStamp currtime; if(!BWLGetTimeStamp(ctx,&currtime)){ I2ErrLogP(errhand, errno, "BWLGetTimeOfDay: %M"); return; } BWLError(ctx,BWLErrDEBUG,BWLErrDEBUG, "Reservation Status: time=%lu action=%s sender=%s receiver=%s tool=%s res_start=%lu res_end=%lu test_start=%lu", BWLNum64ToTimestamp(currtime.tstamp), action, res->sender, res->receiver, BWLToolGetNameByID(ctx,res->tool), BWLNum64ToTimestamp(res->start), BWLNum64ToTimestamp(res->end), BWLNum64ToTimestamp(res->restime)); } static BWLBoolean ChldReservationDemand( ChldState cstate, BWLSID sid, BWLNum64 rtime, BWLNum64 ftime, BWLNum64 ltime, uint32_t duration, BWLNum64 rtttime, BWLNum64 *restime, uint16_t *toolport, BWLToolType tool_id, const char *sender, const char *receiver, int *err) { BWLTimeStamp currtime; Reservation res; TimeSlot prev_slot; I2numT hsecs; BWLNum64 dtime; /* duration with fuzz applied */ BWLNum64 minstart; TimeSlot slot; int added; TimeSlot new_slot; char *action = "new"; *err = 1; if(!BWLDGetFixedLimit(cstate->node,BWLDLimEventHorizon,&hsecs)) return False; if(cstate->res){ /* FIXME: should be sizeof(BWLSID) */ if(memcmp(sid,cstate->res->sid,sizeof(sid))) return False; /* * Remove cstate->res from pending_queue */ if(!ResRemove(cstate->res)) { return False; } cstate->res->toolport = *toolport; action = "reschedule"; } else if(!AllocReservation(cstate,sid,tool_id,toolport,sender,receiver)){ /* * Alloc failed. */ return False; } /* * Initialize fields */ res = cstate->res; /* * At this point cstate->res is ready to be inserted into * the pending test queue. */ if(!BWLGetTimeStamp(ctx,&currtime)){ I2ErrLogP(errhand, errno, "BWLGetTimeOfDay: %M"); FreeReservation(cstate->res); cstate->res = NULL; return False; } /* * Determine earliest time the test can happen. * This is the max of the earliest time the deamon is willing * to have a test and the requested time. * The algorithm being used to determine the "earliest time * the daemon" is willing to have a test is: * * 2 X rtt(client) + fuzztime(otherserver) * * The actual message time is: * server client * request response -> * <- start sessions * start response -> * (This is only 1.5 rtt, but rouding up to 2 rtt seems prudent) * * The reservation is defined by the following vars: * res->restime == time of reservation * res->start == fuzz applied to beginning of that * res->end == fuzz applied to res->restime + duration * The time period from res->start to res->end is completely * allocated to this test. */ res->start = BWLNum64Sub(rtime,ftime); minstart =BWLNum64Add(currtime.tstamp, BWLNum64Add(ftime, BWLNum64Mult(rtttime,BWLULongToNum64(2)))); /* * If the start time is less than the minimum start time, then * reset the start time to one second past the minimum start time. * minstart should take into account rtt times. The one second is * simply a small buffer space so that rounding error and random * extra delay to the other server will still allow a reservation. */ if(BWLNum64Cmp(res->start,minstart) < 0){ res->start = BWLNum64Add(minstart,BWLULongToNum64(1)); } res->restime = BWLNum64Add(res->start,ftime); dtime = BWLNum64Add(BWLULongToNum64(duration),ftime); res->end = BWLNum64Add(res->restime,dtime); res->fuzz = ftime; res->duration = duration; /* * Determine the latest time the test could happen. * (Min of the EventHorizon of the daemon and the latest time from * the request.) */ if(hsecs){ ltime = BWLNum64Min(ltime,BWLNum64Add(currtime.tstamp, BWLI2numTToNum64(hsecs))); } /* * Open slot too late */ if(ltime && (BWLNum64Cmp(res->restime,ltime) > 0)){ *restime = res->restime; goto denied; } /******************************** * Find an open slot * ********************************/ added = 0; prev_slot = NULL; TAILQ_FOREACH(slot, &time_slots, entries) { time_t res_start; time_t res_end; /* * Make sure the reservation time, and end time matches what's expected * based on its start time */ if (BWLNum64Cmp(res->end, res->start) <= 0) { res->restime = BWLNum64Add(res->start,res->fuzz); res->end = BWLNum64Add(res->restime,dtime); } /* * Check if the open slot too late */ if(ltime && (BWLNum64Cmp(res->restime,ltime) > 0)) { *restime = res->restime; goto denied; } /* * Convert the res start/end to a 'second' instead of the sub-second * resolution. The slots are all on second 'granularity'. */ res_start = BWLNum64ToTimestamp(res->start); res_end = BWLNum64ToTimestamp(res->end) + 1; /* * Skip ahead trying to find a slot that might overlap this reservation */ if (difftime(slot->end, res_start) < 0) { prev_slot = slot; continue; } /* * If this slot starts after our reservation ends, we just add a new * time slot covering this reservation since it doesn't overlap any * reservations. */ if ((!prev_slot || difftime(prev_slot->end, res_start) < 0) && difftime(res_end, slot->start) < 0) { // There is enough time between the end of the previous slot, and // the beginning of the next one to make a new slot. TimeSlot new_slot = TimeSlotCreate(res, res_start, res_end); TAILQ_INSERT_BEFORE(slot, new_slot, entries); added = 1; break; } /* * Skip this slot if it's already full */ if (ReservationCanUseSlot(res, slot) == False) { prev_slot = slot; res->start = BWLTimestampToNum64(slot->end + 1); res->restime = BWLNum64Add(res->start,res->fuzz); res->end = BWLNum64Add(res->restime,dtime); continue; } else { /* * Using the current slot as a starting point, check whether it's * possible to run the test by going through all the slots that * overlap the reservation, and make sure they're all copacetic * with this test before performed as well. */ TimeSlot first_slot = slot; TimeSlot last_slot = slot; TimeSlot conflicting_slot = NULL; /* * By the end of this loop, first_slot will be the first slot that * overlaps the reservation, and last_slot will be the last slot * that overlaps the reservation. */ while (difftime(last_slot->end, res_end) <= 0) { TimeSlot next_slot = TAILQ_NEXT(last_slot, entries); if (!next_slot) break; if (difftime(res_end, next_slot->start) < 0) break; if (ReservationCanUseSlot(res, next_slot) == False) { conflicting_slot = next_slot; break; } last_slot = next_slot; } if (conflicting_slot) { // might as well skip ahead to the end of the conflicting slot res->start = BWLTimestampToNum64(conflicting_slot->end + 1); res->restime = BWLNum64Add(res->start,res->fuzz); res->end = BWLNum64Add(res->restime,dtime); } else { TimeSlot temp_slot; if (difftime(first_slot->start, res_start) < 0) { // Our reservation partially overlaps this slot, so we need // to split the existing slot to divide into two new slots: // one that handles the time period up until the new // reservation starts, and one that handles the time period // after. TimeSlot new_slot = TimeSlotSplit(first_slot, res_start); TAILQ_INSERT_AFTER(&time_slots, first_slot, new_slot, entries); // first_slot is meant to refer to the first slot that // overlaps the reservation. The TimeSlotSplit function // will return the timeslot after the split point, i.e. // it's the first slot that overlaps our reservation. Also, // since we're changing the first slot, we might be // changing the last slot as well. if (last_slot == first_slot) last_slot = new_slot; first_slot = new_slot; } else if (difftime(res_start, first_slot->start) < 0) { // We need to create an additional slot to handle // res->start to first_slot->start. TimeSlot new_slot = TimeSlotCreate(res, res_start, first_slot->start - 1); TAILQ_INSERT_BEFORE(first_slot, new_slot, entries); } if (difftime(res_end, last_slot->end) < 0) { // Our reservation partially overlaps this slot, so we need // to split the existing slot to divide into two new slots: // the slot up to when our reservation ends, and the slot // after our reservation ends. TimeSlot new_slot = TimeSlotSplit(last_slot, res_end + 1); TAILQ_INSERT_AFTER(&time_slots, last_slot, new_slot, entries); } else if (difftime(last_slot->end, res_end) < 0) { // We need to create an additional slot to handle // last_slot->end to res->end. TimeSlot new_slot = TimeSlotCreate(res, last_slot->end + 1, res_end); TAILQ_INSERT_AFTER(&time_slots, last_slot, new_slot, entries); } temp_slot = first_slot; while (temp_slot) { TimeSlotAddReservation(temp_slot, res); if (temp_slot == last_slot) temp_slot = NULL; else temp_slot = TAILQ_NEXT(temp_slot, entries); } added = 1; break; } } } if (!added) { time_t res_start; time_t res_end; // Error out if the new reservation time is too late if(ltime && (BWLNum64Cmp(res->restime,ltime) > 0)){ *restime = res->restime; goto denied; } /* * Convert the res start/end to a 'second' instead of the sub-second * resolution. The slots are all on second 'granularity'. */ res_start = BWLNum64ToTimestamp(res->start); res_end = BWLNum64ToTimestamp(res->end) + 1; new_slot = TimeSlotCreate(res, res_start, res_end); /* * Two reasons it wasn't added: nothing in the list, or its start time * is later than everything in the list. */ if (TAILQ_EMPTY(&time_slots)) { TAILQ_INSERT_HEAD(&time_slots, new_slot, entries); } else { TAILQ_INSERT_TAIL(&time_slots, new_slot, entries); } } BWLError(ctx,BWLErrDEBUG,BWLErrDEBUG, "Test Reservation Information: Current Time: %lu, Fuzz: %f, Reservation Start: %lu, Reservation End: %lu, Test Start Time: %lu", BWLNum64ToTimestamp(currtime.tstamp), BWLNum64ToDouble(ftime), BWLNum64ToTimestamp(res->start), BWLNum64ToTimestamp(res->end) + 1, BWLNum64ToTimestamp(res->restime)); DisplayReservationStatus(res, action); DisplayTimeSlots(); *restime = res->restime; *toolport = res->toolport; return True; denied: *err = 0; I2ErrLogP(errhand,errno, "Unable to find reservation before \"last time\""); DeleteReservation(cstate, "failed"); return False; } static void DisplayTimeSlots() { TimeSlot slot; int i; BWLError(ctx,BWLErrDEBUG,BWLErrOK, "Time Slots"); i = 1; TAILQ_FOREACH(slot, &time_slots, entries) { BWLError(ctx,BWLErrDEBUG,BWLErrOK, "Time Slot %d: %lu to %lu: %d reservations\n", i, slot->start, slot->end, slot->num_reservations); i++; } } static BWLBoolean ChldReservationComplete( ChldState cstate, BWLSID sid, BWLAcceptType aval __attribute__((unused)), int *err) { *err = 1; /* FIXME: should be sizeof(BWLSID) */ if(!cstate->res || memcmp(sid,cstate->res->sid,sizeof(sid))) return False; DeleteReservation(cstate, "remove"); return True; } static ChldState AllocChldState( BWLDPolicy policy, pid_t pid, int fd ) { ChldState cstate = calloc(1,sizeof(*cstate)); I2Datum k,v; if(!cstate){ BWLError(ctx,BWLErrFATAL,ENOMEM,"malloc(): %M"); return NULL; } cstate->policy = policy; cstate->pid = pid; cstate->fd = fd; /* * Add cstate into the hash's. */ v.dptr = (void*)cstate; v.dsize = sizeof(*cstate); /* * add cstate to the pidtable hash */ k.dptr = NULL; k.dsize = pid; if(I2HashStore(pidtable,k,v) != 0){ free(cstate); return NULL; } /* * add cstate to the fdtable hash */ k.dsize = fd; if(I2HashStore(fdtable,k,v) != 0){ k.dsize = pid; I2HashDelete(pidtable,k); free(cstate); return NULL; } return cstate; } static void FreeChldState( ChldState cstate, fd_set *readfds ) { I2Datum k; k.dptr = NULL; if(cstate->fd >= 0){ while((close(cstate->fd) < 0) && (errno == EINTR)); FD_CLR(cstate->fd, readfds); k.dsize = cstate->fd; if(I2HashDelete(fdtable,k) != 0){ BWLError(ctx,BWLErrWARNING, BWLErrUNKNOWN, "fd(%d) not in fdtable!?!",cstate->fd); } } k.dsize = cstate->pid; if(I2HashDelete(pidtable,k) != 0){ BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "pid(%d) not in pidtable!?!",cstate->pid); } /* * TODO: Release resources here if there are any left? * (should not need to..., but perhaps I should check and * and report errors if there are still any allocated?) */ DeleteReservation(cstate, "failed"); free(cstate); return; } static void ReapChildren( int *maxfd, fd_set *readfds ) { int status; pid_t child; I2Datum key; I2Datum val; ChldState cstate; if(!ipfd_chld) return; key.dptr = NULL; while ( (child = waitpid(-1, &status, WNOHANG)) > 0){ key.dsize = child; if(!I2HashFetch(pidtable,key,&val)){ BWLError(ctx,BWLErrWARNING, BWLErrUNKNOWN, "pid(%d) not in pidtable!?!",child); } cstate = val.dptr; /* * Let main loop know maxfd needs to be recomputed. */ if(cstate->fd == *maxfd) *maxfd = -1; FreeChldState(cstate,readfds); } ipfd_chld = 0; } struct CleanPipeArgRec{ int *maxfd; fd_set *avail; fd_set *readfds; int nready; }; static I2Boolean CheckFD( I2Datum fdkey __attribute__((unused)), I2Datum fdval, void *app_data ) { struct CleanPipeArgRec *arg = (struct CleanPipeArgRec *)app_data; ChldState cstate = fdval.dptr; int err=1; /* * If this fd is not ready, return. */ if(!FD_ISSET(cstate->fd,arg->avail)) return True; /* * This fd needs processing - reduce the "ready" count. */ arg->nready--; /* * child initialization - first message. * Get classname and find policy node for that class. */ if(!cstate->node){ cstate->node = BWLDReadClass(cstate->policy,cstate->fd, &ipfd_exit,&err); } else{ BWLDMesgT query; BWLDMesgT resp; BWLDLimRec lim; BWLSID sid; BWLNum64 rtime,ftime,ltime,restime=0,rtttime; uint32_t duration; uint16_t toolport; BWLToolType tool_id; BWLAcceptType aval; char sender[46]; char receiver[46]; switch(BWLDReadReqType(cstate->fd,&ipfd_exit,&err)){ case BWLDMESGRESOURCE: /* read child request for resources */ if(!BWLDReadQuery(cstate->fd,&ipfd_exit,&query, &lim,&err)){ goto done; } /* * parse tree for resource request/release */ resp = BWLDResourceDemand(cstate->node,query, lim) ? BWLDMESGOK : BWLDMESGDENIED; /* * Send response */ err = BWLDSendResponse(cstate->fd,&ipfd_exit, resp); break; case BWLDMESGRESERVATION: /* read child request for reservation */ if(!BWLDReadReservationQuery(cstate->fd, &ipfd_exit,sid, &rtime,&ftime,<ime, &duration,&rtttime, &toolport,&tool_id, sender,receiver,&err)){ goto done; } /* * Look for open slot to run test */ if(ChldReservationDemand(cstate, sid,rtime,ftime,ltime, duration,rtttime, &restime,&toolport,tool_id, sender,receiver,&err)){ resp = BWLDMESGOK; } else if(err){ goto done; } else{ resp = BWLDMESGDENIED; } /* * Send response */ err = BWLDSendReservationResponse(cstate->fd, &ipfd_exit,resp,restime,toolport); break; case BWLDMESGCOMPLETE: if(!BWLDReadTestComplete(cstate->fd,&ipfd_exit, sid,&aval,&err)){ goto done; } /* * Mark reservation complete (free memory?) */ if(ChldReservationComplete(cstate,sid,aval, &err)){ resp = BWLDMESGOK; } else if(err){ goto done; } else{ resp = BWLDMESGDENIED; } /* * Send response */ err = BWLDSendResponse(cstate->fd,&ipfd_exit, resp); break; default: break; } } done: if(err){ BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "Invalid message from child pid=%d",cstate->pid); (void)kill(cstate->pid,SIGTERM); } /* * Return true if there are more fd's to process. */ return (arg->nready > 0); } /* * avail contains the fd_set of fd's that are currently readable, readfds is * the set of all fd's that the server needs to pay attention to. * maxfd is the largest of those. */ static void CleanPipes( fd_set *avail, int *maxfd, fd_set *readfds, int nready ) { struct CleanPipeArgRec cpargs; cpargs.avail = avail; cpargs.maxfd = maxfd; cpargs.readfds = readfds; cpargs.nready = nready; I2HashIterate(fdtable,CheckFD,&cpargs); return; } static I2Boolean ClosePipes( I2Datum key, I2Datum value, void *app_data __attribute__((unused)) ) { ChldState cstate = value.dptr; while((close(cstate->fd) < 0) && (errno == EINTR)); if(I2HashDelete(fdtable,key) != 0){ BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "fd(%d) not in fdtable!?!",cstate->fd); } cstate->fd = -1; return True; } /* * This function needs to create a new child process with a pipe to * communicate with it. It needs to add the new pipefd into the readfds, * and update maxfd if the new pipefd is greater than the current max. */ static void NewConnection( BWLDPolicy policy, I2Addr listenaddr, int *maxfd, fd_set *readfds ) { int connfd; struct sockaddr_storage sbuff; socklen_t sbufflen; int new_pipe[2]; pid_t pid; BWLSessionMode mode = opts.auth_mode; int listenfd = I2AddrFD(listenaddr); BWLControl cntrl=NULL; BWLErrSeverity out; ACCEPT: sbufflen = sizeof(sbuff); connfd = accept(listenfd, (struct sockaddr *)&sbuff, &sbufflen); if (connfd < 0){ switch(errno){ case EINTR: /* * Go ahead and reap since it could make * more free connections. */ if(ipfd_exit){ return; } ReapChildren(maxfd,readfds); goto ACCEPT; break; case ECONNABORTED: return; break; default: BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "accept(): %M"); return; break; } } if (socketpair(AF_UNIX,SOCK_STREAM,0,new_pipe) < 0){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"socketpair(): %M"); (void)close(connfd); return; } pid = fork(); /* fork error */ if (pid < 0){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"fork(): %M"); (void)close(new_pipe[0]); (void)close(new_pipe[1]); (void)close(connfd); return; } /* Parent */ if (pid > 0){ ChldState chld; /* * If close is interupted, continue to try and close, * otherwise, ignore the error. */ while((close(new_pipe[1]) < 0) && (errno == EINTR)); while((close(connfd) < 0) && (errno == EINTR)); if(!(chld = AllocChldState(policy,pid,new_pipe[0]))){ (void)close(new_pipe[0]); (void)kill(pid,SIGKILL); return; } FD_SET(chld->fd, readfds); if((*maxfd > -1) && (chld->fd > *maxfd)) *maxfd = chld->fd; } /* Child */ else{ struct itimerval itval; BWLRequestType msgtype=BWLReqInvalid; #ifndef NDEBUG void *childwait = BWLContextConfigGetV(ctx, BWLChildWait); if(childwait){ BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "Waiting for Debugger."); /* busy loop to wait for debug-attach */ while(childwait); /* * Set childwait back to non-zero in debugger before * executing the next line to make sub children 'wait' * as well. */ if( !BWLContextConfigSet(ctx,BWLChildWait, (void*)childwait)){ BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "BWLContextConfigSet(ChildWait): %M"); } } #endif /* * TODO: Close all open file descriptors not needed by this * child. */ while((close(new_pipe[0]) < 0) && (errno == EINTR)); while((close(listenfd) < 0) && (errno == EINTR)); I2HashIterate(fdtable,ClosePipes,NULL); /* * check/set signal vars. */ if(ipfd_exit){ exit(0); } ipfd_intr = 0; /* * Initialize itimer struct. The it_value.tv_sec will be * set to interrupt socket i/o if the message is not received * within the timeout as described by owdp draft section 4 * (BWLIB-Control). */ memset(&itval,0,sizeof(itval)); /* * save the pipe fd in the policy record for the hooks to * pick it up. */ policy->fd = new_pipe[1]; /* * If the daemon is configured to do open_mode, check if * there is an open_mode limit defined for the given * address. */ if((mode & BWL_MODE_OPEN) && !BWLDAllowOpenMode(policy, (struct sockaddr *)&sbuff,&out)){ if(out != BWLErrOK){ exit((int)out); } mode &= ~BWL_MODE_OPEN; } ipfd_intr = 0; itval.it_value.tv_sec = opts.controltimeout; if(setitimer(ITIMER_REAL,&itval,NULL) != 0){ I2ErrLog(errhand,"setitimer(): %M"); exit(BWLErrFATAL); } cntrl = BWLControlAccept(ctx,connfd, (struct sockaddr *)&sbuff,sbufflen, mode,uptime,&ipfd_intr,&out); /* * session not accepted. */ if(!cntrl){ exit((int)out); } /* * Process all requests - return when complete. */ while(1){ BWLErrSeverity rc; rc = BWLErrOK; /* * reset signal vars * XXX: If there is a pending reservation, * timer should be reduced to: * MIN(time-util-start,reserve-timeout) */ ipfd_intr = ipfd_alrm = ipfd_chld = 0; itval.it_value.tv_sec = opts.controltimeout; if(setitimer(ITIMER_REAL,&itval,NULL) != 0){ I2ErrLog(errhand,"setitimer(): %M"); goto done; } msgtype = BWLReadRequestType(cntrl,&ipfd_intr); switch (msgtype){ case BWLReqTest: rc = BWLProcessTestRequest(cntrl,&ipfd_intr); break; case BWLReqTime: rc = BWLProcessTimeRequest(cntrl,&ipfd_intr); break; case BWLReqStartSession: rc = BWLProcessStartSession(cntrl,&ipfd_intr); if(rc < BWLErrOK){ break; } /* * Test session started - unset timer - wait * until all sessions are complete, then * reset the timer and wait for stopsessions * to complete. */ ipfd_intr = 0; itval.it_value.tv_sec = 0; if(setitimer(ITIMER_REAL,&itval,NULL) != 0){ I2ErrLog(errhand,"setitimer(): %M"); goto done; } if(ipfd_exit) goto done; /* * This loop is here so StopSessionWait * can be told to return on ipfd_intr. In * other words, SIGCHLD will cause it to * return. This is done so the alrm timer * can be set before the StopSessions * command is sent in the case where the * child exits before the StopSessions * messages exchange. */ while(BWLSessionsActive(cntrl,NULL)){ int wstate; rc = BWLErrOK; ipfd_intr = 0; wstate = BWLStopSessionWait(cntrl,NULL, &ipfd_intr,NULL,&rc); if(ipfd_exit || (wstate < 0)){ goto done; } if(wstate == 0){ goto nextreq; } } /* * Sessions are complete, but StopSession * message has not been exchanged - set the * timer and trade StopSession messages */ ipfd_intr = 0; itval.it_value.tv_sec = opts.dieby; if(setitimer(ITIMER_REAL,&itval,NULL) != 0){ I2ErrLog(errhand,"setitimer(): %M"); goto done; } rc = BWLStopSession(cntrl,&ipfd_intr,NULL); break; case BWLReqSockClose: default: rc = BWLErrFATAL; break; } nextreq: if(rc < BWLErrWARNING){ break; } } done: BWLControlClose(cntrl); if(ipfd_exit){ exit(0); } /* * Normal socket close */ if(msgtype == BWLReqSockClose){ exit(0); } I2ErrLog(errhand,"Control session terminated abnormally..."); exit(1); } } /* * hash functions... * I cheat - I use the "dsize" part of the datum for the key data since * pid and fd are both integers. */ static int intcmp( const I2Datum x, const I2Datum y ) { return(x.dsize != y.dsize); } static uint32_t inthash( I2Datum key ) { return (uint32_t)key.dsize; } static I2Boolean FindMaxFD( I2Datum key, I2Datum value __attribute__((unused)), void *app_data ) { int *maxfd = (int *)app_data; if((*maxfd < 0) || ((int)key.dsize > *maxfd)){ *maxfd = (int)key.dsize; } return True; } static void BWLDExecPostHookScript( char *script, BWLControl ctrl, BWLBoolean is_sender, BWLTestSpec *test_spec, FILE *sendfp, FILE *recvfp ) { pid_t pid; int pipe_fds[2]; char buf[1024]; size_t n; FILE *pipe_fp; int status; size_t buflen; BWLDPolicyNode node; char *limit_class; struct timespec ts; if (pipe(pipe_fds) < 0) { BWLError(ctx,BWLErrFATAL,errno,"pipe(): %M"); return; } pid = fork(); if (pid < 0) { BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN,"fork(): %M"); (void)close(pipe_fds[0]); (void)close(pipe_fds[1]); return; } if (pid == 0) { /* * set the read end of the pipe to be the new stdin */ dup2(pipe_fds[0], STDIN_FILENO); /* * close the write end along with the duplicate of the read end of the pipe. * if either are interrupted, try again */ while((close(pipe_fds[0]) < 0) && (errno == EINTR)); while((close(pipe_fds[1]) < 0) && (errno == EINTR)); execlp(script, script, NULL); BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Couldn't execute script \'%s\'", script); exit(1); } /* * Close the read side to ensure that the pipe writes fail instead of * filling up the pipe and possibly blocking. */ close(pipe_fds[0]); if (fcntl(pipe_fds[1], F_SETFL, O_NONBLOCK) == -1) { BWLError(ctx,BWLErrFATAL,errno, "fcntl() failed"); goto error_out; } pipe_fp = fdopen(pipe_fds[1], "w"); if (!pipe_fp) { BWLError(ctx,BWLErrFATAL,errno, "fdopen() failed"); goto error_out; } /* * Fetch the "user class" for this connection. */ node = (BWLDPolicyNode)BWLControlConfigGetV(ctrl, BWLDPOLICY_NODE); if(!node) { limit_class = "unknown"; } else { limit_class = node->nodename; } BWLTimeStampToTimespec(&ts, &test_spec->req_time); fprintf(pipe_fp, "\n"); fprintf(pipe_fp, "tool: %s\n", BWLToolGetNameByID(ctx,test_spec->tool_id)); fprintf(pipe_fp, "user: %s\n", ctrl->userid_buffer); fprintf(pipe_fp, "limit_class: %s\n", limit_class); fprintf(pipe_fp, "start_time: %ld\n", (long)ts.tv_sec); fprintf(pipe_fp, "is_host_sender: %s\n", (is_sender)?"YES":"NO"); fprintf(pipe_fp, "tos: %d\n", test_spec->tos); buflen = sizeof(buf); fprintf(pipe_fp, "client: %s\n", I2AddrNodeName(ctrl->remote_addr, buf, &buflen)); buflen = sizeof(buf); fprintf(pipe_fp, "sender: %s\n", I2AddrNodeName(test_spec->client, buf, &buflen)); buflen = sizeof(buf); fprintf(pipe_fp, "receiver: %s\n", I2AddrNodeName(test_spec->server, buf, &buflen)); fprintf(pipe_fp, "duration: %i\n", test_spec->duration); fprintf(pipe_fp, "use_udp: %s\n", (test_spec->udp)?"YES":"NO"); fprintf(pipe_fp, "bandwidth: %llu\n", (unsigned long long)test_spec->bandwidth); fprintf(pipe_fp, "window: %i\n", test_spec->window_size); fprintf(pipe_fp, "len_buffer: %i\n", test_spec->len_buffer); fprintf(pipe_fp, "report_interval: %u\n", test_spec->report_interval); fprintf(pipe_fp, "parallel_streams: %u\n", test_spec->parallel_streams); fprintf(pipe_fp, "units: %c\n", test_spec->units); fprintf(pipe_fp, "output_format: %c\n", test_spec->outformat); fprintf(pipe_fp, "use_dynamic_window_sizing: %s\n", (test_spec->dynamic_window_size)?"YES":"NO"); fprintf(pipe_fp, "\n"); /* * seek to the beginning of the file and copy it all to the pipe */ fseek(recvfp, SEEK_SET, 0); fprintf(pipe_fp, "\n"); do { n = fread(buf, 1, sizeof(buf), recvfp); if (n > 0) { fwrite(buf, 1, n, pipe_fp); } } while (n > 0); fprintf(pipe_fp, "\n"); /* * seek to the beginning of the file and copy it all to the pipe */ fseek(sendfp, SEEK_SET, 0); fprintf(pipe_fp, "\n"); do { n = fread(buf, 1, sizeof(buf), sendfp); if (n > 0) { fwrite(buf, 1, n, pipe_fp); } } while (n > 0); fprintf(pipe_fp, "\n"); fclose(pipe_fp); close(pipe_fds[1]); waitpid(pid, &status, 0); return; error_out: close(pipe_fds[0]); close(pipe_fds[1]); kill(pid, SIGKILL); } static BWLErrSeverity BWLDProcessResults( BWLControl ctrl, BWLBoolean is_sender, BWLTestSpec *test_spec, FILE *sendfp, FILE *recvfp ) { int i; for(i = 0; i < opts.posthook_count; i++) { BWLDExecPostHookScript(opts.posthook[i], ctrl, is_sender, test_spec, sendfp, recvfp); } return BWLErrOK; } static BWLBoolean PostHookAvailable( const char *script ) { int len; int fdpipe[2]; pid_t pid; int status; int rc; /* Post-hook scripts must print out "Status: OK" to stdout */ char *pattern = "Status: OK"; /* Expected begin of stdout */ char buf[1024]; const uint32_t buf_size = I2Number(buf); if(socketpair(AF_UNIX,SOCK_STREAM,0,fdpipe) < 0){ BWLError(ctx,BWLErrFATAL,errno,"PostHookAvailable():socketpair(): %M"); return False; } pid = fork(); /* fork error */ if(pid < 0){ BWLError(ctx,BWLErrFATAL,errno,"PostHookAvailable():fork(): %M"); return False; } /* * child: * * Redirect stdout to pipe - then exec the script with the --validate. The * script can then perform any internal checks it wants and sends back * "Status: OK" via the pipe if everything is fine. */ if(0 == pid){ dup2(fdpipe[1],STDOUT_FILENO); close(fdpipe[0]); close(fdpipe[1]); execlp(script,script,"--validate",NULL); buf[buf_size-1] = '\0'; snprintf(buf,buf_size-1,"exec(%s)",script); perror(buf); exit(1); } /* * parent: * * Wait for child to exit, then read the output from the * child. * * XXX: This solution depends on the pipe buffer being large enough * to hold the complete output of the script. (Otherwise * it will block...) This has not been a problem in practice, but * a more thourough solution would make sure SIGCHLD will be sent, * and wait for either that signal or I/O using select(2). */ close(fdpipe[1]); while(((rc = waitpid(pid,&status,0)) == -1) && errno == EINTR); if(rc < 0){ BWLError(ctx,BWLErrFATAL,errno, "PostHookAvailable(): waitpid(), rc = %d: %M",rc); return False; } /* * If the script did not even exit... */ if(!WIFEXITED(status)){ if(WIFSIGNALED(status)){ BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "PostHookAvailable(): script %s exited due to signal=%d", script, WTERMSIG(status)); } BWLError(ctx,BWLErrWARNING,errno,"PostHookAvailable(): script %s unusable", script); return False; } /* * Read any output from the child */ buf[0] = '\0'; if( (rc = read(fdpipe[0],buf,buf_size-1)) > 0){ /* unsure the string is nul terminated */ for(len=buf_size;len>rc;len--){ buf[len-1] = '\0'; } } close(fdpipe[0]); /* * If it exited as expected, check the return string. */ if(WEXITSTATUS(status) == 0){ if(0 == strncmp(buf,pattern,strlen(pattern))){ /* script validated */ return True; } else { BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "PostHookAvailable(): There was an error validating posthook script %s: script output:\n%s", script,buf); } } else { BWLError(ctx,BWLErrWARNING,BWLErrUNKNOWN, "PostHookAvailable(): There was an error validating posthook script %s: exit status %d: output:\n%s", script,WEXITSTATUS(status),buf); } return False; } static void LoadErrConfig( char **lbuf, size_t *lbuf_max ) { FILE *conf; char conf_file[MAXPATHLEN+1]; char keybuf[MAXPATHLEN],valbuf[MAXPATHLEN]; char *key = keybuf; char *val = valbuf; int rc=0; conf_file[0] = '\0'; rc = strlen(BWCTLD_CONF_FILE); if(rc > MAXPATHLEN){ fprintf(stderr,"strlen(BWCTLD_CONF_FILE) > MAXPATHLEN\n"); exit(1); } if(opts.confdir){ rc += strlen(opts.confdir) + strlen(BWL_PATH_SEPARATOR); if(rc > MAXPATHLEN){ fprintf(stderr,"Path to %s > MAXPATHLEN\n", BWCTLD_CONF_FILE); exit(1); } strcpy(conf_file, opts.confdir); strcat(conf_file, BWL_PATH_SEPARATOR); } strcat(conf_file, BWCTLD_CONF_FILE); if(!(conf = fopen(conf_file, "r"))){ if(opts.confdir){ fprintf(stderr,"Unable to open %s: %s\n",conf_file, strerror(errno)); exit(1); } return; } while((rc = I2ReadConfVar(conf,rc,key,val,MAXPATHLEN,lbuf,lbuf_max)) > 0){ /* syslog facility */ if(!strncasecmp(key,"facility",9)){ int fac = I2ErrLogSyslogFacility(val); if(fac == -1){ fprintf(stderr, "Invalid -e: Syslog facility \"%s\" unknown\n", val); rc = -rc; break; } syslogattr.facility = fac; } else if(!strncasecmp(key,"priority",9)){ int prio = I2ErrLogSyslogPriority(val); if(prio == -1){ fprintf(stderr, "Invalid syslog priority \"%s\" unknown\n", val); rc = -rc; break; } syslogattr.priority = prio; } /* fall-through: unrecognized syntax ignored here */ } if(rc < 0){ fprintf(stderr,"%s:%d Problem parsing config file\n", conf_file,-rc); exit(1); } return; } static void LoadConfig( char **lbuf, size_t *lbuf_max ) { FILE *conf; char conf_file[MAXPATHLEN+1]; char keybuf[MAXPATHLEN],valbuf[MAXPATHLEN]; char *key = keybuf; char *val = valbuf; int rc; int dc; conf_file[0] = '\0'; rc = strlen(BWCTLD_CONF_FILE); if(rc > MAXPATHLEN){ I2ErrLog(errhand,"strlen(BWCTLD_CONF_FILE) > MAXPATHLEN"); exit(1); } if(opts.confdir){ rc += strlen(opts.confdir) + strlen(BWL_PATH_SEPARATOR); if(rc > MAXPATHLEN){ I2ErrLog(errhand,"Path to %s > MAXPATHLEN", BWCTLD_CONF_FILE); exit(1); } strcpy(conf_file, opts.confdir); strcat(conf_file, BWL_PATH_SEPARATOR); } strcat(conf_file, BWCTLD_CONF_FILE); if(!(conf = fopen(conf_file, "r"))){ if(opts.confdir){ I2ErrLog(errhand,"Unable to open %s: %M",conf_file); exit(1); } return; } /* * Parse conf file */ rc=0; while((rc = I2ReadConfVar(conf,rc,key,val,MAXPATHLEN,lbuf,lbuf_max)) > 0){ /* syslog facility */ if(!strncasecmp(key,"facility",9)){ int fac = I2ErrLogSyslogFacility(val); if(fac == -1){ I2ErrLog(errhand, "Invalid -e: Syslog facility \"%s\" unknown", val); rc = -rc; break; } syslogattr.facility = fac; } else if(!strncasecmp(key,"priority",9)){ int prio = I2ErrLogSyslogPriority(val); if(prio == -1){ I2ErrLog(errhand, "Invalid syslog priority \"%s\" unknown", val); rc = -rc; break; } syslogattr.priority = prio; } else if(!strncasecmp(key,"rootfolly",10) || !strncasecmp(key,"root_folly",11)){ opts.allowRoot = True; } else if(!strncasecmp(key,"loglocation",12) || !strncasecmp(key,"log_location",13)){ syslogattr.line_info |= I2FILE|I2LINE; } else if(!strncasecmp(key,"datadir",8) || !strncasecmp(key,"data_dir",9)){ I2ErrLog(errhand,"The data_dir option has been depricated, ignoring..."); } else if(!strncasecmp(key,"user",5)){ if(!(opts.user = strdup(val))) { I2ErrLog(errhand,"strdup(): %M"); rc=-rc; break; } } else if(!strncasecmp(key,"group",6)){ if(!(opts.group = strdup(val))) { I2ErrLog(errhand,"strdup(): %M"); rc=-rc; break; } } else if(!strncasecmp(key,"verbose",8)){ opts.verbose = True; } else if(!strncasecmp(key,"authmode",9) || !strncasecmp(key,"auth_mode",10)){ if(!(opts.authmode = strdup(val))) { I2ErrLog(errhand,"strdup(): %M"); rc=-rc; break; } } else if(!strncasecmp(key,"srcnode",8) || !strncasecmp(key,"src_node",9)){ if(!(opts.srcnode = strdup(val))) { I2ErrLog(errhand,"strdup(): %M"); rc=-rc; break; } } else if(!strncasecmp(key,"vardir",7) || !strncasecmp(key,"var_dir",8)){ if(!(opts.vardir = strdup(val))) { I2ErrLog(errhand,"strdup(): %M"); rc=-rc; break; } } else if(!strncasecmp(key,"dieby",6) || !strncasecmp(key,"die_by",7)){ char *end=NULL; uint32_t tlng; errno = 0; tlng = strtoul(val,&end,10); if((end == val) || (errno == ERANGE)){ I2ErrLog(errhand,"strtoul(): %M"); rc=-rc; break; } opts.dieby = tlng; } else if (!strncasecmp(key,"posthook",8) || !strncasecmp(key,"post_hook",9)) { char **new_posthook; if (!PostHookAvailable(val)) { I2ErrLog(errhand, "Can't use posthook %s", val); exit(1); } new_posthook = realloc(opts.posthook, sizeof(char *) * (opts.posthook_count + 1)); if (!new_posthook) { I2ErrLog(errhand,"realloc(): %M"); rc = -rc; break; } new_posthook[opts.posthook_count] = strdup(val); if (!new_posthook[opts.posthook_count]) { I2ErrLog(errhand,"strdup(): %M"); rc=-rc; break; } opts.posthook_count++; opts.posthook = new_posthook; /* just non-null */ if( !BWLContextConfigSet(ctx,BWLProcessResults,(void*)BWLDProcessResults)){ I2ErrLog(errhand, "Unable to set BWLProcessResults"); exit(1); } } else if( (dc = BWLDaemonParseArg(ctx,key,val))){ if(dc < 0){ rc = -rc; break; } } else{ I2ErrLog(errhand,"Unknown key=%s",key); rc = -rc; break; } } if(rc < 0){ I2ErrLog(errhand,"%s:%d Problem parsing config file",conf_file,-rc); exit(1); } return; } static I2Boolean KillChildrenHandler( I2Datum key, I2Datum value __attribute__((unused)), void *app_data ) { int signal = *((int *) app_data); int pid = key.dsize; I2ErrLog(errhand, "Sending kill signal (%d) to %d", signal, pid); kill(pid,signal); return True; } static I2Boolean KillChildren( int signal ) { I2HashIterate(pidtable,KillChildrenHandler,&signal); killpg(mypid,signal); return True; } int main(int argc, char *argv[]) { char *progname; BWLErrSeverity out = BWLErrFATAL; char pid_file[MAXPATHLEN]; char info_file[MAXPATHLEN]; fd_set readfds; int maxfd; /* max fd in readfds */ BWLDPolicy policy; I2Addr listenaddr = NULL; int listenfd; int rc; I2Datum data; struct flock flk; int pid_fd; FILE *pid_fp; FILE *info_fp; BWLTimeStamp currtime; int ch; uid_t setuser=0; gid_t setgroup=0; char *lbuf=NULL; size_t lbuf_max=0; struct sigaction ignact; struct sigaction setact; sigset_t sigs; #define OPTBASESTRING "hvVc:d:fR:a:S:e:ZU:G:" #ifndef NDEBUG #define OPTSTRING OPTBASESTRING "w" #else #define OPTSTRING OPTBASESTRING #endif char *optstring = OPTSTRING; /* * Start an error loggin session for reporting errors to the * standard error */ if((progname = strrchr(argv[0],'/'))){ progname++; }else{ progname = *argv; } syslogattr.ident = progname; syslogattr.logopt = LOG_PID; syslogattr.facility = LOG_DAEMON; syslogattr.priority = LOG_ERR; syslogattr.line_info = (I2MSG); #ifndef NDEBUG syslogattr.line_info |= (I2LINE | I2FILE); #endif /* Set up options defaults */ memset(&opts,0,sizeof(opts)); opts.daemon = 1; opts.dieby = 30; opts.controltimeout = 7200; if(!getcwd(opts.cwd,sizeof(opts.cwd))){ perror("getcwd()"); exit(1); } /* * Fetch config file option if present */ opterr = 0; while((ch = getopt(argc, argv, optstring)) != -1){ switch (ch){ case 'c': /* -c "Config directory" */ if (!(opts.confdir = strdup(optarg))) { /* eh isn't setup yet...*/ perror("strdup()"); exit(1); } break; default: break; } } opterr = optreset = optind = 1; /* * Load Config file options for error reporting. * lbuf/lbuf_max keep track of a dynamically grown "line" buffer. * (It is grown using realloc.) * This will be used throughout all the config file reading and * should be free'd once all config files have been read. */ LoadErrConfig(&lbuf,&lbuf_max); /* * Read cmdline options that effect syslog so the rest of cmdline * processing can be reported via syslog. */ opterr = 0; while((ch = getopt(argc, argv, optstring)) != -1){ switch (ch){ int fac; case 'e': /* -e "syslog err facility" */ fac = I2ErrLogSyslogFacility(optarg); if(fac == -1){ fprintf(stderr, "Invalid -e: Syslog facility \"%s\" unknown\n", optarg); exit(1); } syslogattr.facility = fac; break; case 'Z': opts.daemon = 0; break; default: break; } } opterr = optreset = optind = 1; /* * Always use LOG_PERROR if it exists * If daemonizing, stderr will be closed, and this hurts nothing. * And... commandline reporting is good until after the fork. */ syslogattr.logopt |= LOG_PERROR; errhand = I2ErrOpen(progname, I2ErrLogSyslog, &syslogattr, NULL, NULL); if(! errhand) { fprintf(stderr, "%s : Couldn't init error module\n", progname); exit(1); } /* * Initialize the context. (Set the error handler to the app defined * one.) */ if(!(ctx = BWLContextCreate(errhand,NULL))){ exit(1); } /* * Load all config file options. * This one will exit with a syntax error for things it does not * understand. It takes the context as an arg so the context can * be queried for tool specific option parsing. */ LoadConfig(&lbuf,&lbuf_max); /* * Now deal with "all" cmdline options. */ while ((ch = getopt(argc, argv, optstring)) != -1){ switch (ch) { /* Connection options. */ case 'v': /* -v "verbose" */ opts.verbose = True; break; case 'f': opts.allowRoot = True; break; case 'a': /* -a "auth_mode" */ if (!(opts.authmode = strdup(optarg))) { I2ErrLog(errhand,"strdup(): %M"); exit(1); } break; case 'S': /* -S "src addr" */ if (!(opts.srcnode = strdup(optarg))) { I2ErrLog(errhand,"strdup(): %M"); exit(1); } break; case 'U': if(!(opts.user = strdup(optarg))){ I2ErrLog(errhand,"strdup(): %M"); exit(1); } break; case 'G': if(!(opts.group = strdup(optarg))){ I2ErrLog(errhand,"strdup(): %M"); exit(1); } break; case 'R': /* -R "var/run directory" */ if (!(opts.vardir = strdup(optarg))) { I2ErrLog(errhand,"strdup(): %M"); exit(1); } break; case 'c': case 'e': case 'Z': break; #ifndef NDEBUG case 'w': /* just non-null */ if( !BWLContextConfigSet(ctx,BWLChildWait,NOTNULL)){ I2ErrLog(errhand, "ContextConfigSet(): Unable to set BWLChildWait"); exit(1); } break; #endif case 'V': version(); exit(0); /* UNREACHED */ case 'h': case '?': default: usage(progname, ""); exit(0); /* UNREACHED */ } } argc -= optind; argv += optind; if (argc) { usage(progname, ""); exit(1); } if(!opts.vardir) opts.vardir = opts.cwd; if(!opts.confdir) opts.confdir = opts.cwd; /* Get exclusive lock for pid file. */ strcpy(pid_file, opts.vardir); strcat(pid_file, BWL_PATH_SEPARATOR); strcat(pid_file, "bwctld.pid"); if ((pid_fd = open(pid_file, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) < 0) { I2ErrLog(errhand, "open(%s): %M", pid_file); exit(1); } flk.l_start = 0; flk.l_len = 0; flk.l_type = F_WRLCK; flk.l_whence = SEEK_SET; while((rc=fcntl(pid_fd, F_SETLK, &flk)) < 0 && errno == EINTR); if(rc < 0){ I2ErrLog(errhand,"Unable to lock file %s: %M", pid_file); exit(1); } if ((pid_fp = fdopen(pid_fd, "wr")) == NULL) { I2ErrLog(errhand, "fdopen(): %M"); exit(1); } /* * Install policy for "ctx" - and return policy record. */ if(!(policy = BWLDPolicyInstall(ctx,opts.confdir,&ipfd_exit, &lbuf,&lbuf_max))){ I2ErrLog(errhand, "PolicyInit failed. Exiting..."); exit(1); }; if(getenv("BWCTL_DEBUG_CHILDWAIT")){ if( !BWLContextConfigSet(ctx,BWLChildWait,NOTNULL)){ I2ErrLog(errhand,"BWLContextconfigSet(ChildWait): %M"); exit(1); } } if(opts.verbose){ BWLContextSetErrMask(ctx,BWLErrOK); } else{ BWLContextSetErrMask(ctx,BWLErrINFO); } if( !BWLContextFinalize(ctx)){ I2ErrLog(errhand, "BWLContextFinalize failed."); exit(1); } if( !BWLContextFindTools(ctx)){ I2ErrLog(errhand, "BWLContextFindTools failed."); exit(1); } if( !BWLContextConfigGetV(ctx,BWLAllowUnsync)){ if (BWLNTPIsSynchronized(ctx) == False) { I2ErrLog(errhand, "NTP is currently unsynchronized. Tests will be denied until NTP is synchronized. Set 'allow_unsync' to allow tests anyway."); } } /* * Done with the line buffer. (reset to 0 for consistancy.) */ if(lbuf){ free(lbuf); } lbuf = NULL; lbuf_max = 0; /* * If running as root warn if the -U/-G flags not set. */ if(!geteuid()){ struct passwd *pw; struct group *gr; /* * Validate user option. */ if(opts.user){ if((pw = getpwnam(opts.user))){ setuser = pw->pw_uid; } else if(opts.user[0] == '-'){ setuser = strtoul(&opts.user[1],NULL,10); if(errno || !getpwuid(setuser)){ I2ErrLog(errhand,"Invalid user/-U option: %s",opts.user); exit(1); } } else{ I2ErrLog(errhand,"Invalid user/-U option: %s",opts.user); exit(1); } } if(!setuser && !opts.allowRoot){ I2ErrLog(errhand,"Running bwctld as root is folly!"); I2ErrLog(errhand, "Use the -U option! (or allow root with the -f option)"); exit(1); } /* * Validate group option. */ if(opts.group){ if((gr = getgrnam(opts.group))){ setgroup = gr->gr_gid; } else if(opts.group[0] == '-'){ setgroup = strtoul(&opts.group[1],NULL,10); if(errno || !getgrgid(setgroup)) { I2ErrLog(errhand,"Invalid user/-G option: %s", opts.group); exit(1); } } else { I2ErrLog(errhand,"Invalid user/-G option: %s", opts.group); exit(1); } } /* * Only setting effective id for now. This will catch * errors, and will still allow the rename of the * pid/info file later. */ if(setgroup && (setegid(setgroup) != 0)){ I2ErrLog(errhand,"Unable to setgid to \"%s\": %M", opts.group); exit(1); } if(setuser && seteuid(setuser) != 0){ I2ErrLog(errhand,"Unable to setuid to \"%s\": %M", opts.user); exit(1); } } /* * Setup the "default_mode". */ if(opts.authmode){ char *s = opts.authmode; opts.auth_mode = 0; while(*s != '\0'){ switch(toupper(*s)){ case 'O': opts.auth_mode |= BWL_MODE_OPEN; break; case 'A': opts.auth_mode |= BWL_MODE_AUTHENTICATED; break; case 'E': opts.auth_mode |= BWL_MODE_ENCRYPTED; break; default: I2ErrLogP(errhand,EINVAL, "Invalid -authmode %c",*s); usage(progname,NULL); exit(1); } s++; } } else{ /* * Default to all modes. */ opts.auth_mode = BWL_MODE_OPEN|BWL_MODE_AUTHENTICATED| BWL_MODE_ENCRYPTED; } /* * TODO: a config test for this would probably be cleaner... */ { /* ensure intcmp will work */ size_t psize = sizeof(pid_t); assert(psize<=sizeof(data.dsize)); } pidtable = I2HashInit(errhand,0,intcmp,inthash); fdtable = I2HashInit(errhand,0,intcmp,inthash); if(!pidtable || !fdtable){ I2ErrLogP(errhand,0,"Unable to setup hash tables..."); exit(1); } /* * daemonize here */ mypid = 0; if(opts.daemon){ /* * chdir to '/' so filesystems can be unmounted. */ if(chdir("/") < 0){ I2ErrLog(errhand,"Unable to chdir to /: %M"); exit(1); } /* * reopen stdin/stdout/stderr fd's */ for(rc=0;rc<3;rc++){ if(close(rc) == -1 || open("/dev/null",O_RDWR) != rc){ I2ErrLog(errhand,"Unable to reopen fd(%d): %M", rc); exit(1); } } /* * respawn self to detach from terminal. */ mypid = fork(); if(mypid < 0){ I2ErrLog(errhand,"Unable to fork: %M"); exit(1); } if((mypid == 0) && (setsid() == -1)){ I2ErrLog(errhand,"setsid(): %M"); exit(1); } } else{ /* * Depending upon the shell that starts this -Z "foreground" * daemon, this process may or may not be the Process Group * leader... This will make sure. (Needed so HUP/TERM * catching can kill the whole process group with one * kill call.) setsid handles this when daemonizing. */ mypid = getpid(); if(setpgid(0,mypid) != 0){ I2ErrLog(errhand,"setpgid(): %M"); exit(1); } } /* * Temporarily take root permissions back. * (If this is parent of daemonizing - exit immediately after * updating pid/info files. If not daemonizing, setuid/setgid * is called after the mypid if to return to lesser * permissions.) */ if((setuser) && (seteuid(getuid()) != 0)){ I2ErrLog(errhand,"seteuid(): %M"); kill(mypid,SIGTERM); exit(1); } if((setgroup) && (setegid(getgid()) != 0)){ I2ErrLog(errhand,"setegid(): %M"); kill(mypid,SIGTERM); exit(1); } /* * If this is the parent process (or not daemonizing) - write the pid * and info files. */ if(mypid > 0){ /* Record pid. */ if (ftruncate(pid_fd, 0) < 0) { I2ErrLogP(errhand, errno, "ftruncate: %M"); kill(mypid,SIGTERM); exit(1); } fprintf(pid_fp, "%lld\n", (long long)mypid); if (fflush(pid_fp) < 0) { I2ErrLogP(errhand, errno, "fflush: %M"); kill(mypid,SIGTERM); exit(1); } /* Record the start timestamp in the info file. */ strcpy(info_file, opts.vardir); strcat(info_file, BWL_PATH_SEPARATOR); strcat(info_file, "bwctld.info"); if ((info_fp = fopen(info_file, "w")) == NULL) { I2ErrLog(errhand, "fopen(%s): %M", info_file); kill(mypid,SIGTERM); exit(1); } if(!BWLGetTimeStamp(ctx,&currtime)){ I2ErrLogP(errhand, errno, "BWLGetTimeStamp: %M"); kill(mypid,SIGTERM); exit(1); } uptime = currtime.tstamp; fprintf(info_fp, "START="BWL_TSTAMPFMT"\n", (unsigned long long)currtime.tstamp); fprintf(info_fp, "PID=%lld\n", (long long)mypid); while ((rc = fclose(info_fp)) < 0 && errno == EINTR); if(rc < 0){ I2ErrLog(errhand,"fclose(): %M"); kill(mypid,SIGTERM); exit(1); } /* * If daemonizing - this is parent - exit. */ if(opts.daemon) exit(0); } /* * If the local interface was specified, use it - otherwise use NULL * for wildcard. */ if(opts.srcnode && !(listenaddr = I2AddrByNode(errhand,opts.srcnode))){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Invalid source address specified: %s",opts.srcnode); exit(1); } listenaddr = BWLServerSockCreate(ctx,listenaddr,&out); if(!listenaddr){ BWLError(ctx,BWLErrFATAL,BWLErrUNKNOWN, "Unable to create server socket. Exiting..."); exit(1); } /* * set real uid/gid, not just effective. */ if((setgroup) && (setgid(setgroup) != 0)){ I2ErrLog(errhand,"setegid(): %M"); exit(1); } if((setuser) && (setuid(setuser) != 0)){ I2ErrLog(errhand,"setuid(): %M"); exit(1); } /* * Set up signal handling. */ memset(&ignact,0,sizeof(ignact)); memset(&setact,0,sizeof(setact)); ignact.sa_handler = SIG_IGN; setact.sa_handler = signal_catch; sigemptyset(&ignact.sa_mask); sigemptyset(&setact.sa_mask); ignact.sa_flags = setact.sa_flags = 0; if( (sigaction(SIGPIPE,&ignact,NULL) != 0) || (sigaction(SIGUSR1,&setact,NULL) != 0) || (sigaction(SIGUSR2,&setact,NULL) != 0) || (sigaction(SIGINT,&setact,NULL) != 0) || (sigaction(SIGTERM,&setact,NULL) != 0) || (sigaction(SIGHUP,&setact,NULL) != 0) || (sigaction(SIGCHLD,&setact,NULL) != 0) || (sigaction(SIGALRM,&setact,NULL) != 0) ){ I2ErrLog(errhand,"sigaction(): %M"); exit(1); } listenfd = I2AddrFD(listenaddr); FD_ZERO(&readfds); FD_SET(listenfd,&readfds); maxfd = listenfd; while (1) { int nfound; fd_set ready; if(maxfd < 0){ I2HashIterate(fdtable,FindMaxFD,&maxfd); maxfd = MAX(maxfd,listenfd); } ready = readfds; if(ipfd_exit){ break; } nfound = select(maxfd+1,&ready,NULL,NULL,NULL); /* * Handle select interupts/errors. */ if(nfound < 0){ if(errno == EINTR){ if(ipfd_exit){ break; } ReapChildren(&maxfd,&readfds); continue; } BWLError(ctx,BWLErrFATAL,errno,"select(): %M"); exit(1); } /* * shouldn't happen, but for completeness... */ if(nfound == 0) continue; if(FD_ISSET(listenfd, &ready)){ /* new connection */ NewConnection(policy,listenaddr,&maxfd,&readfds); } else{ CleanPipes(&ready,&maxfd,&readfds,nfound); } if(ipfd_exit){ break; } ReapChildren(&maxfd,&readfds); } I2ErrLog(errhand,"%s: exiting...",progname); /* * Close the server socket. reset the readfds/maxfd so they * can't confuse later ReapChildren calls. */ I2AddrFree(listenaddr); FD_ZERO(&readfds); maxfd = -1; /* * Signal the process group to exit. */ KillChildren(SIGTERM); /* * Set an alarm to exit by even if graceful shutdown doesn't occur. */ ipfd_alrm = 0; alarm(opts.dieby); /* * Close all the pipes so pipe i/o can stay simple. (Don't have * to deal with interrupts for this.) */ I2HashIterate(fdtable,ClosePipes,NULL); /* * Loop until all children have been waited for, or until * alarm goes off. */ sigemptyset(&sigs); while(!ipfd_alrm && (I2HashNumEntries(pidtable) > 0)){ if(!ipfd_chld){ (void)sigsuspend(&sigs); } ReapChildren(&maxfd,&readfds); } /* * If children didn't die, report the error - send SIGKILL and exit. */ if(I2HashNumEntries(pidtable) > 0){ I2ErrLog(errhand, "Children still alive... Time for brute force."); KillChildren(SIGKILL); exit(1); } /* * Free context */ BWLContextFree(ctx); ctx = NULL; I2ErrLog(errhand,"%s: exited.",progname); exit(0); } bwctl_1.5.4+dfsg1.orig/configure.ac0000664000076500007710000002052412560414557014110 0ustar # # $Id$ # ######################################################################### # # # Copyright (C) 2003 # # Internet2 # # All Rights Reserved # # # ######################################################################### # # File: configure.ac # # Author: Jeff Boote # Internet2 # # Date: Tue Sep 16 14:22:47 MDT 2003 # # Description: autoconfig input script for bwctl build # # Usage: see bootstrap... # # Environment: # # Files: # # # Options: # Process this file with autoconf to produce a configure script. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # PACKAGE=bwctl VERSION="1.5.4" AC_INIT(bwctl, 1.5.4, bwctl-users@internet2.edu) AC_CONFIG_AUX_DIR(config) AM_INIT_AUTOMAKE(bwctl, 1.5.4, [no-define]) AC_DEFINE(PATCH_LEVEL, 1, "The RPM version number") AC_SUBST(PATCH_LEVEL, 1) AC_CONFIG_SRCDIR(bwlib/context.c) AM_CONFIG_HEADER(bwlib/config.h) TOP_BUILD_DIRS="" # Checks for programs. AC_PROG_CC #AC_PROG_RANLIB AC_PROG_LN_S AM_DISABLE_SHARED AC_PROG_LIBTOOL # possible solution to config location #BWL_PREFIX='${prefix}' #BWL_PREFIX_CFLAGS="-DBWL_PREFIX=$BWL_PREFIX" #AC_SUBST(BWL_PREFIX_CFLAGS) AC_DEFINE(AUTOCONF_SYSCONFDIR,/etc,"name of sysconfdir under prefix") # Checks for libraries. AC_SEARCH_LIBS(getaddrinfo, [socket nsl]) AC_SEARCH_LIBS(gethostbyname, nsl) AC_SEARCH_LIBS(nanosleep, rt) AC_SEARCH_LIBS(trunc, m) # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([errno.h getopt.h netdb.h stdlib.h tgmath.h sys/param.h sys/socket.h sys/time.h sys/timex.h]) # Checks for typedefs, structures, and compiler characteristics. I2_C___ATTRIBUTE__ AC_C_CONST AC_HEADER_TIME AC_CHECK_MEMBERS([struct sockaddr.sa_len], , , [#include #include ]) # Checks for library functions. AC_CHECK_FUNCS([memset socket getaddrinfo mergesort trunc]) # Checks for variable/function declarations. AC_CHECK_DECLS([optreset]) AC_CHECK_DECLS([fseeko]) # XXX: Replace this efence stuff with something that sets LDFLAGS (for -L) # and then uses AC_SEARCH_LIB to add to LIBS. # ## ## add configure options. ## #AC_ARG_WITH(efence, # AC_HELP_STRING([--with-efence=], # [yes means use -L/usr/local/lib -lefence]), # with_efence=$withval, with_efence=no) # # ## ## setup efence ## #MALLOCDEBUGLIBS="" #if test "$with_efence" != "no"; then # if test "$with_efence" = "yes"; then # MALLOCDEBUGLIBS="-L/usr/local/lib -lefence" # else # efence_dir=`dirname $with_efence` # efence_file=`basename $with_efence` # case $efence_dir in # /*) ;; # already absolute path # *) efence_dir="`pwd`/$efence_dir" ;; # esac # MALLOCDEBUGLIBS="$efence_dir/$efence_file" # fi #fi #AC_SUBST(MALLOCDEBUGLIBS) AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging], [CFLAGS="-g -Wall -DDEBUG $CFLAGS"]) # # --with-I2util: # If not specified, or is 'yes' then: # build with local-dir if available # use installed otherwise (depends on CFLAGS/LDFLAGS env set correctly) # If specified, then that must point to an already installed # prefix style tree (and include/lib subdir is assumed and used to set # LDFLAGS/CFLAGS # AC_ARG_WITH(I2util, AC_HELP_STRING([--with-I2util=], [defaults to using sub-dir if avail, otherwise installed. If specified, attempts to use that.]), with_I2util=$withval, with_I2util=yes) if test \( -z "$with_I2util" -o "$with_I2util" = "yes" \) -a -d I2util; then # Use local I2util? - just setup LDFLAGS/CFLAGS so libtool can find # it from the Makefile.am during build. AC_MSG_WARN([Using local I2util]) AC_CONFIG_SUBDIRS(I2util) TOP_BUILD_DIRS="I2util $TOP_BUILD_DIRS" I2util_dir="`pwd`/I2util" LDFLAGS="-L$I2util_dir/I2util $LDFLAGS" CFLAGS="-I$I2util_dir $CFLAGS" else # else - libI2util must already be built. If , then add to # LDFLAGS/CFLAGS - but ultimately, AC_SEARCH_LIBS and AC_CHECK_HEADERS # must succeed. if test -n "$with_I2util" -a -d "$with_I2util"; then I2util_dir=`dirname $with_I2util` case $I2util_dir in /*) ;; # already an absolute path *) I2util_dir="`pwd`/$I2util_dir" ;; esac LDFLAGS="-L$with_I2util/lib $LDFLAGS" CFLAGS="-I$I2util_dir/include $CFLAGS" fi AC_SEARCH_LIBS([I2AddrByNode],I2util, ,AC_MSG_ERROR([Couldn't find I2util library])) AC_CHECK_HEADERS([I2util/util.h I2util/conf.h], ,AC_MSG_ERROR([Couldn't find I2util header files]), [AC_INCLUDES_DEFAULT]) fi uname=`uname` # --with-thrulay: # If not specified, or is 'yes' then: # build with local-dir if available # use installed otherwise (depends on CFLAGS/LDFLAGS env set correctly) # If specified, then that must point to an already installed # prefix style tree (and include/lib subdir is assumed and used to set # LDFLAGS/CFLAGS # AC_ARG_WITH(thrulay, AC_HELP_STRING([--with-thrulay=], [defaults to using sub-dir if avail, otherwise installed. If specified, attempts to use that.]), with_thrulay=$withval, with_thrulay=no) case $uname in SunOS*) with_thrulay=no ;; esac if test "$with_thrulay" = "no"; then AC_MSG_WARN([Disabling thrulay support]) do_thrulay=false else if test \( -z "$with_thrulay" -o "$with_thrulay" = "yes" \) -a -d thrulay; then # Use local thrulay? - just setup LDFLAGS/CFLAGS so libtool can find # it from the Makefile.am during build. AC_MSG_WARN([Using local thrulay]) AC_CONFIG_SUBDIRS(thrulay) TOP_BUILD_DIRS="thrulay $TOP_BUILD_DIRS" thrulay_dir="`pwd`/thrulay" LDFLAGS="-L$thrulay_dir/thrulay $LDFLAGS" CFLAGS="-I$thrulay_dir $CFLAGS" else # else - libthrulay must already be built. If , then add to # LDFLAGS/CFLAGS - but ultimately, AC_SEARCH_LIBS and AC_CHECK_HEADERS # must succeed. if test -n "$with_thrulay" -a -d "$with_thrulay"; then thrulay_dir=`dirname $with_thrulay` case $thrulay_dir in /*) ;; # already an absolute path *) thrulay_dir="`pwd`/$thrulay_dir" ;; esac LDFLAGS="-L$thrulay_dir/lib $LDFLAGS" CFLAGS="-I$thrulay_dir/include $CFLAGS" fi AC_SEARCH_LIBS([thrulay_client_init],thrulay, ,AC_MSG_ERROR([Couldn't find thrulay library])) use_sys_thrulay="true" AC_DEFINE(USE_SYS_THRULAY, 1, [Use system installed thrulay library]) fi AC_CHECK_HEADERS([thrulay/client.h thrulay/server.h], ,AC_MSG_ERROR([Couldn't find thrulay header files]), [AC_INCLUDES_DEFAULT]) do_thrulay=true AC_DEFINE(TOOL_THRULAY, 1, [THRULAY throughput tool]) fi AM_CONDITIONAL(USE_SYS_THRULAY, test x$use_sys_thrulay = xtrue) AM_CONDITIONAL(TOOL_THRULAY, test x$do_thrulay = xtrue) AC_ARG_ENABLE(iperf, AC_HELP_STRING([--enable-iperf], [- IPERF throughput tool]), [tool_ok=$enableval], [tool_ok=yes]) if test "$tool_ok" = "yes"; then AC_DEFINE(TOOL_IPERF, 1, [IPERF throuphput tool]) do_iperf=true fi AM_CONDITIONAL(TOOL_IPERF, test x$do_iperf = xtrue) AC_ARG_ENABLE(nuttcp, AC_HELP_STRING([--enable-nuttcp], [- NUTTCP throughput tool]), [tool_ok=$enableval], [tool_ok=yes]) if test "$tool_ok" = "yes"; then AC_DEFINE(TOOL_NUTTCP, 1, [NUTTCP throuphput tool]) do_nuttcp=true fi AM_CONDITIONAL(TOOL_NUTTCP, test x$do_nuttcp = xtrue) # Check for MAN2HTML. The manpages will be compiled to html files if it's # found. AC_CHECK_PROGS([MAN2HTML], [man2html]) if test -n "${MAN2HTML}"; then AC_DEFINE(MAN2HTML, 1, [MAN2HTML man-page converter]) do_man2html=true fi AM_CONDITIONAL([HAVE_MAN2HTML], test x$do_man2html = xtrue) AC_SUBST(TOP_BUILD_DIRS) AC_SUBST(ac_aux_dir) AC_OUTPUT([Makefile bwlib/Makefile bwctld/Makefile bwctl/Makefile conf/Makefile contrib/Makefile doc/Makefile bwctl.spec], [test -z "$CONFIG_HEADERS" || echo timestamp > bwlib/stamp-h.in]) bwctl_1.5.4+dfsg1.orig/TODO0000664000076500007710000000166212560414557012314 0ustar Multi-cast support meta-scheduler daemon Authorization Logging Currently just logs integer limit req/resp - should log all resource reqs. I2Addr usage - single host test configuration (documentation as well) Better peer connection problem detection More simple user/passwd config file setup - notice key changes without restart? tool specific output flags csv output from iperf nmwg output? separate common pieces from man-pages similar to owamp ----- And one other minor request: Could it try iperf first, before nuttcp, so we dont see this nuttcp warnings every time? That is from the client spawning off the server... It is trying all the tools to see what is available to it, then the client contacts it to find out what the server supports. (This is what I mean by a more complicated mode...) There may be a way to disable nuttcp using the .bwctlrc file... Or there may at least be an easy way to add that there. ----- bwctl_1.5.4+dfsg1.orig/Makefile.in0000664000076500007710000005575412560414557013704 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@ 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@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/bwctl.spec.in \ $(top_srcdir)/configure ChangeLog INSTALL TODO \ config/config.guess config/config.sub config/depcomp \ config/install-sh config/ltmain.sh config/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/c-attribute.m4 \ $(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 = $(top_builddir)/bwlib/config.h CONFIG_CLEAN_FILES = bwctl.spec CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck 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)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" 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@ 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@ MAN2HTML = @MAN2HTML@ 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_VERSION = @PACKAGE_VERSION@ PATCH_LEVEL = @PATCH_LEVEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TOP_BUILD_DIRS = @TOP_BUILD_DIRS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_aux_dir = @ac_aux_dir@ 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@ lt_ECHO = @lt_ECHO@ 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@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # # $Id$ # ######################################################################### # # # Copyright (C) 2002 # # Internet2 # # All Rights Reserved # # # ######################################################################### # # File: Makefile.am # # Author: Jeff Boote # Internet2 # # Date: Wed Apr 17 13:37:24 EDT 2002 # # Description: toplevel build for bwctl # SUBDIRS = @TOP_BUILD_DIRS@ bwlib bwctld bwctl conf doc contrib RPM_FLAGS = --define "_topdir ${PWD}" --define "_specdir ${PWD}" --define "_sourcedir ${PWD}" --define "_srcrpmdir ${PWD}" --define "_rpmdir ${PWD}" --define "_builddir ${PWD}" # uncomment this when we stop using broken automake 1.5 # (then remove from DIST_EXTRA in subdir) #nobase_include_HEADERS = bwlib/bwlib.h #EXTRA_DIST = bootstrap #MAINTAINERCLEANFILES = aclocal.m4 Makefile.in configure config.log \ # config.status EXTRA_DIST = LICENSE 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) --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): bwctl.spec: $(top_builddir)/config.status $(srcdir)/bwctl.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ 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; \ ($(am__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" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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 || \ set "$$@" "$$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; 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: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; }; }'`; \ 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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || 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 u+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-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) -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-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: 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 mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am srpm: dist @rpmbuild -bs ${RPM_FLAGS} bwctl.spec # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # 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: bwctl_1.5.4+dfsg1.orig/ChangeLog0000664000076500007710000035456712560414557013415 0ustar ------------------------------------------------------------------------ r527 | aaron | 2009-01-26 10:28:02 -0500 (Mon, 26 Jan 2009) | 3 lines Reiterate the Nuttcp/Thrulay limitations in the Features portion of the index.html ------------------------------------------------------------------------ r525 | aaron | 2009-01-26 08:59:22 -0500 (Mon, 26 Jan 2009) | 3 lines Minor documentation updates. ------------------------------------------------------------------------ r523 | aaron | 2009-01-23 12:45:11 -0500 (Fri, 23 Jan 2009) | 3 lines Commit ChangeLog ------------------------------------------------------------------------ r522 | aaron | 2009-01-23 12:30:49 -0500 (Fri, 23 Jan 2009) | 3 lines Make sure the man page used to build other man pages is included ------------------------------------------------------------------------ r521 | aaron | 2009-01-21 13:37:53 -0500 (Wed, 21 Jan 2009) | 3 lines Update the documentation to say something about thrulay being deprecated and not available on Solaris. ------------------------------------------------------------------------ r520 | aaron | 2009-01-21 13:16:59 -0500 (Wed, 21 Jan 2009) | 3 lines Disable thrulay support on solaris as thrulay doesn't work there. ------------------------------------------------------------------------ r519 | aaron | 2009-01-21 10:15:32 -0500 (Wed, 21 Jan 2009) | 3 lines Commit changelog ------------------------------------------------------------------------ r518 | aaron | 2009-01-20 16:55:31 -0500 (Tue, 20 Jan 2009) | 3 lines Update the man2html part of the Makefile and point the externals.txt to the new location. ------------------------------------------------------------------------ r517 | aaron | 2009-01-20 09:36:51 -0500 (Tue, 20 Jan 2009) | 3 lines Update the documentation with Susan's edits. ------------------------------------------------------------------------ r516 | aaron | 2009-01-20 08:02:10 -0500 (Tue, 20 Jan 2009) | 8 lines Truncate the PID file before printing the PID to it. This fixes an issue where a high PID process would get restarted and the new instance would have with a low PID. The pid file would then look like: 283 8 This would not work all that well. ------------------------------------------------------------------------ r515 | aaron | 2009-01-14 13:56:55 -0500 (Wed, 14 Jan 2009) | 3 lines Make sure all the documentation is included. ------------------------------------------------------------------------ r514 | aaron | 2009-01-14 08:53:46 -0500 (Wed, 14 Jan 2009) | 3 lines Document that the various _port configuration options should be set to a range. ------------------------------------------------------------------------ r513 | aaron | 2009-01-12 07:48:33 -0500 (Mon, 12 Jan 2009) | 3 lines Add the bwctl infosheet PDF to the doc directory ------------------------------------------------------------------------ r512 | aaron | 2009-01-12 07:40:03 -0500 (Mon, 12 Jan 2009) | 3 lines Update the thrulay website in the documentation ------------------------------------------------------------------------ r511 | aaron | 2009-01-09 13:03:28 -0500 (Fri, 09 Jan 2009) | 3 lines Minor documentation updates. ------------------------------------------------------------------------ r510 | aaron | 2009-01-09 11:39:06 -0500 (Fri, 09 Jan 2009) | 3 lines Minor updates for the man pages. ------------------------------------------------------------------------ r509 | aaron | 2009-01-06 10:24:01 -0500 (Tue, 06 Jan 2009) | 3 lines Minor wording fixes in the ntp description ------------------------------------------------------------------------ r508 | aaron | 2009-01-06 09:56:34 -0500 (Tue, 06 Jan 2009) | 5 lines Add a bwctlrc man page and convert the bwctld.conf to share the configuration options section with bwctlrc Add a brief thing on NTP configuration Have the index.html link to the firewalls html page ------------------------------------------------------------------------ r507 | aaron | 2008-12-18 15:07:59 -0500 (Thu, 18 Dec 2008) | 3 lines Minor spec file updates ------------------------------------------------------------------------ r506 | aaron | 2008-12-18 13:27:51 -0500 (Thu, 18 Dec 2008) | 4 lines Update the release todo slightly Update the changes, merging all the rc*s into a single 1.3 ------------------------------------------------------------------------ r505 | aaron | 2008-12-18 13:01:26 -0500 (Thu, 18 Dec 2008) | 5 lines Update the TODO Swap the version # to 1.3 instead of 1.3rc6 Make the RPM server depend on the I2util rpm since it has some tools we need ------------------------------------------------------------------------ r504 | aaron | 2008-12-18 10:42:02 -0500 (Thu, 18 Dec 2008) | 5 lines For the bwctl client, only set the AllowUnsync variable if it's not already set to true. This prevents it from overriding a user configured "allow_unsync" with false if they haven't specified a sync fuzz. Only warn about swapping 'localhost' for a different address in the case where a fake daemon isn't being used. ------------------------------------------------------------------------ r503 | aaron | 2008-12-17 16:17:06 -0500 (Wed, 17 Dec 2008) | 3 lines Add some helper functions to avoid copying the I2Addr unnecessarily when doing the loopback checks in bwctl.c ------------------------------------------------------------------------ r502 | aaron | 2008-12-17 15:28:31 -0500 (Wed, 17 Dec 2008) | 3 lines Use the recently added convenience function I2AddrIsLoopback instead of rolling my own. ------------------------------------------------------------------------ r501 | aaron | 2008-12-17 14:13:49 -0500 (Wed, 17 Dec 2008) | 11 lines Fix for when a client is doing a third party test to an ipv6/ipv4 enabled host and an ipv4 enabled host. The client would forget the ipv6 host's ipv4 address, leading to a connect failure when it tried to coordinate addresses for the other servers to use. Enable users to do a third party test in which one of the specified hosts is on the local machine. e.g. "bwctl -c localhost:1234 -s nms-rthr2.chic.net.internet2.edu" should now work. Minor other changes ------------------------------------------------------------------------ r500 | aaron | 2008-10-29 14:16:19 -0400 (Wed, 29 Oct 2008) | 4 lines Minor changes to the release todo Update configure.ac and doc/Makefile.am to support converting the man pages to html if man2html is found. ------------------------------------------------------------------------ r499 | boote | 2008-10-20 20:38:02 -0400 (Mon, 20 Oct 2008) | 8 lines bwctl.man Tried to clarify max_time_error 'a little'. typos index.html Added Chris Tracy to 'thanks' section. ------------------------------------------------------------------------ r498 | aaron | 2008-10-15 08:28:32 -0400 (Wed, 15 Oct 2008) | 3 lines Include the LICENSE file when a make dist is done ------------------------------------------------------------------------ r497 | aaron | 2008-10-14 17:16:49 -0400 (Tue, 14 Oct 2008) | 3 lines A quick edit pass updating the "index.html" documentation. ------------------------------------------------------------------------ r496 | aaron | 2008-10-14 16:42:28 -0400 (Tue, 14 Oct 2008) | 3 lines Update the documentation to use Susan Topol's fancy architecture pictures ------------------------------------------------------------------------ r495 | aaron | 2008-10-14 16:20:18 -0400 (Tue, 14 Oct 2008) | 5 lines Some minor documentation updates Bump the version number to 1.3rc5 Include a license file and include that license in all the .c and .h files ------------------------------------------------------------------------ r494 | aaron | 2008-10-09 13:08:56 -0400 (Thu, 09 Oct 2008) | 3 lines Update the included firewall documentation. ------------------------------------------------------------------------ r493 | aaron | 2008-10-09 12:27:47 -0400 (Thu, 09 Oct 2008) | 11 lines Some bwctl manpage updates: bwctl.man describes -T/-y/-f options includes a reference to max_time_error in -a documentation bwctld.conf.man removes 'datadir' from bwctld.conf manpage adds post_hook directive documentation ------------------------------------------------------------------------ r492 | aaron | 2008-10-07 14:54:22 -0400 (Tue, 07 Oct 2008) | 4 lines Use the access_priority configuration option for the error messages specifying why access was denied. ------------------------------------------------------------------------ r491 | aaron | 2008-10-06 10:23:28 -0400 (Mon, 06 Oct 2008) | 4 lines Minor fixes to some 'unknown' error messages to debug. This keeps messages from accidently being put in the syslog 'emergency' category. ------------------------------------------------------------------------ r490 | boote | 2008-10-02 03:12:46 -0400 (Thu, 02 Oct 2008) | 7 lines Fixed cosmetic issue effecting 'ps' listings... StrToByte function was modifying the string passed in by terminating the string at the 'units' char. (It so happened that the string passed in was in the argv list, so someone looking at 'ps' would then think that the 'units' for the -w or -W or -l flag was incorrect somehow. ------------------------------------------------------------------------ r489 | boote | 2008-08-27 15:56:28 -0400 (Wed, 27 Aug 2008) | 5 lines Fix bash syntax for string compare in configure.ac. jeff ------------------------------------------------------------------------ r488 | aaron | 2008-07-25 11:23:35 -0400 (Fri, 25 Jul 2008) | 4 lines Display an error when there isn't a common 'security' (authentication?) mode (usually when the bwctl server requires authentication). ------------------------------------------------------------------------ r487 | aaron | 2008-07-25 09:44:38 -0400 (Fri, 25 Jul 2008) | 3 lines Have the sample hook handle thrulay output as best it can when it's the sender. ------------------------------------------------------------------------ r486 | aaron | 2008-07-24 15:06:03 -0400 (Thu, 24 Jul 2008) | 6 lines Update the sample configuration to include examples for nuttcp/thrulay ports/cmds Update the sample hook to handle multistream thrulay properly Update the client help screen to show that the -P is no longer ENOTSUPPORT Move the default externals to point to anonsvn ------------------------------------------------------------------------ r485 | aaron | 2008-07-21 18:55:50 -0400 (Mon, 21 Jul 2008) | 4 lines Minor compile warning fixes Update the externals to anonsvn ------------------------------------------------------------------------ r484 | aaron | 2008-07-21 16:07:47 -0400 (Mon, 21 Jul 2008) | 3 lines Clean up some compile-time warnings ------------------------------------------------------------------------ r483 | boote | 2008-07-19 10:59:53 -0400 (Sat, 19 Jul 2008) | 4 lines Only print out the warning message if the fp is non-null. (This helps keep core files from collecting on your sytem.) ------------------------------------------------------------------------ r482 | aaron | 2008-07-16 16:39:29 -0400 (Wed, 16 Jul 2008) | 3 lines Use the configured nuttcp/iperf locations when the option is set in the configuration ------------------------------------------------------------------------ r481 | boote | 2008-07-16 13:27:27 -0400 (Wed, 16 Jul 2008) | 2 lines fix syntax warning... ------------------------------------------------------------------------ r480 | aaron | 2008-07-10 11:26:42 -0400 (Thu, 10 Jul 2008) | 6 lines Minor changes for the RPM - have it install the sample hook - remove the --enable-NUTTCP=no from the configure line - install pfstore and aespasswd ------------------------------------------------------------------------ r479 | aaron | 2008-07-10 10:56:45 -0400 (Thu, 10 Jul 2008) | 4 lines Change the BWLTimeStampToTimespec and BWLTimeStampToTimeval to not modify the BWLTimeStamp argument Modify the sample hook to better handle iperf lines ------------------------------------------------------------------------ r478 | aaron | 2008-07-10 10:16:55 -0400 (Thu, 10 Jul 2008) | 4 lines Fix the "abnormal termination" error Remove the Dumper printing in the sample hook ------------------------------------------------------------------------ r477 | aaron | 2008-07-09 17:20:15 -0400 (Wed, 09 Jul 2008) | 7 lines Document the posthook option in the example .conf file Add more data to the output - start time, tos, client ip Update changes, changelog Have the sample hook script call to syslog ------------------------------------------------------------------------ r476 | aaron | 2008-07-09 14:53:30 -0400 (Wed, 09 Jul 2008) | 5 lines Move sample hook to the contrib directory Properly order the tools when unspecified (iperf, nuttcp, thrulay) Use execlp instead of execl when exec'ing the scripts ------------------------------------------------------------------------ r475 | aaron | 2008-07-09 13:28:37 -0400 (Wed, 09 Jul 2008) | 6 lines Try to validate the posthook script by running it with a --validate flag on startup. The script must print to stdout "Status: OK" on success, anything else is considered a failure. It also sets the non-blocking flag when the script is called. ------------------------------------------------------------------------ r474 | aaron | 2008-07-07 14:00:46 -0400 (Mon, 07 Jul 2008) | 5 lines Commit initial code for "posthook" processing along with a simple script that can be used to post-process the results. Needs some more complete documentation. ------------------------------------------------------------------------ r473 | boote | 2008-06-16 11:36:56 -0400 (Mon, 16 Jun 2008) | 13 lines bwctld.conf: modify peer_ports to peer_port to be consistent with $tool_port config params. tools.c: daemon.c: retrieve $tool_port instead of $tool_ports endpoint.c: fix types for printf vars... (signed vs unsigned) ------------------------------------------------------------------------ r472 | boote | 2008-06-13 16:02:25 -0400 (Fri, 13 Jun 2008) | 4 lines modifying the fuzz to 1.5 seconds. stupid iperf. ------------------------------------------------------------------------ r471 | aaron | 2008-06-13 15:25:21 -0400 (Fri, 13 Jun 2008) | 3 lines Properly convert the fuzz to a timeval ------------------------------------------------------------------------ r470 | boote | 2008-06-13 15:22:53 -0400 (Fri, 13 Jun 2008) | 7 lines endpoint.c: Adding diagnostic message for kill's of children into data stream. sapi.c: Increasing fuzz time because iperf receivers exit slowly. ------------------------------------------------------------------------ r469 | aaron | 2008-06-13 15:01:46 -0400 (Fri, 13 Jun 2008) | 3 lines A temporary fix for when a sender sends fast enough that the receiver iperf isn't done when the stopsession message comes in ------------------------------------------------------------------------ r468 | aaron | 2008-06-13 07:38:39 -0400 (Fri, 13 Jun 2008) | 3 lines Properly set the tool to use when it is left unset by the user ------------------------------------------------------------------------ r467 | aaron | 2008-06-11 15:40:02 -0400 (Wed, 11 Jun 2008) | 7 lines 1. update the default limits file to allow 20 seconds of slub 2. update the ChangeLog/CHANGES for -rc2 3. update the .spec since we no longer depend on a libthrulay rpm 4. have the bwctl client choose a common tool if one isn't specified 5. make iperf the 'default' common tool ------------------------------------------------------------------------ r465 | aaron | 2008-06-09 16:57:18 -0400 (Mon, 09 Jun 2008) | 3 lines Fix an issue where the max_time_error wouldn't be properly checked preventing tests from running. ------------------------------------------------------------------------ r464 | aaron | 2008-06-09 16:24:56 -0400 (Mon, 09 Jun 2008) | 4 lines Update the spec file to deal with the thrulay/i2util files being installed Add a message about UDP thrulay being non-working ------------------------------------------------------------------------ r463 | boote | 2008-06-07 02:16:10 -0400 (Sat, 07 Jun 2008) | 4 lines Add the 2 lines of code to the server to allow legacy clients to work with new servers. (Need to select the IPERF tool by default.) ------------------------------------------------------------------------ r462 | boote | 2008-06-07 01:02:51 -0400 (Sat, 07 Jun 2008) | 6 lines policy.c: modified to report successful allocations as well as denied ones. configure.ac: attempt to test for 'trunc' - packrat complains about no prototype for trunc(). No idea why - I spent too long on it already. ------------------------------------------------------------------------ r461 | boote | 2008-06-06 21:12:35 -0400 (Fri, 06 Jun 2008) | 4 lines Fix the error message for bandwidth requsts to servers that don't support the larger limits. ------------------------------------------------------------------------ r460 | boote | 2008-06-06 21:10:18 -0400 (Fri, 06 Jun 2008) | 20 lines Added lots of numeric conversion warning flags to GCC compile lines, and then went through and removed 99% of the warnings. (htons gives bogus warnings on OS X so I couldn't remove them.) Modified the protocol to support bandwidth limits for UDP of greater than 4.3gbps. I did this by adding an 'exponent' byte into the test request message - if the server supports the later protocol version, then this value indicates the number of bits the existing bandwidth word should be shifted to get the 'real' value requested. (As part of this, added some better error checking to see if limits that are larger than can be handled will be detected and reported as an error instead of being munged by overflow. Fixed what must have been a long-standing bug in the policy code. Due to a mistake, child limit definitions have been able to specify larger limits for things like bandwidth than the parent specified. This bug has now been fixed - if a parent limit is more restrictive it will be used in place of less restrictive limits specified in child limit definitions. ------------------------------------------------------------------------ r459 | boote | 2008-06-05 18:38:11 -0400 (Thu, 05 Jun 2008) | 3 lines Make successful request log as well as unsuccessful ones. ------------------------------------------------------------------------ r458 | boote | 2008-06-05 17:47:36 -0400 (Thu, 05 Jun 2008) | 3 lines Fix typo in limits exceeded message. ------------------------------------------------------------------------ r457 | boote | 2008-05-27 18:10:40 -0400 (Tue, 27 May 2008) | 4 lines Track NTP sync state changes and print out sync/unsync messages when state changes. ------------------------------------------------------------------------ r456 | boote | 2008-05-27 15:55:46 -0400 (Tue, 27 May 2008) | 3 lines Fix to make allow_unsync actually work on systems that have ntp syscalls. ------------------------------------------------------------------------ r455 | aaron | 2008-05-27 13:19:15 -0400 (Tue, 27 May 2008) | 3 lines configure should now accept --disable-nuttcp/--disable-iperf instead of requiring --disable-NUTTCP ------------------------------------------------------------------------ r454 | aaron | 2008-05-23 18:01:01 -0400 (Fri, 23 May 2008) | 4 lines Disable Nuttcp UDP tests since they're currently not working Improve the error messages for when iperf or nuttcp aren't found to allay fears that something catastrophic happened. ------------------------------------------------------------------------ r453 | aaron | 2008-05-23 16:48:50 -0400 (Fri, 23 May 2008) | 10 lines A series of fixes from jeff's tree: 1. Fixed UDP test bug (socket abstraction was copying the socket type in addition to the address so the peer connection was failing) 2. Added comments into the protocol description comments in the code. 3. Corrected the client protocol handling code so that it implicitly recognizes that a pre 1.3 daemon has support for the iperf tool. 4. Added better diagnostic messages for peer connection failures. (Messages now go into the returned sender/receiver results.) 5. Better client error message when two servers don't support the same tools. 6. Bump the version number to 1.3rc2 ------------------------------------------------------------------------ r452 | aaron | 2008-05-23 16:34:56 -0400 (Fri, 23 May 2008) | 3 lines Move the BWCTL_1_3rc1 branch to be the new trunk ------------------------------------------------------------------------ r449 | boote | 2008-04-21 12:23:54 -0400 (Mon, 21 Apr 2008) | 3 lines log of all changes - prepare for release. ------------------------------------------------------------------------ r448 | boote | 2008-04-21 12:21:27 -0400 (Mon, 21 Apr 2008) | 10 lines time.c: Fix logic error for ntp system call check. Also made it more clear from error messages when a host is unsynchronized vs not having ntp system calls. configure.ac: Added AC_DEFINE for the TOOL thrulay stuff. (Accidentily removed it when setting up the one-source tree build method.) ------------------------------------------------------------------------ r447 | boote | 2008-04-21 11:04:32 -0400 (Mon, 21 Apr 2008) | 4 lines Check headers needs to happen to define the thrulay header constants no matter how thrulay is included... ------------------------------------------------------------------------ r446 | boote | 2008-04-21 00:07:15 -0400 (Mon, 21 Apr 2008) | 3 lines Attempting to force static compile... ------------------------------------------------------------------------ r445 | boote | 2008-04-20 22:36:30 -0400 (Sun, 20 Apr 2008) | 3 lines adding --automake to libtool exec. ------------------------------------------------------------------------ r444 | boote | 2008-04-20 22:22:20 -0400 (Sun, 20 Apr 2008) | 3 lines Modify bwctl to use libtool for linking. ------------------------------------------------------------------------ r443 | boote | 2008-04-20 22:01:16 -0400 (Sun, 20 Apr 2008) | 3 lines Well... it seems to run. (Build within one src tree.) ------------------------------------------------------------------------ r442 | boote | 2008-04-20 21:13:47 -0400 (Sun, 20 Apr 2008) | 4 lines Start of single-src tree distribution and attempt at simplifying the autoconf setup. (autoconf sucks) ------------------------------------------------------------------------ r441 | boote | 2008-04-20 10:55:35 -0400 (Sun, 20 Apr 2008) | 4 lines Adding externals to automatically checkout I2util/thrulay into the bwctl 1.3rc1. ------------------------------------------------------------------------ r440 | boote | 2008-04-20 10:07:43 -0400 (Sun, 20 Apr 2008) | 5 lines Preparing for a release - will keep this under branches while messing with autoconf to try and get a reasonable 'static' compile out of it - then will cp to tags upon release. ------------------------------------------------------------------------ r439 | aaron | 2008-04-03 09:52:37 -0400 (Thu, 03 Apr 2008) | 8 lines Commit the beginnings of a test harness for bwctl/bwctld along with a few files containing basic test cases. The test harness reads through a list of tests and, optionally, spawns bwctld instances and then executes the test. It then uses regular expressions defined for each test to see whether or not the results succeeded or failed. ------------------------------------------------------------------------ r438 | aaron | 2008-04-01 16:14:25 -0400 (Tue, 01 Apr 2008) | 4 lines Bugfix when no IPv6 address is present, but the headers are Fix a minor memory leak ------------------------------------------------------------------------ r437 | boote | 2008-03-15 05:20:33 -0400 (Sat, 15 Mar 2008) | 9 lines Added warning messages to indicate what 'common' tools are available in the event the client requests a tool that is not available at both servers. Cleaned up the error mask in the client a bit - will probably need to go through the library and be more consistent about what error levels are used for what types of things. ------------------------------------------------------------------------ r436 | boote | 2008-03-14 21:51:59 -0400 (Fri, 14 Mar 2008) | 24 lines Abstracted as much of the daemon configuration from bwctld as possible so it can be used in bwctl, when the client runs the test directly. So, now the client can completely run tests again since it will invoke the new tool abstraction in the same way bwctld does. This required: The 'childwait' debugging code to *always* use the context Modified the access_prio error level printing to always look in the context as well. Modified the error printing code to have a masking feature. It is now possible to make it ignore all error messages with a prio less than the specified level. (Use BWLErrOK to get everything.) Also cleaned up some other error message printing - added a convinience function for printing a 'tool' name by id. Now - what remains is documentation and testing. ------------------------------------------------------------------------ r435 | boote | 2008-03-05 18:58:53 -0500 (Wed, 05 Mar 2008) | 22 lines Adding a client config file (~/.bwctlrc). This file can be used to set many tool specific aspects of bwctl. Many of the config file options are identical to the daemon - in fact it uses most of the same parsing code. Also modified the 'ports' parsing code to allow the specification of a single port. (and modified the tool parsing options to use the keyword 'port' instead of 'ports' to make it compatible with previous versions of bwctl - this was just a mistake on my part when I abstracted the tools) Modified the bwctl.man page to indicate the BWCTLRC env variable, and removed the now defunct environment variables that used to be used to set these daemon-features. (Still need to modifiy the client to use the same functions as the daemon to run the tool - but now that the configuration is available in the 'ctx' variable, this will be easy.) jeff ------------------------------------------------------------------------ r434 | boote | 2008-02-22 23:49:33 -0500 (Fri, 22 Feb 2008) | 4 lines Adding information about what 'address' is having an error problem to an error message. ------------------------------------------------------------------------ r433 | boote | 2008-02-12 11:58:14 -0500 (Tue, 12 Feb 2008) | 39 lines bwctld.c: Changing 'fuzz' calculation in scheduling to only multiply the rtt, not the time error. Added debugging output for the scheduling process. Modified the give-up 'timeout' for the end of test to use the dieby timeout instead of the generic controltimeout. bwctld.limits: Added an example of max_time_error into the file. (A daemon can say that it will not support peers with greater than this amount of time error - including the error on the local system.) This is intended to protect bwctld from a possible DOS attack by clients requesting tests and specifying very large time errors. time.c: Modify the way the time error is specified in the context. Used to be a (double *), now it is just a double directly. (Required changes to the context code to support double in the 'union' and context access functions. endpoint.c: Modified the poor synchronized clock detection code to make the test fail. Before it reported the error and continued to try and work - but it did not work. bwctl.c: Modified the scheduling request code to ask for a test a little closer to current-time. Added more schedule debugging (with -vv option specified). ------------------------------------------------------------------------ r432 | boote | 2008-01-24 12:00:49 -0500 (Thu, 24 Jan 2008) | 6 lines Fixed signal handling bug. Client was hanging in 'read' because the wrong variable was passed into the retn_on_intr arg of the read function. ------------------------------------------------------------------------ r431 | boote | 2008-01-24 05:31:51 -0500 (Thu, 24 Jan 2008) | 11 lines Added env variable that can be used to perturbe the clock: BWCTL_DEBUG_TIMEOFFSET Set this to a float-point seconds value to change all timestamps in the server or client. This is a good way to test time offset issues. Also, I believe I have fixed the 'sync' uninitialized error - but the code will need to be rerun in valgrind to be sure. ------------------------------------------------------------------------ r430 | boote | 2008-01-18 06:13:41 -0500 (Fri, 18 Jan 2008) | 26 lines Removed unneeded options from bwctld: datadir/verbose Removed peerport initialization process. It was overkill, and confusing. Now, it just uses a random port in the range, and cycles through until it can open one. Moved many of the conf-file parsing options into a new function in daemon.c. This will be called by both the server and the client for implementing request-manager functionality. Reset some of the fuzz-time constants to smaller values - now that there is better process control on iperf, hopefully it will work to tighten up the schedule. Added a Memory-register function into the context. This is poor-man's memory management. When the context is free'd, and registered pointers are also free'd. Removed schedule.c. It was never used in bwctl - it was old owamp code that somehow stayed part of bwctl all this time. Still don't have the client running tests directly, but things are now very close. ------------------------------------------------------------------------ r429 | boote | 2008-01-17 17:02:06 -0500 (Thu, 17 Jan 2008) | 6 lines Remove the 'verbose' option from bwctld. It was not being used. Remove the testerports fields from the daemon opts structure - this is handled by the tool abstraction now. ------------------------------------------------------------------------ r428 | boote | 2008-01-17 15:38:48 -0500 (Thu, 17 Jan 2008) | 6 lines Removing daemon state for bottleneck_capacity. (now it is only in the 'context hash'). Needed to add support for U64 type context variables to do this. ------------------------------------------------------------------------ r427 | boote | 2008-01-15 19:07:47 -0500 (Tue, 15 Jan 2008) | 8 lines Starting to remove as many options from the 'daemon' state structure as possible. Moving them into the ContextConfig hash. This will allow more code reuse between the client-spawned daemon, and the regular daemon because the client can make use of the same 'conf' file things. (client will have a .bwctldrc file for setting things like peerports,tool specific config) ------------------------------------------------------------------------ r426 | aaron | 2008-01-15 10:43:41 -0500 (Tue, 15 Jan 2008) | 10 lines Improve the bwctl RPM: 1. install basic configuration files(bwctld.conf, bwctld.limits) 2. pull in the limits file from the NPToolkit 3. change the conf file to set the user to 'bwctl' 4. install an init file 5. add a bwctl user on install 6. turn on bwctld on boot during install ------------------------------------------------------------------------ r425 | boote | 2008-01-14 18:02:50 -0500 (Mon, 14 Jan 2008) | 2 lines corrected. ------------------------------------------------------------------------ r423 | boote | 2008-01-14 17:55:15 -0500 (Mon, 14 Jan 2008) | 3 lines Update change log. ------------------------------------------------------------------------ r422 | boote | 2008-01-14 17:39:52 -0500 (Mon, 14 Jan 2008) | 3 lines Prepare for release. ------------------------------------------------------------------------ r421 | aaron | 2008-01-14 17:28:08 -0500 (Mon, 14 Jan 2008) | 3 lines Compile fix ------------------------------------------------------------------------ r420 | boote | 2008-01-14 14:19:02 -0500 (Mon, 14 Jan 2008) | 24 lines Modified the Context functions a bit to remove circular dependency issues. The context holds the error-reporting configuration, and is used when parsing config files. However, over time more configuration initialization (with tools and NTP specifically) happened there. Now that options have been added into the config file to modify how some of those things are initialized, it was necessary to split the context creation into two parts - the first does error configuration and can then be used for parsing the files and setting the other configurable options. Modified Aaron's ntp changes a bit - if the system call ever fails, it will never be called again. It treats the system as if the timex.h header file was not available. Also fixed a bug in bwctl where the context was being passed in for arg one of I2AddrByNode instead of the I2ErrHandle. Also did a bit of prep to start moving the daemon event loop into the library to make it easier for the client to run tools in the same way as the server. ------------------------------------------------------------------------ r419 | aaron | 2008-01-14 11:31:03 -0500 (Mon, 14 Jan 2008) | 6 lines 1. Add a spec file 2. Add some extra verbosity to errors in the capi 3. compile fix 4. install bwlib.h ------------------------------------------------------------------------ r418 | boote | 2008-01-11 21:08:31 -0500 (Fri, 11 Jan 2008) | 9 lines iperf.c: Corrected parallel streams selection. (client needs the flag too) thrulay.c: Added some process managment. thrulay_server forks for every child, this waits for all those children to exit before exiting to the bwctl data collection process. ------------------------------------------------------------------------ r417 | boote | 2008-01-11 20:13:04 -0500 (Fri, 11 Jan 2008) | 4 lines Don't reset the 'tool port' if this is the sender. The receiver gets to decide. ------------------------------------------------------------------------ r416 | boote | 2008-01-11 13:05:02 -0500 (Fri, 11 Jan 2008) | 5 lines bwctld.limits: add '\' to fix syntax error I accidentily left in during testing. tools.c/iperf.c: Correct freed-memory read error. ------------------------------------------------------------------------ r415 | boote | 2008-01-11 11:27:29 -0500 (Fri, 11 Jan 2008) | 3 lines Adding nuttcp.c and thrulay.c tool abstractions. ------------------------------------------------------------------------ r414 | boote | 2008-01-04 18:13:56 -0500 (Fri, 04 Jan 2008) | 4 lines Modifying the description of the -L flag to hopefully make it more understandable. (User feedback.) ------------------------------------------------------------------------ r413 | boote | 2008-01-04 17:49:05 -0500 (Fri, 04 Jan 2008) | 5 lines Added csv output from iperf. Added 'units' -f flag for iperf. ------------------------------------------------------------------------ r412 | boote | 2008-01-02 14:42:19 -0500 (Wed, 02 Jan 2008) | 3 lines Mostly testing svn commit-log delivery. ------------------------------------------------------------------------ r411 | boote | 2008-01-02 13:24:22 -0500 (Wed, 02 Jan 2008) | 3 lines Adding a file with a few useful commands to remember. ------------------------------------------------------------------------ r410 | boote | 2007-12-29 20:33:02 -0500 (Sat, 29 Dec 2007) | 8 lines Fixed iperf exec'ing. Now iperf completely works through tool abstraction. (Was using pointers to function (stack) memory. In the previous implementation, the exec was in the same function scope and stack memory was appropriate, this broke when the functionality was split across mulitiple functions.) Thrulay is still failing... That will be next. ------------------------------------------------------------------------ r409 | boote | 2007-12-28 23:38:07 -0500 (Fri, 28 Dec 2007) | 16 lines bwctld: Remove tool selection stuff bwctl: Remove some of the daemon functionality that can no longer easily be done by the client. (The next step is to share more of the actual bwctld functions directly...) bwlib: Finished tool abstraction all the way through. Added Nuttcp to the available tools. I introduced some kind of error into things when moving it to the abstraction causing things to fail at the moment - will be fixed soon. ------------------------------------------------------------------------ r408 | boote | 2007-12-24 03:28:06 -0500 (Mon, 24 Dec 2007) | 6 lines Organization for pre-run and run functions of tool abstraction. Still need to move functionality from endpoint.c into the tool abstraction. ------------------------------------------------------------------------ r407 | boote | 2007-12-22 19:39:01 -0500 (Sat, 22 Dec 2007) | 5 lines Added support so bwctl client can select which tool to run (new tools will automatically be added into the help messages - and become available to the -T option). ------------------------------------------------------------------------ r406 | boote | 2007-12-21 14:51:32 -0500 (Fri, 21 Dec 2007) | 4 lines Make iperf checking function more descriptive. (exec errors are now reported.) ------------------------------------------------------------------------ r405 | boote | 2007-12-21 02:48:28 -0500 (Fri, 21 Dec 2007) | 3 lines IperfAvailable() added to iperf tool abstraction. ------------------------------------------------------------------------ r404 | boote | 2007-12-19 02:36:12 -0500 (Wed, 19 Dec 2007) | 5 lines Abstraction now checks to determine if tools are available and creates the 'tools' bitmask for use in the hand-shake protocol. ------------------------------------------------------------------------ r403 | boote | 2007-12-16 02:47:28 -0500 (Sun, 16 Dec 2007) | 4 lines Tests now work again. (The peer connection was resetting the 'selected' tool in the run_tester because of variable reuse...) ------------------------------------------------------------------------ r402 | boote | 2007-12-13 15:30:19 -0500 (Thu, 13 Dec 2007) | 19 lines Working on completely changing how fedemp did tool negotiation... (He had it doing things in the client - which makes no sense, since the client is not even involved in the test in 3-party.) This required putting more things in the protocol communication. This does not work yet, but it is getting much closer. Basically - I still need to decide where to put the 'tool' detection portion. I'm thinking at daemon start-up only. But, then if someone installs a new tool (like iperf) then the daemon would need to be restarted to make it available. (Since the tool detection is not currently running - all tests currently fail since the tool variable is not initialized. But, I have enough changes here that are working - I wanted to checkpoint this work.) jeff ------------------------------------------------------------------------ r401 | boote | 2007-12-07 20:27:12 -0500 (Fri, 07 Dec 2007) | 7 lines Create a unified API for selecting tool portranges. Document the new -P option (nParellel streams). Started moving where tool detection is done. ------------------------------------------------------------------------ r400 | boote | 2007-12-01 15:41:47 -0500 (Sat, 01 Dec 2007) | 7 lines Corrected bug in PeerAgent. Sender would finish before receiver, and would not wait for StopSessions message correctly. Needed to reset the 'rc' variable to call select again to get updated state of peer socket. ------------------------------------------------------------------------ r399 | boote | 2007-12-01 02:52:00 -0500 (Sat, 01 Dec 2007) | 3 lines Modify default limits file to mention the max_time_error option. ------------------------------------------------------------------------ r398 | boote | 2007-12-01 02:51:06 -0500 (Sat, 01 Dec 2007) | 8 lines Corrected the parsing error (for forgotten comma's). The hasty fix at SC did not work. Added a max_time_error limit type. This allows the daemon to decide if a given 'clock' is precise enough to test with, and puts control of this parameter in the server configuration. ------------------------------------------------------------------------ r397 | boote | 2007-09-21 01:52:56 -0400 (Fri, 21 Sep 2007) | 5 lines Reorganized autoconf stuff slightly, because conditional compiling of individual tool drivers was not working as expected. (automake/libtool stuff I had wrong.) ------------------------------------------------------------------------ r396 | boote | 2007-09-20 02:56:28 -0400 (Thu, 20 Sep 2007) | 11 lines Modularized config file parsing, so individual 'tool' drivers can add their own config file options. Added autoconf magic for enabling/disabling specific tools. bwctld - cleaned up conf file parsing beyond modularization. Now uses I2ErrLog for error reporting during conf file parsing. bwctld/bwctl - simplified port-range specifications slightly. ------------------------------------------------------------------------ r395 | boote | 2007-09-04 02:00:12 -0400 (Tue, 04 Sep 2007) | 13 lines beginnings of tool abstraction. Still need to move iperf/nuttcp code into abstraction. autoconf stuff is done and works. reworked bwctld config file stuff to parse config file in two phases so the 'context' can be initialized before real parsing is done. (first phase deals with error logging. Second phase will do everything else including tool specific parsing which needed to wait until after the 'context' is created. The context will hold a table of all configured throughput tools including functions/data to run them. (does not currently compile completely) ------------------------------------------------------------------------ r394 | boote | 2007-08-29 17:50:16 -0400 (Wed, 29 Aug 2007) | 6 lines Modifications based on further testing for child process management. bwctl is now much better about detecting problems in child processes and reporting them. ------------------------------------------------------------------------ r393 | boote | 2007-08-29 17:48:56 -0400 (Wed, 29 Aug 2007) | 5 lines Adding configure test to look for 'trunc' in -lm. jeff ------------------------------------------------------------------------ r392 | boote | 2007-08-29 17:47:02 -0400 (Wed, 29 Aug 2007) | 3 lines Corrected -h output for -a option (unsync clock offset). ------------------------------------------------------------------------ r391 | boote | 2007-08-28 19:20:12 -0400 (Tue, 28 Aug 2007) | 4 lines Modified the static GetAcceptValue() function to be a private library function. (Useful in endpoint.c as well as protocol.c) ------------------------------------------------------------------------ r390 | boote | 2007-08-28 19:17:31 -0400 (Tue, 28 Aug 2007) | 3 lines Cleanup sub-process management for tester children. Now, perhaps I will be able to detect when iperf freaks out. (Still needs major testing...) ------------------------------------------------------------------------ r389 | boote | 2007-08-26 16:55:40 -0400 (Sun, 26 Aug 2007) | 5 lines Starting to add better error checking and process management into sub-children. (this part doesn't compile yet, but I'm going off-grid and need to checkpoint) ------------------------------------------------------------------------ r388 | boote | 2007-07-03 18:36:35 -0400 (Tue, 03 Jul 2007) | 18 lines Removed all time functions that do not go through the BWLGetTimestamp functions. (This allows offset debugging to work...) Corrected all type-punning except with regard to the socket API. (And still corrected some of them - the easy ones.) So... I'm not compliant to the ISO standard, but I am to the POSIX standard... Hmm... Who wins?) Added some overflow protection to 64-bit arithm functions. Documented the BWCL_DEBUG_TIMEOFFSET environment variable. (This can be used to fake bwctl into reading the clock as a fixed offset from where it really is. This is very useful when debugging issues with offset clocks.) jeff ------------------------------------------------------------------------ r387 | boote | 2007-06-22 22:26:51 -0400 (Fri, 22 Jun 2007) | 4 lines Updating autoconf configuration for thrulay integration and now using libtool. ------------------------------------------------------------------------ r386 | boote | 2007-06-07 09:15:47 -0400 (Thu, 07 Jun 2007) | 4 lines Correcting compiler warnings for signed/unsigned mismatches, unused vars, and function signature mismatches. ------------------------------------------------------------------------ r385 | boote | 2007-05-17 21:45:29 -0400 (Thu, 17 May 2007) | 6 lines Improved error detection. Fixed code to make locally spawned server work again. Broke in merge with fedemp code (interrupts), and changes to I2util (I2Addr issues for unix-domain sockets). ------------------------------------------------------------------------ r384 | boote | 2007-05-17 02:32:38 -0400 (Thu, 17 May 2007) | 15 lines policy.h: Modified some Context key names to indicate the 'type' of the Context variable. capi.c: local_addr part of cntrl record was only set if bind is used - now it is updated in all cases. context.c: Ensure that Context 'set' functions use typed key names. *: reformatted text. ------------------------------------------------------------------------ r383 | boote | 2007-05-15 17:47:25 -0400 (Tue, 15 May 2007) | 2 lines Made sure all I/O now pays attention to interrupt's. ------------------------------------------------------------------------ r382 | boote | 2007-05-11 16:09:20 -0400 (Fri, 11 May 2007) | 3 lines Adding -V version flag. ------------------------------------------------------------------------ r381 | boote | 2007-04-27 19:44:30 -0400 (Fri, 27 Apr 2007) | 8 lines capi.c: Allowing loopback test - but giving warning. (So I can test with a single system.) configure.ac: Cleanup here - suffering from years of bit-rot. ------------------------------------------------------------------------ r380 | boote | 2007-04-02 00:05:22 -0400 (Mon, 02 Apr 2007) | 7 lines Adding support for BWCTL_DEBUG_TIMEOFFSET environment var. Now, it is easier to make a daemon behave as if the clock is offset - and I can better test for time-offset problems. jeff ------------------------------------------------------------------------ r379 | boote | 2007-04-02 00:00:48 -0400 (Mon, 02 Apr 2007) | 6 lines Changed how I2Util and thrulay are found by autoconf. This is much cleaner, and uses new versions of the AC macros - so hopefully it will last a while. jeff ------------------------------------------------------------------------ r378 | boote | 2007-03-30 19:48:53 -0400 (Fri, 30 Mar 2007) | 3 lines Modified bwctl to use I2util as a stand-alone package. ------------------------------------------------------------------------ r377 | boote | 2007-03-23 01:58:06 -0400 (Fri, 23 Mar 2007) | 11 lines Corrected hash-table 'config' variables for both context records and control records to by type-safe. (Latest ISO C rules don't allow for type-punning.) (Basically added some var-args functions for 'sets' to let them stay type independent, added a union to hold the hash value, and made all the 'keys' encode the type as part of the name so the union can be set/get using the correct type.) jeff ------------------------------------------------------------------------ r376 | boote | 2007-03-20 17:16:35 -0400 (Tue, 20 Mar 2007) | 5 lines formatting change. Moved all source to 4-char indents. (it was 50/50 - consistancy makes it much easier to read.) jeff ------------------------------------------------------------------------ r375 | boote | 2007-03-16 22:05:55 -0400 (Fri, 16 Mar 2007) | 18 lines Migrated the reset of bwctl to I2Addr's. The code from GSoC06 is not as clean as I would like. It is going to take some work to fix. The main reason for going to an api interface for the tester is to do most of the testers work during test-request negotiation. That way, things that fail can fail before they effect the scheduling on the client side. That was not done - so there is a fair amount of work. This was not done for the GSoC project - most of the pieces are here - but they need to be refactored to make this a stable/supportable piece of code. Also, there as been a lot of bit-rot in the past 2 years since the last release. The same type-punning issues that took me a couple of days on owamp need to be fixed here. Additionally, there are some problems with the way interrupt-handlers are done. ------------------------------------------------------------------------ r374 | boote | 2007-03-16 03:11:13 -0400 (Fri, 16 Mar 2007) | 4 lines Most of bwctl changed to use I2Addr from I2util library instead of internal socket abstraction. (More work to do - that is why this is in a branch. Just checkpointing...) ------------------------------------------------------------------------ r373 | (no author) | 2007-03-13 17:30:01 -0400 (Tue, 13 Mar 2007) | 1 line This commit was manufactured by cvs2svn to create branch 'BWL06CLEANUP'. ------------------------------------------------------------------------ r372 | boote | 2007-03-13 17:30:01 -0400 (Tue, 13 Mar 2007) | 6 lines Merge in most of the *any tester* functionality. Much integration work still to do, but this compiles - at least on Mac OS. jeff ------------------------------------------------------------------------ r371 | boote | 2007-01-13 16:42:48 -0500 (Sat, 13 Jan 2007) | 4 lines Merging changes from SC06 into 'head'. jeff ------------------------------------------------------------------------ r326 | boote | 2006-04-19 21:24:46 -0400 (Wed, 19 Apr 2006) | 2 lines Additional todo... ------------------------------------------------------------------------ r325 | boote | 2006-04-19 20:30:19 -0400 (Wed, 19 Apr 2006) | 4 lines Now after running ispell... jeff ------------------------------------------------------------------------ r324 | boote | 2006-04-19 20:26:52 -0400 (Wed, 19 Apr 2006) | 5 lines Adding more description of the scheduling algorithm to the architecture page. jeff ------------------------------------------------------------------------ r323 | boote | 2006-04-19 19:19:43 -0400 (Wed, 19 Apr 2006) | 4 lines Adding TODO file. jeff ------------------------------------------------------------------------ r322 | boote | 2006-03-23 00:48:35 -0500 (Thu, 23 Mar 2006) | 4 lines Change program registration for default syslog. jeff ------------------------------------------------------------------------ r321 | boote | 2006-03-09 20:53:20 -0500 (Thu, 09 Mar 2006) | 2 lines format change... ------------------------------------------------------------------------ r320 | boote | 2006-01-25 15:33:45 -0500 (Wed, 25 Jan 2006) | 9 lines bwlib.h: corrected comment. capi.c: removed redundant 'if' - recv_port MUST be passed in. It is better to core dump than to hide the fact that it was not. jeff ------------------------------------------------------------------------ r319 | boote | 2006-01-25 13:39:13 -0500 (Wed, 25 Jan 2006) | 7 lines Adding headings to paragraphs in bwctl architecture discussion to help outline what information is where and make it more readable. (Feedback from DFN.) jeff ------------------------------------------------------------------------ r318 | boote | 2005-11-14 18:50:13 -0500 (Mon, 14 Nov 2005) | 3 lines Adding the '-a' flag into the getopts string. The option was added and documented, but did not actually work due to the slacker developer. ------------------------------------------------------------------------ r317 | boote | 2005-09-30 19:33:02 -0400 (Fri, 30 Sep 2005) | 4 lines Corrected comments... jeff ------------------------------------------------------------------------ r316 | boote | 2005-09-30 19:30:10 -0400 (Fri, 30 Sep 2005) | 2 lines Fixing autoconf macro mess in bwctl too... ------------------------------------------------------------------------ r313 | boote | 2005-09-08 17:33:51 -0400 (Thu, 08 Sep 2005) | 4 lines Last round of rcs changes added into file. jeff ------------------------------------------------------------------------ r312 | boote | 2005-09-07 19:44:14 -0400 (Wed, 07 Sep 2005) | 4 lines Adding new options into example config file. jeff ------------------------------------------------------------------------ r311 | boote | 2005-09-07 19:36:18 -0400 (Wed, 07 Sep 2005) | 4 lines Modified documentation for new options in this release. jeff ------------------------------------------------------------------------ r310 | boote | 2005-09-07 19:00:13 -0400 (Wed, 07 Sep 2005) | 7 lines Changing the names of the config options to be consistent. They now all have '_' between words. (Before, some did and some did not.) The old versions will still be recognized for now. jeff ------------------------------------------------------------------------ r309 | boote | 2005-09-07 18:59:14 -0400 (Wed, 07 Sep 2005) | 3 lines Adding description of file and few more additional things that have been added. ------------------------------------------------------------------------ r308 | boote | 2005-09-01 19:47:12 -0400 (Thu, 01 Sep 2005) | 17 lines Preparing for new release. Unfortunately, I will not be able to test until next week. CHANGES enumerate changes from last release Modified the BWLCreateContext function to be a varargs function so Context values can be set upon creation. This is how a new variable can be added to modify how the use of NTP is initialized. corrected compiler warnings... Began to document NTP changes - this is not done yet. jeff ------------------------------------------------------------------------ r307 | boote | 2005-08-29 12:20:10 -0400 (Mon, 29 Aug 2005) | 4 lines Modifying version tag. jeff ------------------------------------------------------------------------ r306 | boote | 2005-08-29 12:00:50 -0400 (Mon, 29 Aug 2005) | 4 lines Adding an rcs2log changelog. jeff ------------------------------------------------------------------------ r305 | boote | 2005-08-28 18:15:09 -0400 (Sun, 28 Aug 2005) | 6 lines Modifying the "iperf killed" code to do a non-blocking waitpid just before the message - just to double check that the process is still going. jeff ------------------------------------------------------------------------ r304 | boote | 2005-08-28 17:28:03 -0400 (Sun, 28 Aug 2005) | 5 lines Need to include timex.h *after* bwlib.h since the autoconf macro's are not defined until then. jeff ------------------------------------------------------------------------ r303 | boote | 2005-08-28 17:12:23 -0400 (Sun, 28 Aug 2005) | 10 lines 2 changes: 1) Added message into data stream to indicate iperf was killed for scheduling purposes. 2) Modified code to still work if ntp system calls are not available or if system clock is not synchronized. jeff ------------------------------------------------------------------------ r302 | boote | 2005-08-28 17:09:38 -0400 (Sun, 28 Aug 2005) | 6 lines Adding header check for timex.h. This file is required for the ntp system calls. The code has been modified to not use the system calls if this header file is not found. jeff ------------------------------------------------------------------------ r301 | boote | 2005-07-18 22:06:55 -0400 (Mon, 18 Jul 2005) | 6 lines Fixed a bug in the "spawned" local server case. Need to wait for the child daemon to exit on it's own, or the protocol message you read from it for the "close" will not be valid... jeff ------------------------------------------------------------------------ r300 | boote | 2005-07-18 16:16:30 -0400 (Mon, 18 Jul 2005) | 5 lines Preparing for "alpha" release - fixed config files to be more appropriate for an "example". jeff ------------------------------------------------------------------------ r299 | boote | 2005-07-18 14:34:55 -0400 (Mon, 18 Jul 2005) | 4 lines Adding newlines to output to make it a little more readable. jeff ------------------------------------------------------------------------ r298 | boote | 2005-07-17 03:05:19 -0400 (Sun, 17 Jul 2005) | 4 lines Changing the default -L value to be no less than 5 minutes. jeff ------------------------------------------------------------------------ r297 | boote | 2005-07-17 02:56:21 -0400 (Sun, 17 Jul 2005) | 4 lines initializing full ntp_conf structure. jeff ------------------------------------------------------------------------ r296 | boote | 2005-07-16 18:09:56 -0400 (Sat, 16 Jul 2005) | 4 lines Initialize the whole ntp_conf structure... jeff ------------------------------------------------------------------------ r295 | boote | 2005-07-16 17:29:40 -0400 (Sat, 16 Jul 2005) | 5 lines Adding code to print error messages to stderr in the I2Util error module to handle LOG_PERROR directly if syslog does not provide the functionality. jeff ------------------------------------------------------------------------ r294 | boote | 2005-07-15 11:51:26 -0400 (Fri, 15 Jul 2005) | 36 lines Porting to Solaris... This compiles, I have yet to do any real testing. Once this is checked in, I will make sure these changes don't break Linux/FreeBSD. configure.ac: Adding socket,nsl,rt libraries Adding check for paths.h header file ErrLogSyslog.c: Define LOG_AUTHPRIV and LOG_FTP if they are not defined. Options.c: conf.c: Adding cast from char to int for all isspace/isdigit args. readpassphrase.c: remove cdefs.h. Add check for autoconf paths.h value, include or define _PATH_TTY. Adding cast from char to int for all isspace/isdigit args. bwctl.c: Adding cast from char to int for all isspace/isdigit args. Change setenv to putenv to set POSIXLY_CORRECT for getopt. Check for LOG_PERROR. (Add warning if -r is passed in, and LOG_PERROR is not available.) bwctld.c: Add check for LOG_PERROR. policy.c: Remove fts.h - not even used here, this is an owamp leftover... Adding cast from char to int for all isspace/isdigit args. util.c: Adding cast from char to int for all isspace/isdigit args. ------------------------------------------------------------------------ r293 | boote | 2005-07-14 18:54:59 -0400 (Thu, 14 Jul 2005) | 6 lines changing all u_int* types to uint* types so they agree with the latest 'C' standard. This is part of a Solaris port - I am about to make sure this still works on Linux/FreeBSD... jeff ------------------------------------------------------------------------ r292 | boote | 2005-07-14 18:22:15 -0400 (Thu, 14 Jul 2005) | 4 lines Adding some debugging code. jeff ------------------------------------------------------------------------ r291 | boote | 2005-07-14 14:29:06 -0400 (Thu, 14 Jul 2005) | 2 lines syntax error. Sigh. ------------------------------------------------------------------------ r290 | boote | 2005-07-14 14:19:52 -0400 (Thu, 14 Jul 2005) | 13 lines capi.c: Added a check for localhost/loopback - those addresses are not valid test endpoints. (They are not routable off the host, and trying to use them confuses the "peer" connection.) Removing default address of localhost from BWLControlOpen if server address is not specified. (This would have failed had it happened anyway.) sapi.c: Modified a comment. ------------------------------------------------------------------------ r289 | boote | 2005-07-11 21:05:38 -0400 (Mon, 11 Jul 2005) | 5 lines Fix for srcnode bug. (Passive bit was not being set in "hints" for some configurations.) jeff ------------------------------------------------------------------------ r288 | boote | 2005-07-11 20:12:15 -0400 (Mon, 11 Jul 2005) | 8 lines Fix annoying bug that caused incorrect error to be returned. (Caused by an uninitialized variable. I was jumping into the middle of a block, and the static initializer was never being executed.) (Yes, this is the one everyone always complains about.) jeff ------------------------------------------------------------------------ r287 | boote | 2005-07-11 19:30:54 -0400 (Mon, 11 Jul 2005) | 4 lines Increasing version number - to prepare for bug-fix release. jeff ------------------------------------------------------------------------ r286 | boote | 2005-07-11 19:30:17 -0400 (Mon, 11 Jul 2005) | 4 lines Changing version string to print at bottom of usage() message. jeff ------------------------------------------------------------------------ r285 | boote | 2005-07-11 19:29:10 -0400 (Mon, 11 Jul 2005) | 4 lines Changing version string to print at bottom of usage message. jeff ------------------------------------------------------------------------ r284 | boote | 2005-07-11 19:18:24 -0400 (Mon, 11 Jul 2005) | 4 lines Adding an ack's section. jeff ------------------------------------------------------------------------ r283 | boote | 2005-07-11 19:18:08 -0400 (Mon, 11 Jul 2005) | 4 lines Just changed code formatting for readability. jeff ------------------------------------------------------------------------ r282 | boote | 2005-07-11 19:17:47 -0400 (Mon, 11 Jul 2005) | 6 lines Adding more contextual information to passphrase prompt. You are now told which host you are attempting to authenticate for in addition to the identity name. (If it is for the -A flag, the host is listed as BOTH.) jeff ------------------------------------------------------------------------ r281 | boote | 2005-07-11 18:24:20 -0400 (Mon, 11 Jul 2005) | 4 lines Adding version reporting to usage() messages. jeff ------------------------------------------------------------------------ r280 | boote | 2005-05-20 12:22:23 -0400 (Fri, 20 May 2005) | 4 lines Corrected logic flow. -f is now REQUIRED if the uid comes back as 0. jeff ------------------------------------------------------------------------ r279 | boote | 2005-05-20 12:00:14 -0400 (Fri, 20 May 2005) | 2 lines typo. ------------------------------------------------------------------------ r278 | boote | 2005-05-20 11:54:09 -0400 (Fri, 20 May 2005) | 7 lines Adding an option to allow bwctld to run with root permissions. (Needed for specifying some combinations of TOS bits.) (One bug done.) jeff ------------------------------------------------------------------------ r277 | boote | 2004-09-16 11:45:12 -0400 (Thu, 16 Sep 2004) | 4 lines Correct error message. jeff ------------------------------------------------------------------------ r275 | boote | 2004-09-15 20:11:01 -0400 (Wed, 15 Sep 2004) | 6 lines Ugh - now fix the code to work on FreeBSD again too. computers-- jeff ------------------------------------------------------------------------ r274 | boote | 2004-09-15 20:06:09 -0400 (Wed, 15 Sep 2004) | 4 lines correct brain-dead linux getopt. jeff ------------------------------------------------------------------------ r272 | boote | 2004-09-14 19:06:58 -0400 (Tue, 14 Sep 2004) | 4 lines Modified to prepare for 1.1a release. jeff ------------------------------------------------------------------------ r271 | boote | 2004-09-14 18:55:52 -0400 (Tue, 14 Sep 2004) | 2 lines spell checked... ------------------------------------------------------------------------ r270 | boote | 2004-09-14 18:37:27 -0400 (Tue, 14 Sep 2004) | 4 lines Document new features. jeff ------------------------------------------------------------------------ r269 | boote | 2004-09-10 18:52:59 -0400 (Fri, 10 Sep 2004) | 4 lines document conf file a little better. jeff ------------------------------------------------------------------------ r268 | boote | 2004-09-10 18:48:22 -0400 (Fri, 10 Sep 2004) | 12 lines Merging SERVLESS_CLIENT changes into HEAD. bwctl New athentication options TOS (Still need to document 3-party,servless client, env vars.) bwctld new conf options jeff ------------------------------------------------------------------------ r267 | boote | 2004-09-10 18:46:45 -0400 (Fri, 10 Sep 2004) | 9 lines Merging SERVLESS_CLIENT changes into HEAD. Added example and description of: peerports priority accesspriority jeff ------------------------------------------------------------------------ r266 | boote | 2004-09-10 18:45:45 -0400 (Fri, 10 Sep 2004) | 38 lines Merging SERVLESS_CLIENT changes into HEAD. api.c: Lots of changes to the Addr abstraction to support more socktypes and address families. Unified Addr abstraction a LOT. Eventually, this should probably move down into I2util. bwlib.h: bwlibP.h: Added support for PeerPortRange. Added support to log access and errors to different prio's. capi.c: Modified to use new Addr api. context.c: Access log prio - access function for context. endpoint.c: Modified iperf_exec to use execv in support of a user spawned daemon. Modified to use new Addr api. Added TOS support. protocol.c: Modified to use new Addr api. Added TOS support. sapi.c: Modified to use new Addr api. util.c: Removed Hex funcs. Added a parse ports function to do port range logic for both bwctl and bwctld. jeff ------------------------------------------------------------------------ r265 | boote | 2004-09-10 18:36:20 -0400 (Fri, 10 Sep 2004) | 23 lines Merging SERVLESS_CLIENT changes into HEAD. bwctld.c: Added option to configure a port range for peer connections. Modified scheduling algorithm to enable 3-party to work. Modified srcnode option to allow only setting the port to wildcard the address on a different port for listening. Added TOS support to protocol. Modified iperf exec to bind the source address for the sender. Modified the ordering of initialization to change when the setuid will happen. (This will be more important later when bwctld notices changes in the config/limits files.) Modied daemon to send "access" messages with a different priority than "error" messages to allow admins to seperate these in syslog. jeff ------------------------------------------------------------------------ r264 | boote | 2004-09-10 18:28:48 -0400 (Fri, 10 Sep 2004) | 25 lines Merging SERVLESS_CLIENT changes into HEAD. bwctl.c: 3-party implemented: bwctl can now talk to do remote servers to arrange a test between them. servless client implemented: If only one target host is specified, then the localhost is assumed to be the other target. If bwctl can't contact a local daemon, it will spawn off a process to run iperf itself - dealing with all peer communication with the other bwctld process. Completely modified the scheduling algorithm so it would work with 3-party as well as point-2-point. (timing issues were different, and I had to rethink.) Lots of small things... Enabled the -S (TOS) option to iperf. Modified the way error logging happens. Added a number of environment variables to control how a spawned off daemon controls iperf. (port numbers etc...) Generalized the authentication options to make future auth protocols easier to incorporate. jeff ------------------------------------------------------------------------ r228 | boote | 2004-08-07 02:53:23 -0400 (Sat, 07 Aug 2004) | 9 lines Modified BWLControlOpen function to take a new masked bit to indicate that it should use the "least restrictive" mode instead of the *most* restrictive mode. (It was too much of a pain to implement this above this level, and adding a bit to a bitmask is a pretty easy fix.) This actually made me rethink some of what I was doing in capi.c and I have even simplified the code some. jeff ------------------------------------------------------------------------ r227 | boote | 2004-08-06 19:24:47 -0400 (Fri, 06 Aug 2004) | 4 lines Fix bit-shift. jeff ------------------------------------------------------------------------ r226 | boote | 2004-08-06 19:05:26 -0400 (Fri, 06 Aug 2004) | 4 lines passing in wrong 'mode' variable. Ugh. jeff ------------------------------------------------------------------------ r225 | boote | 2004-08-06 19:01:40 -0400 (Fri, 06 Aug 2004) | 2 lines syntax. ------------------------------------------------------------------------ r224 | boote | 2004-08-06 19:00:27 -0400 (Fri, 06 Aug 2004) | 5 lines Modify peer connection to use the least restrictive authmode required as defined by the most restrictive of the two control connections. jeff ------------------------------------------------------------------------ r223 | boote | 2004-08-04 23:41:53 -0400 (Wed, 04 Aug 2004) | 2 lines Disable excess debug messages. ------------------------------------------------------------------------ r222 | boote | 2004-08-04 23:39:37 -0400 (Wed, 04 Aug 2004) | 4 lines Disable excess debug messages. jeff ------------------------------------------------------------------------ r221 | boote | 2004-08-04 19:22:32 -0400 (Wed, 04 Aug 2004) | 4 lines Another attempt at a timing algorithm. jeff ------------------------------------------------------------------------ r220 | boote | 2004-08-04 18:37:50 -0400 (Wed, 04 Aug 2004) | 2 lines more still... ------------------------------------------------------------------------ r219 | boote | 2004-08-04 18:34:04 -0400 (Wed, 04 Aug 2004) | 2 lines More debugging... ------------------------------------------------------------------------ r218 | boote | 2004-08-04 18:27:21 -0400 (Wed, 04 Aug 2004) | 2 lines More timing problems... Adding debugging code to daemon. ------------------------------------------------------------------------ r217 | boote | 2004-07-30 17:07:21 -0400 (Fri, 30 Jul 2004) | 5 lines Modified how the server determines how much lead time is required before a test can start and wrote a long comment explaining the algorithm. jeff ------------------------------------------------------------------------ r216 | boote | 2004-07-30 16:37:09 -0400 (Fri, 30 Jul 2004) | 6 lines Oops - reservation code was not using 'fuzz' to determine when a reservation could happen. Only rtt. Both are needed to determine how far into the future things must be scheduled. jeff ------------------------------------------------------------------------ r215 | boote | 2004-07-30 16:35:32 -0400 (Fri, 30 Jul 2004) | 7 lines capi.c: removed error message. caller of BWLControlOpen should report connect errors. time.c: fix typo from last check-in. jeff ------------------------------------------------------------------------ r214 | boote | 2004-07-30 16:34:04 -0400 (Fri, 30 Jul 2004) | 5 lines Modifying "fuzz" time to include rtt time to other server as well as NTP offset. (3-party adds some delay to when a test can be started...) jeff ------------------------------------------------------------------------ r213 | boote | 2004-07-30 16:22:53 -0400 (Fri, 30 Jul 2004) | 4 lines Added a set timestamp error utility function. jeff ------------------------------------------------------------------------ r212 | boote | 2004-07-30 15:21:23 -0400 (Fri, 30 Jul 2004) | 4 lines Simplifying error messages. jeff ------------------------------------------------------------------------ r211 | boote | 2004-07-29 20:02:43 -0400 (Thu, 29 Jul 2004) | 8 lines Added better error messages. The errors now indicate which server the client was attempting to talk to. 3 party works now - although I still need to test authentication with 3 party. :) jeff ------------------------------------------------------------------------ r210 | boote | 2004-07-29 19:20:06 -0400 (Thu, 29 Jul 2004) | 5 lines Corrected logic to determine if a server is "busy" or if the request is simply "denied". jeff ------------------------------------------------------------------------ r209 | boote | 2004-07-29 17:49:05 -0400 (Thu, 29 Jul 2004) | 6 lines Corrected copy of session record to only tspec portion. Corrected logic for "send" determination. jeff ------------------------------------------------------------------------ r208 | boote | 2004-07-29 17:08:08 -0400 (Thu, 29 Jul 2004) | 4 lines removed unused var. jeff ------------------------------------------------------------------------ r207 | boote | 2004-07-29 16:51:20 -0400 (Thu, 29 Jul 2004) | 4 lines Fix compile errors. jeff ------------------------------------------------------------------------ r206 | boote | 2004-07-29 14:40:57 -0400 (Thu, 29 Jul 2004) | 12 lines bwctl: Added remaining logic to support authentication to more than a single auth method. time.c: Added include of sys/time.h. Still needs to be compiled and tested, but logic is now completely there for 3 party. jeff ------------------------------------------------------------------------ r205 | boote | 2004-07-27 18:43:26 -0400 (Tue, 27 Jul 2004) | 8 lines capi.c: Modifies errno to indicate if a connection was disallowed by policy or simply failed. bwctld.man: Modified to deal with 3-party case - different authentication. jeff ------------------------------------------------------------------------ r204 | boote | 2004-07-27 18:42:10 -0400 (Tue, 27 Jul 2004) | 6 lines At least "part" of 3-party is here. server-less client is not done at all. (This has not even been compiled, but I have enough new code here that I want it backed up to cvs...) jeff ------------------------------------------------------------------------ r203 | boote | 2004-07-09 12:17:16 -0400 (Fri, 09 Jul 2004) | 4 lines cleaned up compiler warnings. jeff ------------------------------------------------------------------------ r202 | boote | 2004-07-08 17:27:21 -0400 (Thu, 08 Jul 2004) | 4 lines Removed italics for "BWCTL" and added recommended hardware section. jeff ------------------------------------------------------------------------ r201 | boote | 2004-07-08 17:08:09 -0400 (Thu, 08 Jul 2004) | 4 lines Reformatting. jeff ------------------------------------------------------------------------ r200 | boote | 2004-05-28 18:13:30 -0400 (Fri, 28 May 2004) | 4 lines Corrected some comments... jeff ------------------------------------------------------------------------ r199 | boote | 2004-05-27 07:59:56 -0400 (Thu, 27 May 2004) | 5 lines checking in possible fix for reservation - cancellation bug. (still needs to be tested.) jeff ------------------------------------------------------------------------ r198 | boote | 2004-05-20 16:45:14 -0400 (Thu, 20 May 2004) | 4 lines Cleanup. jeff ------------------------------------------------------------------------ r197 | boote | 2004-03-24 16:02:20 -0500 (Wed, 24 Mar 2004) | 4 lines Adding performance tuning links to documentation. jeff ------------------------------------------------------------------------ r195 | boote | 2004-03-10 09:12:20 -0500 (Wed, 10 Mar 2004) | 4 lines this is version 1.0e jeff ------------------------------------------------------------------------ r194 | boote | 2004-03-10 09:10:49 -0500 (Wed, 10 Mar 2004) | 7 lines Indicate "changes" for this version. remove -q option from bwctld - (I added this here when I thought I was adding it to bwctl.) jeff ------------------------------------------------------------------------ r193 | boote | 2004-03-10 08:55:37 -0500 (Wed, 10 Mar 2004) | 4 lines Corrected documentation of "assign user" lines. jeff ------------------------------------------------------------------------ r192 | boote | 2004-03-10 08:44:03 -0500 (Wed, 10 Mar 2004) | 4 lines Creating version 1.0e jeff ------------------------------------------------------------------------ r191 | boote | 2004-03-10 08:34:21 -0500 (Wed, 10 Mar 2004) | 4 lines Corrected order for -v/-q options so logic works correctly. Sigh. jeff ------------------------------------------------------------------------ r190 | boote | 2004-03-10 07:53:29 -0500 (Wed, 10 Mar 2004) | 10 lines Add syncfuzz to server, remove sync check from client. Add -q option to bwctl properly. document syncfuzz Add documentation on :port for -c/-s options of bwctl jeff ------------------------------------------------------------------------ r189 | boote | 2004-03-09 20:11:38 -0500 (Tue, 09 Mar 2004) | 4 lines Fixed variable field length for memcpy. jeff ------------------------------------------------------------------------ r188 | boote | 2004-03-09 19:30:30 -0500 (Tue, 09 Mar 2004) | 4 lines Correct syntax errors. jeff ------------------------------------------------------------------------ r187 | boote | 2004-03-09 19:27:28 -0500 (Tue, 09 Mar 2004) | 4 lines Fix for policy bug. jeff ------------------------------------------------------------------------ r186 | boote | 2004-03-04 14:58:28 -0500 (Thu, 04 Mar 2004) | 4 lines Paul and Susan edits. jeff ------------------------------------------------------------------------ r185 | boote | 2004-03-04 13:46:12 -0500 (Thu, 04 Mar 2004) | 4 lines Susan/Paul Hyder edits. jeff ------------------------------------------------------------------------ r184 | boote | 2004-03-04 13:34:26 -0500 (Thu, 04 Mar 2004) | 4 lines Susan edits. jeff ------------------------------------------------------------------------ r183 | boote | 2004-03-03 02:22:25 -0500 (Wed, 03 Mar 2004) | 6 lines changed esterr to maxerr for timestamp errors. Removed old version of timestamps that doesn't use "offsets". jeff ------------------------------------------------------------------------ r182 | boote | 2004-03-02 03:18:54 -0500 (Tue, 02 Mar 2004) | 6 lines Possible fix for synchronization "fuzz" problem. Uses a default of 20 msecs as the maximum synchronization distance that is not accounted for by NTP error estimates. (This value is in the bwlib.h header file...) jeff ------------------------------------------------------------------------ r181 | boote | 2004-02-25 16:36:42 -0500 (Wed, 25 Feb 2004) | 4 lines Adding ref to ntp documentation. jeff ------------------------------------------------------------------------ r180 | boote | 2004-02-25 12:58:31 -0500 (Wed, 25 Feb 2004) | 2 lines Adding change log. ------------------------------------------------------------------------ r179 | boote | 2004-02-25 12:56:07 -0500 (Wed, 25 Feb 2004) | 7 lines mandoc.cgi: calls man2html using INC path instead of using full path. *.html: removed 's - futile.... ------------------------------------------------------------------------ r177 | boote | 2004-02-24 18:54:16 -0500 (Tue, 24 Feb 2004) | 4 lines inc version number. jeff ------------------------------------------------------------------------ r176 | boote | 2004-02-24 18:44:07 -0500 (Tue, 24 Feb 2004) | 2 lines corrected syntax error. ------------------------------------------------------------------------ r175 | boote | 2004-02-24 18:37:33 -0500 (Tue, 24 Feb 2004) | 8 lines endpoint.c: modified the error reporting to give more details if the clocks look out of sync. time.c: Changed timestamp fetching to use the ntp "offset". jeff ------------------------------------------------------------------------ r174 | boote | 2004-02-20 20:11:37 -0500 (Fri, 20 Feb 2004) | 13 lines Disabled hyphenation in url references in manpages. The hypphenation broke the url stuff I added to man2html to make url's links in html'd man pages. This all works now, but I can't install it on e2epi because the server feature I need is not activated. I have made a request to websupport for that. To see the man pages for now, take a look at: http://people.internet2.edu/~boote/bwctl.man jeff ------------------------------------------------------------------------ r173 | boote | 2004-02-20 12:12:30 -0500 (Fri, 20 Feb 2004) | 5 lines Fix -O2 bug warren found. (Wasn't initializing the row-count variable when reading the bwctld.keys file.) jeff ------------------------------------------------------------------------ r172 | boote | 2004-02-18 19:48:21 -0500 (Wed, 18 Feb 2004) | 5 lines Remove bold formatting around man page and http refs so man2html will recognize them. jeff ------------------------------------------------------------------------ r171 | boote | 2004-02-18 19:39:31 -0500 (Wed, 18 Feb 2004) | 4 lines Remove other "bold" indicators from man page refs. jeff ------------------------------------------------------------------------ r170 | boote | 2004-02-18 19:27:11 -0500 (Wed, 18 Feb 2004) | 9 lines removed "bold" letters for man pages and for http refs so man2html can more easily match them to turn them into href's. (still need to do other man pages - still working on cgi script handler to automate the man pages on the web server, but it is very close now. At least I have man2html working correctly now.) jeff ------------------------------------------------------------------------ r168 | boote | 2004-02-17 17:22:53 -0500 (Tue, 17 Feb 2004) | 5 lines Fixing a bug with command-line arg counting. (caused incorrect usage() message.) jeff ------------------------------------------------------------------------ r167 | boote | 2004-02-17 17:03:14 -0500 (Tue, 17 Feb 2004) | 7 lines bwctl.c: changed error message README and bwctld.sh: Adding information on example rc file. jeff ------------------------------------------------------------------------ r166 | boote | 2004-02-17 16:19:38 -0500 (Tue, 17 Feb 2004) | 5 lines Modified to support installing of man pages. This took an upgrade of the autoconf tools. Ugh. jeff ------------------------------------------------------------------------ r165 | boote | 2004-02-16 18:59:13 -0500 (Mon, 16 Feb 2004) | 4 lines Adding NTP rant into bwctld.man page. jeff ------------------------------------------------------------------------ r164 | boote | 2004-02-16 18:38:24 -0500 (Mon, 16 Feb 2004) | 4 lines Spell checking, and incorporating changes based on Eric's comments. jeff ------------------------------------------------------------------------ r163 | boote | 2004-02-16 18:00:53 -0500 (Mon, 16 Feb 2004) | 4 lines Revised based upon test in manual pages. jeff ------------------------------------------------------------------------ r162 | boote | 2004-02-16 11:07:01 -0500 (Mon, 16 Feb 2004) | 7 lines bwctld.c: modified error message. *.man: Added acknowledgments section for NSF grant disclaimer. jeff ------------------------------------------------------------------------ r161 | boote | 2004-02-14 15:13:30 -0500 (Sat, 14 Feb 2004) | 4 lines Noticed a quirk in the way nroff handled the \\ in my examples and fixed it. jeff ------------------------------------------------------------------------ r160 | boote | 2004-02-14 14:59:04 -0500 (Sat, 14 Feb 2004) | 18 lines Man pages now completly written. For first thing monday morning... Remaining before release: review html and copy back man page content. spell check all docs setup install rules for man pages check complete build process test bwctl command-line changes with abilene installation build tarball Then after release: add man pages to website add abilene measurements link to website add "how to test into abilene" document to website jeff ------------------------------------------------------------------------ r159 | boote | 2004-02-13 19:12:02 -0500 (Fri, 13 Feb 2004) | 5 lines Adding the last man pages. bwctld.limits.man is not done yet, but it is getting close. jeff ------------------------------------------------------------------------ r158 | boote | 2004-02-13 00:42:41 -0500 (Fri, 13 Feb 2004) | 6 lines bwctld.c Reordered args printed out from "usage" message. Removed unused options... Added a validation check for the iperfport range. bwctld.8 corrected errors bwctld.conf.5 new ------------------------------------------------------------------------ r157 | boote | 2004-02-11 20:47:20 -0500 (Wed, 11 Feb 2004) | 6 lines Minor corrections to bwctl.1 Adding bwctld.8 jeff ------------------------------------------------------------------------ r156 | boote | 2004-02-11 18:24:32 -0500 (Wed, 11 Feb 2004) | 4 lines changing order of args in page and adding Iperf website refs. jeff ------------------------------------------------------------------------ r155 | boote | 2004-02-11 15:05:59 -0500 (Wed, 11 Feb 2004) | 4 lines Adding iperf web site reference. jeff ------------------------------------------------------------------------ r154 | boote | 2004-02-11 14:36:43 -0500 (Wed, 11 Feb 2004) | 4 lines Ran through spell checker... jeff ------------------------------------------------------------------------ r153 | boote | 2004-02-11 14:29:07 -0500 (Wed, 11 Feb 2004) | 5 lines Removed the -K option. passphrase is now implied if -U is used without the -k option. jeff ------------------------------------------------------------------------ r152 | boote | 2004-02-11 14:28:20 -0500 (Wed, 11 Feb 2004) | 4 lines Modified based upon Matt's comments. jeff ------------------------------------------------------------------------ r151 | boote | 2004-02-10 15:16:50 -0500 (Tue, 10 Feb 2004) | 6 lines Finished bwctl man page and corrected spelling in index.html. Now to document the daemon... jeff ------------------------------------------------------------------------ r150 | boote | 2004-02-10 03:07:42 -0500 (Tue, 10 Feb 2004) | 4 lines improve help message. jeff ------------------------------------------------------------------------ r149 | boote | 2004-02-10 03:06:54 -0500 (Tue, 10 Feb 2004) | 4 lines change address for bug reports. jeff ------------------------------------------------------------------------ r148 | boote | 2004-02-10 03:05:13 -0500 (Tue, 10 Feb 2004) | 2 lines checkpoint. ------------------------------------------------------------------------ r147 | boote | 2004-02-09 20:02:10 -0500 (Mon, 09 Feb 2004) | 4 lines checkpoint bwctl.1 jeff ------------------------------------------------------------------------ r146 | boote | 2004-02-08 19:57:05 -0500 (Sun, 08 Feb 2004) | 4 lines bwctl.c: changing so remotehost is attached to the -c/-s options bwctl.1: checkpoint ------------------------------------------------------------------------ r145 | boote | 2004-02-08 17:41:26 -0500 (Sun, 08 Feb 2004) | 2 lines Adding manpage for aespasswd. ------------------------------------------------------------------------ r144 | boote | 2004-02-07 20:44:53 -0500 (Sat, 07 Feb 2004) | 4 lines formatting change. jeff ------------------------------------------------------------------------ r143 | boote | 2004-02-07 20:43:39 -0500 (Sat, 07 Feb 2004) | 4 lines Adding date heading to index file. jeff ------------------------------------------------------------------------ r142 | boote | 2004-02-07 20:37:37 -0500 (Sat, 07 Feb 2004) | 4 lines More text in the overview, added architecture description. jeff ------------------------------------------------------------------------ r141 | boote | 2004-02-07 02:21:49 -0500 (Sat, 07 Feb 2004) | 4 lines most of the overview document. man pages tomorrow after some sleep... jeff ------------------------------------------------------------------------ r140 | boote | 2004-02-06 14:25:26 -0500 (Fri, 06 Feb 2004) | 2 lines better comment. ------------------------------------------------------------------------ r139 | boote | 2004-02-05 20:23:02 -0500 (Thu, 05 Feb 2004) | 7 lines Fixed error messages to report time before test results are available. Added a -q flag for "quiet". Swapped -v/-V options. Changed -v so that increasing numbers of -vvvv's mean higher levels of debugging. ------------------------------------------------------------------------ r138 | boote | 2004-02-05 16:44:16 -0500 (Thu, 05 Feb 2004) | 4 lines correct some error messages in bwctl. jeff ------------------------------------------------------------------------ r137 | boote | 2004-01-19 10:53:05 -0500 (Mon, 19 Jan 2004) | 5 lines Moved policy init so it happens while bwctld is still root. (Must be this way for the "keys" file to be opened.) jeff ------------------------------------------------------------------------ r136 | boote | 2004-01-15 18:28:21 -0500 (Thu, 15 Jan 2004) | 4 lines modified to not do dynamic window calculation for udp tests. jeff ------------------------------------------------------------------------ r134 | boote | 2004-01-13 12:21:01 -0500 (Tue, 13 Jan 2004) | 4 lines Corrected some spelling errors. jeff ------------------------------------------------------------------------ r133 | boote | 2004-01-13 12:17:37 -0500 (Tue, 13 Jan 2004) | 4 lines Adding "INSTALL" file. (First kernel of documentation on bwctl.) jeff ------------------------------------------------------------------------ r132 | boote | 2004-01-12 20:18:39 -0500 (Mon, 12 Jan 2004) | 4 lines updating version number for bwctl for hawaii tracking. jeff ------------------------------------------------------------------------ r131 | boote | 2004-01-09 15:54:23 -0500 (Fri, 09 Jan 2004) | 24 lines Addressing two bwctl problems: 1. bwctl control connections were being disconnected unexpectedly. Reason: There was an application timeout that closed the connection if there was no communication for 30 min. (controltimeout) Because bwctl is configured to run tests ~30 min, this means some amount of the time there will be no traffic for 30 or more min on a given control connection. Solution: Change the default value to 7200 and document this in the bwctld.conf file with the controltimeout option. 2. Some udp sessions end up being corrupt. Reason: First the buffer space between sessions was a little to small. Therefore the bwctld would kill the iperf server before the job was complete. The iperf server catches SIGINT and corrupts the results when it does. Solution: Increased the buffer space between sessions by 1 second. Then changed the kill of children that are still running at this time to a SIGKILL so it will not be caught. This will ensure that the invalid data will not be used. jeff ------------------------------------------------------------------------ r130 | boote | 2004-01-09 00:42:07 -0500 (Fri, 09 Jan 2004) | 4 lines Forgot to change function prototypes, and removing unused vars. jeff ------------------------------------------------------------------------ r129 | boote | 2004-01-09 00:30:45 -0500 (Fri, 09 Jan 2004) | 10 lines Changing the time sync check. The daemon no longer fails to start if the system clock is not synchronized. (this was problematic for rc boot scripts since ntp often takes some number of minutes to sync the clock). Now, to ensure tests start properly, the peer connection does a remote time check to make sure the system clocks are "close" enough, but does not require actual ntp synchronization. jeff ------------------------------------------------------------------------ r128 | boote | 2004-01-05 21:05:59 -0500 (Mon, 05 Jan 2004) | 2 lines typo in my typo... ugh. ------------------------------------------------------------------------ r127 | boote | 2004-01-05 21:03:27 -0500 (Mon, 05 Jan 2004) | 2 lines typo... ------------------------------------------------------------------------ r126 | boote | 2004-01-05 20:41:03 -0500 (Mon, 05 Jan 2004) | 4 lines Oops - passed in key instead of value to a function. jeff ------------------------------------------------------------------------ r125 | boote | 2004-01-05 20:24:13 -0500 (Mon, 05 Jan 2004) | 2 lines pseudo-dynamic window code. ------------------------------------------------------------------------ r124 | boote | 2003-12-20 01:34:59 -0500 (Sat, 20 Dec 2003) | 4 lines Making an error message a little more readable. jeff ------------------------------------------------------------------------ r123 | boote | 2003-12-20 01:32:05 -0500 (Sat, 20 Dec 2003) | 4 lines Removed unused -W option to make room for new -W option. jeff ------------------------------------------------------------------------ r122 | boote | 2003-12-20 01:30:09 -0500 (Sat, 20 Dec 2003) | 2 lines small typo. ------------------------------------------------------------------------ r121 | boote | 2003-12-20 01:28:34 -0500 (Sat, 20 Dec 2003) | 23 lines bwctl/*: Added -W option that mirrors -w option. -W indicates to use the specified window_size only if a dynamic one is unavailable. bwlib/*: Modified the test_spec structure and protocol encoding/decoding functions to allow for an additional field for "dynamic" window size determination. bwlib/endpoint.c: Had to change the order children were forked to allow the peer control communication to happen before forking off the run_iperf process. (That way the RTT can be determined as part of the dynamic window calculation.) ** have not actually changed the function to calculate a dynamic window - I wanted to test to make sure the rest of this quagmire works before adding it. And I'm sorry, I'm too tired - so this is going to have to wait, probably until Jan 5. (I really underestimated what it was going to take to get this working correctly. And I really, really underestimated what it was going to take to get the aes passphrases working. It sounded so easy...) jeff ------------------------------------------------------------------------ r120 | boote | 2003-12-20 00:01:49 -0500 (Sat, 20 Dec 2003) | 4 lines Remove debugging statements from ReadStopSession. jeff ------------------------------------------------------------------------ r119 | boote | 2003-12-19 21:06:02 -0500 (Fri, 19 Dec 2003) | 5 lines Found where cntrl->zero was being corrupted. (I forgot the "send" function is destructive to the string passed in when encryption is turned on...) jeff ------------------------------------------------------------------------ r118 | boote | 2003-12-19 19:53:53 -0500 (Fri, 19 Dec 2003) | 4 lines Hmm... message looks correct, checking cntrl->zero with this one. jeff ------------------------------------------------------------------------ r117 | boote | 2003-12-19 19:51:12 -0500 (Fri, 19 Dec 2003) | 4 lines Removing sid debugging and adding a debug for the StopSessions message. jeff ------------------------------------------------------------------------ r116 | boote | 2003-12-19 18:48:38 -0500 (Fri, 19 Dec 2003) | 5 lines I think I found the corruption... One of the message offsets was not set correctly. jeff ------------------------------------------------------------------------ r115 | boote | 2003-12-19 18:43:39 -0500 (Fri, 19 Dec 2003) | 2 lines more debug stuff... ------------------------------------------------------------------------ r114 | boote | 2003-12-19 18:31:54 -0500 (Fri, 19 Dec 2003) | 2 lines more... ------------------------------------------------------------------------ r113 | boote | 2003-12-19 18:19:27 -0500 (Fri, 19 Dec 2003) | 2 lines more debugging... ------------------------------------------------------------------------ r112 | boote | 2003-12-19 18:04:32 -0500 (Fri, 19 Dec 2003) | 2 lines more debug statements. ------------------------------------------------------------------------ r111 | boote | 2003-12-19 15:06:31 -0500 (Fri, 19 Dec 2003) | 4 lines adding debug statement. jeff ------------------------------------------------------------------------ r110 | boote | 2003-12-19 12:56:49 -0500 (Fri, 19 Dec 2003) | 4 lines Sigh - the key retrieval for the p2p connection had the same bug. jeff ------------------------------------------------------------------------ r109 | boote | 2003-12-19 12:40:51 -0500 (Fri, 19 Dec 2003) | 5 lines Fixed bug that was causing only first 4 bytes of key to be copied. (Encryption doesn't work as well this way...) jeff ------------------------------------------------------------------------ r108 | boote | 2003-12-19 11:38:56 -0500 (Fri, 19 Dec 2003) | 4 lines Duh. forgot to add the -K option to the optstring for getopts in bwctl. jeff ------------------------------------------------------------------------ r107 | boote | 2003-12-19 03:40:20 -0500 (Fri, 19 Dec 2003) | 9 lines I2util/*: Adding aespasswd into autoconf files. I2util/aespasswd/*: Now works on FreeBSD - need to test Linux. bwctl/bwctlP.h: Clean-up comments. jeff ------------------------------------------------------------------------ r106 | boote | 2003-12-19 02:57:21 -0500 (Fri, 19 Dec 2003) | 9 lines I2util/conf.[ch] Adding a WriteKeyLine function. I2util/aespasswd/* Adding an aespasswd command for managing keyfiles. bwctl/bwctl.c Making some error messages pretty. jeff ------------------------------------------------------------------------ r105 | boote | 2003-12-17 23:26:11 -0500 (Wed, 17 Dec 2003) | 6 lines Now compiles on Linux. termios suck. jeff ------------------------------------------------------------------------ r104 | boote | 2003-12-17 22:21:40 -0500 (Wed, 17 Dec 2003) | 4 lines Fixed compile errors. jeff ------------------------------------------------------------------------ r103 | boote | 2003-12-17 16:21:13 -0500 (Wed, 17 Dec 2003) | 16 lines I2util: Added conf file handling routines, hex encode/decode, md5, readpassphrase... Basically lots of things that owamp and bwctl will both use. Modified bwctl to use the I2util versions of these functions. Modified bwctl to do aeskeys with either a keyfile or a passphrase. Modified bwctld to do aeskeys with a keyfile. (These changes have not even been compiled yet since I did this on my laptop. I will be checking in updates to this after actually testing it.) jeff ------------------------------------------------------------------------ r102 | boote | 2003-11-27 03:40:57 -0500 (Thu, 27 Nov 2003) | 16 lines bwctl.[ch]: Adding -R option and changing the way test interval schedules are computed. The -R option specifies an "alpha" value which is the percentage of the "interval" to randomize. Each test will happen at +- alpha from a fixed interval from the first start. (removed pseudo-poisson schedule) Added -V option. (Verbose output.) For now it just makes bwctl print an estimate for when the next test interval will begin if that period is longer than 3 seconds from "now". Added a time-check in so if the clock is off by more than the error estimate then bwctl exits. jeff ------------------------------------------------------------------------ r101 | boote | 2003-11-22 02:56:08 -0500 (Sat, 22 Nov 2003) | 4 lines Adding fflush to printout of filenames in -p mode. jeff ------------------------------------------------------------------------ r100 | boote | 2003-11-18 02:52:37 -0500 (Tue, 18 Nov 2003) | 4 lines modify debug messages to only print for priority == debug. jeff ------------------------------------------------------------------------ r99 | boote | 2003-11-18 02:48:15 -0500 (Tue, 18 Nov 2003) | 4 lines corrected truncated bandwidth number. jeff ------------------------------------------------------------------------ r98 | boote | 2003-11-18 01:56:36 -0500 (Tue, 18 Nov 2003) | 2 lines syntax errors. ------------------------------------------------------------------------ r97 | boote | 2003-11-18 01:52:10 -0500 (Tue, 18 Nov 2003) | 6 lines Ok, bit the bullet and wrote a routine for converting test addresses to peer addresses from the perspective of the endpoints. (My quick fix wasn't complete enough.) jeff ------------------------------------------------------------------------ r96 | boote | 2003-11-18 01:10:40 -0500 (Tue, 18 Nov 2003) | 6 lines Opening connection with SOCK_DGRAM instead of SOCK_STREAM!!!!!! AGGGHHHHH! jeff ------------------------------------------------------------------------ r95 | boote | 2003-11-18 00:25:29 -0500 (Tue, 18 Nov 2003) | 4 lines Changing order of args passed to iperf because it is BRAIN DEAD! jeff ------------------------------------------------------------------------ r94 | boote | 2003-11-17 21:02:36 -0500 (Mon, 17 Nov 2003) | 3 lines Add currtime print at end of test to try and figure out why ALRM is going off... ------------------------------------------------------------------------ r93 | boote | 2003-11-17 20:24:13 -0500 (Mon, 17 Nov 2003) | 4 lines double is not float. jeff ------------------------------------------------------------------------ r92 | boote | 2003-11-17 20:21:50 -0500 (Mon, 17 Nov 2003) | 4 lines Add timestamp information to debug output. jeff ------------------------------------------------------------------------ r91 | boote | 2003-11-17 18:24:48 -0500 (Mon, 17 Nov 2003) | 4 lines Adding debug messages. jeff ------------------------------------------------------------------------ r90 | boote | 2003-11-17 17:37:58 -0500 (Mon, 17 Nov 2003) | 4 lines Found another place i/o needed to be interruptable. Sigh. jeff ------------------------------------------------------------------------ r89 | boote | 2003-11-17 04:41:44 -0500 (Mon, 17 Nov 2003) | 5 lines Found a place I could be missing the SIG_CHLD... This *could* explain the zombied iperf processes. jeff ------------------------------------------------------------------------ r88 | boote | 2003-11-17 03:31:55 -0500 (Mon, 17 Nov 2003) | 5 lines Adding interruptable i/o to client side communications. (The p2p aspect was causing problems if processes were killed.) jeff ------------------------------------------------------------------------ r87 | boote | 2003-11-16 21:47:28 -0500 (Sun, 16 Nov 2003) | 4 lines Fix broken signal mask inherited from perl. jeff ------------------------------------------------------------------------ r86 | boote | 2003-11-16 21:13:16 -0500 (Sun, 16 Nov 2003) | 6 lines tweaking schedule generation loop to deal with the case where a connection is not working. (It was trying again immediately - I want it to wait until the next scheduled interval.) jeff ------------------------------------------------------------------------ r85 | boote | 2003-11-16 20:29:40 -0500 (Sun, 16 Nov 2003) | 4 lines re-enable signal handling so the nanosleep loop can work correctly. jeff ------------------------------------------------------------------------ r84 | boote | 2003-11-16 19:29:17 -0500 (Sun, 16 Nov 2003) | 2 lines blah ------------------------------------------------------------------------ r83 | boote | 2003-11-16 00:26:02 -0500 (Sun, 16 Nov 2003) | 5 lines Adding test for "loopback" to allow a test. "loopback" is implicitly trusted to an extent. jeff ------------------------------------------------------------------------ r82 | boote | 2003-11-15 20:31:38 -0500 (Sat, 15 Nov 2003) | 4 lines adding additional error message to try and determine why v6 tests are failing. jeff ------------------------------------------------------------------------ r81 | boote | 2003-11-15 02:52:59 -0500 (Sat, 15 Nov 2003) | 4 lines clean up a bit. jeff ------------------------------------------------------------------------ r80 | boote | 2003-11-15 02:50:23 -0500 (Sat, 15 Nov 2003) | 2 lines limits for abilene... ------------------------------------------------------------------------ r79 | boote | 2003-11-14 02:32:29 -0500 (Fri, 14 Nov 2003) | 4 lines I think it is working! jeff ------------------------------------------------------------------------ r78 | boote | 2003-11-13 23:16:22 -0500 (Thu, 13 Nov 2003) | 6 lines Oops was overwriting the recv file with the send file... also removed more warning messages. jeff ------------------------------------------------------------------------ r77 | boote | 2003-11-13 21:14:00 -0500 (Thu, 13 Nov 2003) | 5 lines fix linux specific errors. (gcc complains more on bon-jovi... Perhaps it is a newer version.) jeff ------------------------------------------------------------------------ r76 | boote | 2003-11-13 21:04:45 -0500 (Thu, 13 Nov 2003) | 7 lines adding code to make bwctl save session data in a file and print out filenames. (It should now work like powstream in this respect.) I did have it just printing to stdout until now. jeff ------------------------------------------------------------------------ r75 | boote | 2003-11-07 20:12:43 -0500 (Fri, 07 Nov 2003) | 7 lines Removing debugging statements. resetting the itimer for the peer connection and reducing the fuzz factor now that I've had a chance to experiment with what is needed. jeff ------------------------------------------------------------------------ r74 | boote | 2003-11-07 16:15:06 -0500 (Fri, 07 Nov 2003) | 4 lines typo. jeff ------------------------------------------------------------------------ r73 | boote | 2003-11-07 15:51:00 -0500 (Fri, 07 Nov 2003) | 5 lines Ugh - I hate when I forget to update the size of the message when I change it. jeff ------------------------------------------------------------------------ r72 | boote | 2003-11-07 15:32:45 -0500 (Fri, 07 Nov 2003) | 4 lines Add command-string that is executed to the data output. jeff ------------------------------------------------------------------------ r71 | boote | 2003-11-07 15:28:13 -0500 (Fri, 07 Nov 2003) | 4 lines Fixing a bug in the policy code that allocates port numbers. jeff ------------------------------------------------------------------------ r70 | boote | 2003-11-07 02:35:16 -0500 (Fri, 07 Nov 2003) | 4 lines Remove some debugging messages and add some information to another one. jeff ------------------------------------------------------------------------ r69 | boote | 2003-11-07 01:53:55 -0500 (Fri, 07 Nov 2003) | 4 lines Changing the name of iperfc to bwctl. jeff ------------------------------------------------------------------------ r68 | boote | 2003-11-05 19:16:45 -0500 (Wed, 05 Nov 2003) | 8 lines Set iperf port to 5001-5004 allow iperfcmd to default iperfc.c: change time into future to one second. jeff ------------------------------------------------------------------------ r67 | boote | 2003-11-04 19:11:16 -0500 (Tue, 04 Nov 2003) | 7 lines Logic error in scheduling loop (looking for next slot). In some cases the pointer into the linked list was not incremented to the next node which caused it to loop forever. (This happened if concurrent requests came in.) jeff ------------------------------------------------------------------------ r66 | boote | 2003-11-04 18:01:58 -0500 (Tue, 04 Nov 2003) | 8 lines endpoint.c: Fix bug - iperf was trying to contact the wrong address. sapi.c: remove extra fuzz factor. jeff ------------------------------------------------------------------------ r65 | boote | 2003-11-04 17:58:41 -0500 (Tue, 04 Nov 2003) | 4 lines bug fix for multiplier factors. jeff ------------------------------------------------------------------------ r64 | boote | 2003-11-03 18:28:07 -0500 (Mon, 03 Nov 2003) | 4 lines Make fuzz factor huge since it doesn't seem to be helping... jeff ------------------------------------------------------------------------ r63 | boote | 2003-11-03 18:25:31 -0500 (Mon, 03 Nov 2003) | 5 lines Sigh, iperf takes a long time to start up. Add a "fuzz" factor to ensure the server starts before the client. jeff ------------------------------------------------------------------------ r62 | boote | 2003-11-03 17:02:29 -0500 (Mon, 03 Nov 2003) | 4 lines Fix command-line args to iperf. jeff ------------------------------------------------------------------------ r61 | boote | 2003-11-03 16:32:19 -0500 (Mon, 03 Nov 2003) | 4 lines Modify to run real iperf instead of my test perl script. jeff ------------------------------------------------------------------------ r60 | boote | 2003-11-03 16:21:52 -0500 (Mon, 03 Nov 2003) | 4 lines Fixed syntax errors. jeff ------------------------------------------------------------------------ r59 | boote | 2003-11-03 16:01:21 -0500 (Mon, 03 Nov 2003) | 8 lines recrafted wait loop for peer2peer connection that should not cause the process to exit if the StopSession message from the peer is "success". (Need to test this still - I'm using cvs to transfer the diffs around to my test hosts.) jeff ------------------------------------------------------------------------ r58 | boote | 2003-10-31 18:00:24 -0500 (Fri, 31 Oct 2003) | 4 lines Cause newly forked process to print its pid if -w is specified. jeff ------------------------------------------------------------------------ r57 | boote | 2003-10-31 17:59:43 -0500 (Fri, 31 Oct 2003) | 6 lines Add check for WIFSTOPPED() for child process so children processes that are currently being debugged don't look like they have exited to the parent process management code. jeff ------------------------------------------------------------------------ r56 | boote | 2003-10-31 01:38:39 -0500 (Fri, 31 Oct 2003) | 6 lines Modified more state for the grandchild... Needed to modify the cntrl record for the tsess to point at the rcntrl pointer instead of the cntrl pointer. (rcntrl is the p2p connection, cntrl goes to the client.) jeff ------------------------------------------------------------------------ r55 | boote | 2003-10-31 01:07:23 -0500 (Fri, 31 Oct 2003) | 4 lines Removed more policy functions from the grandchild... jeff ------------------------------------------------------------------------ r54 | boote | 2003-10-30 12:12:47 -0500 (Thu, 30 Oct 2003) | 4 lines Apply "fuzz" factor to the "end" of the test so it is not pre-maturely killed. jeff ------------------------------------------------------------------------ r53 | boote | 2003-10-29 18:58:43 -0500 (Wed, 29 Oct 2003) | 4 lines Remove debugging constant. jeff ------------------------------------------------------------------------ r52 | boote | 2003-10-29 18:19:45 -0500 (Wed, 29 Oct 2003) | 4 lines AAGGHHH! Forgot a single ntohl() around the "duration" field of the message. jeff ------------------------------------------------------------------------ r51 | boote | 2003-10-29 17:57:27 -0500 (Wed, 29 Oct 2003) | 4 lines Modifying policy function for p2p. jeff ------------------------------------------------------------------------ r50 | boote | 2003-10-29 12:45:59 -0500 (Wed, 29 Oct 2003) | 4 lines Another fix related to the "status" message. jeff ------------------------------------------------------------------------ r49 | boote | 2003-10-29 11:50:54 -0500 (Wed, 29 Oct 2003) | 5 lines Fixed an endpoint status bug. This has been causing the endpoint to be killed before it even really gets started. jeff ------------------------------------------------------------------------ r48 | boote | 2003-10-28 17:52:09 -0500 (Tue, 28 Oct 2003) | 2 lines debugging... ------------------------------------------------------------------------ r47 | boote | 2003-10-28 17:00:13 -0500 (Tue, 28 Oct 2003) | 6 lines Fixes remote address check. Added more debugging code. jeff ------------------------------------------------------------------------ r46 | boote | 2003-10-24 17:46:18 -0400 (Fri, 24 Oct 2003) | 5 lines changing accept interrupt handler to exit the process on CHLD in addition to TERM/HUP. jeff ------------------------------------------------------------------------ r45 | boote | 2003-10-24 15:08:26 -0400 (Fri, 24 Oct 2003) | 4 lines Corrected bug in EndpointStatus. (Fixed this bug in owamp too!) jeff ------------------------------------------------------------------------ r44 | boote | 2003-10-24 13:03:58 -0400 (Fri, 24 Oct 2003) | 9 lines Adding debug message. Eric, I'm going through cvs to distribute code changes from one test endpoint to the other - so you should probably just ignore most of these messages. jeff ------------------------------------------------------------------------ r43 | boote | 2003-10-23 18:06:37 -0400 (Thu, 23 Oct 2003) | 6 lines using ntohs instead of htons. (not sure that should matter...) Also adding a statement to print out the port number of the receive side to try and figure out why the end-2-end connection is not being made. jeff ------------------------------------------------------------------------ r42 | boote | 2003-10-23 17:17:08 -0400 (Thu, 23 Oct 2003) | 4 lines Found the bug that was putting the "state" variable off. jeff ------------------------------------------------------------------------ r41 | boote | 2003-10-23 16:24:40 -0400 (Thu, 23 Oct 2003) | 4 lines tweaking the timing to make it easier to see the progression of events. jeff ------------------------------------------------------------------------ r40 | boote | 2003-10-23 15:08:48 -0400 (Thu, 23 Oct 2003) | 2 lines typo... ------------------------------------------------------------------------ r39 | boote | 2003-10-23 15:06:17 -0400 (Thu, 23 Oct 2003) | 4 lines Corrected addresses for peer communication. jeff ------------------------------------------------------------------------ r38 | boote | 2003-10-22 20:23:37 -0400 (Wed, 22 Oct 2003) | 4 lines Adding some debug info. jeff ------------------------------------------------------------------------ r37 | boote | 2003-10-22 19:42:03 -0400 (Wed, 22 Oct 2003) | 5 lines correcting sigprocmask call. Had SIG_BLOCK where I wanted SIG_SETMASK. (Ugh. This is what I get for copying code without thinking about it enough!) jeff ------------------------------------------------------------------------ r36 | boote | 2003-10-22 19:21:31 -0400 (Wed, 22 Oct 2003) | 4 lines wrong index for EndSessions call. jeff ------------------------------------------------------------------------ r35 | boote | 2003-10-22 17:43:25 -0400 (Wed, 22 Oct 2003) | 4 lines syntax errors... jeff ------------------------------------------------------------------------ r34 | boote | 2003-10-22 17:39:06 -0400 (Wed, 22 Oct 2003) | 5 lines modified so an error message prints out if the clock is unsync even if allowunsync is set. (This is not a good way to run!) jeff ------------------------------------------------------------------------ r33 | boote | 2003-10-22 17:37:28 -0400 (Wed, 22 Oct 2003) | 5 lines Modified code to use an allowunsync paramater to determine if the application exits or continues on an unsyncronized clock. jeff ------------------------------------------------------------------------ r32 | boote | 2003-10-22 12:11:41 -0400 (Wed, 22 Oct 2003) | 4 lines Add a check for unsync in NTP initialization. jeff ------------------------------------------------------------------------ r31 | boote | 2003-10-22 11:35:31 -0400 (Wed, 22 Oct 2003) | 5 lines Fixed syntax errors. (pervious check-in was from my laptop so I didn't get a chance to compile.) jeff ------------------------------------------------------------------------ r30 | boote | 2003-10-22 11:13:39 -0400 (Wed, 22 Oct 2003) | 7 lines Modified how the local address is determined. (If the src address was not being specified, the test connection was assuming localhost due to an owamp assumption. Now getsockname is used on the remote control connection to determine a good address to use for the local host.) jeff ------------------------------------------------------------------------ r29 | boote | 2003-10-17 13:23:54 -0400 (Fri, 17 Oct 2003) | 5 lines Just checkpointing changes I made while flying. Have not even tried compiling yet. (Monday - I'm going to go enjoy the sunshine on my bike right now!) jeff ------------------------------------------------------------------------ r28 | boote | 2003-10-14 21:03:52 -0400 (Tue, 14 Oct 2003) | 4 lines Add ntohs macro for recv port number. jeff ------------------------------------------------------------------------ r27 | boote | 2003-10-14 12:47:45 -0400 (Tue, 14 Oct 2003) | 4 lines Remove compiler warning. jeff ------------------------------------------------------------------------ r26 | boote | 2003-10-14 12:45:28 -0400 (Tue, 14 Oct 2003) | 4 lines Fixed sid copy in policy code. jeff ------------------------------------------------------------------------ r25 | boote | 2003-10-14 11:38:08 -0400 (Tue, 14 Oct 2003) | 4 lines Corrected sid copy in session request. jeff ------------------------------------------------------------------------ r24 | boote | 2003-10-13 19:20:24 -0400 (Mon, 13 Oct 2003) | 4 lines Ugh. Initialize variables to NULL. jeff ------------------------------------------------------------------------ r23 | boote | 2003-10-13 17:50:14 -0400 (Mon, 13 Oct 2003) | 4 lines Fix double-free error. jeff ------------------------------------------------------------------------ r22 | boote | 2003-10-13 15:33:19 -0400 (Mon, 13 Oct 2003) | 4 lines Fixed some bugs in the schedule generation. jeff ------------------------------------------------------------------------ r21 | boote | 2003-10-13 12:39:15 -0400 (Mon, 13 Oct 2003) | 4 lines Added poisson interval to client loop. jeff ------------------------------------------------------------------------ r20 | boote | 2003-10-11 12:45:30 -0400 (Sat, 11 Oct 2003) | 12 lines Fixed a bug in the TestSessionRequest message read/write functions. I had added a field in this message, and forgot to modify the offset for the v4 version of the address reading/writing. Therefore the addresses for the test were not being communicated properly. It looks like this part of the protocol is now working correctly. (I have not been able to completely test due to the fact that my development system is currently behind a NAT...) (My initial tests were trying to contact a host in Frankfurt due to the way the addresses were corrupted. Oops.) jeff ------------------------------------------------------------------------ r19 | boote | 2003-10-11 00:32:34 -0400 (Sat, 11 Oct 2003) | 4 lines Fixed a couple of bugs. jeff ------------------------------------------------------------------------ r18 | boote | 2003-10-10 18:01:37 -0400 (Fri, 10 Oct 2003) | 5 lines daemon is complete. I have not even tried running any tests with it at all yet. It does compile however. Attempting tests now. jeff ------------------------------------------------------------------------ r17 | boote | 2003-10-10 10:14:43 -0400 (Fri, 10 Oct 2003) | 5 lines Modified the time estimates for starting a session from the client perspective. (i.e. the algortithm for determining a good "start" time to request.) jeff ------------------------------------------------------------------------ r16 | boote | 2003-10-08 19:39:59 -0400 (Wed, 08 Oct 2003) | 6 lines Fixed limits are done, but not tested. Global limits, and the global schedule are about half way there. jeff ------------------------------------------------------------------------ r15 | boote | 2003-10-06 19:19:07 -0400 (Mon, 06 Oct 2003) | 7 lines Getting closer.... The last major piece that needs to be written is the code that actually does the scheduling and determines if a given test is allowed. (I am going to shortcut this substantially by basically allowing any test.) jeff ------------------------------------------------------------------------ r14 | boote | 2003-10-05 00:53:05 -0400 (Sun, 05 Oct 2003) | 4 lines Yet a little farther... jeff ------------------------------------------------------------------------ r13 | boote | 2003-10-04 21:04:39 -0400 (Sat, 04 Oct 2003) | 7 lines checkpoint... doesn't compile but I've written most of the code that actually runs the endpoint. (swaps results with the other server and exec's iperf) jeff ------------------------------------------------------------------------ r12 | boote | 2003-10-03 18:51:09 -0400 (Fri, 03 Oct 2003) | 5 lines Actually compiles at the moment - although there are still lots of stubs for the test endpoint processes and the scheduling. jeff ------------------------------------------------------------------------ r11 | boote | 2003-10-01 19:36:34 -0400 (Wed, 01 Oct 2003) | 7 lines checkpoint. Ok - all the "fluff" is done. Now it is time to really get to it and start writing the part that forks off the tests. jeff ------------------------------------------------------------------------ r10 | boote | 2003-09-30 18:50:24 -0400 (Tue, 30 Sep 2003) | 8 lines check-point. client code path is complete. (But not as functional as I would like.) Server path still needs work, but I am getting there. jeff ------------------------------------------------------------------------ r9 | boote | 2003-09-29 12:21:43 -0400 (Mon, 29 Sep 2003) | 5 lines check-point. The whole thing actually compiles at the moment. (although there is not enough functionality to test yet.) jeff ------------------------------------------------------------------------ r8 | boote | 2003-09-26 19:17:40 -0400 (Fri, 26 Sep 2003) | 2 lines checkpoint. Getting there... ------------------------------------------------------------------------ r7 | boote | 2003-09-25 18:14:46 -0400 (Thu, 25 Sep 2003) | 2 lines checkpoint ------------------------------------------------------------------------ r6 | boote | 2003-09-24 18:54:10 -0400 (Wed, 24 Sep 2003) | 2 lines checkpoint ------------------------------------------------------------------------ r5 | boote | 2003-09-22 19:21:43 -0400 (Mon, 22 Sep 2003) | 5 lines checkpoint. (Much of the actual client is complete - moving down into the library to fill in the details.) Have not started the server. jeff ------------------------------------------------------------------------ r4 | boote | 2003-09-19 17:23:56 -0400 (Fri, 19 Sep 2003) | 2 lines check-point. ------------------------------------------------------------------------ r3 | boote | 2003-09-18 17:19:16 -0400 (Thu, 18 Sep 2003) | 2 lines checkpoint. ------------------------------------------------------------------------ r2 | boote | 2003-09-16 16:31:47 -0400 (Tue, 16 Sep 2003) | 5 lines Initial ci of iperfc code. (This is mostly a template still - very little real code yet.) jeff ------------------------------------------------------------------------ r1 | (no author) | 2003-09-16 16:31:47 -0400 (Tue, 16 Sep 2003) | 1 line New repository initialized by cvs2svn. ------------------------------------------------------------------------ bwctl_1.5.4+dfsg1.orig/contrib/0000775000076500007710000000000012560414557013257 5ustar bwctl_1.5.4+dfsg1.orig/contrib/Makefile.am0000664000076500007710000000205412560414557015314 0ustar # # $Id: Makefile.am 426 2008-01-15 15:43:41Z aaron $ # ######################################################################### # # # Copyright (C) 2008 # # Internet2 # # All Rights Reserved # # # ######################################################################### # # File: Makefile.am # # Author: Aaron M. Brown # Internet2 # # Date: Thu Jul 10 11:16:15 EDT 2008 # # Description: contributed scripts noinst_DATA = sample_hook.pl EXTRA_DIST = $(noinst_DATA) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # bwctl_1.5.4+dfsg1.orig/contrib/sample_hook.pl0000775000076500007710000001714412560414557016127 0ustar #!/usr/bin/perl # The sample_hook.pl script is an example post hook script for bwctl. This # script can be easily modified to perform any number of tasks with the # resulting output or simply as a guide for how one might parse the output from # the bwctl server. my $facility = "daemon"; ########################## # End of Configuration ########################## use strict; use warnings; use Sys::Syslog; use Data::Dumper; my $arg = shift; # Check if we're being asked to validate ourselves. If so, a more involved # script might check that syslog is running or the database is accessible. if ($arg and $arg eq "--validate") { print "Status: OK\n"; exit(0); } # BWCTL will pass us the input via standard input. Grab all the input into the array @input. my @input = <>; my ($test, $recv_results, $send_results) = parse_input(\@input); # The section here could be easily modified to report this information to # syslog, email the results somewhere or store them in a database. # Display the structure of the returned elements. #print "Test: "; #print Dumper($test); #print "Send: "; #print Dumper($send_results); #print "Recv: "; #print Dumper($recv_results); # Create a summary of the test results for syslog my $user; my $bandwidth; my $direction; my $duration; my $protocol; my $sender; my $receiver; my $client; my $limit_class; my $start_time; my $streams; $limit_class = $test->{"limit_class"}; $start_time = $test->{"start_time"}; $receiver = $test->{"receiver"}; $sender = $test->{"sender"}; $protocol = ($test->{"use_udp"} eq "YES")?"UDP":"TCP"; $sender = $test->{"sender"}; $receiver = $test->{"receiver"}; $client = $test->{"client"}; $streams = $test->{"parallel_streams"}; if ($streams == 0) { $streams = 1; } # If the user field is unset, the user was anonymous if (not $test->{"user"}) { $user = "anonymous"; } else{ $user = $test->{"user"}; } # The is_host_sender field will be either "YES" or "NO" depending on whether # the bwctl instance executing the posthook was the sender. if ($test->{"is_host_sender"} eq "YES") { $direction = "outgoing"; if ($test->{tool} eq "thrulay") { # thrulay is a special case since no final result gets displayed on the send side $bandwidth = $recv_results->{"bandwidth"}; $duration = $recv_results->{"duration"}; } else { $bandwidth = $send_results->{"bandwidth"}; $duration = $send_results->{"duration"}; } } else { $direction = "incoming"; $bandwidth = $recv_results->{"bandwidth"}; $duration = $recv_results->{"duration"}; } my $res = "USER=$user LIMIT_CLASS=$limit_class BANDWIDTH=$bandwidth DIRECTION=$direction DURATION=$duration PROTOCOL=$protocol START_TIME=$start_time SENDER=$sender RECEIVER=$receiver CLIENT=$client STREAMS=$streams"; #print $res."\n"; openlog('bwctld','',$facility); syslog('info', $res); closelog; exit 0; # The 'parse_input' function takes an array of lines containing the results # provided by the bwctl program. It then parses that input into 3 structures: # test, recv_results and send_results. # # The test structure will be a hash containing the settings used for the test. # # The recv_results will be a hash containing the bandwidth and duration seen by # the recv side for the given test. This might be empty if the host was not the # receiver. # # The send_results will be a hash containing the bandwidth and duration seen by # the send side for the given test. This might be empty if the host was not the # sender. sub parse_input { my ($lines) = @_; my %test = (); my %recv_results = (); my %send_results = (); my $in_test_config = 0; my $in_send_output = 0; my $in_recv_output = 0; foreach my $line (@$lines) { chomp $line; if ($line =~ //) { $in_test_config = 1; next; } elsif ($line =~ /<\/TEST_CONFIG>/) { $in_test_config = 0; next; } elsif ($line =~ //) { $in_recv_output = 1; next; } elsif ($line =~ /<\/RECV_OUTPUT>/) { $in_recv_output = 0; next; } elsif ($line =~ //) { $in_send_output = 1; next; } elsif ($line =~ /<\/SEND_OUTPUT>/) { $in_send_output = 0; next; } if ($in_test_config) { parse_test_config_line(\%test, $line); } elsif ($in_send_output) { parse_tool_output_line(\%test, \%send_results, $line); } elsif ($in_recv_output) { parse_tool_output_line(\%test, \%recv_results, $line); } } return (\%test, \%recv_results, \%send_results); } # The parse_test_config_line parses the lines describing the test settings. # # All those lines are of the form: # variable: value # # The function fills in the passed 'test' hash with the variable it finds sub parse_test_config_line { my ($test, $line) = @_; if ($line =~ /^([^:]*): (.*)$/) { $test->{$1} = $2; } } # The parse_tool_output_line parses the lines for the send/recv tool output. # It simply checks what tool was used in the test and calls the function to # parse that tools line. sub parse_tool_output_line { my ($test, $results, $line) = @_; if ($test->{tool} eq "iperf") { parse_iperf_output_line($test, $results, $line); } elsif ($test->{tool} eq "nuttcp") { parse_nuttcp_output_line($test, $results, $line); } elsif ($test->{tool} eq "thrulay") { parse_thrulay_output_line($test, $results, $line); } } # The parse_thrulay_output_line parses the lines for the send/recv thrulay output. # It looks for duration/bandwidth entries in each line of the output and fills # in the $results hash. sub parse_thrulay_output_line { my ($test, $results, $line) = @_; # Grab the duration. There may be multiple "final" lines if a # multistream test occurred so grab the longest duration. if ($line =~ /duration = (\d+\.\d+)s/) { if (not $results->{"duration"} or $1 > $results->{"duration"}) { $results->{"duration"} = $1; } } # Grab the bandwidth acheived and convert the Mbps. There may be # multiple "final" lines if a multistream test occurred. if ($line =~ /throughput = (\d+\.\d+)Mb\/s/) { if (not $results->{"bandwidth"}) { $results->{"bandwidth"} = 0; } $results->{"bandwidth"} += $1; } } # The parse_iperf_output_line parses the lines for the send/recv iperf output. # It looks for the 'footer' line in the output and fills in the $results hash. sub parse_iperf_output_line { my ($test, $results, $line) = @_; if ($line =~ /0.0- ?(\d+.\d+) .*(\d+) ([M|G|K]?)Bytes *(\d+) ([M|G|K]?)[B|b]its\/sec/) { # Grab the duration $results->{"duration"} = $1; # Grab the bandwidth acheived and convert the Mbps my $bandwidth = $4; if ($3 eq "G") { $bandwidth *= 1000; } if ($3 eq "K") { $bandwidth /= 1000; } if (not $3) { $bandwidth /= 1000*1000; } $results->{"bandwidth"} = $bandwidth; } } # The parse_nuttcp_output_line parses the lines for the send/recv nuttcp output. # It looks for the 'footer' line in the output and fills in the $results hash. sub parse_nuttcp_output_line { my ($test, $results, $line) = @_; if ($line =~ /(\d+\.\d+) real seconds .* = (\d+\.\d+) Mbps/) { $results->{"duration"} = $1; $results->{"bandwidth"} = $2; } # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #} bwctl_1.5.4+dfsg1.orig/contrib/Makefile.in0000664000076500007710000002442712560414557015335 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: Makefile.am 426 2008-01-15 15:43:41Z aaron $ # ######################################################################### # # # Copyright (C) 2008 # # Internet2 # # All Rights Reserved # # # ######################################################################### # # File: Makefile.am # # Author: Aaron M. Brown # Internet2 # # Date: Thu Jul 10 11:16:15 EDT 2008 # # Description: contributed scripts 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@ subdir = contrib DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/c-attribute.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/bwlib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DATA = $(noinst_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 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@ 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@ MAN2HTML = @MAN2HTML@ 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_VERSION = @PACKAGE_VERSION@ PATCH_LEVEL = @PATCH_LEVEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TOP_BUILD_DIRS = @TOP_BUILD_DIRS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_aux_dir = @ac_aux_dir@ 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@ lt_ECHO = @lt_ECHO@ 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@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_DATA = sample_hook.pl EXTRA_DIST = $(noinst_DATA) 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign contrib/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @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 check-am: all-am check: check-am all-am: Makefile $(DATA) 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) -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-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic 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-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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # 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: bwctl_1.5.4+dfsg1.orig/LICENSE0000664000076500007710000002363612560414557012636 0ustar Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. bwctl_1.5.4+dfsg1.orig/configure0000775000076500007710000155111312560414557013535 0ustar #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.63 for bwctl 1.5.4. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 # PATH needs CR # 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_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 if (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 # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false 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. 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); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. 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 # Name of the executable. 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'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= 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=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF 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 : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF 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_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell bug-autoconf@gnu.org about your system, echo including any error possibly output before this message. echo This can help us improve future autoconf versions. echo Configuration will now proceed without shell functions. } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # 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 after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, 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 # scripts with optimization help from Paolo Bonzini. 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 { (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 sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi 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=: 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'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac ECHO=${lt_ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF $* _LT_EOF exit 0 fi # 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 if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi exec 7<&0 &1 # 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` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='bwctl' PACKAGE_TARNAME='bwctl' PACKAGE_VERSION='1.5.4' PACKAGE_STRING='bwctl 1.5.4' PACKAGE_BUGREPORT='bwctl-users@internet2.edu' ac_unique_file="bwlib/context.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" enable_option_checking=no ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS ac_aux_dir TOP_BUILD_DIRS HAVE_MAN2HTML_FALSE HAVE_MAN2HTML_TRUE MAN2HTML TOOL_NUTTCP_FALSE TOOL_NUTTCP_TRUE TOOL_IPERF_FALSE TOOL_IPERF_TRUE TOOL_THRULAY_FALSE TOOL_THRULAY_TRUE USE_SYS_THRULAY_FALSE USE_SYS_THRULAY_TRUE subdirs CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL lt_ECHO RANLIB AR OBJDUMP NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL LN_S 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 PATCH_LEVEL 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_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_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 enable_libtool_lock enable_debug with_I2util with_thrulay enable_iperf enable_nuttcp ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' ac_subdirs_all='I2util thrulay' # 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=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_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } 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_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } 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_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } 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_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } 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_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 && { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } 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_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 { (exit 1); exit 1; }; } ;; *) $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_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } 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_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # 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_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } 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 bwctl 1.5.4 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/bwctl] --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] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of bwctl 1.5.4:";; 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=no] --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-debug turn on debugging --enable-iperf - IPERF throughput tool --enable-nuttcp - NUTTCP throughput tool 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-I2util= defaults to using sub-dir if avail, otherwise installed. If specified, attempts to use that. --with-thrulay= defaults to using sub-dir if avail, otherwise installed. If specified, attempts to use that. 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 C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. 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 bwctl configure 1.5.4 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 fi 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 bwctl $as_me 1.5.4, which was generated by GNU Autoconf 2.63. 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) 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_arg'" ;; 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: 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 cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX 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:$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= ;; #( *) $as_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 cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX 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 cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX 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 cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX 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'; { (exit 1); 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 # 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 an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE 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 -r "$ac_site_file"; then { $as_echo "$as_me:$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" 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 { $as_echo "$as_me:$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:$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:$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:$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:$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:$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:$LINENO: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:$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. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:$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_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 $as_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 ac_aux_dir= for ac_dir in config "$srcdir"/config; 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_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5 $as_echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;} { (exit 1); exit 1; }; } 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. 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:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $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:$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:$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_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 $as_echo "$as_me: error: unsafe absolute working directory name" >&2;} { (exit 1); exit 1; }; };; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 $as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} { (exit 1); exit 1; }; };; 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_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 $as_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 { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 $as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; 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:$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:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $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:$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:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$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:$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:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $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 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. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; 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:$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:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:$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 { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; 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:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$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_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 $as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } 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=bwctl VERSION=1.5.4 # 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 -' cat >>confdefs.h <<\_ACEOF #define PATCH_LEVEL 1 _ACEOF PATCH_LEVEL=1 ac_config_headers="$ac_config_headers bwlib/config.h" TOP_BUILD_DIRS="" # Checks for programs. 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; 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:$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:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $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:$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:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; 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:$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:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; 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:$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:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; 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:$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:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $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:$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:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$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:$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:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.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:$LINENO: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 { $as_echo "$as_me:$LINENO: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 $as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi fi fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:$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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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:$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:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then $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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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:$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:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -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" 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac 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 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:$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:$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 depcc="$CC" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then $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:$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_PROG_RANLIB { $as_echo "$as_me:$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:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # 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=no fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:$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.2.6b' macro_revision='1.3017' ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; 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_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 $as_echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; 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:$LINENO: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; 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_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 $as_echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; 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:$LINENO: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${ac_cv_path_SED+set}" = set; then $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 $as_unset ac_script || 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 ac_count=`expr $ac_count + 1` 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_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:$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:$LINENO: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then $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 ac_count=`expr $ac_count + 1` 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_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:$LINENO: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; 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 ac_count=`expr $ac_count + 1` 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_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:$LINENO: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if test "${ac_cv_path_FGREP+set}" = set; 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 ac_count=`expr $ac_count + 1` 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_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:$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:$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:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then $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:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then $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:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test "${lt_cv_path_NM+set}" = set; then $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:$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 "$ac_tool_prefix"; then for ac_prog in "dumpbin -symbols" "link -dump -symbols" 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DUMPBIN+set}" = set; 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:$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:$LINENO: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:$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 -symbols" "link -dump -symbols" 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then $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:$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:$LINENO: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:$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:$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 if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if test "${lt_cv_nm_interface+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:4447: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:4450: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:4453: 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:$LINENO: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } # find the maximum length of command line arguments { $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then $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; ;; 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"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$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:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:$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:$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"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:$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:$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:$LINENO: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:$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 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; 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:$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:$LINENO: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then $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:$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:$LINENO: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:$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:$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:$LINENO: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then $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. if ( 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 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 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 ;; 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]) 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) lt_cv_deplibs_check_method=pass_all ;; netbsd*) 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:$LINENO: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } 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}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; 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}ar" $as_echo "$as_me:$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:$LINENO: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then $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="ar" $as_echo "$as_me:$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:$LINENO: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; 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:$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:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $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:$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:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:$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:$LINENO: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:$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:$LINENO: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:$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:$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 # 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:$LINENO: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then $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 # 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:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$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:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && 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 #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. */ 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_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_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:$LINENO: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:$LINENO: result: ok" >&5 $as_echo "ok" >&6; } fi # 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:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 5648 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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:$LINENO: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then $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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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 lt_cv_cc_needs_belf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 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:$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:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) 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" 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; 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:$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:$LINENO: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then $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:$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:$LINENO: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; 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:$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:$LINENO: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then $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:$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:$LINENO: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LIPO+set}" = set; 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:$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:$LINENO: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then $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:$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:$LINENO: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL+set}" = set; 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:$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:$LINENO: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then $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:$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:$LINENO: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL64+set}" = set; 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:$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:$LINENO: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then $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:$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:$LINENO: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:$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:$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:$LINENO: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then $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:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then $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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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 lt_cv_ld_exported_symbols_list=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_ld_exported_symbols_list=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&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" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac 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:$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 test "${ac_cv_prog_CPP+set}" = set; 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:$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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #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 rm -f 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : 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 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # 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:$LINENO: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; 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:$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 # Sed substitution that helps us do robust quoting. It backslashifies # 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' # 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 "X$cc_temp" | $Xsed -e 's%.*/%%' -e "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:$LINENO: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then $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:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; 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:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$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 lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then $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:7471: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7475: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:$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= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } 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' ;; 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 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) 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' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # 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='' ;; 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*) 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:$LINENO: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then $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:7810: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7814: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:$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:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then $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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_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:$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:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then $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:7915: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:7919: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 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:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then $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:7970: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:7974: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 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:$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:$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:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$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:$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 ;; esac ld_shlibs=yes if test "$with_gnu_ld" = 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 *\ [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.9.1, 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 modify your PATH *** so that a non-GNU linker is found, and then restart. _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' 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/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--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 ;; 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) 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= 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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; 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; $ECHO \"$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*) # 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 $compiler_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 $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) 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 $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' 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 $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 ;; 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 $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 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 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")) && (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 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. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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 lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' 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 "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; 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. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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 lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' 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 "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; 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' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' 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. 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 `$ECHO "X$deplibs" | $Xsed -e '\''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' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' 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=echo 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 -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 -fPIC ${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 -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_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 -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$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 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 $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat >conftest.$ac_ext <<_ACEOF int foo(void) {} _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -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*) 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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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" && $ECHO "X-set_version $verstring" | $Xsed` -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} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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" && $ECHO "X-set_version $verstring" | $Xsed` -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 "X-set_version $verstring" | $Xsed` -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 ${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 ${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:$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:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 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:$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:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$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 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # 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 -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # 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; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` 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=`$ECHO "X$lib" | $Xsed -e '\''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,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 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="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. 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 ;; 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 ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # 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 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' ;; 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) 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 save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then shlibpath_overrides_runpath=yes fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # 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 # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # 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;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $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' ;; 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:$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:$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:$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:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any 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 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 $as_echo_n "checking for shl_load... " >&6; } if test "${ac_cv_func_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any 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 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_shl_load || defined __stub___shl_load choke me #endif int main () { return shl_load (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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_cv_func_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 $as_echo "$ac_cv_func_shl_load" >&6; } if test "x$ac_cv_func_shl_load" = x""yes; then lt_cv_dlopen="shl_load" else { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any 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 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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_cv_lib_dld_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 $as_echo_n "checking for dlopen... " >&6; } if test "${ac_cv_func_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any 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 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_dlopen || defined __stub___dlopen choke me #endif int main () { return dlopen (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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_cv_func_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 $as_echo "$ac_cv_func_dlopen" >&6; } if test "x$ac_cv_func_dlopen" = x""yes; then lt_cv_dlopen="dlopen" else { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any 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 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any 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 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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_cv_lib_svld_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any 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 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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_cv_lib_dld_dld_link=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then 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:$LINENO: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then $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 10773 "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 void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && 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:$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:$LINENO: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then $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 10869 "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 void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && 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:$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:$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:$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:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:$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:$LINENO: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:$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:$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: # possible solution to config location #BWL_PREFIX='${prefix}' #BWL_PREFIX_CFLAGS="-DBWL_PREFIX=$BWL_PREFIX" #AC_SUBST(BWL_PREFIX_CFLAGS) cat >>confdefs.h <<\_ACEOF #define AUTOCONF_SYSCONFDIR /etc _ACEOF # Checks for libraries. { $as_echo "$as_me:$LINENO: checking for library containing getaddrinfo" >&5 $as_echo_n "checking for library containing getaddrinfo... " >&6; } if test "${ac_cv_search_getaddrinfo+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any 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 getaddrinfo (); int main () { return getaddrinfo (); ; return 0; } _ACEOF for ac_lib in '' socket nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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_cv_search_getaddrinfo=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_getaddrinfo+set}" = set; then break fi done if test "${ac_cv_search_getaddrinfo+set}" = set; then : else ac_cv_search_getaddrinfo=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_getaddrinfo" >&5 $as_echo "$ac_cv_search_getaddrinfo" >&6; } ac_res=$ac_cv_search_getaddrinfo if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 $as_echo_n "checking for library containing gethostbyname... " >&6; } if test "${ac_cv_search_gethostbyname+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any 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 gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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_cv_search_gethostbyname=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_gethostbyname+set}" = set; then break fi done if test "${ac_cv_search_gethostbyname+set}" = set; then : else ac_cv_search_gethostbyname=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 $as_echo "$ac_cv_search_gethostbyname" >&6; } ac_res=$ac_cv_search_gethostbyname if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:$LINENO: checking for library containing nanosleep" >&5 $as_echo_n "checking for library containing nanosleep... " >&6; } if test "${ac_cv_search_nanosleep+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any 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 nanosleep (); int main () { return nanosleep (); ; return 0; } _ACEOF for ac_lib in '' rt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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_cv_search_nanosleep=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_nanosleep+set}" = set; then break fi done if test "${ac_cv_search_nanosleep+set}" = set; then : else ac_cv_search_nanosleep=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_nanosleep" >&5 $as_echo "$ac_cv_search_nanosleep" >&6; } ac_res=$ac_cv_search_nanosleep if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:$LINENO: checking for library containing trunc" >&5 $as_echo_n "checking for library containing trunc... " >&6; } if test "${ac_cv_search_trunc+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any 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 trunc (); int main () { return trunc (); ; return 0; } _ACEOF for ac_lib in '' m; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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_cv_search_trunc=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_trunc+set}" = set; then break fi done if test "${ac_cv_search_trunc+set}" = set; then : else ac_cv_search_trunc=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_trunc" >&5 $as_echo "$ac_cv_search_trunc" >&6; } ac_res=$ac_cv_search_trunc if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # Checks for header files. { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #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 rm -f 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : 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 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi for ac_header in errno.h getopt.h netdb.h stdlib.h tgmath.h sys/param.h sys/socket.h sys/time.h sys/timex.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$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:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ---------------------------------------- ## ## Report this to bwctl-users@internet2.edu ## ## ---------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:$LINENO: checking for __attribute__" >&5 $as_echo_n "checking for __attribute__... " >&6; } if test "${ac_cv___attribute__+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF #include static void foo(void) __attribute__ ((noreturn)); static void foo(void) { exit(1); } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv___attribute__=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv___attribute__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "$ac_cv___attribute__" = "yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE___ATTRIBUTE__ 1 _ACEOF fi { $as_echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5 $as_echo "$ac_cv___attribute__" >&6; } { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset 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 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const /**/ _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if test "${ac_cv_header_time+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5 $as_echo_n "checking for struct sockaddr.sa_len... " >&6; } if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { static struct sockaddr ac_aggr; if (ac_aggr.sa_len) return 0; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_sockaddr_sa_len=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { static struct sockaddr ac_aggr; if (sizeof ac_aggr.sa_len) return 0; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_sockaddr_sa_len=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_sockaddr_sa_len=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5 $as_echo "$ac_cv_member_struct_sockaddr_sa_len" >&6; } if test "x$ac_cv_member_struct_sockaddr_sa_len" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_SA_LEN 1 _ACEOF fi # Checks for library functions. for ac_func in memset socket getaddrinfo mergesort trunc do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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 eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # Checks for variable/function declarations. { $as_echo "$as_me:$LINENO: checking whether optreset is declared" >&5 $as_echo_n "checking whether optreset is declared... " >&6; } if test "${ac_cv_have_decl_optreset+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef optreset (void) optreset; #endif ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_optreset=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_optreset=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5 $as_echo "$ac_cv_have_decl_optreset" >&6; } if test "x$ac_cv_have_decl_optreset" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_OPTRESET 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_OPTRESET 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether fseeko is declared" >&5 $as_echo_n "checking whether fseeko is declared... " >&6; } if test "${ac_cv_have_decl_fseeko+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef fseeko (void) fseeko; #endif ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_fseeko=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_fseeko=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fseeko" >&5 $as_echo "$ac_cv_have_decl_fseeko" >&6; } if test "x$ac_cv_have_decl_fseeko" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FSEEKO 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FSEEKO 0 _ACEOF fi # XXX: Replace this efence stuff with something that sets LDFLAGS (for -L) # and then uses AC_SEARCH_LIB to add to LIBS. # ## ## add configure options. ## #AC_ARG_WITH(efence, # AC_HELP_STRING([--with-efence=], # [yes means use -L/usr/local/lib -lefence]), # with_efence=$withval, with_efence=no) # # ## ## setup efence ## #MALLOCDEBUGLIBS="" #if test "$with_efence" != "no"; then # if test "$with_efence" = "yes"; then # MALLOCDEBUGLIBS="-L/usr/local/lib -lefence" # else # efence_dir=`dirname $with_efence` # efence_file=`basename $with_efence` # case $efence_dir in # /*) ;; # already absolute path # *) efence_dir="`pwd`/$efence_dir" ;; # esac # MALLOCDEBUGLIBS="$efence_dir/$efence_file" # fi #fi #AC_SUBST(MALLOCDEBUGLIBS) # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then enableval=$enable_debug; CFLAGS="-g -Wall -DDEBUG $CFLAGS" fi # # --with-I2util: # If not specified, or is 'yes' then: # build with local-dir if available # use installed otherwise (depends on CFLAGS/LDFLAGS env set correctly) # If specified, then that must point to an already installed # prefix style tree (and include/lib subdir is assumed and used to set # LDFLAGS/CFLAGS # # Check whether --with-I2util was given. if test "${with_I2util+set}" = set; then withval=$with_I2util; with_I2util=$withval else with_I2util=yes fi if test \( -z "$with_I2util" -o "$with_I2util" = "yes" \) -a -d I2util; then # Use local I2util? - just setup LDFLAGS/CFLAGS so libtool can find # it from the Makefile.am during build. { $as_echo "$as_me:$LINENO: WARNING: Using local I2util" >&5 $as_echo "$as_me: WARNING: Using local I2util" >&2;} subdirs="$subdirs I2util" TOP_BUILD_DIRS="I2util $TOP_BUILD_DIRS" I2util_dir="`pwd`/I2util" LDFLAGS="-L$I2util_dir/I2util $LDFLAGS" CFLAGS="-I$I2util_dir $CFLAGS" else # else - libI2util must already be built. If , then add to # LDFLAGS/CFLAGS - but ultimately, AC_SEARCH_LIBS and AC_CHECK_HEADERS # must succeed. if test -n "$with_I2util" -a -d "$with_I2util"; then I2util_dir=`dirname $with_I2util` case $I2util_dir in /*) ;; # already an absolute path *) I2util_dir="`pwd`/$I2util_dir" ;; esac LDFLAGS="-L$with_I2util/lib $LDFLAGS" CFLAGS="-I$I2util_dir/include $CFLAGS" fi { $as_echo "$as_me:$LINENO: checking for library containing I2AddrByNode" >&5 $as_echo_n "checking for library containing I2AddrByNode... " >&6; } if test "${ac_cv_search_I2AddrByNode+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any 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 I2AddrByNode (); int main () { return I2AddrByNode (); ; return 0; } _ACEOF for ac_lib in '' I2util; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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_cv_search_I2AddrByNode=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_I2AddrByNode+set}" = set; then break fi done if test "${ac_cv_search_I2AddrByNode+set}" = set; then : else ac_cv_search_I2AddrByNode=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_I2AddrByNode" >&5 $as_echo "$ac_cv_search_I2AddrByNode" >&6; } ac_res=$ac_cv_search_I2AddrByNode if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else { { $as_echo "$as_me:$LINENO: error: Couldn't find I2util library" >&5 $as_echo "$as_me: error: Couldn't find I2util library" >&2;} { (exit 1); exit 1; }; } fi for ac_header in I2util/util.h I2util/conf.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else { { $as_echo "$as_me:$LINENO: error: Couldn't find I2util header files" >&5 $as_echo "$as_me: error: Couldn't find I2util header files" >&2;} { (exit 1); exit 1; }; } fi done fi uname=`uname` # --with-thrulay: # If not specified, or is 'yes' then: # build with local-dir if available # use installed otherwise (depends on CFLAGS/LDFLAGS env set correctly) # If specified, then that must point to an already installed # prefix style tree (and include/lib subdir is assumed and used to set # LDFLAGS/CFLAGS # # Check whether --with-thrulay was given. if test "${with_thrulay+set}" = set; then withval=$with_thrulay; with_thrulay=$withval else with_thrulay=no fi case $uname in SunOS*) with_thrulay=no ;; esac if test "$with_thrulay" = "no"; then { $as_echo "$as_me:$LINENO: WARNING: Disabling thrulay support" >&5 $as_echo "$as_me: WARNING: Disabling thrulay support" >&2;} do_thrulay=false else if test \( -z "$with_thrulay" -o "$with_thrulay" = "yes" \) -a -d thrulay; then # Use local thrulay? - just setup LDFLAGS/CFLAGS so libtool can find # it from the Makefile.am during build. { $as_echo "$as_me:$LINENO: WARNING: Using local thrulay" >&5 $as_echo "$as_me: WARNING: Using local thrulay" >&2;} subdirs="$subdirs thrulay" TOP_BUILD_DIRS="thrulay $TOP_BUILD_DIRS" thrulay_dir="`pwd`/thrulay" LDFLAGS="-L$thrulay_dir/thrulay $LDFLAGS" CFLAGS="-I$thrulay_dir $CFLAGS" else # else - libthrulay must already be built. If , then add to # LDFLAGS/CFLAGS - but ultimately, AC_SEARCH_LIBS and AC_CHECK_HEADERS # must succeed. if test -n "$with_thrulay" -a -d "$with_thrulay"; then thrulay_dir=`dirname $with_thrulay` case $thrulay_dir in /*) ;; # already an absolute path *) thrulay_dir="`pwd`/$thrulay_dir" ;; esac LDFLAGS="-L$thrulay_dir/lib $LDFLAGS" CFLAGS="-I$thrulay_dir/include $CFLAGS" fi { $as_echo "$as_me:$LINENO: checking for library containing thrulay_client_init" >&5 $as_echo_n "checking for library containing thrulay_client_init... " >&6; } if test "${ac_cv_search_thrulay_client_init+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any 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 thrulay_client_init (); int main () { return thrulay_client_init (); ; return 0; } _ACEOF for ac_lib in '' thrulay; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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_cv_search_thrulay_client_init=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_thrulay_client_init+set}" = set; then break fi done if test "${ac_cv_search_thrulay_client_init+set}" = set; then : else ac_cv_search_thrulay_client_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_thrulay_client_init" >&5 $as_echo "$ac_cv_search_thrulay_client_init" >&6; } ac_res=$ac_cv_search_thrulay_client_init if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else { { $as_echo "$as_me:$LINENO: error: Couldn't find thrulay library" >&5 $as_echo "$as_me: error: Couldn't find thrulay library" >&2;} { (exit 1); exit 1; }; } fi use_sys_thrulay="true" cat >>confdefs.h <<\_ACEOF #define USE_SYS_THRULAY 1 _ACEOF fi for ac_header in thrulay/client.h thrulay/server.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else { { $as_echo "$as_me:$LINENO: error: Couldn't find thrulay header files" >&5 $as_echo "$as_me: error: Couldn't find thrulay header files" >&2;} { (exit 1); exit 1; }; } fi done do_thrulay=true cat >>confdefs.h <<\_ACEOF #define TOOL_THRULAY 1 _ACEOF fi if test x$use_sys_thrulay = xtrue; then USE_SYS_THRULAY_TRUE= USE_SYS_THRULAY_FALSE='#' else USE_SYS_THRULAY_TRUE='#' USE_SYS_THRULAY_FALSE= fi if test x$do_thrulay = xtrue; then TOOL_THRULAY_TRUE= TOOL_THRULAY_FALSE='#' else TOOL_THRULAY_TRUE='#' TOOL_THRULAY_FALSE= fi # Check whether --enable-iperf was given. if test "${enable_iperf+set}" = set; then enableval=$enable_iperf; tool_ok=$enableval else tool_ok=yes fi if test "$tool_ok" = "yes"; then cat >>confdefs.h <<\_ACEOF #define TOOL_IPERF 1 _ACEOF do_iperf=true fi if test x$do_iperf = xtrue; then TOOL_IPERF_TRUE= TOOL_IPERF_FALSE='#' else TOOL_IPERF_TRUE='#' TOOL_IPERF_FALSE= fi # Check whether --enable-nuttcp was given. if test "${enable_nuttcp+set}" = set; then enableval=$enable_nuttcp; tool_ok=$enableval else tool_ok=yes fi if test "$tool_ok" = "yes"; then cat >>confdefs.h <<\_ACEOF #define TOOL_NUTTCP 1 _ACEOF do_nuttcp=true fi if test x$do_nuttcp = xtrue; then TOOL_NUTTCP_TRUE= TOOL_NUTTCP_FALSE='#' else TOOL_NUTTCP_TRUE='#' TOOL_NUTTCP_FALSE= fi # Check for MAN2HTML. The manpages will be compiled to html files if it's # found. for ac_prog in man2html 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_MAN2HTML+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$MAN2HTML"; then ac_cv_prog_MAN2HTML="$MAN2HTML" # 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_MAN2HTML="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MAN2HTML=$ac_cv_prog_MAN2HTML if test -n "$MAN2HTML"; then { $as_echo "$as_me:$LINENO: result: $MAN2HTML" >&5 $as_echo "$MAN2HTML" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$MAN2HTML" && break done if test -n "${MAN2HTML}"; then cat >>confdefs.h <<\_ACEOF #define MAN2HTML 1 _ACEOF do_man2html=true fi if test x$do_man2html = xtrue; then HAVE_MAN2HTML_TRUE= HAVE_MAN2HTML_FALSE='#' else HAVE_MAN2HTML_TRUE='#' HAVE_MAN2HTML_FALSE= fi ac_config_files="$ac_config_files Makefile bwlib/Makefile bwctld/Makefile bwctl/Makefile conf/Makefile contrib/Makefile doc/Makefile bwctl.spec" ac_config_commands="$ac_config_commands default" 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:$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= ;; #( *) $as_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 test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:$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= 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. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$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_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${USE_SYS_THRULAY_TRUE}" && test -z "${USE_SYS_THRULAY_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"USE_SYS_THRULAY\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"USE_SYS_THRULAY\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${TOOL_THRULAY_TRUE}" && test -z "${TOOL_THRULAY_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"TOOL_THRULAY\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"TOOL_THRULAY\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${TOOL_IPERF_TRUE}" && test -z "${TOOL_IPERF_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"TOOL_IPERF\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"TOOL_IPERF\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${TOOL_NUTTCP_TRUE}" && test -z "${TOOL_NUTTCP_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"TOOL_NUTTCP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"TOOL_NUTTCP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_MAN2HTML_TRUE}" && test -z "${HAVE_MAN2HTML_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_MAN2HTML\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_MAN2HTML\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } 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:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF || ac_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} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_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 # PATH needs CR # 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_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 if (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 # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false 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. 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); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. 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 # Name of the executable. 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'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # 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 after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, 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 # scripts with optimization help from Paolo Bonzini. 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 { (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 sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi 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=: 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 # 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 bwctl $as_me 1.5.4, which was generated by GNU Autoconf 2.63. 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 from templates according to the current configuration. Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, 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_version="\\ bwctl config.status 1.5.4 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2008 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=$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 ;; --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"` ;; esac CONFIG_FILES="$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 CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { $as_echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --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_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" 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' enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ AR \ AR_FLAGS \ 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 \ SHELL \ ECHO \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ 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 \ fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$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 \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` ;; esac 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 "bwlib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS bwlib/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "bwlib/Makefile") CONFIG_FILES="$CONFIG_FILES bwlib/Makefile" ;; "bwctld/Makefile") CONFIG_FILES="$CONFIG_FILES bwctld/Makefile" ;; "bwctl/Makefile") CONFIG_FILES="$CONFIG_FILES bwctl/Makefile" ;; "conf/Makefile") CONFIG_FILES="$CONFIG_FILES conf/Makefile" ;; "contrib/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "bwctl.spec") CONFIG_FILES="$CONFIG_FILES bwctl.spec" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason 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= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$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 "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # 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=' ' 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 {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } 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_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } 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_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } 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 >>"\$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 >>"\$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 < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 $as_echo "$as_me: error: could not setup config files machinery" >&2;} { (exit 1); exit 1; }; } _ACEOF # 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 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 >"$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_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} { (exit 1); exit 1; }; } 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_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 $as_echo "$as_me: error: could not setup config headers machinery" >&2;} { (exit 1); exit 1; }; } 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_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[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="$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_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac ac_file_inputs="$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:$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 >"$tmp/stdin" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; 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" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { 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_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } 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:$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 "$tmp/subs.awk" >$tmp/out \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 $as_echo "$as_me: error: could not create -" >&2;} { (exit 1); exit 1; }; } 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:$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 case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { 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_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # 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 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 # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # 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 # 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 # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # 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 # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # 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 # 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 # The name of the directory that contains temporary libtool files. objdir=$objdir # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that does not interpret backslashes. ECHO=$lt_ECHO # 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 # 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 # 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 # 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 # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # 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 # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # 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 # 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # 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 () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # 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 () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # 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_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}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $* )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # 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 () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -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 file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # 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 "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[^=]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$@"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1+=\$2" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1=\$$1\$2" } _LT_EOF ;; esac sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; "default":C) test -z "$CONFIG_HEADERS" || echo timestamp > bwlib/stamp-h.in ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } # 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 # # CONFIG_SUBDIRS section. # if test "$no_recursion" != yes; then # Remove --cache-file, --srcdir, and --disable-option-checking arguments # so they do not pile up. ac_sub_configure_args= ac_prev= eval "set x $ac_configure_args" shift for ac_arg do if test -n "$ac_prev"; then ac_prev= continue fi case $ac_arg in -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=*) ;; --config-cache | -C) ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ;; --disable-option-checking) ;; *) case $ac_arg in *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;; esac done # Always prepend --prefix to ensure using the same prefix # in subdir configurations. ac_arg="--prefix=$prefix" case $ac_arg in *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" # Pass --silent if test "$silent" = yes; then ac_sub_configure_args="--silent $ac_sub_configure_args" fi # Always prepend --disable-option-checking to silence warnings, since # different subdirs can have different --enable and --with options. ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" ac_popdir=`pwd` for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. test -d "$srcdir/$ac_dir" || continue ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" $as_echo "$as_me:$LINENO: $ac_msg" >&5 $as_echo "$ac_msg" >&6 { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { 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_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } 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" # Check for guested configure; otherwise get Cygnus style configure. if test -f "$ac_srcdir/configure.gnu"; then ac_sub_configure=$ac_srcdir/configure.gnu elif test -f "$ac_srcdir/configure"; then ac_sub_configure=$ac_srcdir/configure elif test -f "$ac_srcdir/configure.in"; then # This should be Cygnus configure. ac_sub_configure=$ac_aux_dir/configure else { $as_echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi # The recursion is here. if test -n "$ac_sub_configure"; then # Make the cache file name correct relative to the subdirectory. case $cache_file in [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; *) # Relative name. ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac { $as_echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || { { $as_echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 $as_echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} { (exit 1); exit 1; }; } fi cd "$ac_popdir" done fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi bwctl_1.5.4+dfsg1.orig/conf/0000775000076500007710000000000012560414557012544 5ustar bwctl_1.5.4+dfsg1.orig/conf/bwctld.conf0000664000076500007710000001636612560414557014706 0ustar # # $Id$ # ######################################################################### # # # Copyright (C) 2003 # # Internet2 # # All Rights Reserved # # # ######################################################################### # # File: bwctld.conf # # Author: Jeff W. Boote # Internet2 # # Date: Tue Sep 9 16:28:53 MDT 2003 # # Description: # Example bwctld.conf config file. # peer_port (port to open peer "server" connection on.) If this daemon # is running the iperf "receiver" then it will also open a peer tcp # connection using these port numbers. This extra connection is used to # validate clocks between the two bwctld processes and to exchange results. # Must be specified as a valid range with the first value less than the # second. (A single value is only allowed if it is '0'.) # (defaults to 0 - let the system pick an ephemeral port) peer_port 6001-6200 # test_port (ports to run the test tool "server" on.) This is set to a range # since some tests can run in parallel, and need to be able to open servers on # separate ports. The daemon will cycle through this range assigning each ports # to each test, as needed. # (defaults to 5001-5900) test_port 5001-5900 # full path to iperf executable # (defaults to "iperf" - assumes it will be found using PATH) #iperf_cmd iperf # disable_iperf - disable the iperf command. Defaults to False. #disable_iperf # iperf_port (port to run iperf server "receiver" processes on) # (defaults to 5001-5100) #iperf_port 5001-5300 # full path to nuttcp executable # (defaults to "nuttcp" - assumes it will be found using PATH) #nuttcp_cmd nuttcp # disable_nuttcp - disable the nuttcp command. Defaults to False. #disable_nuttcp # nuttcp_port (port to run nuttcp server "receiver" processes on) # (defaults to 5001-5100) # nuttcp_port 5301-5600 # ping_cmd - full path to ping executable # (defaults to "ping" - assumes it will be found using PATH) #ping_cmd ping # ping6_cmd - full path to ping6 executable # (defaults to "ping6" - assumes it will be found using PATH) #ping6_cmd ping6 # disable_ping - disable the ping command. Defaults to False. #disable_ping # traceroute_cmd - full path to traceroute executable # (defaults to "traceroute" - assumes it will be found using PATH) #traceroute_cmd traceroute # traceroute6_cmd - full path to traceroute6 executable # (defaults to "traceroute6" - assumes it will be found using PATH) #traceroute6_cmd traceroute6 # disable_traceroute - disable the traceroute command. Defaults to False. #disable_traceroute # tracepath_cmd - full path to tracepath executable # (defaults to "tracepath" - assumes it will be found using PATH) #tracepath_cmd tracepath # tracepath6_cmd - full path to tracepath6 executable # (defaults to "tracepath6" - assumes it will be found using PATH) #tracepath6_cmd tracepath6 # disable_tracepath - disable the tracepath command. Defaults to False. #disable_tracepath # full path to owping executable # (defaults to "owping" - assumes it will be found using PATH) #owamp_cmd owping # full path to owampd executable # (defaults to "owampd" - assumes it will be found using PATH) #owamp_server_cmd owampd # disable_owamp - disable the owamp tool. Defaults to False. #disable_owamp # owamp_port (port to run owampd server "receiver" processes on) # (defaults to 4001-4100) # owamp_port 5601-5900 # taskset_cmd - full path to the taskset executable # (defaults to "taskset" - assumes it will be found using PATH) #taskset_cmd taskset # test_cpu_affinity - The set of CPUs to use for throughput tests. Defaults to all CPUs. #test_cpu_affinity 0,1-3 # iperf_cpu_affinity - The set of CPUs to use for iperf tests. Defaults to all CPUs. #iperf_cpu_affinity 0,1-3 # nuttcp_cpu_affinity - The set of CPUs to use for nuttcp tests. Defaults to all CPUs. #nuttcp_cpu_affinity 0,1-3 # iperf3_cpu_affinity - The set of CPUs to use for iperf3 tests. Defaults to all CPUs. #iperf3_cpu_affinity 0,1-3 # run as group/user - only used if effective uid is root. # (defaults to nil) user bwctl group bwctl # root_folly needs to be set if the 'user' specified above has root # permissions. This is an additional check to ensure bwctld is not # run as root unless expressly intended. # (You could uncomment this line... But are you really sure you # want to do that?) # (defaults to !root_folly) #root_folly # not really used, but what the heck. # (defaults to !verbose) #verbose # where should syslog messages go? # valid facilitynames from syslog # (defaults to daemon) #facility local5 # what syslog "level" should be used for errors? # valid prioritynames from syslog # (defaults to error) #priority error # what syslog "level" should be used for access messages? # valid prioritynames from syslog # (defaults to info) #access_priority info # include src file:line in log messages # keep this on, and help us with more specific bug reports! # (defaults to !log_location) log_location # location for bwctld.pid and bwctld.info files # (defaults to $cwd) #var_dir /var/run # location for session files. (NOT USED YET) # (defaults to $cwd) #data_dir /big/enough # auth_mode - uncomment to make only Open. # (defaults to OAE) #auth_mode O # allow_unsync - allow test requests to schedule even if the host is # not syncronized, or the NTP system calls are not available. # (defaults to False if NTP system calls unavailable, # defaults to True if NTP system calls are available.) #allow_unsync # sync_fuzz - admin specified amount of time error (seconds). If NTP # errors are suspect, set this to the amount of error you suspect. #sync_fuzz 3 # src address/port defaults to wildcard addr and standard(not yet...) port. # Can be specified as only a port number to still wildcard address and not # use the semi-standard bwctl control port (':' must be the first non # whitespace charactor in this case). # Can specify the host without the port to use the default port. #src_node localhost:8765 #src_node :8765 # die_by - amount of time to wait for child processes to gracefully terminate # before killing them with a SIGKILL. (default is 5 seconds) # This is in response to the master process receiving SIGTERM or SIGHUP. # (defaults to 5) #die_by 5 # control_timeout - amount of time (seconds) to wait for a protocol # message. # If you are using bwctl to run regular tests in a loop, make sure this timeout # is significantly larger than the -I values you want to support or the # daemon will close the control connection and cause bwctl to do extra work. # (defaults to 7200) 2 hours - same as default for tcp keepalive #control_timeout 7200 # bottleneck_capacity - this value is used in the algorithm to dynamically # set the send/recv window sizes. This option is likely to be removed in # the future once a dynamic bottleneck_capacity algorithm is incorporated into # the code. # (defaults to 0 - unused) #bottleneck_capacity 1g # posthook - a script to run after a session has completed # There can be any number of posthook scripts. These scripts will be executed # by the daemon when a session finishes. The script will be passed the test # parameters, the receiver output and the sender output. An example script is # included in the contrib directory that will send a message to syslog when the # session completes. #posthook /path/to/script.pl #posthook /path/to/other/script.pl bwctl_1.5.4+dfsg1.orig/conf/Makefile.am0000664000076500007710000000220112560414557014573 0ustar # # $Id$ # ######################################################################### # # # Copyright (C) 2003 # # Internet2 # # All Rights Reserved # # # ######################################################################### # # File: Makefile.am # # Author: Jeff W. Boote # Internet2 # # Date: Tue Sep 9 16:24:58 MDT 2003 # # Description: constructing owamp conf files from templates # This doesn't really do this yet - it just provides # examples. noinst_DATA = README bwctld.conf bwctld.limits bwctld.sh bwctld.init EXTRA_DIST = $(noinst_DATA) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # bwctl_1.5.4+dfsg1.orig/conf/README0000664000076500007710000000031612560414557013424 0ustar This directory contains examples of some of the config files you may want to install to get bwctld on your system. bwctld.conf bwctld.limits bwctld.sh (Example rc script - this one came from RedHat Linux) bwctl_1.5.4+dfsg1.orig/conf/Makefile.in0000664000076500007710000002455312560414557014622 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@ 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@ subdir = conf DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/c-attribute.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/bwlib/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DATA = $(noinst_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 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@ 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@ MAN2HTML = @MAN2HTML@ 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_VERSION = @PACKAGE_VERSION@ PATCH_LEVEL = @PATCH_LEVEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TOP_BUILD_DIRS = @TOP_BUILD_DIRS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_aux_dir = @ac_aux_dir@ 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@ lt_ECHO = @lt_ECHO@ 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@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # # $Id$ # ######################################################################### # # # Copyright (C) 2003 # # Internet2 # # All Rights Reserved # # # ######################################################################### # # File: Makefile.am # # Author: Jeff W. Boote # Internet2 # # Date: Tue Sep 9 16:24:58 MDT 2003 # # Description: constructing owamp conf files from templates # This doesn't really do this yet - it just provides # examples. noinst_DATA = README bwctld.conf bwctld.limits bwctld.sh bwctld.init EXTRA_DIST = $(noinst_DATA) 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign conf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign conf/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @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 check-am: all-am check: check-am all-am: Makefile $(DATA) 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) -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-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic 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-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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # 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: bwctl_1.5.4+dfsg1.orig/conf/bwctld.limits0000664000076500007710000000356412560414557015256 0ustar # This is an EXAMPLE "limits" file for the bwctld process. # # You SHOULD change this to meet the requirements for your local # deployment needs! # # This example configuration allows Abilene measurement hosts to run # tests to your server, but will not allow you to run tests to your own # hosts. This is intentional so you will have to look at this file and # modifiy it. # # # Basics: # Almost the same as owampd - with the following limit types defined: # # parent - specified which limit to inherit settings from # bandwidth - Sets the maximum UDP bandwidth # duration - Sets the maximum duration for tests # allow_open_mode - Allows unauthenticated users # allow_tcp - Allows for TCP tests # allow_udp - Allows for UDP tests # max_time_error - Sets the maximum time offset that the server will accept # minimum_ttl - Sets the minimum TTL for traceroute tests # # setup the root node with max bandwidth as open as possible. # Super-user access limit root with \ bandwidth=900m, \ duration=60, \ allow_udp=on, \ allow_tcp=on, \ allow_open_mode=on, \ max_time_error=20 # Disable UDP tests for non-authorized users. Unspecified values default to # parent permissions limit regular with parent=root, \ allow_udp=off # minimal everything # send hackers and bad nets here limit jail with parent=root, \ bandwidth=1, \ duration=1, \ allow_udp=off, \ allow_tcp=off, \ allow_open_mode=off # Default everything to regular user access # this allows TCP for up to 60 seconds and # no UDP tests assign default regular # hacker and BBI networks # this shows a 172.16 private address block being # prohibited # see RFC 1918 for a descripton of private address blocks assign net 172.16.10.0/24 jail # localhost (and any other hosts you completely trust) # (might as well trust localhost, the user could run iperf directly...) assign net 127.0.0.1/32 root assign net ::1/128 root bwctl_1.5.4+dfsg1.orig/conf/bwctld.init0000775000076500007710000000411012560414557014707 0ustar #!/bin/bash # # Init file for Bandwidth Control daemon # # chkconfig: 2345 60 20 # description: Bandwidth Control daemon # # processname: bwctld # BWCTLDBINDIR=/usr/bin CONFDIR=/etc/bwctld BWCTLDVARDIR=/var/run PIDFILE=${BWCTLDVARDIR}/bwctld.pid BWCTLD="${BWCTLDBINDIR}/bwctld -c ${CONFDIR} -R ${BWCTLDVARDIR}" ERROR=0 ARGV="$@" if [ "x$ARGV" = "x" ] ; then ARGS="help" fi for ARG in $@ $ARGS do # check for pidfile if [ -f $PIDFILE ] ; then PID=`cat $PIDFILE` if [ "x$PID" != "x" ] && kill -0 $PID 2>/dev/null ; then STATUS="bwctld (pid $PID) running" RUNNING=1 else STATUS="bwctld (pid $PID?) not running" RUNNING=0 fi else STATUS="bwctld (no pid file) not running" RUNNING=0 fi case $ARG in start) if [ $RUNNING -eq 1 ]; then echo "$0 $ARG: bwctld (pid $PID) already running" continue fi echo $BWCTLD if $BWCTLD ; then echo "$0 $ARG: bwctld started" else echo "$0 $ARG: bwctld could not be started" ERROR=3 fi ;; stop) if [ $RUNNING -eq 0 ]; then echo "$0 $ARG: $STATUS" continue fi if kill $PID ; then echo "$0 $ARG: bwctld stopped" else echo "$0 $ARG: bwctld could not be stopped" ERROR=4 fi ;; cond-restart) if [ $RUNNING -eq 1 ]; then $0 stop; echo "waiting..."; sleep 10; $0 start; fi ;; restart) $0 stop; echo "waiting..."; sleep 10; $0 start; ;; # if [ $RUNNING -eq 0 ]; then # echo "$0 $ARG: bwctld not running, trying to start" # if $BWCTLD ; then # echo "$0 $ARG: bwctld started" # else # echo "$0 $ARG: bwctld could not be started" # ERROR=5 # fi # else # if kill -HUP $PID ; then # echo "$0 $ARG: bwctld restarted" # else # echo "$0 $ARG: bwctld could not be restarted" # ERROR=6 # fi # fi # ;; *) echo "usage: $0 (start|stop|restart|help)" cat </dev/null ; then STATUS="bwctld (pid $PID) running" RUNNING=1 else STATUS="bwctld (pid $PID?) not running" RUNNING=0 fi else STATUS="bwctld (no pid file) not running" RUNNING=0 fi case $ARG in start) if [ $RUNNING -eq 1 ]; then echo "$0 $ARG: bwctld (pid $PID) already running" continue fi echo $BWCTLD if $BWCTLD ; then echo "$0 $ARG: bwctld started" else echo "$0 $ARG: bwctld could not be started" ERROR=3 fi ;; stop) if [ $RUNNING -eq 0 ]; then echo "$0 $ARG: $STATUS" continue fi if kill $PID ; then echo "$0 $ARG: bwctld stopped" else echo "$0 $ARG: bwctld could not be stopped" ERROR=4 fi ;; restart) $0 stop; echo "waiting..."; sleep 10; $0 start; ;; # if [ $RUNNING -eq 0 ]; then # echo "$0 $ARG: bwctld not running, trying to start" # if $BWCTLD ; then # echo "$0 $ARG: bwctld started" # else # echo "$0 $ARG: bwctld could not be started" # ERROR=5 # fi # else # if kill -HUP $PID ; then # echo "$0 $ARG: bwctld restarted" # else # echo "$0 $ARG: bwctld could not be restarted" # ERROR=6 # fi # fi # ;; *) echo "usage: $0 (start|stop|restart|help)" cat <