rivet-2.3.5/doc/xml/calendar.xml000644 001750 001750 00000031303 11752325411 016157 0ustar00mxmmxm000000 000000
Calendar Package
Introduction The package is based on the Calendar class, a class capable of printing an ascii calendar table that closely resembles the output of the typical Unix cal command. The internal code is written entirely in Tcl, therefore doesn't rely on the existance of cal on the system. XmlCalendar inherits the basic methods and adds XML tagging to the table. XmlCalendar prints an XML calendar table whose header, weekdays banner and days rows tags are configurable. Also specific days or specific weeks can be given arbitrary attributes. Calendar core methods are based on the cal procedure written by Richard Suchenwirth and published on the Tcl Wiki The Calendar package uses Tcl dict command to manage markup information. Hence either Tcl8.5 or Tcl8.4 with package dict are required.
Calendar Utility class the builds and prints a calendar table Calendar calendar_name Calendar object subcommands The main public command for a calendar object is emit that returns a calendar table calendar_obj emit calendar_obj emit month year calendar_obj emit month | year The method 'emit' if invoked without arguments returns an ASCII formatted calendar of the current month set cal [Calendar #auto] set current_month [$cal emit] puts $current_month Jun 2010 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 The method emit when invoked with a single argument takes it as an year number and prints the whole calendar of that year. When invoked with 2 arguments takes the first as a month, either expressed in its shortened form ('Jan','Feb',...) or as a number in the range 1-12. The second argument is a year number. XmlCalendar Prints XML formatted calendar tables XmlCalendar calendar_name -option1 option_list -option2 option_list ... An XmlCalendar object is created and returned. XmlCalendar objects print XML formatted calendar tables. The markup can be customized using the configuration options. Configuration options accept odd-length lists as values. An option_list has the following structure tag_name The first element of an option list is a tag name, the remaining terms are therefore an even-length sublist which is interpreted as a sequence of attribute-value pairs that will in turn become attributes of the tag. Methods cal_obj emit cal_obj emit month year cal_obj emit month | year The method 'emit' if invoked without arguments returns an XML calendar table of the current month Options -container tag_name Assigns an options list to the XML element that will hold the whole table. The default tag for the container is 'calendar', with no attributes. -header tag_name Assigns tag name and attributes to the XML header element (default: calheader) -body tag_name Assigns tag name and attributes to the XML body element of the table (default: calbody) -banner tag_name Assigns tag name and attributes to the XML banner element of the table (default: monthyear) The header of a calendar table is made of a banner, showing the Month and Year number, and of a weekdays bar. -foot tag_name Assigns tag name and attributes to the XML foot element of the table (default: calfoot). This option was added for completeness, but it's not implemented yet -banner_month tag_name Tag name and attributes for the XML element holding the month name (default:month) -banner_year tag_name Tag name and attributes for the XML element holding the month name (default: year) -weekdays tag_name Tag name and attributes for the XML element holding the weekday header (default: weekdays) -weekdays_cell tag_name Tag name and attributes for the XML element holding the each single weekday (default: wkdays) -days_row tag_name Tag name and attributes for the XML element holding the each row of the calendar table (default: week) -days_cell tag_name Tag name and attributes for the XML element representing a cell in the calendar table (default: day) -cell_function If set this option is the name of a procedure that gets called for every day of the month. The procedure must accept 4 argument representing day, month, year and weekday and must return an odd-length list interpreted in the same way as options lists. -current_day This option works as a simple method for pointing out a specific day of the month. If set with a day number that day will get the class attribute automatically set as "current" -current_weekday This option works as a simple method for pointing out a specific weekday of the month. If set with a weekday index (0: Sunday, 6: Saturday) the corresponding cell in the weekdays header will get the class attribute automatically set as "current_wkday" HtmlCalendar Concrete class derived from XmlCalendar HtmlCalendar calendar_name -option1 option_list -option2 option_list ... Concrete XmlCalendar class for printing html calendar tables. The markup of the class is xhtml compliant and prints a code fragment for inclusion in a webpage. The following is the class definition. ::itcl::class HtmlCalendar { inherit XmlCalendar constructor {args} {XmlCalendar::constructor $args} { $this configure -container table \ -header thead \ -body tbody \ -banner tr \ -banner_month {th colspan 3 style "text-align: right;"} \ -banner_year {th colspan 4 style "text-align: left;"} \ -weekdays tr \ -weekday_cell th \ -days_row tr \ -days_cell td } } A sample output from HtmlCalendar (with some styling)
rivet-2.3.5/doc/examples-sgml/vars.html000644 001750 001750 00000002130 11562073576 017512 0ustar00mxmmxm000000 000000 <form action="vars.rvt"> <table> <tbody> <tr> <td><b>Title:</b></td> <td><input name="title" /></td> </tr> <tr> <td><b>Salary:</b></td> <td><input name="salary" /></td> </tr> <tr> <td><b>Boss:</b></td> <td><input name="boss" /></td></tr> <tr> <td><b>Skills:</b></td> <td> <select name="skills" multiple="multiple"> <option>C</option> <option>Java</option> <option>Tcl</option> <option>Perl</option> </select> </td> </tr> <tr> <td><input type="submit" /></td> </tr> </tbody> </table> </form> rivet-2.3.5/rivet/packages/dio/dio.tcl000644 001750 001750 00000064271 12254346343 017277 0ustar00mxmmxm000000 000000 # dio.tcl -- implements a database abstraction layer. # Copyright 2002-2004 The Apache Software Foundation # 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. # $Id: dio.tcl 1552005 2013-12-18 16:27:15Z mxmanghi $ catch {package require Tclx} package require Itcl ##set auto_path [linsert $auto_path 0 [file dirname [info script]]] namespace eval ::DIO { proc handle {interface args} { set obj \#auto set first [lindex $args 0] if {![lempty $first] && [string index $first 0] != "-"} { set obj [lindex $args 0] set args [lreplace $args 0 0] } uplevel \#0 package require dio_$interface return [uplevel \#0 ::DIO::$interface $obj $args] } ## # DATABASE CLASS ## ::itcl::class Database { constructor {args} { eval configure $args } destructor { close } # # result - generate a new DIO result object for the specified database # interface, with key-value pairs that get configured into the new # result object. # protected method result {interface args} { return [eval uplevel \#0 ::DIO::${interface}Result \#auto $args] } # # quote - given a string, return the same string with any single # quote characters preceded by a backslash # method quote {string} { regsub -all {'} $string {\'} string return $string } # # build_select_query - build a select query based on given arguments, # which can include a table name, a select statement, switches to # turn on boolean AND or OR processing, and possibly # some key-value pairs that cause the where clause to be # generated accordingly # protected method build_select_query {args} { set bool AND set first 1 set req "" set myTable $table set what "*" # for each argument passed us... # (we go by integers because we mess with the index based on # what we find) for {set i 0} {$i < [llength $args]} {incr i} { # fetch the argument we're currently processing set elem [lindex $args $i] switch -- [::string tolower $elem] { "-and" { # -and -- switch to AND-style processing set bool AND } "-or" { # -or -- switch to OR-style processing set bool OR } "-table" { # -table -- identify which table the query is about set myTable [lindex $args [incr i]] } "-select" { # -select - set what [lindex $args [incr i]] } default { # it wasn't -and, -or, -table, or -select... # if the first character of the element is a dash, # it's a field name and a value if {[::string index $elem 0] == "-"} { set field [::string range $elem 1 end] set elem [lindex $args [incr i]] # if it's the first field being processed, append # WHERE to the SQL request we're generating if {$first} { append req " WHERE" set first 0 } else { # it's not the first variable in the comparison # expression, so append the boolean state, either # AND or OR append req " $bool" } # convert any asterisks to percent signs in the # value field regsub -all {\*} $elem {%} elem # if there is a percent sign in the value # field now (having been there originally or # mapped in there a moment ago), the SQL aspect # is appended with a "field LIKE value" if {[::string first {%} $elem] != -1} { append req " $field LIKE [makeDBFieldValue $myTable $field $elem]" } elseif {[regexp {^([<>]) *([0-9.]*)$} $elem _ fn val]} { # value starts with <, or >, then space, # and a something append req " $field$fn$val" } elseif {[regexp {^([<>]=) *([0-9.]*)$} $elem _ fn val]} { # value starts with <= or >=, space, and something. append req " $field$fn$val" } else { # otherwise it's a straight key=value comparison append req " $field=[makeDBFieldValue $myTable $field $elem]" } continue } append req " $elem" } } } return "select $what from $myTable $req" } # # build_insert_query -- given an array name, a list of fields, and # possibly a table name, return a SQL insert statement inserting # into the named table (or the object's table variable, if none # is specified) for all of the fields specified, with their values # coming from the array # protected method build_insert_query {arrayName fields {myTable ""}} { upvar 1 $arrayName array if {[lempty $myTable]} { set myTable $table } set vals [::list] set vars [::list] foreach field $fields { if {![info exists array($field)]} { continue } lappend vars "$field" lappend vals "[makeDBFieldValue $myTable $field $array($field)]" } return "insert into $myTable ([join $vars {,}]) VALUES ([join $vals {,}])" } # # build_update_query -- given an array name, a list of fields, and # possibly a table name, return a SQL update statement updating # the named table (or using object's table variable, if none # is named) for all of the fields specified, with their values # coming from the array # # note that after use a where clause still neds to be added or # you might update a lot more than you bargained for # protected method build_update_query {arrayName fields {myTable ""}} { upvar 1 $arrayName array if {[lempty $myTable]} { set myTable $table } set string [::list] foreach field $fields { if {![info exists array($field)]} { continue } lappend string "$field=[makeDBFieldValue $myTable $field $array($field)]" } return "update $myTable SET [join $string {,}]" } # # lassign_array - given a list, an array name, and a variable number # of arguments consisting of variable names, assign each element in # the list, in turn, to elements corresponding to the variable # arguments, into the named array. From TclX. # protected method lassign_array {list arrayName args} { upvar 1 $arrayName array foreach elem $list field $args { set array($field) $elem } } # # configure_variable - given a variable name and a string, if the # string is empty return the variable name, otherwise set the # variable to the string. # protected method configure_variable {varName string} { if {[lempty $string]} { return [cget -$varName] } configure -$varName $string } # # build_where_key_clause - given a list of one or more key fields and # a corresponding list of one or more key values, construct a # SQL where clause that boolean ANDs all of the key-value pairs # together. # protected method build_key_where_clause {myKeyfield myKey} { ## If we're not using multiple keyfields, just return a simple ## where clause. if {[llength $myKeyfield] < 2} { return " WHERE $myKeyfield = [makeDBFieldValue $table $myKeyfield $myKey]" } # multiple fields, construct it as a where-and set req " WHERE 1 = 1" foreach field $myKeyfield key $myKey { append req " AND $field = [makeDBFieldValue $table $field $key]" } return $req } ## ## makekey -- Given an array containing a key-value pairs and # an optional list of key fields (we use the object's keyfield # if none is specified)... # # if we're doing auto keys, create and return a new key, # otherwise if it's a single key, just return its value # from the array, else if it's multiple keys, return all their # values as a list ## method makekey {arrayName {myKeyfield ""}} { if {[lempty $myKeyfield]} { set myKeyfield $keyfield } if {[lempty $myKeyfield]} { return -code error "No -keyfield specified in object" } upvar 1 $arrayName array ## If we're not using multiple keyfields, we want to check and see ## if we're using auto keys. If we are, create a new key and ## return it. If not, just return the value of the single keyfield ## in the array. if {[llength $myKeyfield] < 2} { if {$autokey} { set array($myKeyfield) [$this nextkey] } else { if {![info exists array($myKeyfield)]} { return -code error \ "${arrayName}($myKeyfield) does not exist" } } return $array($myKeyfield) } ## We're using multiple keys. Return a list of all the keyfield ## values. foreach field $myKeyfield { if {![info exists array($field)]} { return -code error "$field does not exist in $arrayName" } lappend key $array($field) } return $key } method destroy {} { ::itcl::delete object $this } # # string - execute a SQL request and only return a string of one row. # method string {req} { set res [exec $req] $res next -list val $res destroy return $val } # # list - execute a request and return a list of the first element of each # row returned. # method list {req} { set res [exec $req] set list "" $res forall -list line { lappend list [lindex $line 0] } $res destroy return $list } # # array - execute a request and setup an array containing elements # with the field names as the keys and the first row results as # the values # method array {req arrayName} { upvar 1 $arrayName $arrayName set res [exec $req] set ret [$res next -array $arrayName] $res destroy return $ret } # # forall - execute a SQL select and iteratively fill the named array # with elements named with the matching field names, containing the # matching values, executing the specified code body for each, in turn. # method forall {req arrayName body} { upvar 1 $arrayName $arrayName set res [exec $req] $res forall -array $arrayName { uplevel 1 $body } if {[$res error]} { set errinf [$res errorinfo] $res destroy return -code error "Got '$errinf' executing '$req'" } set ret [$res numrows] $res destroy return $ret } # # table_check - internal method to populate the data array with # a -table element containing the table name, a -keyfield element # containing the key field or list of key fields, and a list of # key-value pairs to get set into the data table. # # afterwards, it's an error if -table or -keyfield hasn't somehow been # determined. # protected method table_check {list {tableVar myTable} {keyVar myKeyfield}} { upvar 1 $tableVar $tableVar $keyVar $keyVar set data(-table) $table set data(-keyfield) $keyfield ::array set data $list if {[lempty $data(-table)]} { return -code error -errorcode missing_table "-table not specified in DIO object" } set $tableVar $data(-table) if {[lempty $data(-keyfield)]} { return -code error -errorcode missing_keyfield "-keyfield not specified in DIO object" } set $keyVar $data(-keyfield) } # # key_check - given a list of key fields and a list of keys, it's # an error if there aren't the same number of each, and if it's # autokey, there can't be more than one key. # protected method key_check {myKeyfield myKey} { if {[llength $myKeyfield] < 2} { return } if {$autokey} { return -code error "Cannot have autokey and multiple keyfields" } if {[llength $myKeyfield] != [llength $myKey]} { return -code error "Bad key length." } } # # fetch - given a key (or list of keys) an array name, and some # extra key-value arguments like -table and -keyfield, fetch # the key into the array # method fetch {key arrayName args} { table_check $args key_check $myKeyfield $key upvar 1 $arrayName $arrayName set req "select * from $myTable" append req [build_key_where_clause $myKeyfield $key] set res [$this exec $req] if {[$res error]} { set errinf [$res errorinfo] $res destroy return -code error "Got '$errinf' executing '$req'" } set rows_found [expr [$res numrows] > 0] $res next -array $arrayName $res destroy return $rows_found } # # store - given an array containing key-value pairs and optional # arguments like -table and -keyfield, insert or update the # corresponding table entry. # method store {arrayName args} { table_check $args upvar 1 $arrayName $arrayName $arrayName array if {[llength $myKeyfield] > 1 && $autokey} { return -code error "Cannot have autokey and multiple keyfields" } set key [makekey $arrayName $myKeyfield] set req "select * from $myTable" append req [build_key_where_clause $myKeyfield $key] set res [exec $req] if {[$res error]} { set errinf [$res errorinfo] $res destroy return -code error "Got '$errinf' executing '$req'" } set numrows [$res numrows] $res destroy if {$numrows} { $this update $arrayName {*}$args } else { $this insert $myTable $arrayName } return 1 } # # update - a pure update, without store's somewhat clumsy # efforts to see if it needs to be an update rather than # an insert # method update {arrayName args} { table_check $args upvar 1 $arrayName $arrayName $arrayName array set key [makekey $arrayName $myKeyfield] set fields [::array names array] set req [build_update_query array $fields $myTable] append req [build_key_where_clause $myKeyfield $key] set res [exec $req] if {[$res error]} { set errinf [$res errorinfo] $res destroy return -code error "Got '$errinf' executing '$req'" } # this doesn't work on postgres, you've got to use cmdRows, # we need to figure out what to do with this set numrows [$res numrows] $res destroy return $numrows } # # update_with_explicit_key - an update where the key is specified # as an argument to the proc rather than being dug out of the array # # this is a kludge until we come up with a better way to # solve the problem of updating a row where we actually # want to change the value of a key field # method update_with_explicit_key {key arrayName args} { table_check $args key_check $myKeyfield $key upvar 1 $arrayName $arrayName $arrayName array set fields [::array names array] set req [build_update_query array $fields $myTable] append req [build_key_where_clause $myKeyfield $key] set res [exec $req] if {[$res error]} { set errinf [$res errorinfo] $res destroy return -code error "Got '$errinf' executing '$req'" } # this doesn't work on postgres, you've got to use cmdRows, # we need to figure out what to do with this set numrows [$res numrows] $res destroy return $numrows } # # insert - a pure insert, without store's somewhat clumsy # efforts to see if it needs to be an update rather than # an insert -- this shouldn't require fields, it's broken # method insert {table arrayName} { upvar 1 $arrayName $arrayName $arrayName array set req [build_insert_query array [::array names array] $table] set res [exec $req] if {[$res error]} { set errinf [$res errorinfo] $res destroy return -code error "Got '$errinf' executing '$req'" } $res destroy return 1 } # # delete - delete matching record from the specified table # method delete {key args} { table_check $args set req "DELETE FROM $myTable" append req [build_key_where_clause $myKeyfield $key] set res [exec $req] if {[$res error]} { set errinf [$res errorinfo] $res destroy return -code error "Got '$errinf' executing '$req'" } set n_deleted_rows [$res numrows] $res destroy return $n_deleted_rows } # # keys - return all keys in a table # method keys {args} { table_check $args set req "select * from $myTable" set obj [$this exec $req] set keys "" $obj forall -array a { lappend keys [makekey a $myKeyfield] } $obj destroy return $keys } # # search - construct and execute a SQL select statement using # build_select_query style and return the result handle. # method search {args} { set req [eval build_select_query $args] return [exec $req] } # # count - return a count of the specified (or current) table. # method count {args} { # table_check returns an error if either a keyfield or a table were not set. # In order to count the rows in a table we don't need a keyfield, so we check # if table_check is returning missing_table and in case we rethrow the error, # otherwise we continue if {[catch {table_check $args} e]} { if {$e != "missing_keyfield"} { return -code error -errorcode $e "error in table_check ($e)" } } return [string "select count(*) from $myTable"] } method makeDBFieldValue {table_name field_name val} { return "'[quote $val]'" } method registerSpecialField {table_name field_name type} { set specialFields(${table_name}@${field_name}) $type } ## ## These are methods which should be defined by each individual database ## interface class. ## method open {args} {} method close {args} {} method exec {args} {} method nextkey {args} {} method lastkey {args} {} method now {} {} ## ## Functions to get and set public variables. ## method interface {{string ""}} { return [configure_variable interface $string] } method errorinfo {{string ""}} { return [configure_variable errorinfo $string] } method db {{string ""}} { return [configure_variable db $string] } method table {{string ""}} { return [configure_variable table $string] } method keyfield {{string ""}} { return [configure_variable keyfield $string] } method autokey {{string ""}} { return [configure_variable autokey $string] } method sequence {{string ""}} { return [configure_variable sequence $string] } method user {{string ""}} { return [configure_variable user $string] } method pass {{string ""}} { return [configure_variable pass $string] } method host {{string ""}} { return [configure_variable host $string] } method port {{string ""}} { return [configure_variable port $string] } protected variable specialFields public variable interface "" public variable errorinfo "" public variable db "" public variable table "" public variable sequence "" public variable user "" public variable pass "" public variable host "" public variable port "" public variable keyfield "" { if {[llength $keyfield] > 1 && $autokey} { return -code error "Cannot have autokey and multiple keyfields" } } public variable autokey 0 { if {[llength $keyfield] > 1 && $autokey} { return -code error "Cannot have autokey and multiple keyfields" } } } ; ## ::itcl::class Database # # DIO Result object # ::itcl::class Result { constructor {args} { eval configure $args } destructor { } method destroy {} { ::itcl::delete object $this } # # configure_variable - given a variable name and a string, if the # string is empty return the variable name, otherwise set the # variable to the string. # protected method configure_variable {varName string} { if {[lempty $string]} { return [cget -$varName] } configure -$varName $string } # # lassign_array - given a list, an array name, and a variable number # of arguments consisting of variable names, assign each element in # the list, in turn, to elements corresponding to the variable # arguments, into the named array. From TclX. # protected method lassign_array {list arrayName args} { upvar 1 $arrayName array foreach elem $list field $args { set array($field) $elem } } # # seek - set the current row ID (our internal row cursor, if you will) # to the specified row ID # method seek {newrowid} { set rowid $newrowid } method cache {{size "all"}} { set cacheSize $size if {$size == "all"} { set cacheSize $numrows } ## Delete the previous cache array. catch {unset cacheArray} set autostatus $autocache set currrow $rowid set autocache 1 seek 0 set i 0 while {[next -list list]} { if {[incr i] >= $cacheSize} { break } } set autocache $autostatus seek $currrow set cached 1 } # # forall -- walk the result object, executing the code body over it # method forall {type varName body} { upvar 1 $varName $varName set currrow $rowid seek 0 while {[next $type $varName]} { uplevel 1 $body } set rowid $currrow return } method next {type {varName ""}} { set return 1 if {![lempty $varName]} { upvar 1 $varName var set return 0 } catch {unset var} set list "" ## If we have a cached result for this row, use it. if {[info exists cacheArray($rowid)]} { set list $cacheArray($rowid) } else { set list [$this nextrow] if {[lempty $list]} { if {$return} { return } set var "" return 0 } if {$autocache} { set cacheArray($rowid) $list } } incr rowid switch -- $type { "-list" { if {$return} { return $list } else { set var $list } } "-array" { if {$return} { foreach field $fields elem $list { lappend var $field $elem } return $var } else { eval lassign_array [list $list] var $fields } } "-keyvalue" { foreach field $fields elem $list { lappend var -$field $elem } if {$return} { return $var } } default { incr rowid -1 return -code error \ "In-valid type: must be -list, -array or -keyvalue" } } return [expr [lempty $list] == 0] } method resultid {{string ""}} { return [configure_variable resultid $string] } method fields {{string ""}} { return [configure_variable fields $string] } method rowid {{string ""}} { return [configure_variable rowid $string] } method numrows {{string ""}} { return [configure_variable numrows $string] } method error {{string ""}} { return [configure_variable error $string] } method errorcode {{string ""}} { return [configure_variable errorcode $string] } method errorinfo {{string ""}} { return [configure_variable errorinfo $string] } method autocache {{string ""}} { return [configure_variable autocache $string] } public variable resultid "" public variable fields "" public variable rowid 0 public variable numrows 0 public variable error 0 public variable errorcode 0 public variable errorinfo "" public variable autocache 1 protected variable cached 0 protected variable cacheSize 0 protected variable cacheArray } ; ## ::itcl::class Result } ; ## namespace eval DIO package provide DIO 1.0 rivet-2.3.5/doc/html/html_calendar.html000644 001750 001750 00000007434 13200160530 017510 0ustar00mxmmxm000000 000000 HtmlCalendar

Name

HtmlCalendar — Concrete class derived from XmlCalendar

Synopsis

HtmlCalendar calendar_name ?-option1 option_list? ?-option2 option_list? ?...?

Concrete XmlCalendar class for printing html calendar tables. The markup of the class is xhtml compliant and prints a code fragment for inclusion in a webpage. The following is the class definition.

::itcl::class HtmlCalendar {
    inherit XmlCalendar
    
    constructor {args} {XmlCalendar::constructor $args} {
    $this configure -container    table \
                    -header       thead \
                    -body         tbody \
                    -banner       tr    \
                    -banner_month {th colspan 3 style "text-align: right;"} \
                    -banner_year  {th colspan 4 style "text-align: left;"}  \
                    -weekdays     tr    \
                    -weekday_cell th    \
                    -days_row     tr    \
                    -days_cell    td 
    }
}

A sample output from HtmlCalendar (with some styling)

rivet-2.3.5/tests/broken.test000644 001750 001750 00000001324 11670231317 015642 0ustar00mxmmxm000000 000000 # $Id: broken.test 1212149 2011-12-08 21:57:35Z mxmanghi $ set testfilename1 broken.rvt ::tcltest::test broken-1.1 {error page test} { apachetest::start {} {} { catch { set page [::http::geturl "${urlbase}$testfilename1"] set match [string trim [::http::data $page]] } } set match } {

invalid command name "broken" while executing "broken" (in namespace eval "::request" script line 5) invoked from within "namespace eval request { puts -nonewline "" # non-existent command broken puts -nonewline " " }"

OUTPUT BUFFER:

namespace eval request { puts -nonewline "" # non-existent command broken puts -nonewline " " }
} rivet-2.3.5/rivet/rivet-tcl/parray_table.tcl000644 001750 001750 00000002532 12215032535 020531 0ustar00mxmmxm000000 000000 ## ## -- parray_table ?pattern? ?html-attibutes? ## ## tablearray prints an array data in HTML table ## This is good when a table is enough to print consistently ## related data. ## ## arrayName - Name of the array to display ## pattern - Wildcard pattern of variables. An empty string ## is tantamout a "*" and prints the whole array ## html-attributes - ## list attribute-value pairs to be given ## to the element tag ## ## $Id: parray_table.tcl 1523202 2013-09-14 10:07:25Z mxmanghi $ ## ## namespace eval ::rivet { proc parray_table {arrayName {pattern "*"} {htmlAttributes ""}} { upvar 1 $arrayName array if {![array exists array]} { return -code error "\"$arrayName\" isn't an array" } puts -nonewline stdout "" puts stdout "" foreach name [lsort [array names array $pattern]] { puts stdout [format "" [::rivet::escape_sgml_chars $name] \ [::rivet::escape_sgml_chars $array($name)]] } puts stdout "
$arrayName
%s%s
" } } rivet-2.3.5/tests/apachetest/apachetest.tcl000644 001750 001750 00000027112 12764370173 020443 0ustar00mxmmxm000000 000000 # apachetest.tcl -- Tcl-based Apache test suite # Copyright 2001-2005 The Apache Software Foundation # 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. # $Id: apachetest.tcl 1759926 2016-09-08 23:12:59Z mxmanghi $ # This test suite provides a means to create configuration files, and # start apache with user-specified options. All it needs to run is # the name of the Apache executable, which must, however, be compiled # with the right options. set auto_path [linsert $auto_path 0 [file dirname [info script]]] package require Tclx package provide apachetest 0.1 #package require http 2.4.5 source [file join [file dirname [info script]] http.tcl] namespace eval apachetest { set debug 1 # name of the apache binary, such as /usr/sbin/httpd variable binname "" if ![info exists ::httpd_version ] { puts stderr "Please create httpd_version variable in global namespace" exit 1 } variable httpd_version $::httpd_version # this file should be in the same directory this script is. variable templatefile [file join [file dirname [info script]] \ template.conf.2.tcl] } # apachetest::need_modules -- # # Tell the test suite which modules we *need* to have. The test # suite will then check to see if these are either 1) compiled # into the server or 2) loaded in its configuration file. # # Arguments: # args # # Side Effects: # Sets up the rest of the apachetest tools to find the needed # modules. # # Results: # None. proc apachetest::need_modules { modlist } { variable module_assoc foreach module_pair $modlist { set module_assoc([lindex $module_pair 0]) [lindex $module_pair 1] } } # apachetest::connect -- # # Attempt to open a socket to the web server we are using in our # tests. Try for 10 seconds before giving up. # # Arguments: # None. proc apachetest::connect { } { set starttime [clock seconds] set diff 0 # We try for 10 seconds. while { $diff < 10 } { if { ! [catch { set sk [socket localhost 8081] } err]} { close $sk return } set diff [expr {[clock seconds] - $starttime}] } } # apachetest::start -- # # Start the web server in the background. After running the # script specified, stop the server. # # Arguments: # options - command line options to pass to the web server. # conftext - text to insert into test.conf. # code - code to run. # # Side Effects: # Runs 'code' in the global namespace. # # Results: # None. proc apachetest::start { options conftext code } { variable serverpid 0 variable binname variable debug variable httpd_version set fn [file join [pwd] test.conf] catch {file delete -force $fn} set fl [open $fn w] puts $fl [uplevel [list subst $conftext]] close $fl #OpenBSD related workaround, their stock apache tries to chroot by default #have to add -u to the arguments to prevent this catch {exec uname} uname_str if {[string equal $uname_str OpenBSD]} { set server_args "-u -X -f" } else { set server_args [list -X -f] } # There has got to be a better way to do this, aside from waiting. set serverpid [eval exec $binname $server_args \ [file join [pwd] server.conf] $options >& apachelog.txt &] apachetest::connect if { $debug > 0 } { puts "Apache started as PID $serverpid" } if { [catch { uplevel $code } err] } { } # Kill and wait are the only reasons we need TclX. # apache2 binary started with -X reacts to SIGQUIT and ignores TERM kill QUIT $serverpid catch { set waitres [wait $serverpid] if { $debug > 0 } { puts $waitres } } } # startserver - start the server with 'options'. proc apachetest::startserver { args } { variable binname variable debug if { [catch { if { $debug } { puts "$binname -X -f [file join [pwd] server.conf] [concat $args]" } set serverpid [eval exec $binname -X -f "[file join [pwd] server.conf]" [concat $args]] } err] } { puts "$err" } } # getbinname - get the name of the apache binary, and check to make # sure it's ok. The user should supply this parameter. proc apachetest::getbinname { argv } { variable binname set binname [lindex $argv 0] if { $binname == "" || ! [file executable $binname] } { error "Please supply the full name and path of the Apache executable on the command line." } return $binname } # get the modules that are compiled into Apache directly, and return # the XXX_module name. Check also for the existence of mod_so, which # we need to load the shared object in the directory above... proc apachetest::getcompiledin { binname } { variable module_assoc set bin [open [list | "$binname" -l] r] set compiledin [read $bin] close $bin set modlist [split $compiledin] set compiledin [list] set mod_so_present 0 foreach entry $modlist { if { [regexp {(.*)\.c$} $entry match modname] } { if { $modname == "mod_so" } { set mod_so_present 1 } if { [info exists module_assoc($modname)] } { lappend compiledin $module_assoc($modname) } } } if { $mod_so_present == 0 } { error "We need mod_so in Apache to run these tests" } return $compiledin } # find the httpd.conf file proc apachetest::gethttpdconf { binname } { set bin [open [list | $binname -V] r] set options [read $bin] close $bin regexp {SERVER_CONFIG_FILE="(.*?)"} "$options" match filename if { ! [file exists $filename] } { # see if we can find something by combining HTTP_ROOT + SERVER_CONFIG_FILE regexp {HTTPD_ROOT="(.*?)"} "$options" match httpdroot set completename [file join $httpdroot $filename] if { ! [file exists $completename] } { error "neither '$filename' or '$completename' exists" } return $completename } return $filename } # apachetest::getallincludes -- # # Reads the conf file, and returns its text, plus the text in # all the files that it Includes itself. # # Arguments: # conffile - file to read. # # Side Effects: # None. # # Results: # Text of configuration files. proc apachetest::getallincludes { conffile } { if [file exists $conffile] { set fl [open $conffile r] set data [read $fl] close $fl set newdata {} foreach line [split $data \n] { # Look for Include lines. if { [regexp -line {^[^\#]*Include +(.*)} $line match file] } { puts "including files from $file" set file [string trim $file] # Include directives accept as argument a file, a directory # or a glob-style file matching pattern. Patterns usually match # many files, but are not directories, so we have to handle # all these 3 cases # we use the glob command to tell whether we are dealing with # a pure file expression or a matching pattern set matched_files [glob -nocomplain $file] set matched_files_n [llength $matched_files] if {$matched_files_n > 1} { foreach fl $matched_files { puts "including $fl" if [file exists $fl] { append newdata [getallincludes $fl] } } } elseif {$matched_files_n == 1} { set file $matched_files if { [file isdirectory $file] } { foreach fl [glob -nocomplain [file join $file *]] { puts "including $fl" if [file exists $fl] { append newdata [getallincludes $fl] } } } else { append newdata [getallincludes $file] } } } } append data $newdata return $data } else { return } } # apachetest::getloadmodules -- # # Get the LoadModule lines for modules that we want to load. # # Arguments: # conffile - the name of the conf file to read. # needtoget - list of modules that we want to load. # # Side Effects: # None. # # Results: # Returns a string suitable for inclusion in a conf file. proc apachetest::getloadmodules { conffile needtoget } { puts "checking $conffile " set confdata [getallincludes $conffile] set loadline [list] regexp -line {^[^#]*(ServerRoot[\s]?[\"]?)([^\"]+)()([\"]?)} $confdata \ match sub1 server_root_path sub2 foreach mod $needtoget { # Look for LoadModule lines. puts -nonewline "check conf line for $mod module..." flush stdout if { ! [regexp -line "^\[^\#\]*(LoadModule\\s+$mod\\s+.+)\$"\ $confdata match line] } { error "No LoadModule line for $mod\!" } else { puts ok set raw_path [join [lrange [split $line { }] 2 end]] #trimming leading whitespaces set path [string trimleft $raw_path] if ![string equal [file pathtype $line] "absolute"] { set absolute_path [file join $server_root_path $path] lappend loadline "[join [lrange [split $line " "] 0 1]] $absolute_path" } else { lappend loadline $line } } } return [join $loadline "\n"] } # Compare what's compiled in with what we need. proc apachetest::determinemodules { binname } { variable module_assoc set compiledin [lsort [getcompiledin $binname]] set conffile [gethttpdconf $binname] foreach {n k} [array get module_assoc] { lappend needed $k } set needed [lsort $needed] set needtoget [list] foreach mod $needed { if { [lsearch $compiledin $mod] == -1 } { lappend needtoget $mod } } if { $needtoget == "" } { return "" } else { return [getloadmodules $conffile $needtoget] } } # apachetest::makeconf -- # # Creates a config file and writes it to disk. # # Arguments: # outfile - the file to create/write to. # extra - extra config options to add. # # Side Effects: # Creates a new config file. # # Results: # None. proc apachetest::makeconf { outfile {extra ""} } { variable binname variable templatefile set CWD [pwd] #getting uid and gid of user catch {exec id} raw_string # username and group no longer needed. User and Group directives removed from # main conffile template (#Bug 53396) # set username [lindex [regexp -inline {(uid=)([\d]+)(\()([^\)]+)(\))} $raw_string] 4] # set group [lindex [regexp -inline {(gid=)([\d]+)(\()([^\)]+)(\))} $raw_string] 4] # replace with determinemodules set LOADMODULES [determinemodules $binname] puts "reading template from $templatefile" set fl [open [file join . $templatefile] r] set template [read $fl] append template $extra close $fl puts $template set out [subst $template] set of [open $outfile w] puts $of "$out" close $of } rivet-2.3.5/rivet/rivet-tcl/load_response.tcl000644 001750 001750 00000001664 11670231317 020731 0ustar00mxmmxm000000 000000 ### ## ## load_response ?arrayName? ## Load any form variables passed to this page into an array. ## ## arrayName - Name of the array to set. Default is 'response'. ## ## $Id: load_response.tcl 1212149 2011-12-08 21:57:35Z mxmanghi $ ## ### namespace eval ::rivet { proc load_response {{arrayName response}} { upvar 1 $arrayName response foreach {var elem} [::rivet::var all] { if {[info exists response(__$var)]} { # we have seen var multiple times already, add to the list lappend response($var) $elem } elseif {[info exists response($var)]} { # second occurence of var, convert response(var) list: set response($var) [list $response($var) $elem] set response(__$var) "" } else { # first time seeing this var set response($var) $elem } } } } rivet-2.3.5/tclconfig/README.txt000644 001750 001750 00000001454 11220500575 015765 0ustar00mxmmxm000000 000000 These files comprise the basic building blocks for a Tcl Extension Architecture (TEA) extension. For more information on TEA see: http://www.tcl.tk/doc/tea/ This package is part of the Tcl project at SourceForge, and latest sources should be available there: http://tcl.sourceforge.net/ This package is a freely available open source package. You can do virtually anything you like with it, such as modifying it, redistributing it, and selling it either in whole or in part. CONTENTS ======== The following is a short description of the files you will find in the sample extension. README.txt This file install-sh Program used for copying binaries and script files to their install locations. tcl.m4 Collection of Tcl autoconf macros. Included by a package's aclocal.m4 to define TEA_* macros. rivet-2.3.5/src/request/apache_request.h000644 001750 001750 00000010450 12323561775 017752 0ustar00mxmmxm000000 000000 #ifndef _APACHE_REQUEST_H #define _APACHE_REQUEST_H #include "httpd.h" #include "http_config.h" #include "http_core.h" #include "http_log.h" #include "http_main.h" #include "http_protocol.h" #include "util_script.h" #ifdef SFIO #include "sfio.h" /* sfio 2000 changed _stdopen to _stdfdopen */ #if SFIO_VERSION >= 20000101L #define _stdopen _stdfdopen #endif extern Sfio_t* _stdopen _ARG_((int, const char*)); /*1999*/ #undef FILE #define FILE Sfio_t #undef fwrite #define fwrite(p,s,n,f) sfwrite((f),(p),(s)*(n)) #undef fseek #define fseek(f,a,b) sfseek((f),(a),(b)) #undef ap_pfdopen #define ap_pfdopen(p,q,r) _stdopen((q),(r)) #undef ap_pfclose #define ap_pfclose(p,q) sfclose(q) #endif /*SFIO*/ typedef struct ApacheUpload ApacheUpload; typedef struct _ApacheRequest { //table *parms; apr_table_t *parms; ApacheUpload *upload; int status; int parsed; int post_max; int disable_uploads; int (*upload_hook)(void *ptr, char *buf, int len, ApacheUpload *upload); void *hook_data; const char* temp_dir; char* raw_post; /* Raw post data. */ request_rec *r; int nargs; } ApacheRequest; struct ApacheUpload { ApacheUpload *next; char *filename; char *name; char *tempname; //table *info; apr_table_t *info; apr_file_t *fp; long size; ApacheRequest *req; }; #ifndef strEQ #define strEQ(s1,s2) (!strcmp((s1),(s2))) #endif #ifndef strEQN #define strEQN(s1,s2,n) (!strncmp((s1),(s2),(n))) #endif #ifndef strcaseEQ #define strcaseEQ(s1,s2) (!strcasecmp((s1),(s2))) #endif #ifndef strncaseEQ #define strncaseEQ(s1,s2,n) (!strncasecmp((s1),(s2),(n))) #endif #define DEFAULT_TABLE_NELTS 10 #define DEFAULT_ENCTYPE "application/x-www-form-urlencoded" #define DEFAULT_ENCTYPE_LENGTH 33 #define MULTIPART_ENCTYPE "multipart/form-data" #define MULTIPART_ENCTYPE_LENGTH 19 #define TEXT_XML_ENCTYPE "text/xml" #define TEXT_XML_ENCTYPE_LENGTH 8 #ifdef __cplusplus extern "C" { #endif ApacheRequest* ApacheRequest_new(apr_pool_t *); ApacheRequest* ApacheRequest_init(ApacheRequest* req, request_rec *r); /* int ApacheRequest_save_post_data(request_rec *r, int flag); char *ApacheRequest_fetch_post_data(request_rec *r); */ int ApacheRequest_parse_multipart(ApacheRequest *req,const char* ct); int ApacheRequest_parse_urlencoded(ApacheRequest *req); char *ApacheRequest_script_name(ApacheRequest *req); char *ApacheRequest_script_path(ApacheRequest *req); const char *ApacheRequest_param(ApacheRequest *req, const char *key); apr_array_header_t *ApacheRequest_params(ApacheRequest *req, const char *key); char *ApacheRequest_params_as_string(ApacheRequest *req, const char *key); int ApacheRequest___parse(ApacheRequest *req); #define ApacheRequest_parse(req) \ ((req)->status = (req)->parsed ? (req)->status : ApacheRequest___parse(req)) apr_table_t *ApacheRequest_query_params(ApacheRequest *req, apr_pool_t *p); apr_table_t *ApacheRequest_post_params(ApacheRequest *req, apr_pool_t *p); apr_table_t *ApacheRequest_query_params(ApacheRequest *req, apr_pool_t *p); apr_table_t *ApacheRequest_post_params(ApacheRequest *req, apr_pool_t *p); apr_file_t *ApacheRequest_tmpfile(ApacheRequest *req, ApacheUpload *upload); ApacheUpload *ApacheUpload_new(ApacheRequest *req); ApacheUpload *ApacheUpload_find(ApacheUpload *upload, char *name); #define ApacheRequest_upload(req) \ (((req)->parsed || (ApacheRequest_parse(req) == OK)) ? (req)->upload : NULL) #define ApacheUpload_FILE(upload) ((upload)->fp) #define ApacheUpload_size(upload) ((upload)->size) #define ApacheUpload_info(upload, key) \ apr_table_get((upload)->info, (key)) #define ApacheUpload_type(upload) \ ApacheUpload_info((upload), "Content-Type") #define ApacheRequest_set_post_max(req, max) ((req)->post_max = (max)) #define ApacheRequest_set_temp_dir(req, dir) ((req)->temp_dir = (dir)) #define ApacheRequest_get_raw_post(req) ((req)->raw_post) char *ApacheUtil_expires(apr_pool_t *p, char *time_str, int type); #define EXPIRES_HTTP 1 #define EXPIRES_COOKIE 2 char *ApacheRequest_expires(ApacheRequest *req, char *time_str); #ifdef __cplusplus } #endif #define REQ_ERROR APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, APR_EGENERAL, req->r #define REQ_INFO APLOG_MARK, APLOG_INFO, APR_EGENERAL, req->r #ifdef REQDEBUG #define REQ_DEBUG(a) (a) #else #define REQ_DEBUG(a) #endif #endif /* _APACHE_REQUEST_H */ rivet-2.3.5/doc/example.tcl000644 001750 001750 00000001742 07416050616 015233 0ustar00mxmmxm000000 000000 # we have complete access to the interpreter here, so it is best to # run per-page code in a namespace, just like we do with .rvt pages. proc getcode { filename } { set fl [ open $filename r ] set sourcecode [ read $fl ] close $fl regsub -all "&" "$sourcecode" "\\&" sourcecode regsub -all "<" "$sourcecode" "\\<" sourcecode regsub -all ">" "$sourcecode" "\\>" sourcecode return $sourcecode } if { ! [ info exists header ] } { set header { .tcl example } } if { ! [ info exists footer ] } { set footer { } } namespace eval request { hgetvars puts $header puts {

This is an example of a .tcl file being processed in Rivet

Here is the source code:


    }
    puts [ getcode $ENVS(SCRIPT_FILENAME) ]
    puts {
	

} puts $footer }rivet-2.3.5/doc/html/form_package.html000644 001750 001750 00000122315 13200160530 017325 0ustar00mxmmxm000000 000000 form

Name

form — a Tcl command object for creating HTML forms

Synopsis

form form_name ?-option1 value_1? ?-option2 value_2? ?...?

creates and returns a new Tcl command named form_name.

Options

-method ?post|get?
The http method for sending the form data back to the server. Possible values are get or post
-name ?form_name?
a name for the form being created: this value becomes the value of the attribute 'name' in the <form> tag.
-defaults ?default_values?
an array of default values to be assigned to the fields of the form. Every name in the array is matched with an input field, when a given field gets added to the form it is initialized with the value of the corresponding variable in the array. This option works well in conjuction with the load_response command of Rivet when default values come from another form.
-action ?URL?
The URL the data are being sent to. If no ?-action? switch is specified the data are sent to the form's URL.

Form Object Commands

Form object commands follow the usual syntax of Tcl commands with a ?subcommand? argument playing the role of a switch among various functionalities of the command. Form objects also need the ?name? parameter which is to become the value of the 'name' attribute in an input field. This argument is the key that has to be used by the server-side script to retrieve the input field value.

form_object subcommand ?name? ?-option1 value1? ?-option2 value2? ?...?

Options passed to a subcommand are copied into the tag as attribute="value" pairs. Some subcommands (e.g. form, radiobuttons and checkboxes) treat specific options in a way that fits the specific organization and function of these fields.

Exceptions to this general syntax are the field and end subcommands. field is an abstract input field creation method and requires an additional parameter specifiyng the type of field to create. Every concrete input field generation command uses this subcommand internally to print the final html.

Subcommands

start ?name? ?-method get | post? ?-name form_name? ?-defaults default_values? ?-action URL? ?args?
Print the <form> tag with all its attributes. This command must be called as first in the form generation process. The following is a sample of code creating a form named 'formname' whose data will be sent via the GET method. Initial form fields values will be obtained from array response
form myform -defaults response -method get -name formname
myform start
myform text	  text_entry -size 20
myform select option_selected -values {opt1 opt2 opt3 opt4}
myform submit submit -value Search
myform end
The code prints a form that sends a text entry content and the option value associated with a radiobutton. The URL of the server script is the same that created the form. Use the ?-url? option to specify a different url.
Options
-method ?post|get?
The method to be used to encode the form data. Possible values are get or post
-name ?form_name?
a name for the form being generated: this value becomes the value of the attribute 'name' in the <form> tag.
-defaults ?default_values?
an array of default values to be assigned to the fields of the form. Every name in the array is matched with an input field, when a given field gets added to the form it is initialized with the value of the corresponding variable in the array. This option works well in conjuction with the load_response command of Rivet when default values come from another form.
-action ?URL?
The URL the data will be sent to. If no ?-action? switch is specified the data are sent to the form's URL.
end
Print the </form> closing tag. This command must be called last in the form generation process
field ?name? ?type? ?args?
Print a field of the given ?type? and ?name?, including any default key-value pairs defined for this field type and optional key-value pairs included with the statement
Options
-opt1 ?val1?
Option description
radiobuttons ?name? ?-values values? ?-labels labels? ?args?
the radiobutton creates a whole radiobutton group with the values and labels specified in the argument list. If no ?-labels? switch is passed to the subcommand the values are printed as labels of the radiobutton.
Options
-values ?values_list?
List of values associated with the radiobuttons to be displayed
-labels ?labels_list?
List of labels to be printed with every radiobutton. There must be a label for every radiobutton
Example:
form myform -defaults response -method get -name formname
myform start
myform text text_entry -size 20
myform radiobuttons fruit -values {big medium small} \
              -labels {Watermelon Orange Strawberry} \
              -class myradiobclass
myform submit submit -value Search
myform end
will print the following HTML code.
<input type="radio" name="fruit" class="myradiobclass" value="big" />Watermelon
<input type="radio" name="fruit" class="myradiobclass" value="medium" />Orange
<input type="radio" name="fruit" class="myradiobclass" value="small" />Strawberry
if the response array has a variable for the name 'fruit' the corresponding radiobutton field is automatically checked. The options ?values? and ?labels? are used internally and don't get into the tag attributes. If a ?labels? option is not given, labels are assigned using the ?values? list.
checkbox ?name? ?-label label? ?-value value? ?args?
The checkbox subcommand emits a checkbox type input field with the name, label and value attributes set according to the parameters passed to the subcommand.
Example:
form myform -defaults response -method get -name formname -action <form_url>
myform start
myform checkbox options -value opt1 -label "Option 1"
myform checkbox options -value opt2 -label "Option 2"
myform checkbox options -value opt3 -label "Option 3"
myform checkbox options -value opt4 -label "Option 4"
myform submit save_tps -value "Send Options"
myform end
myform destroy
Provided opt2 was in response array (in the list valued 'options' variable) that initialized the form, the output would look like this
<form  action="<form_url>" method="get" name="formname">
<input type="checkbox" name="options"  id="autogen_1" label="Option 1" value="sopt1" /><label for="autogen_1">Option 1</label>
<input type="checkbox" name="options"  id="autogen_2" label="Option 2" value="sopt2" /><label for="autogen_2">Option 2</label>
<input type="checkbox" name="options"  id="autogen_3" label="Option 3" value="sopt3" /><label for="autogen_3">Option 3</label>
<input type="checkbox" name="options"  id="autogen_4" label="Option 4" value="sopt4" /><label for="autogen_4">Option 4</label>
<input type="submit" name="submit"  value="Send" />
</form>
checkboxes ?name? ?-labels labels_list? ?-values values_list? ?args?
The checkboxes is an extended form of the checkbox subcommand. checkboxes prints as many checkboxes as the number of elements in the ?labels_list? argument
Options
-values ?values_list?
List of values associated with the checkboxes to be displayed
-labels ?labels_list?
List of labels to be printed with every checkbox. There must be a label for every checkbox
Example:
form myform -defaults response -method post -action <form_url>
myform start
myform checkboxes options -values {opt1 opt2 opt3 opt4} -labels {"Option 1" "Option 2" "Option 3" "Option 4"}
myform submit save_tps -value "Send Options"
myform end
myform destroy
will print the following HTML code
<form  action="<form_url>" method="post">
<input type="checkbox" name="options"  id="autogen_1" label="Option 1" value="opt1" /><label for="autogen_1">Option 1</label>
<input type="checkbox" name="options"  id="autogen_2" label="Option 2" value="opt2" /><label for="autogen_2">Option 2</label>
<input type="checkbox" name="options"  id="autogen_3" label="Option 3" value="opt3" /><label for="autogen_3">Option 3</label>
<input type="checkbox" name="options"  id="autogen_4" label="Option 4" value="opt4" /><label for="autogen_4">Option 4</label>
<input type="submit" name="save_tps"  value="Send Options" />
</form>
password ?name? ?args?
Same as text, but the input is obfuscated so as not to reveal the text being typed
hidden ?name? ?args?
hidden input element: typicall embedded in a form in order to pass status variables.
submit ?name? ?args?
emits the code for a classical HTML submit button. Example: the following code
	form myform -defaults response -method get -name feedsearch
	myform start
	myform submit submit -value Search
Would emit a form like this
	<form...>
	<input type="submit" name="submit" value="Search" /> 
	</form>
button ?name? ?args?
emits the code for a button field having ?name? as name
reset ?name? ?args?
Classical HTML reset button that resets the input fields back to their initial values
image ?name? ?args?
Emits an image input field
radio ?name? ?args?
Emits a radiobutton input field
color ?name? ?args?
Emits an HTML 5 "color" form field
date ?name? ?args?
Emits an HTML 5 "date" form field
datetime ?name? ?args?
Emits an HTML 5 "datetime" form field
datetime_local ?name? ?args?
Emits an HTML 5 "datetime_local" form field
email ?name? ?args?
Emits an HTML 5 "email" form field
file ?name? ?args?
Emits an HTML 5 "file" form field
month ?name? ?args?
Emits an HTML 5 "month" form field
number ?name? ?args?
Emits an HTML 5 "number" form field
range ?name? ?args?
Emits an HTML 5 "range" form field
search ?name? ?args?
Emits an HTML 5 "search" form field
tel ?name? ?args?
Emits an HTML 5 "tel" form field
time ?name? ?args?
Emits an HTML 5 "time" form field
url ?name? ?args?
Emits an HTML 5 "url" form field
week ?name? ?args?
Emits an HTML 5 "week" form field
rivet-2.3.5/doc/html/images/scrollup.png000644 001750 001750 00000000541 13200160527 017641 0ustar00mxmmxm000000 000000 PNG  IHDR _w(gAMA asRGB cHRMz&u0`:pQ<PLTE5us0tRNS@fbKGDH pHYsHHFk>0IDATc```d! l$Ag"\@Ɔ B (hi6P%tEXtdate:create2012-10-01T18:29:07+02:00j%tEXtdate:modify2004-02-19T05:50:42+01:00%:,IENDB`rivet-2.3.5/tests/docroot2/vhost2.rvt000644 001750 001750 00000000370 11670231317 017176 0ustar00mxmmxm000000 000000 " puts "::childinit2 exists
" } elseif {[info exists ::beforescript2]} { ?>Virtual Host2 Test" } ?> rivet-2.3.5/src/request/apache_request.c000644 001750 001750 00000045223 12323561775 017753 0ustar00mxmmxm000000 000000 /* Copyright 2000-2004 The Apache Software Foundation 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 "apache_request.h" #include "apache_multipart_buffer.h" int fill_buffer(multipart_buffer *self); /* needed for mozilla hack */ static void req_plustospace(char *str) { register int x; for(x=0;str[x];x++) if(str[x] == '+') str[x] = ' '; } static int util_read(ApacheRequest *req, const char **rbuf) { request_rec *r = req->r; int rc = OK; if ((rc = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR))) { return rc; } if (ap_should_client_block(r)) { char buff[HUGE_STRING_LEN]; int rsize, len_read, rpos=0; long length = r->remaining; if (length > req->post_max && req->post_max > 0) { ap_log_rerror(REQ_ERROR,"entity too large (%d, max=%d)", (int)length, req->post_max); return HTTP_REQUEST_ENTITY_TOO_LARGE; } *rbuf = apr_pcalloc(r->pool, length + 1); while ((len_read = ap_get_client_block(r, buff, sizeof(buff))) > 0) { if ((rpos + len_read) > length) { rsize = length - rpos; } else { rsize = len_read; } memcpy((char*)*rbuf + rpos, buff, rsize); rpos += rsize; } } return rc; } char *ApacheRequest_script_name(ApacheRequest *req) { request_rec *r = req->r; char *tmp; if (r->path_info && *r->path_info) { int path_info_start = ap_find_path_info(r->uri, r->path_info); tmp = (char*) apr_pstrndup(r->pool, r->uri, path_info_start); } else { tmp = r->uri; } return tmp; } char *ApacheRequest_script_path(ApacheRequest *req) { return ap_make_dirstr_parent(req->r->pool, ApacheRequest_script_name(req)); } const char *ApacheRequest_param(ApacheRequest *req, const char *key) { ApacheRequest_parse(req); return (char*) apr_table_get(req->parms, key); } static int make_params(void *data, const char *key, const char *val) { //array_header *arr = (array_header *)data; apr_array_header_t *arr = (apr_array_header_t *)data; //*(char **)apr_push_array(arr) = (char *)val; *(char **)apr_array_push(arr) = (char *)val; return 1; } //array_header *ApacheRequest_params(ApacheRequest *req, const char *key) apr_array_header_t *ApacheRequest_params(ApacheRequest *req, const char *key) { //array_header *values = ap_make_array(req->r->pool, 4, sizeof(char *)); apr_array_header_t *values = apr_array_make(req->r->pool, 4, sizeof(char *)); ApacheRequest_parse(req); apr_table_do(make_params, (void*)values, req->parms, key, NULL); return values; } char *ApacheRequest_params_as_string(ApacheRequest *req, const char *key) { char *retval = NULL; //array_header *values = ApacheRequest_params(req, key); apr_array_header_t *values = ApacheRequest_params(req, key); int i; for (i=0; inelts; i++) { retval = (char*) apr_pstrcat(req->r->pool, retval ? retval : "", ((char **)values->elts)[i], (i == (values->nelts - 1)) ? NULL : ", ", NULL); } return retval; } //table *ApacheRequest_query_params(ApacheRequest *req, ap_pool *p) apr_table_t *ApacheRequest_query_params(ApacheRequest *req, /*ap_pool*/apr_pool_t *p) { //array_header *a = ap_palloc(p, sizeof *a); //array_header *b = (array_header *)req->parms; apr_array_header_t *a = apr_palloc(p, sizeof *a); apr_array_header_t *b = (apr_array_header_t *)req->parms; a->elts = b->elts; a->nelts = req->nargs; a->nalloc = a->nelts; /* COW hack: array push will induce copying */ //a->elt_size = sizeof(table_entry); //return (table *)a; a->elt_size = sizeof(apr_table_entry_t); return (apr_table_t *)a; } apr_table_t *ApacheRequest_post_params(ApacheRequest *req, apr_pool_t *p) { apr_array_header_t *a = apr_palloc(p, sizeof *a); apr_array_header_t *b = (apr_array_header_t *)req->parms; a->elts = (void *)( (apr_table_entry_t *)b->elts + req->nargs ); a->nelts = b->nelts - req->nargs; a->nalloc = a->nelts; /* COW hack: array push will induce copying */ a->elt_size = sizeof(apr_table_entry_t); return (apr_table_t *)a; } ApacheUpload *ApacheUpload_new(ApacheRequest *req) { ApacheUpload *upload = (ApacheUpload *) apr_pcalloc(req->r->pool, sizeof(ApacheUpload)); upload->next = NULL; upload->name = NULL; upload->info = NULL; upload->fp = NULL; upload->size = 0; upload->req = req; return upload; } ApacheUpload *ApacheUpload_find(ApacheUpload *upload, char *name) { ApacheUpload *uptr; for (uptr = upload; uptr; uptr = uptr->next) { if (strEQ(uptr->name, name)) { return uptr; } } return NULL; } ApacheRequest *ApacheRequest_new(apr_pool_t *pool) { ApacheRequest *req = (ApacheRequest *) apr_pcalloc(pool, sizeof(ApacheRequest)); req->status = OK; req->parms = apr_table_make(pool, DEFAULT_TABLE_NELTS); req->upload = NULL; req->post_max = -1; req->disable_uploads = 0; req->upload_hook = NULL; req->hook_data = NULL; req->temp_dir = NULL; req->raw_post = NULL; req->parsed = 0; req->r = NULL; req->nargs = 0; return req; } ApacheRequest *ApacheRequest_init(ApacheRequest* req, request_rec *r) { req->status = OK; apr_table_clear(req->parms); req->upload = NULL; req->post_max = -1; req->disable_uploads = 0; req->upload_hook = NULL; req->hook_data = NULL; req->temp_dir = NULL; req->raw_post = NULL; req->parsed = 0; req->r = r; req->nargs = 0; return req; } static char x2c(const char *what) { register char digit; #ifndef CHARSET_EBCDIC digit = ((what[0] >= 'A') ? ((what[0] & 0xdf) - 'A') + 10 : (what[0] - '0')); digit *= 16; digit += (what[1] >= 'A' ? ((what[1] & 0xdf) - 'A') + 10 : (what[1] - '0')); #else /*CHARSET_EBCDIC*/ char xstr[5]; xstr[0]='0'; xstr[1]='x'; xstr[2]=what[0]; xstr[3]=what[1]; xstr[4]='\0'; digit = os_toebcdic[0xFF & ap_strtol(xstr, NULL, 16)]; #endif /*CHARSET_EBCDIC*/ return (digit); } static unsigned int utf8_convert(char *str) { long x = 0; int i = 0; while (i < 4 ) { if ( apr_isxdigit(str[i]) != 0 ) { if( apr_isdigit(str[i]) != 0 ) { x = x * 16 + str[i] - '0'; } else { str[i] = tolower( str[i] ); x = x * 16 + str[i] - 'a' + 10; } } else { return 0; } i++; } if(i < 3) return 0; return (x); } static int ap_unescape_url_u(char *url) { register int x, y, badesc, badpath; badesc = 0; badpath = 0; for (x = 0, y = 0; url[y]; ++x, ++y) { if (url[y] != '%'){ url[x] = url[y]; } else { if(url[y + 1] == 'u' || url[y + 1] == 'U'){ unsigned int c = utf8_convert(&url[y + 2]); y += 5; if(c < 0x80){ url[x] = c; } else if(c < 0x800) { url[x] = 0xc0 | (c >> 6); url[++x] = 0x80 | (c & 0x3f); } else if(c < 0x10000){ url[x] = (0xe0 | (c >> 12)); url[++x] = (0x80 | ((c >> 6) & 0x3f)); url[++x] = (0x80 | (c & 0x3f)); } else if(c < 0x200000){ url[x] = 0xf0 | (c >> 18); url[++x] = 0x80 | ((c >> 12) & 0x3f); url[++x] = 0x80 | ((c >> 6) & 0x3f); url[++x] = 0x80 | (c & 0x3f); } else if(c < 0x4000000){ url[x] = 0xf8 | (c >> 24); url[++x] = 0x80 | ((c >> 18) & 0x3f); url[++x] = 0x80 | ((c >> 12) & 0x3f); url[++x] = 0x80 | ((c >> 6) & 0x3f); url[++x] = 0x80 | (c & 0x3f); } else if(c < 0x8000000){ url[x] = 0xfe | (c >> 30); url[++x] = 0x80 | ((c >> 24) & 0x3f); url[++x] = 0x80 | ((c >> 18) & 0x3f); url[++x] = 0x80 | ((c >> 12) & 0x3f); url[++x] = 0x80 | ((c >> 6) & 0x3f); url[++x] = 0x80 | (c & 0x3f); } } else { if (!apr_isxdigit(url[y + 1]) || !apr_isxdigit(url[y + 2])) { badesc = 1; url[x] = '%'; } else { url[x] = x2c(&url[y + 1]); y += 2; if (url[x] == '/' || url[x] == '\0') badpath = 1; } } } } url[x] = '\0'; if (badesc) return HTTP_BAD_REQUEST; else if (badpath) return HTTP_NOT_FOUND; else return OK; } //static int urlword_dlm[] = {'&', ';', 0}; static char *my_urlword(apr_pool_t *p, const char **line) { char *res = NULL; const char *pos = *line; char ch; while ( (ch = *pos) != '\0' && ch != ';' && ch != '&') { ++pos; } res = (char*) apr_pstrndup(p, *line, pos - *line); while (ch == ';' || ch == '&') { ++pos; ch = *pos; } *line = pos; return res; } static void split_to_parms(ApacheRequest *req, const char *data) { request_rec *r = req->r; const char *val; while (*data && (val = my_urlword(r->pool, &data))) { const char *key = ap_getword(r->pool, &val, '='); req_plustospace((char*)key); ap_unescape_url_u((char*)key); req_plustospace((char*)val); ap_unescape_url_u((char*)val); apr_table_add(req->parms, key, val); } } int ApacheRequest___parse(ApacheRequest *req) { request_rec *r = req->r; const char *ct = apr_table_get(r->headers_in, "Content-type"); int result; if (r->args) { split_to_parms(req, r->args); req->nargs = ((apr_array_header_t *)req->parms)->nelts; } if ((r->method_number == M_POST) && ct && strncaseEQ(ct, MULTIPART_ENCTYPE, MULTIPART_ENCTYPE_LENGTH)) { // //ap_log_rerror(REQ_INFO, "content-type: `%s'", ct); // result = ApacheRequest_parse_multipart(req,ct); } else { result = ApacheRequest_parse_urlencoded(req); } req->parsed = 1; return result; } int ApacheRequest_parse_urlencoded(ApacheRequest *req) { request_rec *r = req->r; int rc = OK; if (r->method_number == M_POST || r->method_number == M_PUT || r->method_number == M_DELETE) { const char *data = NULL; /* const char *type; type = apr_table_get(r->headers_in, "Content-Type"); if (!strncaseEQ(type, DEFAULT_ENCTYPE, DEFAULT_ENCTYPE_LENGTH) && !strncaseEQ(type, TEXT_XML_ENCTYPE, TEXT_XML_ENCTYPE_LENGTH)) { return DECLINED; } */ if ((rc = util_read(req, &data)) != OK) { return rc; } if (data) { req->raw_post = (char*) data; /* Give people a way of getting at the raw data. */ split_to_parms(req, data); } } return OK; } static apr_status_t remove_tmpfile(void *data) { ApacheUpload *upload = (ApacheUpload *) data; // ApacheRequest *req = upload->req; //TODO: fix ap_pfclose //if( ap_pfclose(req->r->pool, upload->fp) ) //TODO: fix logging apr_log_rerror //apr_log_rerror(REQ_ERROR,"[libapreq] close error on '%s'", upload->tempname); #ifndef DEBUG if( remove(upload->tempname) ) { //TODO: fix logging apr_log_rerror //apr_log_rerror(REQ_ERROR,"[libapreq] remove error on '%s'", upload->tempname); } #endif // free(upload->tempname); return 0; } apr_file_t *ApacheRequest_tmpfile(ApacheRequest *req, ApacheUpload *upload) { request_rec *r = req->r; apr_file_t *fp = NULL; char *name = NULL; char *file = NULL ; const char *tempdir; apr_status_t rv; tempdir = req->temp_dir; /* file = (char *)apr_palloc(r->pool,sizeof(apr_time_t)); */ file = apr_psprintf(r->pool,"%u.XXXXXX", (unsigned int)r->request_time); rv = apr_temp_dir_get(&tempdir,r->pool); if (rv != APR_SUCCESS) { ap_log_perror(APLOG_MARK, APLOG_ERR, rv, r->pool, "No temp dir!"); return NULL; } rv = apr_filepath_merge(&name,tempdir,file,APR_FILEPATH_NATIVE,r->pool); if (rv != APR_SUCCESS) { ap_log_perror(APLOG_MARK, APLOG_ERR, rv, r->pool, "File path error!"); return NULL; } rv = apr_file_mktemp(&fp,name,0,r->pool); if (rv != APR_SUCCESS) { char* errorBuffer = (char*) apr_palloc(r->pool,256); ap_log_perror(APLOG_MARK, APLOG_ERR, rv, r->pool, "Failed to open temp file: %s",apr_strerror(rv,errorBuffer,256)); return NULL; } upload->fp = fp; upload->tempname = name; apr_pool_cleanup_register (r->pool, (void *)upload, remove_tmpfile, apr_pool_cleanup_null); return fp; } int ApacheRequest_parse_multipart(ApacheRequest *req,const char* ct) { request_rec *r = req->r; int rc = OK; long length; char *boundary; multipart_buffer *mbuff; ApacheUpload *upload = NULL; apr_status_t status; char error[1024]; if ((rc = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR))) { return rc; } if (!ap_should_client_block(r)) { return rc; } if ((length = r->remaining) > req->post_max && req->post_max > 0) { ap_log_rerror(REQ_ERROR,"entity too large (%d, max=%d)", (int)length,req->post_max); return HTTP_REQUEST_ENTITY_TOO_LARGE; } do { int blen; boundary = ap_getword(r->pool, &ct, '='); if (boundary == NULL) return DECLINED; blen = strlen(boundary); if (blen == 0 || blen < strlen("boundary")) return DECLINED; boundary += blen - strlen("boundary"); } while (strcasecmp(boundary,"boundary") != 0); boundary = ap_getword_conf(r->pool, &ct); if (!(mbuff = multipart_buffer_new(boundary, length, r))) { return DECLINED; } while (!multipart_buffer_eof(mbuff)) { apr_table_t *header = (apr_table_t*) multipart_buffer_headers(mbuff); const char *cd, *param=NULL, *filename=NULL; char buff[FILLUNIT]; int blen; if (!header) { #ifdef DEBUG ap_log_rerror(REQ_ERROR,"Silently dropping remaining '%ld' bytes", r->remaining); #endif do { } while ( ap_get_client_block(r, buff, sizeof(buff)) > 0 ); return OK; } if ((cd = apr_table_get(header, "Content-Disposition"))) { const char *pair; while (*cd && (pair = ap_getword(r->pool, &cd, ';'))) { const char *key; while (apr_isspace(*cd)) { ++cd; } if (ap_ind(pair, '=')) { key = ap_getword(r->pool, &pair, '='); if(strcaseEQ(key, "name")) { param = ap_getword_conf(r->pool, &pair); } else if(strcaseEQ(key, "filename")) { filename = ap_getword_conf(r->pool, &pair); } } } if (!filename) { char *value = multipart_buffer_read_body(mbuff); apr_table_add(req->parms, param, value); continue; } if (!param) continue; /* shouldn't happen, but just in case. */ if (req->disable_uploads) { #if DEBUG ap_log_rerror(REQ_ERROR, "[libapreq] file upload forbidden"); #endif return HTTP_FORBIDDEN; } apr_table_add(req->parms, param, filename); if (upload) { upload->next = ApacheUpload_new(req); upload = upload->next; } else { upload = ApacheUpload_new(req); req->upload = upload; } if (! req->upload_hook && ! ApacheRequest_tmpfile(req, upload) ) { return HTTP_INTERNAL_SERVER_ERROR; } upload->info = header; upload->filename = (char*)apr_pstrdup(req->r->pool, filename); upload->name = (char*)apr_pstrdup(req->r->pool, param); /* mozilla empty-file (missing CRLF) hack */ fill_buffer(mbuff); if( strEQN(mbuff->buf_begin, mbuff->boundary, strlen(mbuff->boundary)) ) { r->remaining -= 2; continue; } while ((blen = multipart_buffer_read(mbuff, buff, sizeof(buff)))) { apr_size_t bytes_to_write = (apr_size_t) blen; status = apr_file_write(upload->fp,buff,&bytes_to_write); if (status != 0) { apr_strerror(status,error,1024); return HTTP_INTERNAL_SERVER_ERROR; } upload->size += blen; } } } return OK; } #define Mult_s 1 #define Mult_m 60 #define Mult_h (60*60) #define Mult_d (60*60*24) #define Mult_M (60*60*24*30) #define Mult_y (60*60*24*365) static int expire_mult(char s) { switch (s) { case 's': return Mult_s; case 'm': return Mult_m; case 'h': return Mult_h; case 'd': return Mult_d; case 'M': return Mult_M; case 'y': return Mult_y; default: return 1; }; } static time_t expire_calc(char *time_str) { int is_neg = 0, offset = 0; char buf[256]; int ix = 0; if (*time_str == '-') { is_neg = 1; ++time_str; } else if (*time_str == '+') { ++time_str; } else if (strcaseEQ(time_str, "now")) { /*ok*/ } else { return 0; } /* wtf, ap_isdigit() returns false for '1' !? */ while (*time_str && (apr_isdigit(*time_str) || (*time_str == '1'))) { buf[ix++] = *time_str++; } buf[ix] = '\0'; offset = atoi(buf); return time(NULL) + (expire_mult(*time_str) * (is_neg ? (0 - offset) : offset)); } char *ApacheUtil_expires(apr_pool_t *p, char *time_str, int type) { time_t when; struct tm *tms; int sep = (type == EXPIRES_HTTP) ? ' ' : '-'; if (!time_str) { return NULL; } when = expire_calc(time_str); if (!when) { return (char*) apr_pstrdup(p, time_str); } tms = gmtime(&when); return (char*) apr_psprintf(p, "%s, %.2d%c%s%c%.2d %.2d:%.2d:%.2d GMT", apr_day_snames[tms->tm_wday], tms->tm_mday, sep, apr_month_snames[tms->tm_mon], sep, tms->tm_year + 1900, tms->tm_hour, tms->tm_min, tms->tm_sec); } char *ApacheRequest_expires(ApacheRequest *req, char *time_str) { return ApacheUtil_expires(req->r->pool, time_str, EXPIRES_HTTP); } rivet-2.3.5/rivet/rivet-tcl/random.tcl000644 001750 001750 00000001740 11670231317 017347 0ustar00mxmmxm000000 000000 ### ## random [seed | value ] ## ## Generate a random number using only Tcl code. This proc tries to ## emulate what the TclX random function does. If we don't have TclX ## though, this is a decent substitute. ## ## Note: random predates the existence of Tcl's built-in rand() function, ## that is a part of the expr command -- programmers should consider using ## Tcl's built-in rand() function as an alternative to this command. ## ## $Id: random.tcl 1212149 2011-12-08 21:57:35Z mxmanghi $ ## ### namespace eval ::rivet { proc random {args} { global _ran if {[llength $args] > 1} { set _ran [lindex $args 1] } else { set period 233280 if {[info exists _ran]} { set _ran [expr { ($_ran*9301 + 49297) % $period }] } else { set _ran [expr { [clock seconds] % $period } ] } return [expr { int($args*($_ran/double($period))) } ] } } } rivet-2.3.5/doc/html/load_response.html000644 001750 001750 00000010425 13200160527 017550 0ustar00mxmmxm000000 000000 load_response

Name

load_response — load form variables into an array.

Synopsis

::rivet::load_response ?arrayName?

Description

Load any form variables passed to this page into an array. If load_response is called without arguments the array response is created in the scope of the caller. If the variables var1,var2,var3... having values val1,val2,val3... are passed to the page, the resulting array will be a collection mapping var1,var2,var3... to their corresponding values. load_response was inspired by the same NeoWebScript procedure in the way it deals with multiple assignments: if a variable is assigned more than once the corresponding array element will be a list of the values for the variable. This can be useful in the case of forms with checkbox options that are given the same name. This condition is signalled by the presence of an auxiliary array variable.

Example: if a group of checkboxes are associated to the var1 variable then response(var1) will store the list of their values and the array will also have the extra variable response(__var1) which can be tested with the usual [info exists response(__var1)]

Calling load_response several times for the same array results in adding more values to the array at every call. When needed it is left to the caller to empty the array between two subsequent calls.

rivet-2.3.5/tests/test-htaccess000644 001750 001750 00000000334 07444440163 016163 0ustar00mxmmxm000000 000000 # this file is a test file to simulate an .htaccess file. RivetUserConf ErrorScript 'puts "this page is BROKEN"' RivetUserConf BeforeScript 'puts "Local Page Header"' RivetUserConf AfterScript 'puts "Local Page Footer"'rivet-2.3.5/000755 001750 001750 00000000000 13201433217 012312 5ustar00mxmmxm000000 000000 rivet-2.3.5/src/parser/rivetParser.h000644 001750 001750 00000002132 12025575055 017064 0ustar00mxmmxm000000 000000 /* Copyright 2002-2004 The Apache Software Foundation 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 RIVETPARSER_H #define RIVETPARSER_H 1 #define START_TAG "" /* This bit is for windows. */ #ifdef BUILD_rivet #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLEXPORT #endif /* BUILD_rivet */ EXTERN int Rivet_GetRivetFile(char *filename, int toplevel, Tcl_Obj *outbuf, Tcl_Interp *interp); EXTERN int Rivet_GetTclFile(char *filename, Tcl_Obj *outbuf, Tcl_Interp *interp); EXTERN int Rivet_Parser(Tcl_Obj *outbuf, Tcl_Obj *inbuf); #endif /* RIVETPARSER_H */ rivet-2.3.5/src/librivet/Makefile.am000644 001750 001750 00000002475 12323760311 016767 0ustar00mxmmxm000000 000000 # Makefile for Rivet # Copyright 2004-2005 The Apache Software Foundation # 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. # $Id: Makefile.am 1588263 2014-04-17 14:10:17Z mxmanghi $ #AM_CPPFLAGS = @apache_include@ # ... and these two. We want to put the libs in the package path, # rather than the standard library location for the system. #lib_libexecdir = @RIVET_TCL_TARGET@ #lib_libexec_LTLIBRARIES = librivetlib.la ## ## Rivet Library ## #librivetlib_la_SOURCES = rivetList.c rivetCrypt.c rivetWWW.c rivetPkgInit.c #librivetlib_la_LDFLAGS = @TCL_STUB_LIB_SPEC@ @APXS_LDFLAGS@ @APR_LDFLAGS@ -module -avoid-version #librivetlib_la_LIBADD = @APXS_LIBS@ #librivetlib_la_CPPFLAGS = -I.. -I../@apache_version_dir@ @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_INCLUDES@ @APR_CPPFLAGS@ -DSTART_TAG='""' -DUSE_TCL_STUBS rivet-2.3.5/doc/html/encode.html000644 001750 001750 00000006164 13200160530 016147 0ustar00mxmmxm000000 000000 encode

Name

encode — encode a string replacing every occurrence of characters for which an SGML entity exists

Synopsis

::rivet::encode string ?-encoding <encoding>?

Description

::rivet::encode returns a copy of the input string after replacing every occurence of characters for which an SGML entity exists. By default the command assumes the string is encoded in UTF-8, other encodings are supported by passing the -encoding <encoding> argument. The list of available encodings is returned by command

encoding names
rivet-2.3.5/src/apache-2/Makefile.am000644 001750 001750 00000003760 12236031346 016527 0ustar00mxmmxm000000 000000 # Makefile for Rivet # Copyright 2004-2005 The Apache Software Foundation # 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. #AUTOMAKE_OPTIONS = subdir-objects ## AM_CFLAGS = @TCL_INCLUDES@ @GM_CPPFLAGS@ ## The weird and wild magic of auto* associates these two. #apxs_libexecdir = @APXS_LIBEXECDIR@ #apxs_libexec_LTLIBRARIES = mod_rivet.la #AM_CPPFLAGS = ## ... and these two. We want to put the libs in the package path, ## rather than the standard library location for the system. ###lib_libexecdir = @TCL_PACKAGE_PATH@/rivet ###lib_libexec_LTLIBRARIES = librivet.la librivetparser.la ## ## Apache Rivet Module, mod_rivet.so / mod_rivet.dll ## #mod_rivet_la_SOURCES = \ # apache_multipart_buffer.c \ # apache_request.c \ # mod_rivet.c \ # TclWebapache.c \ # ../rivetcmds/rivetCore.c \ # ../rivetcmds/rivetInspect.c \ # ../rivetChannel.c \ # ../parser/rivetParser.c ###mod_rivet_la_SOURCES = mod_rivet.c mod_rivet.h #mod_rivet_la_LDFLAGS = @TCL_LIB_SPEC@ @APXS_LDFLAGS@ @APR_LDFLAGS@ -module -avoid-version #mod_rivet_la_LIBADD = @TCL_LIBS@ @APXS_LIBS@ #mod_rivet_la_CPPFLAGS = @apache_include@ -I@RIVET_BASE_INCLUDE@ -I../parser @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_CPPFLAGS@ @APR_INCLUDES@ -DSTART_TAG='""' # APXS_CPPFLAGS_SHLIB ## Removing libtool .la files from installation # #install-data-hook: # echo 'removing unwanted libtool .la files' # rm -f $(DESTDIR)/$(apxs_libexecdir)/*.la rivet-2.3.5/rivet/packages/session/000755 001750 001750 00000000000 13200157764 016715 5ustar00mxmmxm000000 000000 rivet-2.3.5/cvsversion.tcl000755 001750 001750 00000005156 07566273234 015253 0ustar00mxmmxm000000 000000 #!/bin/sh # the next line restarts using tclsh \ exec tclsh "$0" "$@" # By David N. Welton # $Id: cvsversion.tcl 265232 2002-11-18 23:24:12Z davidw $ # This is to generate new versions based on CVS information. set newversionvar 0 proc newversion { } { global newversionvar puts stderr "New version" set newversionvar 1 } proc diffentries { {dir .} } { global newversionvar set CVSEntries [file join . CVS Entries] set OldEntries [file join . .OLDEntries] puts stderr "Diffentries for $dir" set currentdir [pwd] cd $dir if { ! [file exists $CVSEntries] } { puts stderr "You must be in a directory with a path to ./CVS/Entries." } if { ! [file exists $OldEntries] } { puts stderr "No OLDEntries file. It will be created." set fl [open $OldEntries w] close $fl } set entries [open $CVSEntries] set blob "" while { [gets $entries ln] != -1 } { lappend blob $ln } close $entries set oldentries [open $OldEntries] set blob2 "" while { [gets $oldentries ln] != -1 } { lappend blob2 $ln } close $oldentries if { $blob != $blob2 } { newversion } foreach ln $blob { # the regexp below scans for directories in CVS Entries files if { [regexp {^D/(.*)////$} "$ln" match dir] } { diffentries $dir } } file copy -force $CVSEntries $OldEntries cd $currentdir } proc main {} { global newversionvar diffentries if { $newversionvar == 0 } { puts stderr "No changes, exiting." } else { if { [file exists VERSION] } { set versionfile [open VERSION "r"] gets $versionfile versionstring close $versionfile } else { set versionstring "0.0.0" } if { ! [regexp {([0-9]+)\.([0-9]+)\.([0-9]+)} $versionstring match major minor point] } { puts stderr "Problem with versionstring '$versionstring', exiting" exit 1 } set versionfile [ open VERSION "w" ] if { [catch { while { 1 } { puts -nonewline "Current version: $major.$minor.$point. " puts -nonewline {Increment [M]ajor, m[I]nor, [P]oint release, or [A]bort? >>> } flush stdout gets stdin answer switch [string tolower $answer] { m { incr major set minor 0 set point 0 break } i { incr minor set point 0 break } p { incr point break } a { puts "Aborted" break } } } puts $versionfile "$major.$minor.$point" } err] } { puts stderr "Problem writing VERSION file: $err" puts $versionfile "$major.$minor.$point" } close $versionfile puts "Done, version is $major.$minor.$point" } } mainrivet-2.3.5/tclconfig/000755 001750 001750 00000000000 13200157764 014273 5ustar00mxmmxm000000 000000 rivet-2.3.5/doc/html/incr0.html000644 001750 001750 00000007061 13200160527 015730 0ustar00mxmmxm000000 000000 incr0

Name

incr0 — increment a variable or set it to 1 if nonexistent.

Synopsis

incr0 ?varname? ?num?

Description

Increment a variable varname by num. If the variable doesn't exist, create it instead of returning an error.

[Note]Note
incr0 functionality is provided by the native incr in Tcl >= 8.5, therefore this command is deprecated and kept as an interpreter alias only for compatibility. As such incr0 wasn't moved to the ::rivet namespace and it will be removed in future versions of Rivet.
rivet-2.3.5/doc/html/lempty.html000644 001750 001750 00000005050 13200160527 016223 0ustar00mxmmxm000000 000000 lempty

Name

lempty — Returns 1 if <list> is empty or 0 if it has any elements. This command emulates the TclX lempty command.

Synopsis

::rivet::lempty list

Description

Returns 1 if <list> is empty or 0 if it has any elements. This command emulates the TclX lempty command.

rivet-2.3.5/tests/bailout.test000644 001750 001750 00000013131 12764556425 016037 0ustar00mxmmxm000000 000000 # bailout.test -- test redirect command. # # redirect must trigger an AbortScript and have # predictable data stored in the abort code # $Id: bailout.test 1760054 2016-09-09 16:02:29Z mxmanghi $ ::tcltest::test bailout-1.1 {::rivet::redirect command} { apachetest::start {} { RivetServerConf AbortScript "::rivet::apache_log_error err \\\"catching redirect\\\"" RivetServerConf AbortScript "set tmpfp \[open redirect_code.txt w+\]" RivetServerConf AbortScript "puts \$tmpfp \[::rivet::abort_code\]" RivetServerConf AbortScript "close \$tmpfp" } { set url "${urlbase}redirect.rvt?base=$urlbase" #puts $url catch {set page1 [::http::geturl $url]} puts "verifying abort code" set rdfp [open redirect_code.txt r] set redirect_code [dict create {*}[read $rdfp]] set r1 [dict exists $redirect_code location] set r2 [dict exists $redirect_code error_code] } list $r1 $r2 } {1 1} ::tcltest::test bailout-1.2 {::rivet::exit command} { apachetest::start {} { RivetServerConf AbortScript "::rivet::apache_log_error err \\\"catching exit\\\"" RivetServerConf AbortScript "set abcode \[::rivet::abort_code\]" RivetServerConf AbortScript "puts -nonewline \[::rivet::abort_page -exiting\]" RivetServerConf AbortScript "puts -nonewline \\\" \[dict get \$abcode error_code\] \[dict get \$abcode return_code\]\\\"" } { puts "test exit command" set url "${urlbase}exit.tcl" set page [::http::geturl $url] set r [::http::data $page] ::http::cleanup $page } set r } {1 exit 100} ::tcltest::test bailout-2.0 {::rivet::catch procedure successful execution} { apachetest::start {} { } { set url "${urlbase}catch.rvt" set page [::http::geturl $url] set r [::http::data $page] ::http::cleanup $page } set r [string trim $r] set r } {OK} ::tcltest::test bailout-2.1 {::rivet::catch command generic error handling} { apachetest::start {} { } { set url "${urlbase}catch.rvt?abort=1" set page [::http::geturl $url] set r [::http::data $page] ::http::cleanup $page } set r [string trim $r] set r } {OK} ::tcltest::test bailout-2.2 {::rivet::catch command abort_page handling} { apachetest::start {} { RivetServerConf AbortScript "::rivet::apache_log_error err \\\"catching abort condition\\\"" RivetServerConf AbortScript "puts -nonewline \[::rivet::abort_page -aborting\]" } { puts "test ::rivet::catch and ::rivet::abort_page interaction" set url "${urlbase}catch.rvt?abort=2" set page [::http::geturl $url] set r [::http::data $page] ::http::cleanup $page } set r } {1} ::tcltest::test bailout-2.3 {::rivet::catch handling options dictionary} { apachetest::start {} { } { set url "${urlbase}catch.rvt?abort=3" set page [::http::geturl $url] set r [::http::data $page] ::http::cleanup $page } set r [string trim $r] set r } {3 error} ::tcltest::test bailout-3.0 {::rivet::try successful procedure call} { apachetest::start {} { } { set url "${urlbase}try.rvt" set page [::http::geturl $url] set r [::http::data $page] ::http::cleanup $page } set r [string trim $r] set r } {finalize} ::tcltest::test bailout-3.1 {::rivet::try handling break return code} { apachetest::start {} { } { set url "${urlbase}try.rvt?cond=3" set page [::http::geturl $url] set r [::http::data $page] ::http::cleanup $page } set r [string trim $r] set r } {try 3 finalize} ::tcltest::test bailout-3.2 {::rivet::try handling error return code} { apachetest::start {} { } { set url "${urlbase}try.rvt?cond=1" set page [::http::geturl $url] set r [::http::data $page] ::http::cleanup $page } set r [string trim $r] set r } {try 1 finalize} ::tcltest::test bailout-3.3 {::rivet::try handling continue return code} { apachetest::start {} { } { set url "${urlbase}try.rvt?cond=4" set page [::http::geturl $url] set r [::http::data $page] ::http::cleanup $page } set r [string trim $r] set r } {try 4 finalize} ::tcltest::test bailout-3.4 {::rivet::try abort_page handling} { apachetest::start {} { RivetServerConf AbortScript "::rivet::apache_log_error err \\\"catching abort condition\\\"" RivetServerConf AbortScript "puts -nonewline \\\" \[::rivet::abort_page -aborting\]\\\"" RivetServerConf AbortScript "puts -nonewline \\\" \[::rivet::abort_code\]\\\"" } { set url "${urlbase}try.rvt?cond=abort" set page [::http::geturl $url] set r [::http::data $page] ::http::cleanup $page } set r [string trim $r] set r } {finalize 1 arg1} ::tcltest::test bailout-3.4 {::rivet::try handling ::rivet::exit} { apachetest::start {} { RivetServerConf AbortScript "::rivet::apache_log_error err \\\"catching abort condition\\\"" RivetServerConf AbortScript "set abcode \[::rivet::abort_code\]" RivetServerConf AbortScript "puts -nonewline \\\" \[::rivet::abort_page -exiting\]\\\"" RivetServerConf AbortScript "puts -nonewline \\\" \[dict get \$abcode error_code\] \[dict get \$abcode return_code\]\\\"" } { set url "${urlbase}try.rvt?cond=exit" set page [::http::geturl $url] set r [::http::data $page] ::http::cleanup $page } set r [string trim $r] set r } {finalize 1 exit 101} rivet-2.3.5/doc/html/images/word.png000644 001750 001750 00000000611 13200160527 016747 0ustar00mxmmxm000000 000000 PNG  IHDRf0gAMA asRGB cHRMz&u0`:pQ<PLTEBBB[ϕtRNS@fbKGD- pHYsHHFk>XIDAT% **,PxD6QPr0"T:&Ss'zN:i^;EjjN /y%tEXtdate:create2012-10-01T18:30:10+02:00k%tEXtdate:modify2004-02-19T05:50:53+01:00OS1IENDB`rivet-2.3.5/src/parser/rivetParser.c000644 001750 001750 00000017456 12667313665 017107 0ustar00mxmmxm000000 000000 /* * -- Rivet parser - Contains functions for loading up Tcl scripts either * in flat Tcl files, or in Rivet .rvt files. */ /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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. */ /* $Id: rivetParser.c 1733936 2016-03-07 15:01:09Z mxmanghi $ */ #include #include #include "rivetParser.h" int Rivet_Parser(Tcl_Obj *outbuf, Tcl_Obj *inbuf); /* *----------------------------------------------------------------------------- * * Rivet_GetTclFile -- * * Takes a filename, an outbuf to fill in with a Tcl script, and a * TclWebRequest. Fills in outbuf with a Tcl script. * *----------------------------------------------------------------------------- */ int Rivet_GetTclFile(char *filename, Tcl_Obj *outbuf, Tcl_Interp *interp) { int result = 0; /* Taken, in part, from tclIOUtil.c out of the Tcl distribution, * and modified. */ Tcl_Channel chan = Tcl_OpenFileChannel(interp, filename, "r", 0644); if (chan == (Tcl_Channel) NULL) { Tcl_ResetResult(interp); Tcl_AppendResult(interp, "couldn't read file \"", filename, "\": ", Tcl_PosixError(interp), (char *) NULL); return TCL_ERROR; } result = Tcl_ReadChars(chan, outbuf, -1, 1); if (result < 0) { Tcl_Close(interp, chan); Tcl_AppendResult(interp, "couldn't read file \"", filename, "\": ", Tcl_PosixError(interp), (char *) NULL); return TCL_ERROR; } if (Tcl_Close(interp, chan) != TCL_OK) return TCL_ERROR; return TCL_OK; } /* *----------------------------------------------------------------------------- * * Rivet_GetRivetFile -- * * Takes a filename, a flag to indicate whether we are operating at * the top level (not from within the "parse" command), a buffer to * fill in, and a TclWebRequest. Fills in outbuf with a parsed Rivet * .rvt file, creating a Tcl script ready for execution. * *----------------------------------------------------------------------------- */ int Rivet_GetRivetFile(char *filename, int toplevel, Tcl_Obj *outbuf, Tcl_Interp *interp) { int sz = 0; Tcl_Obj *inbuf; Tcl_Channel rivetfile; /* * TODO There is much switching between Tcl and APR for calling * utility routines. We should make up our minds and keep * a coherent attitude deciding when Tcl should be called upon * and when APR should be invoked instead for a certain class of * tasks */ rivetfile = Tcl_OpenFileChannel(interp, filename, "r", 0664); if (rivetfile == NULL) { /* Don't need to adderrorinfo - Tcl_OpenFileChannel takes care of that for us. */ return TCL_ERROR; } if (toplevel) { Tcl_AppendToObj(outbuf, "namespace eval request {\n", -1); } else { Tcl_SetStringObj(outbuf, "", -1); } Tcl_AppendToObj(outbuf, "puts -nonewline \"", -1); inbuf = Tcl_NewObj(); Tcl_IncrRefCount(inbuf); sz = Tcl_ReadChars(rivetfile, inbuf, -1, 0); Tcl_Close(interp, rivetfile); if (sz == -1) { Tcl_AddErrorInfo(interp, Tcl_PosixError(interp)); Tcl_DecrRefCount(inbuf); return TCL_ERROR; } /* If we are not inside a section, add the closing ". */ if (Rivet_Parser(outbuf, inbuf) == 0) { Tcl_AppendToObj(outbuf, "\"\n", 2); } if (toplevel) { Tcl_AppendToObj(outbuf, "\n}", -1); } Tcl_AppendToObj(outbuf, "\n", -1); Tcl_DecrRefCount(inbuf); /* END PARSER */ return TCL_OK; } /* *----------------------------------------------------------------------------- * * Rivet_Parser -- * * Parses data (from .rvt file) in inbuf and creates resulting script * in outbuf. * * Results: * * Returns 'inside' - whether we were still inside a block of Tcl code * or not, when the parser hit the end of the data. * *----------------------------------------------------------------------------- */ int Rivet_Parser(Tcl_Obj *outbuf, Tcl_Obj *inbuf) { char *next; char *cur; const char *strstart = START_TAG; const char *strend = END_TAG; int endseqlen = strlen(END_TAG); int startseqlen = strlen(START_TAG); int inside = 0, p = 0, check_echo = 0; int inLen = 0; next = Tcl_GetStringFromObj(inbuf, &inLen); if (inLen == 0) return 0; while (*next != 0) { cur = next; next = (char *)Tcl_UtfNext(cur); if (!inside) { /* Outside the delimiting tags. */ if (*cur == strstart[p]) { if ((++p) == startseqlen) { /* We have matched the whole ending sequence. */ Tcl_AppendToObj(outbuf, "\"\n", 2); inside = 1; check_echo = 1; p = 0; continue; } } else { if (p > 0) { Tcl_AppendToObj(outbuf, (char *)strstart, p); p = 0; } /* or else just put the char in outbuf */ switch (*cur) { case '{': Tcl_AppendToObj(outbuf, "\\{", 2); break; case '}': Tcl_AppendToObj(outbuf, "\\}", 2); break; case '$': Tcl_AppendToObj(outbuf, "\\$", 2); break; case '[': Tcl_AppendToObj(outbuf, "\\[", 2); break; case ']': Tcl_AppendToObj(outbuf, "\\]", 2); break; case '"': Tcl_AppendToObj(outbuf, "\\\"", 2); break; case '\\': Tcl_AppendToObj(outbuf, "\\\\", 2); break; default: Tcl_AppendToObj(outbuf, cur, next - cur); break; } continue; } } else { /* Inside the delimiting tags. */ if (check_echo) { check_echo = 0; if (*cur == '=') { Tcl_AppendToObj(outbuf, "\nputs -nonewline ", -1); continue; } } if (*cur == strend[p]) { if ((++p) == endseqlen) { Tcl_AppendToObj(outbuf, "\nputs -nonewline \"", -1); inside = 0; p = 0; } } else { /* Plop stuff into outbuf, which we will then eval. */ if (p > 0) { Tcl_AppendToObj(outbuf, (char *)strend, p); p = 0; } Tcl_AppendToObj(outbuf, cur, next - cur); } } } //fprintf (stderr, "content:\n%s\n", Tcl_GetString(outbuf)); //fflush (stderr); return inside; } rivet-2.3.5/doc/images/toc-blank.png000644 001750 001750 00000000476 11436722370 016724 0ustar00mxmmxm000000 000000 PNG  IHDR kd0PLTEO&IbKGDHIDATxc?|` h BhCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com!*tEXtSignaturef7e388dabd4ef0097714b5643fdd3cfbb tEXtPage15x9+0+07vIENDB`rivet-2.3.5/TODO000644 001750 001750 00000004433 12453610043 013010 0ustar00mxmmxm000000 000000 this document is obsolete. If you have suggestions for TODOs please subscribe the rivet-dev mailing list sending a message to rivet-dev-subscribe@tcl.apache.org $Id: TODO 1650416 2015-01-08 23:17:55Z mxmanghi $ BUGS ==== TODO ==== * getting the plain post data. I use mod_dtcl as an xml server and I need to collect the broken xml (due to query string proccessing). if the user enters in the xml "=" I am lost. (From yahalom emet). * session handling. this feature can not be added by a tcl package so it is missing from the interface. (From yahalom emet). * Write commands like 'open' and such in the request namespace that keep track of open file pointers and close them in the cleanup. * Complete the NWS package. * Swipe include_* from NWS and rework it like: include ?-virtual? ?-noparse? file * Re-write load_file. This basically loads an entire .tcl file into the current document instead of sourcing it. This will allow us to cache even pages which only source a huge .tcl file. load_virtual should do the same but relative to the document root. * Create escape_string and unescape_string using Apache conventions. * Free Rivet commands of apache dependencies, which are moved into the TclWebapache.c file. Compatible file, for CGI only operating, TclWebcgi.c needs to be created. * Create replacements, in Tcl where possible, for Rivet commands in order to enable the aforementioned 'CGI' mode of operation. * Need to add a local.tcl for local procs and setup. * Script timeouts - limit time scripts can run before bailing out. * Safe mode. * Add documentation for commands implemented in Tcl. * Make some tests for commands implemented in Tcl. * Integrate package documentation with main documentation. * Document the 'form' package. * Integrate ncgi package, to help migration for people using it. * I think we need some kind of unified interface to launching tcl 'services'. These are separate Tcl processes that most likely exist to allow the Apache children to share data. * Find a way of integrating the Tcl event loop? * Document and add tests for parserivetdata command. MAYBE ===== * Maybe move ::request commands into a file called request.tcl. DONE ==== * Nice logo. * Documentation in XML. * var_get and var_post commands. * Apache 2 interface. rivet-2.3.5/doc/convert_examples.tcl.in000644 001750 001750 00000002712 12037355623 017562 0ustar00mxmmxm000000 000000 # convert_examples.tcl -- # # # reads the examples dir, checks if a file has been already converted # in and compares their mtimes. If the file in # is more recent the target dir is recreated. # The script uses Rivet's escape_sgml_chars to convert examples code # into text suitable to be inclued and displayed in XML/XHTML # documentation # NOTICE: This script requires Rivet, its scripts and # libraries to be in the auto_path. # usage: # # tclsh ./convert_examples # # $Id: convert_examples.tcl.in 1399019 2012-10-16 22:11:31Z mxmanghi $ # lappend auto_path @RIVET_TCL_TARGET@ lappend auto_path [file join @RIVET_TCL_TARGET@ rivet-tcl] package require rivetlib set source_dir examples set target_dir examples-sgml if {![info exists source_examples]} { set source_examples [glob [file join $source_dir *.*]] puts "escaping $source_examples to SGML compatible form" } foreach example $source_examples { set exam_name [file tail $example] set example_sgml [file join $target_dir $exam_name] set example_sgml_exists [file exists $example_sgml] if {!$example_sgml_exists || \ ([file mtime $example] > [file mtime $example_sgml])} { puts "$example needs rebuild" set example_text [string trim [::rivet::read_file $example]] set example_sgml_fid [open $example_sgml w+] puts $example_sgml_fid [::rivet::escape_sgml_chars $example_text] close $example_sgml_fid } } rivet-2.3.5/tclconfig/tcl.m4000644 001750 001750 00000375366 12672753233 015350 0ustar00mxmmxm000000 000000 # tcl.m4 -- # # This file provides a set of autoconf macros to help TEA-enable # a Tcl extension. # # Copyright (c) 1999-2000 Ajuba Solutions. # Copyright (c) 2002-2005 ActiveState Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: tcl.m4 1735565 2016-03-18 10:21:15Z mxmanghi $ AC_PREREQ(2.57) dnl TEA extensions pass us the version of TEA they think they dnl are compatible with (must be set in TEA_INIT below) dnl TEA_VERSION="3.9" # Possible values for key variables defined: # # TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem') # TEA_PLATFORM - windows unix # #------------------------------------------------------------------------ # TEA_PATH_TCLCONFIG -- # # Locate the tclConfig.sh file and perform a sanity check on # the Tcl compile flags # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-tcl=... # # Defines the following vars: # TCL_BIN_DIR Full path to the directory containing # the tclConfig.sh file #------------------------------------------------------------------------ AC_DEFUN([TEA_PATH_TCLCONFIG], [ dnl TEA specific: Make sure we are initialized AC_REQUIRE([TEA_INIT]) # # Ok, lets find the tcl configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tcl # if test x"${no_tcl}" = x ; then # we reset no_tcl in case something fails here no_tcl=true AC_ARG_WITH(tcl, AC_HELP_STRING([--with-tcl], [directory containing tcl configuration (tclConfig.sh)]), with_tclconfig="${withval}") AC_MSG_CHECKING([for Tcl configuration]) AC_CACHE_VAL(ac_cv_c_tclconfig,[ # First check to see if --with-tcl was specified. if test x"${with_tclconfig}" != x ; then case "${with_tclconfig}" in */tclConfig.sh ) if test -f "${with_tclconfig}"; then AC_MSG_WARN([--with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself]) with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`" fi ;; esac if test -f "${with_tclconfig}/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`" else AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh]) fi fi # then check for a private Tcl installation if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ../tcl \ `ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ ../../tcl \ `ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ ../../../tcl \ `ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do if test "${TEA_PLATFORM}" = "windows" \ -a -f "$i/win/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i/win; pwd)`" break fi if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i/unix; pwd)`" break fi done fi # on Darwin, check in Framework installation locations if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ `ls -d /Library/Frameworks 2>/dev/null` \ `ls -d /Network/Library/Frameworks 2>/dev/null` \ `ls -d /System/Library/Frameworks 2>/dev/null` \ ; do if test -f "$i/Tcl.framework/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`" break fi done fi # TEA specific: on Windows, check in common installation locations if test "${TEA_PLATFORM}" = "windows" \ -a x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d C:/Tcl/lib 2>/dev/null` \ `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \ ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i; pwd)`" break fi done fi # check in a few common install locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d ${libdir} 2>/dev/null` \ `ls -d ${exec_prefix}/lib 2>/dev/null` \ `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/lib64 2>/dev/null` \ ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i; pwd)`" break fi done fi # check in a few other private locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ${srcdir}/../tcl \ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do if test "${TEA_PLATFORM}" = "windows" \ -a -f "$i/win/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i/win; pwd)`" break fi if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i/unix; pwd)`" break fi done fi ]) if test x"${ac_cv_c_tclconfig}" = x ; then TCL_BIN_DIR="# no Tcl configs found" AC_MSG_ERROR([Can't find Tcl configuration definitions]) else no_tcl= TCL_BIN_DIR="${ac_cv_c_tclconfig}" AC_MSG_RESULT([found ${TCL_BIN_DIR}/tclConfig.sh]) fi fi ]) #------------------------------------------------------------------------ # TEA_PATH_TKCONFIG -- # # Locate the tkConfig.sh file # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-tk=... # # Defines the following vars: # TK_BIN_DIR Full path to the directory containing # the tkConfig.sh file #------------------------------------------------------------------------ AC_DEFUN([TEA_PATH_TKCONFIG], [ # # Ok, lets find the tk configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tk # if test x"${no_tk}" = x ; then # we reset no_tk in case something fails here no_tk=true AC_ARG_WITH(tk, AC_HELP_STRING([--with-tk], [directory containing tk configuration (tkConfig.sh)]), with_tkconfig="${withval}") AC_MSG_CHECKING([for Tk configuration]) AC_CACHE_VAL(ac_cv_c_tkconfig,[ # First check to see if --with-tkconfig was specified. if test x"${with_tkconfig}" != x ; then case "${with_tkconfig}" in */tkConfig.sh ) if test -f "${with_tkconfig}"; then AC_MSG_WARN([--with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself]) with_tkconfig="`echo "${with_tkconfig}" | sed 's!/tkConfig\.sh$!!'`" fi ;; esac if test -f "${with_tkconfig}/tkConfig.sh" ; then ac_cv_c_tkconfig="`(cd "${with_tkconfig}"; pwd)`" else AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh]) fi fi # then check for a private Tk library if test x"${ac_cv_c_tkconfig}" = x ; then for i in \ ../tk \ `ls -dr ../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \ ../../tk \ `ls -dr ../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \ ../../../tk \ `ls -dr ../../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do if test "${TEA_PLATFORM}" = "windows" \ -a -f "$i/win/tkConfig.sh" ; then ac_cv_c_tkconfig="`(cd $i/win; pwd)`" break fi if test -f "$i/unix/tkConfig.sh" ; then ac_cv_c_tkconfig="`(cd $i/unix; pwd)`" break fi done fi # on Darwin, check in Framework installation locations if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ `ls -d /Library/Frameworks 2>/dev/null` \ `ls -d /Network/Library/Frameworks 2>/dev/null` \ `ls -d /System/Library/Frameworks 2>/dev/null` \ ; do if test -f "$i/Tk.framework/tkConfig.sh" ; then ac_cv_c_tkconfig="`(cd $i/Tk.framework; pwd)`" break fi done fi # check in a few common install locations if test x"${ac_cv_c_tkconfig}" = x ; then for i in `ls -d ${libdir} 2>/dev/null` \ `ls -d ${exec_prefix}/lib 2>/dev/null` \ `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/lib64 2>/dev/null` \ ; do if test -f "$i/tkConfig.sh" ; then ac_cv_c_tkconfig="`(cd $i; pwd)`" break fi done fi # TEA specific: on Windows, check in common installation locations if test "${TEA_PLATFORM}" = "windows" \ -a x"${ac_cv_c_tkconfig}" = x ; then for i in `ls -d C:/Tcl/lib 2>/dev/null` \ `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \ ; do if test -f "$i/tkConfig.sh" ; then ac_cv_c_tkconfig="`(cd $i; pwd)`" break fi done fi # check in a few other private locations if test x"${ac_cv_c_tkconfig}" = x ; then for i in \ ${srcdir}/../tk \ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do if test "${TEA_PLATFORM}" = "windows" \ -a -f "$i/win/tkConfig.sh" ; then ac_cv_c_tkconfig="`(cd $i/win; pwd)`" break fi if test -f "$i/unix/tkConfig.sh" ; then ac_cv_c_tkconfig="`(cd $i/unix; pwd)`" break fi done fi ]) if test x"${ac_cv_c_tkconfig}" = x ; then TK_BIN_DIR="# no Tk configs found" AC_MSG_ERROR([Can't find Tk configuration definitions]) else no_tk= TK_BIN_DIR="${ac_cv_c_tkconfig}" AC_MSG_RESULT([found ${TK_BIN_DIR}/tkConfig.sh]) fi fi ]) #------------------------------------------------------------------------ # TEA_LOAD_TCLCONFIG -- # # Load the tclConfig.sh file # # Arguments: # # Requires the following vars to be set: # TCL_BIN_DIR # # Results: # # Subst the following vars: # TCL_BIN_DIR # TCL_SRC_DIR # TCL_LIB_FILE # #------------------------------------------------------------------------ AC_DEFUN([TEA_LOAD_TCLCONFIG], [ AC_MSG_CHECKING([for existence of ${TCL_BIN_DIR}/tclConfig.sh]) if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then AC_MSG_RESULT([loading]) . "${TCL_BIN_DIR}/tclConfig.sh" else AC_MSG_RESULT([could not find ${TCL_BIN_DIR}/tclConfig.sh]) fi # eval is required to do the TCL_DBGX substitution eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" # If the TCL_BIN_DIR is the build directory (not the install directory), # then set the common variable name to the value of the build variables. # For example, the variable TCL_LIB_SPEC will be set to the value # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC # instead of TCL_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. if test -f "${TCL_BIN_DIR}/Makefile" ; then TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}" TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}" TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}" elif test "`uname -s`" = "Darwin"; then # If Tcl was built as a framework, attempt to use the libraries # from the framework at the given location so that linking works # against Tcl.framework installed in an arbitrary location. case ${TCL_DEFS} in *TCL_FRAMEWORK*) if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then for i in "`cd "${TCL_BIN_DIR}"; pwd`" \ "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}" break fi done fi if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}" | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}" TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" fi ;; esac fi # eval is required to do the TCL_DBGX substitution eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" AC_SUBST(TCL_VERSION) AC_SUBST(TCL_PATCH_LEVEL) AC_SUBST(TCL_BIN_DIR) AC_SUBST(TCL_SRC_DIR) AC_SUBST(TCL_LIB_FILE) AC_SUBST(TCL_LIB_FLAG) AC_SUBST(TCL_LIB_SPEC) AC_SUBST(TCL_STUB_LIB_FILE) AC_SUBST(TCL_STUB_LIB_FLAG) AC_SUBST(TCL_STUB_LIB_SPEC) case "`uname -s`" in *CYGWIN_*) AC_MSG_CHECKING([for cygwin variant]) case ${TCL_EXTRA_CFLAGS} in *-mwin32*|*-mno-cygwin*) TEA_PLATFORM="windows" CFLAGS="$CFLAGS -mwin32" AC_MSG_RESULT([win32]) ;; *) TEA_PLATFORM="unix" AC_MSG_RESULT([unix]) ;; esac EXEEXT=".exe" ;; *) ;; esac # Do this here as we have fully defined TEA_PLATFORM now if test "${TEA_PLATFORM}" = "windows" ; then # The BUILD_$pkg is to define the correct extern storage class # handling when making this package AC_DEFINE_UNQUOTED(BUILD_${PACKAGE_NAME}) CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp" fi # TEA specific: AC_SUBST(CLEANFILES) AC_SUBST(TCL_LIBS) AC_SUBST(TCL_DEFS) AC_SUBST(TCL_EXTRA_CFLAGS) AC_SUBST(TCL_LD_FLAGS) AC_SUBST(TCL_SHLIB_LD_LIBS) ]) #------------------------------------------------------------------------ # TEA_LOAD_TKCONFIG -- # # Load the tkConfig.sh file # # Arguments: # # Requires the following vars to be set: # TK_BIN_DIR # # Results: # # Sets the following vars that should be in tkConfig.sh: # TK_BIN_DIR #------------------------------------------------------------------------ AC_DEFUN([TEA_LOAD_TKCONFIG], [ AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh]) if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then AC_MSG_RESULT([loading]) . "${TK_BIN_DIR}/tkConfig.sh" else AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh]) fi # eval is required to do the TK_DBGX substitution eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" # If the TK_BIN_DIR is the build directory (not the install directory), # then set the common variable name to the value of the build variables. # For example, the variable TK_LIB_SPEC will be set to the value # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC # instead of TK_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. if test -f "${TK_BIN_DIR}/Makefile" ; then TK_LIB_SPEC="${TK_BUILD_LIB_SPEC}" TK_STUB_LIB_SPEC="${TK_BUILD_STUB_LIB_SPEC}" TK_STUB_LIB_PATH="${TK_BUILD_STUB_LIB_PATH}" elif test "`uname -s`" = "Darwin"; then # If Tk was built as a framework, attempt to use the libraries # from the framework at the given location so that linking works # against Tk.framework installed in an arbitrary location. case ${TK_DEFS} in *TK_FRAMEWORK*) if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then for i in "`cd "${TK_BIN_DIR}"; pwd`" \ "`cd "${TK_BIN_DIR}"/../..; pwd`"; do if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}" break fi done fi if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}" | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}" TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" fi ;; esac fi # eval is required to do the TK_DBGX substitution eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" # TEA specific: Ensure windowingsystem is defined if test "${TEA_PLATFORM}" = "unix" ; then case ${TK_DEFS} in *MAC_OSX_TK*) AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?]) TEA_WINDOWINGSYSTEM="aqua" ;; *) TEA_WINDOWINGSYSTEM="x11" ;; esac elif test "${TEA_PLATFORM}" = "windows" ; then TEA_WINDOWINGSYSTEM="win32" fi AC_SUBST(TK_VERSION) AC_SUBST(TK_BIN_DIR) AC_SUBST(TK_SRC_DIR) AC_SUBST(TK_LIB_FILE) AC_SUBST(TK_LIB_FLAG) AC_SUBST(TK_LIB_SPEC) AC_SUBST(TK_STUB_LIB_FILE) AC_SUBST(TK_STUB_LIB_FLAG) AC_SUBST(TK_STUB_LIB_SPEC) # TEA specific: AC_SUBST(TK_LIBS) AC_SUBST(TK_XINCLUDES) ]) #------------------------------------------------------------------------ # TEA_PROG_TCLSH # Determine the fully qualified path name of the tclsh executable # in the Tcl build directory or the tclsh installed in a bin # directory. This macro will correctly determine the name # of the tclsh executable even if tclsh has not yet been # built in the build directory. The tclsh found is always # associated with a tclConfig.sh file. This tclsh should be used # only for running extension test cases. It should never be # or generation of files (like pkgIndex.tcl) at build time. # # Arguments # none # # Results # Subst's the following values: # TCLSH_PROG #------------------------------------------------------------------------ AC_DEFUN([TEA_PROG_TCLSH], [ AC_MSG_CHECKING([for tclsh]) if test -f "${TCL_BIN_DIR}/Makefile" ; then # tclConfig.sh is in Tcl build directory if test "${TEA_PLATFORM}" = "windows"; then TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" else TCLSH_PROG="${TCL_BIN_DIR}/tclsh" fi else # tclConfig.sh is in install location if test "${TEA_PLATFORM}" = "windows"; then TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" else TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}" fi list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \ `ls -d ${TCL_BIN_DIR}/.. 2>/dev/null` \ `ls -d ${TCL_PREFIX}/bin 2>/dev/null`" for i in $list ; do if test -f "$i/${TCLSH_PROG}" ; then REAL_TCL_BIN_DIR="`cd "$i"; pwd`/" break fi done TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}" fi AC_MSG_RESULT([${TCLSH_PROG}]) AC_SUBST(TCLSH_PROG) ]) #------------------------------------------------------------------------ # TEA_PROG_WISH # Determine the fully qualified path name of the wish executable # in the Tk build directory or the wish installed in a bin # directory. This macro will correctly determine the name # of the wish executable even if wish has not yet been # built in the build directory. The wish found is always # associated with a tkConfig.sh file. This wish should be used # only for running extension test cases. It should never be # or generation of files (like pkgIndex.tcl) at build time. # # Arguments # none # # Results # Subst's the following values: # WISH_PROG #------------------------------------------------------------------------ AC_DEFUN([TEA_PROG_WISH], [ AC_MSG_CHECKING([for wish]) if test -f "${TK_BIN_DIR}/Makefile" ; then # tkConfig.sh is in Tk build directory if test "${TEA_PLATFORM}" = "windows"; then WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}" else WISH_PROG="${TK_BIN_DIR}/wish" fi else # tkConfig.sh is in install location if test "${TEA_PLATFORM}" = "windows"; then WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}" else WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}" fi list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \ `ls -d ${TK_BIN_DIR}/.. 2>/dev/null` \ `ls -d ${TK_PREFIX}/bin 2>/dev/null`" for i in $list ; do if test -f "$i/${WISH_PROG}" ; then REAL_TK_BIN_DIR="`cd "$i"; pwd`/" break fi done WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}" fi AC_MSG_RESULT([${WISH_PROG}]) AC_SUBST(WISH_PROG) ]) #------------------------------------------------------------------------ # TEA_ENABLE_SHARED -- # # Allows the building of shared libraries # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-shared=yes|no # # Defines the following vars: # STATIC_BUILD Used for building import/export libraries # on Windows. # # Sets the following vars: # SHARED_BUILD Value of 1 or 0 #------------------------------------------------------------------------ AC_DEFUN([TEA_ENABLE_SHARED], [ AC_MSG_CHECKING([how to build libraries]) AC_ARG_ENABLE(shared, AC_HELP_STRING([--enable-shared], [build and link with shared libraries (default: on)]), [tcl_ok=$enableval], [tcl_ok=yes]) if test "${enable_shared+set}" = set; then enableval="$enable_shared" tcl_ok=$enableval else tcl_ok=yes fi if test "$tcl_ok" = "yes" ; then AC_MSG_RESULT([shared]) SHARED_BUILD=1 else AC_MSG_RESULT([static]) SHARED_BUILD=0 AC_DEFINE(STATIC_BUILD, 1, [Is this a static build?]) fi AC_SUBST(SHARED_BUILD) ]) #------------------------------------------------------------------------ # TEA_ENABLE_THREADS -- # # Specify if thread support should be enabled. If "yes" is specified # as an arg (optional), threads are enabled by default, "no" means # threads are disabled. "yes" is the default. # # TCL_THREADS is checked so that if you are compiling an extension # against a threaded core, your extension must be compiled threaded # as well. # # Note that it is legal to have a thread enabled extension run in a # threaded or non-threaded Tcl core, but a non-threaded extension may # only run in a non-threaded Tcl core. # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-threads # # Sets the following vars: # THREADS_LIBS Thread library(s) # # Defines the following vars: # TCL_THREADS # _REENTRANT # _THREAD_SAFE # #------------------------------------------------------------------------ AC_DEFUN([TEA_ENABLE_THREADS], [ AC_ARG_ENABLE(threads, AC_HELP_STRING([--enable-threads], [build with threads]), [tcl_ok=$enableval], [tcl_ok=yes]) if test "${enable_threads+set}" = set; then enableval="$enable_threads" tcl_ok=$enableval else tcl_ok=yes fi if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then TCL_THREADS=1 if test "${TEA_PLATFORM}" != "windows" ; then # We are always OK on Windows, so check what this platform wants: # USE_THREAD_ALLOC tells us to try the special thread-based # allocator that significantly reduces lock contention AC_DEFINE(USE_THREAD_ALLOC, 1, [Do we want to use the threaded memory allocator?]) AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) if test "`uname -s`" = "SunOS" ; then AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Do we really want to follow the standard? Yes we do!]) fi AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?]) AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no) if test "$tcl_ok" = "no"; then # Check a little harder for __pthread_mutex_init in the same # library, as some systems hide it there until pthread.h is # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] AC_CHECK_LIB(pthread, __pthread_mutex_init, tcl_ok=yes, tcl_ok=no) fi if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -lpthread" else AC_CHECK_LIB(pthreads, pthread_mutex_init, tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -lpthreads" else AC_CHECK_LIB(c, pthread_mutex_init, tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = "no"; then AC_CHECK_LIB(c_r, pthread_mutex_init, tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -pthread" else TCL_THREADS=0 AC_MSG_WARN([Do not know how to find pthread lib on your system - thread support disabled]) fi fi fi fi fi else TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output AC_MSG_CHECKING([for building with threads]) if test "${TCL_THREADS}" = 1; then AC_DEFINE(TCL_THREADS, 1, [Are we building with threads enabled?]) AC_MSG_RESULT([yes (default)]) else AC_MSG_RESULT([no]) fi # TCL_THREADS sanity checking. See if our request for building with # threads is the same as the way Tcl was built. If not, warn the user. case ${TCL_DEFS} in *THREADS=1*) if test "${TCL_THREADS}" = "0"; then AC_MSG_WARN([ Building ${PACKAGE_NAME} without threads enabled, but building against Tcl that IS thread-enabled. It is recommended to use --enable-threads.]) fi ;; *) if test "${TCL_THREADS}" = "1"; then AC_MSG_WARN([ --enable-threads requested, but building against a Tcl that is NOT thread-enabled. This is an OK configuration that will also run in a thread-enabled core.]) fi ;; esac AC_SUBST(TCL_THREADS) ]) #------------------------------------------------------------------------ # TEA_ENABLE_SYMBOLS -- # # Specify if debugging symbols should be used. # Memory (TCL_MEM_DEBUG) debugging can also be enabled. # # Arguments: # none # # TEA varies from core Tcl in that C|LDFLAGS_DEFAULT receives # the value of C|LDFLAGS_OPTIMIZE|DEBUG already substituted. # Requires the following vars to be set in the Makefile: # CFLAGS_DEFAULT # LDFLAGS_DEFAULT # # Results: # # Adds the following arguments to configure: # --enable-symbols # # Defines the following vars: # CFLAGS_DEFAULT Sets to $(CFLAGS_DEBUG) if true # Sets to $(CFLAGS_OPTIMIZE) if false # LDFLAGS_DEFAULT Sets to $(LDFLAGS_DEBUG) if true # Sets to $(LDFLAGS_OPTIMIZE) if false # DBGX Formerly used as debug library extension; # always blank now. # #------------------------------------------------------------------------ AC_DEFUN([TEA_ENABLE_SYMBOLS], [ dnl TEA specific: Make sure we are initialized AC_REQUIRE([TEA_CONFIG_CFLAGS]) AC_MSG_CHECKING([for build with symbols]) AC_ARG_ENABLE(symbols, AC_HELP_STRING([--enable-symbols], [build with debugging symbols (default: off)]), [tcl_ok=$enableval], [tcl_ok=no]) DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}" LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" AC_MSG_RESULT([no]) else CFLAGS_DEFAULT="${CFLAGS_DEBUG}" LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}" if test "$tcl_ok" = "yes"; then AC_MSG_RESULT([yes (standard debugging)]) fi fi # TEA specific: if test "${TEA_PLATFORM}" != "windows" ; then LDFLAGS_DEFAULT="${LDFLAGS}" fi AC_SUBST(CFLAGS_DEFAULT) AC_SUBST(LDFLAGS_DEFAULT) AC_SUBST(TCL_DBGX) if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?]) fi if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then AC_MSG_RESULT([enabled symbols mem debugging]) else AC_MSG_RESULT([enabled $tcl_ok debugging]) fi fi ]) #------------------------------------------------------------------------ # TEA_ENABLE_LANGINFO -- # # Allows use of modern nl_langinfo check for better l10n. # This is only relevant for Unix. # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-langinfo=yes|no (default is yes) # # Defines the following vars: # HAVE_LANGINFO Triggers use of nl_langinfo if defined. # #------------------------------------------------------------------------ AC_DEFUN([TEA_ENABLE_LANGINFO], [ AC_ARG_ENABLE(langinfo, AC_HELP_STRING([--enable-langinfo], [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]), [langinfo_ok=$enableval], [langinfo_ok=yes]) HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no]) fi AC_MSG_CHECKING([whether to use nl_langinfo]) if test "$langinfo_ok" = "yes"; then AC_CACHE_VAL(tcl_cv_langinfo_h, [ AC_TRY_COMPILE([#include ], [nl_langinfo(CODESET);], [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])]) AC_MSG_RESULT([$tcl_cv_langinfo_h]) if test $tcl_cv_langinfo_h = yes; then AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?]) fi else AC_MSG_RESULT([$langinfo_ok]) fi ]) #-------------------------------------------------------------------- # TEA_CONFIG_SYSTEM # # Determine what the system is (some things cannot be easily checked # on a feature-driven basis, alas). This can usually be done via the # "uname" command. # # Arguments: # none # # Results: # Defines the following var: # # system - System/platform/version identification code. # #-------------------------------------------------------------------- AC_DEFUN([TEA_CONFIG_SYSTEM], [ AC_CACHE_CHECK([system version], tcl_cv_sys_version, [ # TEA specific: if test "${TEA_PLATFORM}" = "windows" ; then tcl_cv_sys_version=windows else tcl_cv_sys_version=`uname -s`-`uname -r` if test "$?" -ne 0 ; then AC_MSG_WARN([can't find uname command]) tcl_cv_sys_version=unknown else if test "`uname -s`" = "AIX" ; then tcl_cv_sys_version=AIX-`uname -v`.`uname -r` fi fi fi ]) system=$tcl_cv_sys_version ]) #-------------------------------------------------------------------- # TEA_CONFIG_CFLAGS # # Try to determine the proper flags to pass to the compiler # for building shared libraries and other such nonsense. # # Arguments: # none # # Results: # # Defines and substitutes the following vars: # # DL_OBJS, DL_LIBS - removed for TEA, only needed by core. # LDFLAGS - Flags to pass to the compiler when linking object # files into an executable application binary such # as tclsh. # LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib", # that tell the run-time dynamic linker where to look # for shared libraries such as libtcl.so. Depends on # the variable LIB_RUNTIME_DIR in the Makefile. Could # be the same as CC_SEARCH_FLAGS if ${CC} is used to link. # CC_SEARCH_FLAGS-Flags to pass to ${CC}, such as "-Wl,-rpath,/usr/local/tcl/lib", # that tell the run-time dynamic linker where to look # for shared libraries such as libtcl.so. Depends on # the variable LIB_RUNTIME_DIR in the Makefile. # SHLIB_CFLAGS - Flags to pass to cc when compiling the components # of a shared library (may request position-independent # code, among other things). # SHLIB_LD - Base command to use for combining object files # into a shared library. # SHLIB_LD_LIBS - Dependent libraries for the linker to scan when # creating shared libraries. This symbol typically # goes at the end of the "ld" commands that build # shared libraries. The value of the symbol defaults to # "${LIBS}" if all of the dependent libraries should # be specified when creating a shared library. If # dependent libraries should not be specified (as on # SunOS 4.x, where they cause the link to fail, or in # general if Tcl and Tk aren't themselves shared # libraries), then this symbol has an empty string # as its value. # SHLIB_SUFFIX - Suffix to use for the names of dynamically loadable # extensions. An empty string means we don't know how # to use shared libraries on this platform. # LIB_SUFFIX - Specifies everything that comes after the "libfoo" # in a static or shared library name, using the $VERSION variable # to put the version in the right place. This is used # by platforms that need non-standard library names. # Examples: ${VERSION}.so.1.1 on NetBSD, since it needs # to have a version after the .so, and ${VERSION}.a # on AIX, since a shared library needs to have # a .a extension whereas shared objects for loadable # extensions have a .so extension. Defaults to # ${VERSION}${SHLIB_SUFFIX}. # CFLAGS_DEBUG - # Flags used when running the compiler in debug mode # CFLAGS_OPTIMIZE - # Flags used when running the compiler in optimize mode # CFLAGS - Additional CFLAGS added as necessary (usually 64-bit) # #-------------------------------------------------------------------- AC_DEFUN([TEA_CONFIG_CFLAGS], [ dnl TEA specific: Make sure we are initialized AC_REQUIRE([TEA_INIT]) # Step 0.a: Enable 64 bit support? AC_MSG_CHECKING([if 64bit support is requested]) AC_ARG_ENABLE(64bit, AC_HELP_STRING([--enable-64bit], [enable 64bit support (default: off)]), [do64bit=$enableval], [do64bit=no]) AC_MSG_RESULT([$do64bit]) # Step 0.b: Enable Solaris 64 bit VIS support? AC_MSG_CHECKING([if 64bit Sparc VIS support is requested]) AC_ARG_ENABLE(64bit-vis, AC_HELP_STRING([--enable-64bit-vis], [enable 64bit Sparc VIS support (default: off)]), [do64bitVIS=$enableval], [do64bitVIS=no]) AC_MSG_RESULT([$do64bitVIS]) # Force 64bit on with VIS AS_IF([test "$do64bitVIS" = "yes"], [do64bit=yes]) # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. AC_CACHE_CHECK([if compiler supports visibility "hidden"], tcl_cv_cc_visibility_hidden, [ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" AC_TRY_LINK([ extern __attribute__((__visibility__("hidden"))) void f(void); void f(void) {}], [f();], tcl_cv_cc_visibility_hidden=yes, tcl_cv_cc_visibility_hidden=no) CFLAGS=$hold_cflags]) AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [ AC_DEFINE(MODULE_SCOPE, [extern __attribute__((__visibility__("hidden")))], [Compiler support for module scope symbols]) ]) # Step 0.d: Disable -rpath support? AC_MSG_CHECKING([if rpath support is requested]) AC_ARG_ENABLE(rpath, AC_HELP_STRING([--disable-rpath], [disable rpath support (default: on)]), [doRpath=$enableval], [doRpath=yes]) AC_MSG_RESULT([$doRpath]) # TEA specific: Cross-compiling options for Windows/CE builds? AS_IF([test "${TEA_PLATFORM}" = windows], [ AC_MSG_CHECKING([if Windows/CE build is requested]) AC_ARG_ENABLE(wince, AC_HELP_STRING([--enable-wince], [enable Win/CE support (where applicable)]), [doWince=$enableval], [doWince=no]) AC_MSG_RESULT([$doWince]) ]) # Set the variable "system" to hold the name and version number # for the system. TEA_CONFIG_SYSTEM # Require ranlib early so we can override it in special cases below. AC_REQUIRE([AC_PROG_RANLIB]) # Set configuration options based on system name and version. # This is similar to Tcl's unix/tcl.m4 except that we've added a # "windows" case and removed some core-only vars. do64bit_ok=no # default to '{$LIBS}' and set to "" on per-platform necessary basis SHLIB_LD_LIBS='${LIBS}' # When ld needs options to work in 64-bit mode, put them in # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load] # is disabled by the user. [Bug 1016796] LDFLAGS_ARCH="" UNSHARED_LIB_SUFFIX="" # TEA specific: use PACKAGE_VERSION instead of VERSION TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`' ECHO_VERSION='`echo ${PACKAGE_VERSION}`' TCL_LIB_VERSIONS_OK=ok CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE=-O AS_IF([test "$GCC" = yes], [ # TEA specific: CFLAGS_OPTIMIZE=-O2 CFLAGS_WARNING="-Wall" ], [CFLAGS_WARNING=""]) dnl FIXME: Replace AC_CHECK_PROG with AC_CHECK_TOOL once cross compiling is fixed. dnl AC_CHECK_TOOL(AR, ar) AC_CHECK_PROG(AR, ar, ar) STLIB_LD='${AR} cr' LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" AS_IF([test "x$SHLIB_VERSION" = x],[SHLIB_VERSION="1.0"]) case $system in # TEA specific: windows) # This is a 2-stage check to make sure we have the 64-bit SDK # We have to know where the SDK is installed. # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs # MACHINE is IX86 for LINK, but this is used by the manifest, # which requires x86|amd64|ia64. MACHINE="X86" if test "$do64bit" != "no" ; then if test "x${MSSDK}x" = "xx" ; then MSSDK="C:/Progra~1/Microsoft Platform SDK" fi MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'` PATH64="" case "$do64bit" in amd64|x64|yes) MACHINE="AMD64" ; # default to AMD64 64-bit build PATH64="${MSSDK}/Bin/Win64/x86/AMD64" ;; ia64) MACHINE="IA64" PATH64="${MSSDK}/Bin/Win64" ;; esac if test ! -d "${PATH64}" ; then AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode]) AC_MSG_WARN([Ensure latest Platform SDK is installed]) do64bit="no" else AC_MSG_RESULT([ Using 64-bit $MACHINE mode]) do64bit_ok="yes" fi fi if test "$doWince" != "no" ; then if test "$do64bit" != "no" ; then AC_MSG_ERROR([Windows/CE and 64-bit builds incompatible]) fi if test "$GCC" = "yes" ; then AC_MSG_ERROR([Windows/CE and GCC builds incompatible]) fi TEA_PATH_CELIB # Set defaults for common evc4/PPC2003 setup # Currently Tcl requires 300+, possibly 420+ for sockets CEVERSION=420; # could be 211 300 301 400 420 ... TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ... ARCH=ARM; # could be ARM MIPS X86EM ... PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002" if test "$doWince" != "yes"; then # If !yes then the user specified something # Reset ARCH to allow user to skip specifying it ARCH= eval `echo $doWince | awk -F, '{ \ if (length([$]1)) { printf "CEVERSION=\"%s\"\n", [$]1; \ if ([$]1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \ if (length([$]2)) { printf "TARGETCPU=\"%s\"\n", toupper([$]2) }; \ if (length([$]3)) { printf "ARCH=\"%s\"\n", toupper([$]3) }; \ if (length([$]4)) { printf "PLATFORM=\"%s\"\n", [$]4 }; \ }'` if test "x${ARCH}" = "x" ; then ARCH=$TARGETCPU; fi fi OSVERSION=WCE$CEVERSION; if test "x${WCEROOT}" = "x" ; then WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0" if test ! -d "${WCEROOT}" ; then WCEROOT="C:/Program Files/Microsoft eMbedded Tools" fi fi if test "x${SDKROOT}" = "x" ; then SDKROOT="C:/Program Files/Windows CE Tools" if test ! -d "${SDKROOT}" ; then SDKROOT="C:/Windows CE Tools" fi fi WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'` SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'` if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \ -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then AC_MSG_ERROR([could not find PocketPC SDK or target compiler to enable WinCE mode [$CEVERSION,$TARGETCPU,$ARCH,$PLATFORM]]) doWince="no" else # We could PATH_NOSPACE these, but that's not important, # as long as we quote them when used. CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include" if test -d "${CEINCLUDE}/${TARGETCPU}" ; then CEINCLUDE="${CEINCLUDE}/${TARGETCPU}" fi CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" fi fi if test "$GCC" != "yes" ; then if test "${SHARED_BUILD}" = "0" ; then runtime=-MT else runtime=-MD fi if test "$do64bit" != "no" ; then # All this magic is necessary for the Win64 SDK RC1 - hobbs CC="\"${PATH64}/cl.exe\"" CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\"" RC="\"${MSSDK}/bin/rc.exe\"" lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" LINKBIN="\"${PATH64}/link.exe\"" CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d" CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" # Avoid 'unresolved external symbol __security_cookie' # errors, c.f. http://support.microsoft.com/?id=894573 TEA_ADD_LIBS([bufferoverflowU.lib]) elif test "$doWince" != "no" ; then CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin" if test "${TARGETCPU}" = "X86"; then CC="\"${CEBINROOT}/cl.exe\"" else CC="\"${CEBINROOT}/cl${ARCH}.exe\"" fi CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\"" RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\"" arch=`echo ${ARCH} | awk '{print tolower([$]0)}'` defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS" if test "${SHARED_BUILD}" = "1" ; then # Static CE builds require static celib as well defs="${defs} _DLL" fi for i in $defs ; do AC_DEFINE_UNQUOTED($i, 1, [WinCE def ]$i) done AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION, [_WIN32_WCE version]) AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION, [UNDER_CE version]) CFLAGS_DEBUG="-nologo -Zi -Od" CFLAGS_OPTIMIZE="-nologo -Ox" lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'` lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo" LINKBIN="\"${CEBINROOT}/link.exe\"" AC_SUBST(CELIB_DIR) else RC="rc" lflags="-nologo" LINKBIN="link" CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d" CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" fi fi if test "$GCC" = "yes"; then # mingw gcc mode RC="windres" CFLAGS_DEBUG="-g" CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" SHLIB_LD="$CC -shared" UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}" LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}" else SHLIB_LD="${LINKBIN} -dll ${lflags}" # link -lib only works when -lib is the first arg STLIB_LD="${LINKBIN} -lib ${lflags}" UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib' PATHTYPE=-w # For information on what debugtype is most useful, see: # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp # and also # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx # This essentially turns it all on. LDFLAGS_DEBUG="-debug -debugtype:cv" LDFLAGS_OPTIMIZE="-release" if test "$doWince" != "no" ; then LDFLAGS_CONSOLE="-link ${lflags}" LDFLAGS_WINDOW=${LDFLAGS_CONSOLE} else LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" fi fi SHLIB_SUFFIX=".dll" SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll' TCL_LIB_VERSIONS_OK=nodots ;; AIX-*) AS_IF([test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"], [ # AIX requires the _r compiler when gcc isn't being used case "${CC}" in *_r|*_r\ *) # ok ... ;; *) # Make sure only first arg gets _r CC=`echo "$CC" | sed -e 's/^\([[^ ]]*\)/\1_r/'` ;; esac AC_MSG_RESULT([Using $CC for compiling with threads]) ]) LIBS="$LIBS -lc" SHLIB_CFLAGS="" SHLIB_SUFFIX=".so" LD_LIBRARY_PATH_VAR="LIBPATH" # Check to enable 64-bit flags for compiler/linker AS_IF([test "$do64bit" = yes], [ AS_IF([test "$GCC" = yes], [ AC_MSG_WARN([64bit mode not supported with GCC on $system]) ], [ do64bit_ok=yes CFLAGS="$CFLAGS -q64" LDFLAGS_ARCH="-q64" RANLIB="${RANLIB} -X64" AR="${AR} -X64" SHLIB_LD_FLAGS="-b64" ]) ]) AS_IF([test "`uname -m`" = ia64], [ # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC SHLIB_LD="/usr/ccs/bin/ld -G -z text" AS_IF([test "$GCC" = yes], [ CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' ], [ CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' ]) LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' ], [ AS_IF([test "$GCC" = yes], [ SHLIB_LD='${CC} -shared -Wl,-bexpall' ], [ SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry" LDFLAGS="$LDFLAGS -brtl" ]) SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} ]) ;; BeOS*) SHLIB_CFLAGS="-fPIC" SHLIB_LD='${CC} -nostart' SHLIB_SUFFIX=".so" #----------------------------------------------------------- # Check for inet_ntoa in -lbind, for BeOS (which also needs # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- AC_CHECK_LIB(bind, inet_ntoa, [LIBS="$LIBS -lbind -lsocket"]) ;; BSD/OS-4.*) SHLIB_CFLAGS="-export-dynamic -fPIC" SHLIB_LD='${CC} -shared' SHLIB_SUFFIX=".so" LDFLAGS="$LDFLAGS -export-dynamic" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; CYGWIN_*) SHLIB_CFLAGS="" SHLIB_LD='${CC} -shared' SHLIB_SUFFIX=".dll" EXE_SUFFIX=".exe" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; Haiku*) LDFLAGS="$LDFLAGS -Wl,--export-dynamic" SHLIB_CFLAGS="-fPIC" SHLIB_SUFFIX=".so" SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' AC_CHECK_LIB(network, inet_ntoa, [LIBS="$LIBS -lnetwork"]) ;; HP-UX-*.11.*) # Use updated header definitions where possible AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?]) # TEA specific: Needed by Tcl, but not most extensions #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?]) #LIBS="$LIBS -lxnet" # Use the XOPEN network library AS_IF([test "`uname -m`" = ia64], [ SHLIB_SUFFIX=".so" # Use newer C++ library for C++ extensions #if test "$GCC" != "yes" ; then # CPPFLAGS="-AA" #fi ], [ SHLIB_SUFFIX=".sl" ]) AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) AS_IF([test "$tcl_ok" = yes], [ LDFLAGS="$LDFLAGS -E" CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" ]) AS_IF([test "$GCC" = yes], [ SHLIB_LD='${CC} -shared' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} ], [ CFLAGS="$CFLAGS -z" # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc #CFLAGS="$CFLAGS +DAportable" SHLIB_CFLAGS="+z" SHLIB_LD="ld -b" ]) # Check to enable 64-bit flags for compiler/linker AS_IF([test "$do64bit" = "yes"], [ AS_IF([test "$GCC" = yes], [ case `${CC} -dumpmachine` in hppa64*) # 64-bit gcc in use. Fix flags for GNU ld. do64bit_ok=yes SHLIB_LD='${CC} -shared' AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} ;; *) AC_MSG_WARN([64bit mode not supported with GCC on $system]) ;; esac ], [ do64bit_ok=yes CFLAGS="$CFLAGS +DD64" LDFLAGS_ARCH="+DD64" ]) ]) ;; IRIX-6.*) SHLIB_CFLAGS="" SHLIB_LD="ld -n32 -shared -rdata_shared" SHLIB_SUFFIX=".so" AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) AS_IF([test "$GCC" = yes], [ CFLAGS="$CFLAGS -mabi=n32" LDFLAGS="$LDFLAGS -mabi=n32" ], [ case $system in IRIX-6.3) # Use to build 6.2 compatible binaries on 6.3. CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS" ;; *) CFLAGS="$CFLAGS -n32" ;; esac LDFLAGS="$LDFLAGS -n32" ]) ;; IRIX64-6.*) SHLIB_CFLAGS="" SHLIB_LD="ld -n32 -shared -rdata_shared" SHLIB_SUFFIX=".so" AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) # Check to enable 64-bit flags for compiler/linker AS_IF([test "$do64bit" = yes], [ AS_IF([test "$GCC" = yes], [ AC_MSG_WARN([64bit mode not supported by gcc]) ], [ do64bit_ok=yes SHLIB_LD="ld -64 -shared -rdata_shared" CFLAGS="$CFLAGS -64" LDFLAGS_ARCH="-64" ]) ]) ;; Linux*) SHLIB_CFLAGS="-fPIC" SHLIB_SUFFIX=".so" # TEA specific: CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}' LDFLAGS="$LDFLAGS -Wl,--export-dynamic" AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"]) AS_IF([test $do64bit = yes], [ AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [ hold_cflags=$CFLAGS CFLAGS="$CFLAGS -m64" AC_TRY_LINK(,, tcl_cv_cc_m64=yes, tcl_cv_cc_m64=no) CFLAGS=$hold_cflags]) AS_IF([test $tcl_cv_cc_m64 = yes], [ CFLAGS="$CFLAGS -m64" do64bit_ok=yes ]) ]) # The combo of gcc + glibc has a bug related to inlining of # functions like strtod(). The -fno-builtin flag should address # this problem but it does not work. The -fno-inline flag is kind # of overkill but it works. Disable inlining only when one of the # files in compat/*.c is being linked in. AS_IF([test x"${USE_COMPAT}" != x],[CFLAGS="$CFLAGS -fno-inline"]) ;; GNU*) SHLIB_CFLAGS="-fPIC" SHLIB_SUFFIX=".so" SHLIB_LD='${CC} -shared' LDFLAGS="$LDFLAGS -Wl,--export-dynamic" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"]) ;; Lynx*) SHLIB_CFLAGS="-fPIC" SHLIB_SUFFIX=".so" CFLAGS_OPTIMIZE=-02 SHLIB_LD='${CC} -shared' LD_FLAGS="-Wl,--export-dynamic" AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) ;; OpenBSD-*) SHLIB_CFLAGS="-fPIC" SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' SHLIB_SUFFIX=".so" AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [ AC_EGREP_CPP(yes, [ #ifdef __ELF__ yes #endif ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)]) AS_IF([test $tcl_cv_ld_elf = yes], [ LDFLAGS=-Wl,-export-dynamic ], [LDFLAGS=""]) AS_IF([test "${TCL_THREADS}" = "1"], [ # OpenBSD builds and links with -pthread, never -lpthread. LIBS=`echo $LIBS | sed s/-lpthread//` CFLAGS="$CFLAGS -pthread" SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread" ]) # OpenBSD doesn't do version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; NetBSD-*|FreeBSD-[[3-4]].*) # FreeBSD 3.* and greater have ELF. # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs SHLIB_CFLAGS="-fPIC" SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' SHLIB_SUFFIX=".so" LDFLAGS="$LDFLAGS -export-dynamic" AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} AS_IF([test "${TCL_THREADS}" = "1"], [ # The -pthread needs to go in the CFLAGS, not LIBS LIBS=`echo $LIBS | sed s/-pthread//` CFLAGS="$CFLAGS -pthread" LDFLAGS="$LDFLAGS -pthread" ]) case $system in FreeBSD-3.*) # FreeBSD-3 doesn't handle version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' TCL_LIB_VERSIONS_OK=nodots ;; esac ;; FreeBSD-*) # This configuration from FreeBSD Ports. SHLIB_CFLAGS="-fPIC" SHLIB_LD="${CC} -shared" TCL_SHLIB_LD_EXTRAS="-soname \$[@]" SHLIB_SUFFIX=".so" LDFLAGS="" AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) AS_IF([test "${TCL_THREADS}" = "1"], [ # The -pthread needs to go in the LDFLAGS, not LIBS LIBS=`echo $LIBS | sed s/-pthread//` CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LDFLAGS="$LDFLAGS $PTHREAD_LIBS"]) # Version numbers are dot-stripped by system policy. TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .` UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1' TCL_LIB_VERSIONS_OK=nodots ;; Darwin-*) CFLAGS_OPTIMIZE="-Os" SHLIB_CFLAGS="-fno-common" # To avoid discrepancies between what headers configure sees during # preprocessing tests and compiling tests, move any -isysroot and # -mmacosx-version-min flags from CFLAGS to CPPFLAGS: CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \ awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`" CFLAGS="`echo " ${CFLAGS}" | \ awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ if (!([$]i~/^(isysroot|mmacosx-version-min)/)) print "-"[$]i}'`" AS_IF([test $do64bit = yes], [ case `arch` in ppc) AC_CACHE_CHECK([if compiler accepts -arch ppc64 flag], tcl_cv_cc_arch_ppc64, [ hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" AC_TRY_LINK(,, tcl_cv_cc_arch_ppc64=yes, tcl_cv_cc_arch_ppc64=no) CFLAGS=$hold_cflags]) AS_IF([test $tcl_cv_cc_arch_ppc64 = yes], [ CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" do64bit_ok=yes ]);; i386) AC_CACHE_CHECK([if compiler accepts -arch x86_64 flag], tcl_cv_cc_arch_x86_64, [ hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch x86_64" AC_TRY_LINK(,, tcl_cv_cc_arch_x86_64=yes, tcl_cv_cc_arch_x86_64=no) CFLAGS=$hold_cflags]) AS_IF([test $tcl_cv_cc_arch_x86_64 = yes], [ CFLAGS="$CFLAGS -arch x86_64" do64bit_ok=yes ]);; *) AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]);; esac ], [ # Check for combined 32-bit and 64-bit fat build AS_IF([echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \ && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '], [ fat_32_64=yes]) ]) # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}' AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [ hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no) LDFLAGS=$hold_ldflags]) AS_IF([test $tcl_cv_ld_single_module = yes], [ SHLIB_LD="${SHLIB_LD} -Wl,-single_module" ]) # TEA specific: link shlib with current and compatiblity version flags vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([[0-9]]\{1,5\}\)\(\(\.[[0-9]]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d` SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}" SHLIB_SUFFIX=".dylib" # Don't use -prebind when building for Mac OS X 10.4 or later only: AS_IF([test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \ "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4], [ LDFLAGS="$LDFLAGS -prebind"]) LDFLAGS="$LDFLAGS -headerpad_max_install_names" AC_CACHE_CHECK([if ld accepts -search_paths_first flag], tcl_cv_ld_search_paths_first, [ hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-search_paths_first" AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes, tcl_cv_ld_search_paths_first=no) LDFLAGS=$hold_ldflags]) AS_IF([test $tcl_cv_ld_search_paths_first = yes], [ LDFLAGS="$LDFLAGS -Wl,-search_paths_first" ]) AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [ AC_DEFINE(MODULE_SCOPE, [__private_extern__], [Compiler support for module scope symbols]) tcl_cv_cc_visibility_hidden=yes ]) CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" # TEA specific: for combined 32 & 64 bit fat builds of Tk # extensions, verify that 64-bit build is possible. AS_IF([test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"], [ AS_IF([test "${TEA_WINDOWINGSYSTEM}" = x11], [ AC_CACHE_CHECK([for 64-bit X11], tcl_cv_lib_x11_64, [ for v in CFLAGS CPPFLAGS LDFLAGS; do eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' done CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include" LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11" AC_TRY_LINK([#include ], [XrmInitialize();], tcl_cv_lib_x11_64=yes, tcl_cv_lib_x11_64=no) for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done]) ]) AS_IF([test "${TEA_WINDOWINGSYSTEM}" = aqua], [ AC_CACHE_CHECK([for 64-bit Tk], tcl_cv_lib_tk_64, [ for v in CFLAGS CPPFLAGS LDFLAGS; do eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' done CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}" LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}" AC_TRY_LINK([#include ], [Tk_InitStubs(NULL, "", 0);], tcl_cv_lib_tk_64=yes, tcl_cv_lib_tk_64=no) for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done]) ]) # remove 64-bit arch flags from CFLAGS et al. if configuration # does not support 64-bit. AS_IF([test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no], [ AC_MSG_NOTICE([Removing 64-bit architectures from compiler & linker flags]) for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"' done]) ]) ;; OS/390-*) CFLAGS_OPTIMIZE="" # Optimizer is buggy AC_DEFINE(_OE_SOCKETS, 1, # needed in sys/socket.h [Should OS/390 do the right thing with sockets?]) ;; OSF1-V*) # Digital OSF/1 SHLIB_CFLAGS="" AS_IF([test "$SHARED_BUILD" = 1], [ SHLIB_LD='ld -shared -expect_unresolved "*"' ], [ SHLIB_LD='ld -non_shared -expect_unresolved "*"' ]) SHLIB_SUFFIX=".so" AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) AS_IF([test "$GCC" = yes], [CFLAGS="$CFLAGS -mieee"], [ CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"]) # see pthread_intro(3) for pthread support on osf1, k.furukawa AS_IF([test "${TCL_THREADS}" = 1], [ CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE" CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64" LIBS=`echo $LIBS | sed s/-lpthreads//` AS_IF([test "$GCC" = yes], [ LIBS="$LIBS -lpthread -lmach -lexc" ], [ CFLAGS="$CFLAGS -pthread" LDFLAGS="$LDFLAGS -pthread" ]) ]) ;; QNX-6*) # QNX RTP # This may work for all QNX, but it was only reported for v6. SHLIB_CFLAGS="-fPIC" SHLIB_LD="ld -Bshareable -x" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; SCO_SV-3.2*) AS_IF([test "$GCC" = yes], [ SHLIB_CFLAGS="-fPIC -melf" LDFLAGS="$LDFLAGS -melf -Wl,-Bexport" ], [ SHLIB_CFLAGS="-Kpic -belf" LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" ]) SHLIB_LD="ld -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; SunOS-5.[[0-6]]) # Careful to not let 5.10+ fall into this case # Note: If _REENTRANT isn't defined, then Solaris # won't define thread-safe library routines. AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Do we really want to follow the standard? Yes we do!]) SHLIB_CFLAGS="-KPIC" SHLIB_SUFFIX=".so" AS_IF([test "$GCC" = yes], [ SHLIB_LD='${CC} -shared' CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} ], [ SHLIB_LD="/usr/ccs/bin/ld -G -z text" CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} ]) ;; SunOS-5*) # Note: If _REENTRANT isn't defined, then Solaris # won't define thread-safe library routines. AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Do we really want to follow the standard? Yes we do!]) SHLIB_CFLAGS="-KPIC" # Check to enable 64-bit flags for compiler/linker AS_IF([test "$do64bit" = yes], [ arch=`isainfo` AS_IF([test "$arch" = "sparcv9 sparc"], [ AS_IF([test "$GCC" = yes], [ AS_IF([test "`${CC} -dumpversion | awk -F. '{print [$]1}'`" -lt 3], [ AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system]) ], [ do64bit_ok=yes CFLAGS="$CFLAGS -m64 -mcpu=v9" LDFLAGS="$LDFLAGS -m64 -mcpu=v9" SHLIB_CFLAGS="-fPIC" ]) ], [ do64bit_ok=yes AS_IF([test "$do64bitVIS" = yes], [ CFLAGS="$CFLAGS -xarch=v9a" LDFLAGS_ARCH="-xarch=v9a" ], [ CFLAGS="$CFLAGS -xarch=v9" LDFLAGS_ARCH="-xarch=v9" ]) # Solaris 64 uses this as well #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64" ]) ], [AS_IF([test "$arch" = "amd64 i386"], [ AS_IF([test "$GCC" = yes], [ case $system in SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*) do64bit_ok=yes CFLAGS="$CFLAGS -m64" LDFLAGS="$LDFLAGS -m64";; *) AC_MSG_WARN([64bit mode not supported with GCC on $system]);; esac ], [ do64bit_ok=yes case $system in SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*) CFLAGS="$CFLAGS -m64" LDFLAGS="$LDFLAGS -m64";; *) CFLAGS="$CFLAGS -xarch=amd64" LDFLAGS="$LDFLAGS -xarch=amd64";; esac ]) ], [AC_MSG_WARN([64bit mode not supported for $arch])])]) ]) SHLIB_SUFFIX=".so" AS_IF([test "$GCC" = yes], [ SHLIB_LD='${CC} -shared' CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} AS_IF([test "$do64bit_ok" = yes], [ AS_IF([test "$arch" = "sparcv9 sparc"], [ # We need to specify -static-libgcc or we need to # add the path to the sparv9 libgcc. # JH: static-libgcc is necessary for core Tcl, but may # not be necessary for extensions. SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc" # for finding sparcv9 libgcc, get the regular libgcc # path, remove so name and append 'sparcv9' #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" ], [AS_IF([test "$arch" = "amd64 i386"], [ # JH: static-libgcc is necessary for core Tcl, but may # not be necessary for extensions. SHLIB_LD="$SHLIB_LD -m64 -static-libgcc" ])]) ]) ], [ case $system in SunOS-5.[[1-9]][[0-9]]*) # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';; *) SHLIB_LD='/usr/ccs/bin/ld -G -z text';; esac CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' ]) ;; esac AS_IF([test "$do64bit" = yes -a "$do64bit_ok" = no], [ AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform]) ]) dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so dnl # until the end of configure, as configure's compile and link tests use dnl # both CPPFLAGS and CFLAGS (unlike our compile and link) but configure's dnl # preprocessing tests use only CPPFLAGS. AC_CONFIG_COMMANDS_PRE([CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""]) # Add in the arch flags late to ensure it wasn't removed. # Not necessary in TEA, but this is aligned with core LDFLAGS="$LDFLAGS $LDFLAGS_ARCH" # If we're running gcc, then change the C flags for compiling shared # libraries to the right flags for gcc, instead of those for the # standard manufacturer compiler. AS_IF([test "$GCC" = yes], [ case $system in AIX-*) ;; BSD/OS*) ;; CYGWIN_*) ;; IRIX*) ;; NetBSD-*|FreeBSD-*|OpenBSD-*) ;; Darwin-*) ;; SCO_SV-3.2*) ;; windows) ;; *) SHLIB_CFLAGS="-fPIC" ;; esac]) AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [ AC_DEFINE(MODULE_SCOPE, [extern], [No Compiler support for module scope symbols]) AC_DEFINE([NO_VIZ], [], [No description provided for NO_VIZ]...) ]) AS_IF([test "$SHARED_LIB_SUFFIX" = ""], [ # TEA specific: use PACKAGE_VERSION instead of VERSION SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}']) AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [ # TEA specific: use PACKAGE_VERSION instead of VERSION UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a']) AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_OPTIMIZE) AC_SUBST(CFLAGS_WARNING) AC_SUBST(STLIB_LD) AC_SUBST(SHLIB_LD) AC_SUBST(SHLIB_LD_LIBS) AC_SUBST(SHLIB_CFLAGS) AC_SUBST(LD_LIBRARY_PATH_VAR) # These must be called after we do the basic CFLAGS checks and # verify any possible 64-bit or similar switches are necessary TEA_TCL_EARLY_FLAGS TEA_TCL_64BIT_FLAGS ]) #-------------------------------------------------------------------- # TEA_SERIAL_PORT # # Determine which interface to use to talk to the serial port. # Note that #include lines must begin in leftmost column for # some compilers to recognize them as preprocessor directives, # and some build environments have stdin not pointing at a # pseudo-terminal (usually /dev/null instead.) # # Arguments: # none # # Results: # # Defines only one of the following vars: # HAVE_SYS_MODEM_H # USE_TERMIOS # USE_TERMIO # USE_SGTTY # #-------------------------------------------------------------------- AC_DEFUN([TEA_SERIAL_PORT], [ AC_CHECK_HEADERS(sys/modem.h) AC_CACHE_CHECK([termios vs. termio vs. sgtty], tcl_cv_api_serial, [ AC_TRY_RUN([ #include int main() { struct termios t; if (tcgetattr(0, &t) == 0) { cfsetospeed(&t, 0); t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no) if test $tcl_cv_api_serial = no ; then AC_TRY_RUN([ #include int main() { struct termio t; if (ioctl(0, TCGETA, &t) == 0) { t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no) fi if test $tcl_cv_api_serial = no ; then AC_TRY_RUN([ #include int main() { struct sgttyb t; if (ioctl(0, TIOCGETP, &t) == 0) { t.sg_ospeed = 0; t.sg_flags |= ODDP | EVENP | RAW; return 0; } return 1; }], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=no, tcl_cv_api_serial=no) fi if test $tcl_cv_api_serial = no ; then AC_TRY_RUN([ #include #include int main() { struct termios t; if (tcgetattr(0, &t) == 0 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { cfsetospeed(&t, 0); t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no) fi if test $tcl_cv_api_serial = no; then AC_TRY_RUN([ #include #include int main() { struct termio t; if (ioctl(0, TCGETA, &t) == 0 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no) fi if test $tcl_cv_api_serial = no; then AC_TRY_RUN([ #include #include int main() { struct sgttyb t; if (ioctl(0, TIOCGETP, &t) == 0 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { t.sg_ospeed = 0; t.sg_flags |= ODDP | EVENP | RAW; return 0; } return 1; }], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none) fi]) case $tcl_cv_api_serial in termios) AC_DEFINE(USE_TERMIOS, 1, [Use the termios API for serial lines]);; termio) AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);; sgtty) AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);; esac ]) #-------------------------------------------------------------------- # TEA_MISSING_POSIX_HEADERS # # Supply substitutes for missing POSIX header files. Special # notes: # - stdlib.h doesn't define strtol, strtoul, or # strtod in some versions of SunOS # - some versions of string.h don't declare procedures such # as strstr # # Arguments: # none # # Results: # # Defines some of the following vars: # NO_DIRENT_H # NO_ERRNO_H # NO_VALUES_H # HAVE_LIMITS_H or NO_LIMITS_H # NO_STDLIB_H # NO_STRING_H # NO_SYS_WAIT_H # NO_DLFCN_H # HAVE_SYS_PARAM_H # # HAVE_STRING_H ? # # tkUnixPort.h checks for HAVE_LIMITS_H, so do both HAVE and # CHECK on limits.h #-------------------------------------------------------------------- AC_DEFUN([TEA_MISSING_POSIX_HEADERS], [ AC_CACHE_CHECK([dirent.h], tcl_cv_dirent_h, [ AC_TRY_LINK([#include #include ], [ #ifndef _POSIX_SOURCE # ifdef __Lynx__ /* * Generate compilation error to make the test fail: Lynx headers * are only valid if really in the POSIX environment. */ missing_procedure(); # endif #endif DIR *d; struct dirent *entryPtr; char *p; d = opendir("foobar"); entryPtr = readdir(d); p = entryPtr->d_name; closedir(d); ], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no)]) if test $tcl_cv_dirent_h = no; then AC_DEFINE(NO_DIRENT_H, 1, [Do we have ?]) fi # TEA specific: AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have ?])]) AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have ?])]) AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have ?])]) AC_CHECK_HEADER(limits.h, [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have ?])], [AC_DEFINE(NO_LIMITS_H, 1, [Do we have ?])]) AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0) AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0) AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0) AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0) if test $tcl_ok = 0; then AC_DEFINE(NO_STDLIB_H, 1, [Do we have ?]) fi AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0) AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0) AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0) # See also memmove check below for a place where NO_STRING_H can be # set and why. if test $tcl_ok = 0; then AC_DEFINE(NO_STRING_H, 1, [Do we have ?]) fi AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have ?])]) AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have ?])]) # OS/390 lacks sys/param.h (and doesn't need it, by chance). AC_HAVE_HEADERS(sys/param.h) ]) #-------------------------------------------------------------------- # TEA_PATH_X # # Locate the X11 header files and the X11 library archive. Try # the ac_path_x macro first, but if it doesn't find the X stuff # (e.g. because there's no xmkmf program) then check through # a list of possible directories. Under some conditions the # autoconf macro will return an include directory that contains # no include files, so double-check its result just to be safe. # # This should be called after TEA_CONFIG_CFLAGS as setting the # LIBS line can confuse some configure macro magic. # # Arguments: # none # # Results: # # Sets the following vars: # XINCLUDES # XLIBSW # PKG_LIBS (appends to) # #-------------------------------------------------------------------- AC_DEFUN([TEA_PATH_X], [ if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then TEA_PATH_UNIX_X fi ]) AC_DEFUN([TEA_PATH_UNIX_X], [ AC_PATH_X not_really_there="" if test "$no_x" = ""; then if test "$x_includes" = ""; then AC_TRY_CPP([#include ], , not_really_there="yes") else if test ! -r $x_includes/X11/Intrinsic.h; then not_really_there="yes" fi fi fi if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then AC_MSG_CHECKING([for X11 header files]) found_xincludes="no" AC_TRY_CPP([#include ], found_xincludes="yes", found_xincludes="no") if test "$found_xincludes" = "no"; then dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include" for i in $dirs ; do if test -r $i/X11/Intrinsic.h; then AC_MSG_RESULT([$i]) XINCLUDES=" -I$i" found_xincludes="yes" break fi done fi else if test "$x_includes" != ""; then XINCLUDES="-I$x_includes" found_xincludes="yes" fi fi if test "$found_xincludes" = "no"; then AC_MSG_RESULT([couldn't find any!]) fi if test "$no_x" = yes; then AC_MSG_CHECKING([for X11 libraries]) XLIBSW=nope dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" for i in $dirs ; do if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then AC_MSG_RESULT([$i]) XLIBSW="-L$i -lX11" x_libraries="$i" break fi done else if test "$x_libraries" = ""; then XLIBSW=-lX11 else XLIBSW="-L$x_libraries -lX11" fi fi if test "$XLIBSW" = nope ; then AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow) fi if test "$XLIBSW" = nope ; then AC_MSG_RESULT([could not find any! Using -lX11.]) XLIBSW=-lX11 fi # TEA specific: if test x"${XLIBSW}" != x ; then PKG_LIBS="${PKG_LIBS} ${XLIBSW}" fi ]) #-------------------------------------------------------------------- # TEA_BLOCKING_STYLE # # The statements below check for systems where POSIX-style # non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. # On these systems (mostly older ones), use the old BSD-style # FIONBIO approach instead. # # Arguments: # none # # Results: # # Defines some of the following vars: # HAVE_SYS_IOCTL_H # HAVE_SYS_FILIO_H # USE_FIONBIO # O_NONBLOCK # #-------------------------------------------------------------------- AC_DEFUN([TEA_BLOCKING_STYLE], [ AC_CHECK_HEADERS(sys/ioctl.h) AC_CHECK_HEADERS(sys/filio.h) TEA_CONFIG_SYSTEM AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O]) case $system in OSF*) AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?]) AC_MSG_RESULT([FIONBIO]) ;; *) AC_MSG_RESULT([O_NONBLOCK]) ;; esac ]) #-------------------------------------------------------------------- # TEA_TIME_HANDLER # # Checks how the system deals with time.h, what time structures # are used on the system, and what fields the structures have. # # Arguments: # none # # Results: # # Defines some of the following vars: # USE_DELTA_FOR_TZ # HAVE_TM_GMTOFF # HAVE_TM_TZADJ # HAVE_TIMEZONE_VAR # #-------------------------------------------------------------------- AC_DEFUN([TEA_TIME_HANDLER], [ AC_CHECK_HEADERS(sys/time.h) AC_HEADER_TIME AC_STRUCT_TIMEZONE AC_CHECK_FUNCS(gmtime_r localtime_r) AC_CACHE_CHECK([tm_tzadj in struct tm], tcl_cv_member_tm_tzadj, [ AC_TRY_COMPILE([#include ], [struct tm tm; tm.tm_tzadj;], tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no)]) if test $tcl_cv_member_tm_tzadj = yes ; then AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?]) fi AC_CACHE_CHECK([tm_gmtoff in struct tm], tcl_cv_member_tm_gmtoff, [ AC_TRY_COMPILE([#include ], [struct tm tm; tm.tm_gmtoff;], tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no)]) if test $tcl_cv_member_tm_gmtoff = yes ; then AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?]) fi # # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [ AC_TRY_COMPILE([#include ], [extern long timezone; timezone += 1; exit (0);], tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)]) if test $tcl_cv_timezone_long = yes ; then AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?]) else # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time, [ AC_TRY_COMPILE([#include ], [extern time_t timezone; timezone += 1; exit (0);], tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)]) if test $tcl_cv_timezone_time = yes ; then AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?]) fi fi ]) #-------------------------------------------------------------------- # TEA_BUGGY_STRTOD # # Under Solaris 2.4, strtod returns the wrong value for the # terminating character under some conditions. Check for this # and if the problem exists use a substitute procedure # "fixstrtod" (provided by Tcl) that corrects the error. # Also, on Compaq's Tru64 Unix 5.0, # strtod(" ") returns 0.0 instead of a failure to convert. # # Arguments: # none # # Results: # # Might defines some of the following vars: # strtod (=fixstrtod) # #-------------------------------------------------------------------- AC_DEFUN([TEA_BUGGY_STRTOD], [ AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0) if test "$tcl_strtod" = 1; then AC_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[ AC_TRY_RUN([ extern double strtod(); int main() { char *infString="Inf", *nanString="NaN", *spaceString=" "; char *term; double value; value = strtod(infString, &term); if ((term != infString) && (term[-1] == 0)) { exit(1); } value = strtod(nanString, &term); if ((term != nanString) && (term[-1] == 0)) { exit(1); } value = strtod(spaceString, &term); if (term == (spaceString+1)) { exit(1); } exit(0); }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy, tcl_cv_strtod_buggy=buggy)]) if test "$tcl_cv_strtod_buggy" = buggy; then AC_LIBOBJ([fixstrtod]) USE_COMPAT=1 AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?]) fi fi ]) #-------------------------------------------------------------------- # TEA_TCL_LINK_LIBS # # Search for the libraries needed to link the Tcl shell. # Things like the math library (-lm) and socket stuff (-lsocket vs. # -lnsl) are dealt with here. # # Arguments: # Requires the following vars to be set in the Makefile: # DL_LIBS (not in TEA, only needed in core) # LIBS # MATH_LIBS # # Results: # # Subst's the following var: # TCL_LIBS # MATH_LIBS # # Might append to the following vars: # LIBS # # Might define the following vars: # HAVE_NET_ERRNO_H # #-------------------------------------------------------------------- AC_DEFUN([TEA_TCL_LINK_LIBS], [ #-------------------------------------------------------------------- # On a few very rare systems, all of the libm.a stuff is # already in libc.a. Set compiler flags accordingly. # Also, Linux requires the "ieee" library for math to work # right (and it must appear before "-lm"). #-------------------------------------------------------------------- AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm") AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"]) #-------------------------------------------------------------------- # Interactive UNIX requires -linet instead of -lsocket, plus it # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"]) AC_CHECK_HEADER(net/errno.h, [ AC_DEFINE(HAVE_NET_ERRNO_H, 1, [Do we have ?])]) #-------------------------------------------------------------------- # Check for the existence of the -lsocket and -lnsl libraries. # The order here is important, so that they end up in the right # order in the command line generated by make. Here are some # special considerations: # 1. Use "connect" and "accept" to check for -lsocket, and # "gethostbyname" to check for -lnsl. # 2. Use each function name only once: can't redo a check because # autoconf caches the results of the last check and won't redo it. # 3. Use -lnsl and -lsocket only if they supply procedures that # aren't already present in the normal libraries. This is because # IRIX 5.2 has libraries, but they aren't needed and they're # bogus: they goof up name resolution if used. # 4. On some SVR4 systems, can't use -lsocket without -lnsl too. # To get around this problem, check for both libraries together # if -lsocket doesn't work by itself. #-------------------------------------------------------------------- tcl_checkBoth=0 AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1) if test "$tcl_checkSocket" = 1; then AC_CHECK_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt, LIBS="$LIBS -lsocket", tcl_checkBoth=1)]) fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs]) fi AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])]) # TEA specific: Don't perform the eval of the libraries here because # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}' AC_SUBST(TCL_LIBS) AC_SUBST(MATH_LIBS) ]) #-------------------------------------------------------------------- # TEA_TCL_EARLY_FLAGS # # Check for what flags are needed to be passed so the correct OS # features are available. # # Arguments: # None # # Results: # # Might define the following vars: # _ISOC99_SOURCE # _LARGEFILE64_SOURCE # _LARGEFILE_SOURCE64 # #-------------------------------------------------------------------- AC_DEFUN([TEA_TCL_EARLY_FLAG],[ AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]), AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no, AC_TRY_COMPILE([[#define ]$1[ 1 ]$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no))) if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then AC_DEFINE($1, 1, [Add the ]$1[ flag when building]) tcl_flags="$tcl_flags $1" fi ]) AC_DEFUN([TEA_TCL_EARLY_FLAGS],[ AC_MSG_CHECKING([for required early compiler flags]) tcl_flags="" TEA_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include ], [char *p = (char *)strtoll; char *q = (char *)strtoull;]) TEA_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include ], [struct stat64 buf; int i = stat64("/", &buf);]) TEA_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include ], [char *p = (char *)open64;]) if test "x${tcl_flags}" = "x" ; then AC_MSG_RESULT([none]) else AC_MSG_RESULT([${tcl_flags}]) fi ]) #-------------------------------------------------------------------- # TEA_TCL_64BIT_FLAGS # # Check for what is defined in the way of 64-bit features. # # Arguments: # None # # Results: # # Might define the following vars: # TCL_WIDE_INT_IS_LONG # TCL_WIDE_INT_TYPE # HAVE_STRUCT_DIRENT64 # HAVE_STRUCT_STAT64 # HAVE_TYPE_OFF64_T # #-------------------------------------------------------------------- AC_DEFUN([TEA_TCL_64BIT_FLAGS], [ AC_MSG_CHECKING([for 64-bit integer type]) AC_CACHE_VAL(tcl_cv_type_64bit,[ tcl_cv_type_64bit=none # See if the compiler knows natively about __int64 AC_TRY_COMPILE(,[__int64 value = (__int64) 0;], tcl_type_64bit=__int64, tcl_type_64bit="long long") # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... AC_TRY_COMPILE(,[switch (0) { case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ; }],tcl_cv_type_64bit=${tcl_type_64bit})]) if test "${tcl_cv_type_64bit}" = none ; then AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Are wide integers to be implemented with C 'long's?]) AC_MSG_RESULT([using long]) elif test "${tcl_cv_type_64bit}" = "__int64" \ -a "${TEA_PLATFORM}" = "windows" ; then # TEA specific: We actually want to use the default tcl.h checks in # this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER* AC_MSG_RESULT([using Tcl header defaults]) else AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit}, [What type should be used to define wide integers?]) AC_MSG_RESULT([${tcl_cv_type_64bit}]) # Now check for auxiliary declarations AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[ AC_TRY_COMPILE([#include #include ],[struct dirent64 p;], tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)]) if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in ?]) fi AC_CACHE_CHECK([for struct stat64], tcl_cv_struct_stat64,[ AC_TRY_COMPILE([#include ],[struct stat64 p; ], tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)]) if test "x${tcl_cv_struct_stat64}" = "xyes" ; then AC_DEFINE(HAVE_STRUCT_STAT64, 1, [Is 'struct stat64' in ?]) fi AC_CHECK_FUNCS(open64 lseek64) AC_MSG_CHECKING([for off64_t]) AC_CACHE_VAL(tcl_cv_type_off64_t,[ AC_TRY_COMPILE([#include ],[off64_t offset; ], tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)]) dnl Define HAVE_TYPE_OFF64_T only when the off64_t type and the dnl functions lseek64 and open64 are defined. if test "x${tcl_cv_type_off64_t}" = "xyes" && \ test "x${ac_cv_func_lseek64}" = "xyes" && \ test "x${ac_cv_func_open64}" = "xyes" ; then AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in ?]) AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi fi ]) ## ## Here ends the standard Tcl configuration bits and starts the ## TEA specific functions ## #------------------------------------------------------------------------ # TEA_INIT -- # # Init various Tcl Extension Architecture (TEA) variables. # This should be the first called TEA_* macro. # # Arguments: # none # # Results: # # Defines and substs the following vars: # CYGPATH # EXEEXT # Defines only: # TEA_VERSION # TEA_INITED # TEA_PLATFORM (windows or unix) # # "cygpath" is used on windows to generate native path names for include # files. These variables should only be used with the compiler and linker # since they generate native path names. # # EXEEXT # Select the executable extension based on the host type. This # is a lightweight replacement for AC_EXEEXT that doesn't require # a compiler. #------------------------------------------------------------------------ AC_DEFUN([TEA_INIT], [ # TEA extensions pass this us the version of TEA they think they # are compatible with. TEA_VERSION="3.9" AC_MSG_CHECKING([for correct TEA configuration]) if test x"${PACKAGE_NAME}" = x ; then AC_MSG_ERROR([ The PACKAGE_NAME variable must be defined by your TEA configure.in]) fi if test x"$1" = x ; then AC_MSG_ERROR([ TEA version not specified.]) elif test "$1" != "${TEA_VERSION}" ; then AC_MSG_RESULT([warning: requested TEA version "$1", have "${TEA_VERSION}"]) else AC_MSG_RESULT([ok (TEA ${TEA_VERSION})]) fi case "`uname -s`" in *win32*|*WIN32*|*MINGW32_*) AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo) EXEEXT=".exe" TEA_PLATFORM="windows" ;; *CYGWIN_*) CYGPATH=echo EXEEXT=".exe" # TEA_PLATFORM is determined later in LOAD_TCLCONFIG ;; *) CYGPATH=echo EXEEXT="" TEA_PLATFORM="unix" ;; esac # Check if exec_prefix is set. If not use fall back to prefix. # Note when adjusted, so that TEA_PREFIX can correct for this. # This is needed for recursive configures, since autoconf propagates # $prefix, but not $exec_prefix (doh!). if test x$exec_prefix = xNONE ; then exec_prefix_default=yes exec_prefix=$prefix fi AC_SUBST(EXEEXT) AC_SUBST(CYGPATH) # This package name must be replaced statically for AC_SUBST to work AC_SUBST(PKG_LIB_FILE) # Substitute STUB_LIB_FILE in case package creates a stub library too. AC_SUBST(PKG_STUB_LIB_FILE) # We AC_SUBST these here to ensure they are subst'ed, # in case the user doesn't call TEA_ADD_... AC_SUBST(PKG_STUB_SOURCES) AC_SUBST(PKG_STUB_OBJECTS) AC_SUBST(PKG_TCL_SOURCES) AC_SUBST(PKG_HEADERS) AC_SUBST(PKG_INCLUDES) AC_SUBST(PKG_LIBS) AC_SUBST(PKG_CFLAGS) ]) #------------------------------------------------------------------------ # TEA_ADD_SOURCES -- # # Specify one or more source files. Users should check for # the right platform before adding to their list. # It is not important to specify the directory, as long as it is # in the generic, win or unix subdirectory of $(srcdir). # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_SOURCES # PKG_OBJECTS #------------------------------------------------------------------------ AC_DEFUN([TEA_ADD_SOURCES], [ vars="$@" for i in $vars; do case $i in [\$]*) # allow $-var names PKG_SOURCES="$PKG_SOURCES $i" PKG_OBJECTS="$PKG_OBJECTS $i" ;; *) # check for existence - allows for generic/win/unix VPATH # To add more dirs here (like 'src'), you have to update VPATH # in Makefile.in as well if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ -a ! -f "${srcdir}/macosx/$i" \ ; then AC_MSG_ERROR([could not find source file '$i']) fi PKG_SOURCES="$PKG_SOURCES $i" # this assumes it is in a VPATH dir i=`basename $i` # handle user calling this before or after TEA_SETUP_COMPILER if test x"${OBJEXT}" != x ; then j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}" else j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}" fi PKG_OBJECTS="$PKG_OBJECTS $j" ;; esac done AC_SUBST(PKG_SOURCES) AC_SUBST(PKG_OBJECTS) ]) #------------------------------------------------------------------------ # TEA_ADD_STUB_SOURCES -- # # Specify one or more source files. Users should check for # the right platform before adding to their list. # It is not important to specify the directory, as long as it is # in the generic, win or unix subdirectory of $(srcdir). # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_STUB_SOURCES # PKG_STUB_OBJECTS #------------------------------------------------------------------------ AC_DEFUN([TEA_ADD_STUB_SOURCES], [ vars="$@" for i in $vars; do # check for existence - allows for generic/win/unix VPATH if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ -a ! -f "${srcdir}/macosx/$i" \ ; then AC_MSG_ERROR([could not find stub source file '$i']) fi PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i" # this assumes it is in a VPATH dir i=`basename $i` # handle user calling this before or after TEA_SETUP_COMPILER if test x"${OBJEXT}" != x ; then j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}" else j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}" fi PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j" done AC_SUBST(PKG_STUB_SOURCES) AC_SUBST(PKG_STUB_OBJECTS) ]) #------------------------------------------------------------------------ # TEA_ADD_TCL_SOURCES -- # # Specify one or more Tcl source files. These should be platform # independent runtime files. # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_TCL_SOURCES #------------------------------------------------------------------------ AC_DEFUN([TEA_ADD_TCL_SOURCES], [ vars="$@" for i in $vars; do # check for existence, be strict because it is installed if test ! -f "${srcdir}/$i" ; then AC_MSG_ERROR([could not find tcl source file '${srcdir}/$i']) fi PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i" done AC_SUBST(PKG_TCL_SOURCES) ]) #------------------------------------------------------------------------ # TEA_ADD_HEADERS -- # # Specify one or more source headers. Users should check for # the right platform before adding to their list. # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_HEADERS #------------------------------------------------------------------------ AC_DEFUN([TEA_ADD_HEADERS], [ vars="$@" for i in $vars; do # check for existence, be strict because it is installed if test ! -f "${srcdir}/$i" ; then AC_MSG_ERROR([could not find header file '${srcdir}/$i']) fi PKG_HEADERS="$PKG_HEADERS $i" done AC_SUBST(PKG_HEADERS) ]) #------------------------------------------------------------------------ # TEA_ADD_INCLUDES -- # # Specify one or more include dirs. Users should check for # the right platform before adding to their list. # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_INCLUDES #------------------------------------------------------------------------ AC_DEFUN([TEA_ADD_INCLUDES], [ vars="$@" for i in $vars; do PKG_INCLUDES="$PKG_INCLUDES $i" done AC_SUBST(PKG_INCLUDES) ]) #------------------------------------------------------------------------ # TEA_ADD_LIBS -- # # Specify one or more libraries. Users should check for # the right platform before adding to their list. For Windows, # libraries provided in "foo.lib" format will be converted to # "-lfoo" when using GCC (mingw). # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_LIBS #------------------------------------------------------------------------ AC_DEFUN([TEA_ADD_LIBS], [ vars="$@" for i in $vars; do if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then # Convert foo.lib to -lfoo for GCC. No-op if not *.lib i=`echo "$i" | sed -e 's/^\([[^-]].*\)\.lib[$]/-l\1/i'` fi PKG_LIBS="$PKG_LIBS $i" done AC_SUBST(PKG_LIBS) ]) #------------------------------------------------------------------------ # TEA_ADD_CFLAGS -- # # Specify one or more CFLAGS. Users should check for # the right platform before adding to their list. # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_CFLAGS #------------------------------------------------------------------------ AC_DEFUN([TEA_ADD_CFLAGS], [ PKG_CFLAGS="$PKG_CFLAGS $@" AC_SUBST(PKG_CFLAGS) ]) #------------------------------------------------------------------------ # TEA_ADD_CLEANFILES -- # # Specify one or more CLEANFILES. # # Arguments: # one or more file names to clean target # # Results: # # Appends to CLEANFILES, already defined for subst in LOAD_TCLCONFIG #------------------------------------------------------------------------ AC_DEFUN([TEA_ADD_CLEANFILES], [ CLEANFILES="$CLEANFILES $@" ]) #------------------------------------------------------------------------ # TEA_PREFIX -- # # Handle the --prefix=... option by defaulting to what Tcl gave # # Arguments: # none # # Results: # # If --prefix or --exec-prefix was not specified, $prefix and # $exec_prefix will be set to the values given to Tcl when it was # configured. #------------------------------------------------------------------------ AC_DEFUN([TEA_PREFIX], [ if test "${prefix}" = "NONE"; then prefix_default=yes if test x"${TCL_PREFIX}" != x; then AC_MSG_NOTICE([--prefix defaulting to TCL_PREFIX ${TCL_PREFIX}]) prefix=${TCL_PREFIX} else AC_MSG_NOTICE([--prefix defaulting to /usr/local]) prefix=/usr/local fi fi if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \ -o x"${exec_prefix_default}" = x"yes" ; then if test x"${TCL_EXEC_PREFIX}" != x; then AC_MSG_NOTICE([--exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}]) exec_prefix=${TCL_EXEC_PREFIX} else AC_MSG_NOTICE([--exec-prefix defaulting to ${prefix}]) exec_prefix=$prefix fi fi ]) #------------------------------------------------------------------------ # TEA_SETUP_COMPILER_CC -- # # Do compiler checks the way we want. This is just a replacement # for AC_PROG_CC in TEA configure.in files to make them cleaner. # # Arguments: # none # # Results: # # Sets up CC var and other standard bits we need to make executables. #------------------------------------------------------------------------ AC_DEFUN([TEA_SETUP_COMPILER_CC], [ # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE) # in this macro, they need to go into TEA_SETUP_COMPILER instead. # If the user did not set CFLAGS, set it now to keep # the AC_PROG_CC macro from adding "-g -O2". if test "${CFLAGS+set}" != "set" ; then CFLAGS="" fi AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL #-------------------------------------------------------------------- # Checks to see if the make program sets the $MAKE variable. #-------------------------------------------------------------------- AC_PROG_MAKE_SET #-------------------------------------------------------------------- # Find ranlib #-------------------------------------------------------------------- AC_PROG_RANLIB #-------------------------------------------------------------------- # Determines the correct binary file extension (.o, .obj, .exe etc.) #-------------------------------------------------------------------- AC_OBJEXT AC_EXEEXT ]) #------------------------------------------------------------------------ # TEA_SETUP_COMPILER -- # # Do compiler checks that use the compiler. This must go after # TEA_SETUP_COMPILER_CC, which does the actual compiler check. # # Arguments: # none # # Results: # # Sets up CC var and other standard bits we need to make executables. #------------------------------------------------------------------------ AC_DEFUN([TEA_SETUP_COMPILER], [ # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here. AC_REQUIRE([TEA_SETUP_COMPILER_CC]) #------------------------------------------------------------------------ # If we're using GCC, see if the compiler understands -pipe. If so, use it. # It makes compiling go faster. (This is only a performance feature.) #------------------------------------------------------------------------ if test -z "$no_pipe" -a -n "$GCC"; then AC_CACHE_CHECK([if the compiler understands -pipe], tcl_cv_cc_pipe, [ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe" AC_TRY_COMPILE(,, tcl_cv_cc_pipe=yes, tcl_cv_cc_pipe=no) CFLAGS=$hold_cflags]) if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi fi #-------------------------------------------------------------------- # Common compiler flag setup #-------------------------------------------------------------------- AC_C_BIGENDIAN if test "${TEA_PLATFORM}" = "unix" ; then TEA_TCL_LINK_LIBS TEA_MISSING_POSIX_HEADERS # Let the user call this, because if it triggers, they will # need a compat/strtod.c that is correct. Users can also # use Tcl_GetDouble(FromObj) instead. #TEA_BUGGY_STRTOD fi ]) #------------------------------------------------------------------------ # TEA_MAKE_LIB -- # # Generate a line that can be used to build a shared/unshared library # in a platform independent manner. # # Arguments: # none # # Requires: # # Results: # # Defines the following vars: # CFLAGS - Done late here to note disturb other AC macros # MAKE_LIB - Command to execute to build the Tcl library; # differs depending on whether or not Tcl is being # compiled as a shared library. # MAKE_SHARED_LIB Makefile rule for building a shared library # MAKE_STATIC_LIB Makefile rule for building a static library # MAKE_STUB_LIB Makefile rule for building a stub library # VC_MANIFEST_EMBED_DLL Makefile rule for embedded VC manifest in DLL # VC_MANIFEST_EMBED_EXE Makefile rule for embedded VC manifest in EXE #------------------------------------------------------------------------ AC_DEFUN([TEA_MAKE_LIB], [ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_OBJECTS)" MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\[$]@ \$(PKG_OBJECTS)" AC_EGREP_CPP([manifest needed], [ #if defined(_MSC_VER) && _MSC_VER >= 1400 print("manifest needed") #endif ], [ # Could do a CHECK_PROG for mt, but should always be with MSVC8+ VC_MANIFEST_EMBED_DLL="mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;2" VC_MANIFEST_EMBED_EXE="mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;1" MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}" TEA_ADD_CLEANFILES([*.manifest]) ]) MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_STUB_OBJECTS)" else MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)" MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}" MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)" fi if test "${SHARED_BUILD}" = "1" ; then MAKE_LIB="${MAKE_SHARED_LIB} " else MAKE_LIB="${MAKE_STATIC_LIB} " fi #-------------------------------------------------------------------- # Shared libraries and static libraries have different names. # Use the double eval to make sure any variables in the suffix is # substituted. (@@@ Might not be necessary anymore) #-------------------------------------------------------------------- if test "${TEA_PLATFORM}" = "windows" ; then if test "${SHARED_BUILD}" = "1" ; then # We force the unresolved linking of symbols that are really in # the private libraries of Tcl and Tk. SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\"" if test x"${TK_BIN_DIR}" != x ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" fi eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" else eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" fi # Some packages build their own stubs libraries eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" if test "$GCC" = "yes"; then PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE} fi # These aren't needed on Windows (either MSVC or gcc) RANLIB=: RANLIB_STUB=: else RANLIB_STUB="${RANLIB}" if test "${SHARED_BUILD}" = "1" ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}" if test x"${TK_BIN_DIR}" != x ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}" fi eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" RANLIB=: else eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" fi # Some packages build their own stubs libraries eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" fi # These are escaped so that only CFLAGS is picked up at configure time. # The other values will be substituted at make time. CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}" if test "${SHARED_BUILD}" = "1" ; then CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}" fi AC_SUBST(MAKE_LIB) AC_SUBST(MAKE_SHARED_LIB) AC_SUBST(MAKE_STATIC_LIB) AC_SUBST(MAKE_STUB_LIB) AC_SUBST(RANLIB_STUB) AC_SUBST(VC_MANIFEST_EMBED_DLL) AC_SUBST(VC_MANIFEST_EMBED_EXE) ]) #------------------------------------------------------------------------ # TEA_LIB_SPEC -- # # Compute the name of an existing object library located in libdir # from the given base name and produce the appropriate linker flags. # # Arguments: # basename The base name of the library without version # numbers, extensions, or "lib" prefixes. # extra_dir Extra directory in which to search for the # library. This location is used first, then # $prefix/$exec-prefix, then some defaults. # # Requires: # TEA_INIT and TEA_PREFIX must be called first. # # Results: # # Defines the following vars: # ${basename}_LIB_NAME The computed library name. # ${basename}_LIB_SPEC The computed linker flags. #------------------------------------------------------------------------ AC_DEFUN([TEA_LIB_SPEC], [ AC_MSG_CHECKING([for $1 library]) # Look in exec-prefix for the library (defined by TEA_PREFIX). tea_lib_name_dir="${exec_prefix}/lib" # Or in a user-specified location. if test x"$2" != x ; then tea_extra_lib_dir=$2 else tea_extra_lib_dir=NONE fi for i in \ `ls -dr ${tea_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr ${tea_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \ `ls -dr ${tea_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr ${tea_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \ `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \ `ls -dr /usr/lib64/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr /usr/lib64/lib$1[[0-9]]* 2>/dev/null ` \ `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` ; do if test -f "$i" ; then tea_lib_name_dir=`dirname $i` $1_LIB_NAME=`basename $i` $1_LIB_PATH_NAME=$i break fi done if test "${TEA_PLATFORM}" = "windows"; then $1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME} 2>/dev/null`\" else # Strip off the leading "lib" and trailing ".a" or ".so" tea_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'` $1_LIB_SPEC="-L${tea_lib_name_dir} -l${tea_lib_name_lib}" fi if test "x${$1_LIB_NAME}" = x ; then AC_MSG_ERROR([not found]) else AC_MSG_RESULT([${$1_LIB_SPEC}]) fi ]) #------------------------------------------------------------------------ # TEA_PRIVATE_TCL_HEADERS -- # # Locate the private Tcl include files # # Arguments: # # Requires: # TCL_SRC_DIR Assumes that TEA_LOAD_TCLCONFIG has # already been called. # # Results: # # Substs the following vars: # TCL_TOP_DIR_NATIVE # TCL_INCLUDES #------------------------------------------------------------------------ AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [ # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh} AC_REQUIRE([TEA_PUBLIC_TCL_HEADERS]) AC_MSG_CHECKING([for Tcl private include files]) TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}` TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\" # Check to see if tclPort.h isn't already with the public headers # Don't look for tclInt.h because that resides with tcl.h in the core # sources, but the Port headers are in a different directory if test "${TEA_PLATFORM}" = "windows" -a \ -f "${ac_cv_c_tclh}/tclWinPort.h"; then result="private headers found with public headers" elif test "${TEA_PLATFORM}" = "unix" -a \ -f "${ac_cv_c_tclh}/tclUnixPort.h"; then result="private headers found with public headers" else TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\" if test "${TEA_PLATFORM}" = "windows"; then TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\" else TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\" fi # Overwrite the previous TCL_INCLUDES as this should capture both # public and private headers in the same set. # We want to ensure these are substituted so as not to require # any *_NATIVE vars be defined in the Makefile TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}" if test "`uname -s`" = "Darwin"; then # If Tcl was built as a framework, attempt to use # the framework's Headers and PrivateHeaders directories case ${TCL_DEFS} in *TCL_FRAMEWORK*) if test -d "${TCL_BIN_DIR}/Headers" -a \ -d "${TCL_BIN_DIR}/PrivateHeaders"; then TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}" else TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`" fi ;; esac result="Using ${TCL_INCLUDES}" else if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then AC_MSG_ERROR([Cannot find private header tclInt.h in ${TCL_SRC_DIR}]) fi result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}" fi fi AC_SUBST(TCL_TOP_DIR_NATIVE) AC_SUBST(TCL_INCLUDES) AC_MSG_RESULT([${result}]) ]) #------------------------------------------------------------------------ # TEA_PUBLIC_TCL_HEADERS -- # # Locate the installed public Tcl header files # # Arguments: # None. # # Requires: # CYGPATH must be set # # Results: # # Adds a --with-tclinclude switch to configure. # Result is cached. # # Substs the following vars: # TCL_INCLUDES #------------------------------------------------------------------------ AC_DEFUN([TEA_PUBLIC_TCL_HEADERS], [ AC_MSG_CHECKING([for Tcl public headers]) AC_ARG_WITH(tclinclude, [ --with-tclinclude directory containing the public Tcl header files], with_tclinclude=${withval}) AC_CACHE_VAL(ac_cv_c_tclh, [ # Use the value from --with-tclinclude, if it was given if test x"${with_tclinclude}" != x ; then if test -f "${with_tclinclude}/tcl.h" ; then ac_cv_c_tclh=${with_tclinclude} else AC_MSG_ERROR([${with_tclinclude} directory does not contain tcl.h]) fi else list="" if test "`uname -s`" = "Darwin"; then # If Tcl was built as a framework, attempt to use # the framework's Headers directory case ${TCL_DEFS} in *TCL_FRAMEWORK*) list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`" ;; esac fi # Look in the source dir only if Tcl is not installed, # and in that situation, look there before installed locations. if test -f "${TCL_BIN_DIR}/Makefile" ; then list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`" fi # Check order: pkg --prefix location, Tcl's --prefix location, # relative to directory of tclConfig.sh. eval "temp_includedir=${includedir}" list="$list \ `ls -d ${temp_includedir} 2>/dev/null` \ `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`" if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then list="$list /usr/local/include /usr/include" if test x"${TCL_INCLUDE_SPEC}" != x ; then d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'` list="$list `ls -d ${d} 2>/dev/null`" fi fi for i in $list ; do if test -f "$i/tcl.h" ; then ac_cv_c_tclh=$i break fi done fi ]) # Print a message based on how we determined the include path if test x"${ac_cv_c_tclh}" = x ; then AC_MSG_ERROR([tcl.h not found. Please specify its location with --with-tclinclude]) else AC_MSG_RESULT([${ac_cv_c_tclh}]) fi # Convert to a native path and substitute into the output files. INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}` TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" AC_SUBST(TCL_INCLUDES) ]) #------------------------------------------------------------------------ # TEA_PRIVATE_TK_HEADERS -- # # Locate the private Tk include files # # Arguments: # # Requires: # TK_SRC_DIR Assumes that TEA_LOAD_TKCONFIG has # already been called. # # Results: # # Substs the following vars: # TK_INCLUDES #------------------------------------------------------------------------ AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [ # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh} AC_REQUIRE([TEA_PUBLIC_TK_HEADERS]) AC_MSG_CHECKING([for Tk private include files]) TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}` TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\" # Check to see if tkPort.h isn't already with the public headers # Don't look for tkInt.h because that resides with tk.h in the core # sources, but the Port headers are in a different directory if test "${TEA_PLATFORM}" = "windows" -a \ -f "${ac_cv_c_tkh}/tkWinPort.h"; then result="private headers found with public headers" elif test "${TEA_PLATFORM}" = "unix" -a \ -f "${ac_cv_c_tkh}/tkUnixPort.h"; then result="private headers found with public headers" else TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\" TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\" if test "${TEA_PLATFORM}" = "windows"; then TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\" else TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\" fi # Overwrite the previous TK_INCLUDES as this should capture both # public and private headers in the same set. # We want to ensure these are substituted so as not to require # any *_NATIVE vars be defined in the Makefile TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}" # Detect and add ttk subdir if test -d "${TK_SRC_DIR}/generic/ttk"; then TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\"" fi if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then TK_INCLUDES="${TK_INCLUDES} -I\"${TK_XLIB_DIR_NATIVE}\"" fi if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\"" fi if test "`uname -s`" = "Darwin"; then # If Tk was built as a framework, attempt to use # the framework's Headers and PrivateHeaders directories case ${TK_DEFS} in *TK_FRAMEWORK*) if test -d "${TK_BIN_DIR}/Headers" -a \ -d "${TK_BIN_DIR}/PrivateHeaders"; then TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}" else TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`" fi ;; esac result="Using ${TK_INCLUDES}" else if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then AC_MSG_ERROR([Cannot find private header tkInt.h in ${TK_SRC_DIR}]) fi result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}" fi fi AC_SUBST(TK_TOP_DIR_NATIVE) AC_SUBST(TK_XLIB_DIR_NATIVE) AC_SUBST(TK_INCLUDES) AC_MSG_RESULT([${result}]) ]) #------------------------------------------------------------------------ # TEA_PUBLIC_TK_HEADERS -- # # Locate the installed public Tk header files # # Arguments: # None. # # Requires: # CYGPATH must be set # # Results: # # Adds a --with-tkinclude switch to configure. # Result is cached. # # Substs the following vars: # TK_INCLUDES #------------------------------------------------------------------------ AC_DEFUN([TEA_PUBLIC_TK_HEADERS], [ AC_MSG_CHECKING([for Tk public headers]) AC_ARG_WITH(tkinclude, [ --with-tkinclude directory containing the public Tk header files], with_tkinclude=${withval}) AC_CACHE_VAL(ac_cv_c_tkh, [ # Use the value from --with-tkinclude, if it was given if test x"${with_tkinclude}" != x ; then if test -f "${with_tkinclude}/tk.h" ; then ac_cv_c_tkh=${with_tkinclude} else AC_MSG_ERROR([${with_tkinclude} directory does not contain tk.h]) fi else list="" if test "`uname -s`" = "Darwin"; then # If Tk was built as a framework, attempt to use # the framework's Headers directory. case ${TK_DEFS} in *TK_FRAMEWORK*) list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`" ;; esac fi # Look in the source dir only if Tk is not installed, # and in that situation, look there before installed locations. if test -f "${TK_BIN_DIR}/Makefile" ; then list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`" fi # Check order: pkg --prefix location, Tk's --prefix location, # relative to directory of tkConfig.sh, Tcl's --prefix location, # relative to directory of tclConfig.sh. eval "temp_includedir=${includedir}" list="$list \ `ls -d ${temp_includedir} 2>/dev/null` \ `ls -d ${TK_PREFIX}/include 2>/dev/null` \ `ls -d ${TK_BIN_DIR}/../include 2>/dev/null` \ `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`" if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then list="$list /usr/local/include /usr/include" if test x"${TK_INCLUDE_SPEC}" != x ; then d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'` list="$list `ls -d ${d} 2>/dev/null`" fi fi for i in $list ; do if test -f "$i/tk.h" ; then ac_cv_c_tkh=$i break fi done fi ]) # Print a message based on how we determined the include path if test x"${ac_cv_c_tkh}" = x ; then AC_MSG_ERROR([tk.h not found. Please specify its location with --with-tkinclude]) else AC_MSG_RESULT([${ac_cv_c_tkh}]) fi # Convert to a native path and substitute into the output files. INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}` TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" AC_SUBST(TK_INCLUDES) if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then # On Windows and Aqua, we need the X compat headers AC_MSG_CHECKING([for X11 header files]) if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`" TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" AC_SUBST(TK_XINCLUDES) fi AC_MSG_RESULT([${INCLUDE_DIR_NATIVE}]) fi ]) #------------------------------------------------------------------------ # TEA_PATH_CONFIG -- # # Locate the ${1}Config.sh file and perform a sanity check on # the ${1} compile flags. These are used by packages like # [incr Tk] that load *Config.sh files from more than Tcl and Tk. # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-$1=... # # Defines the following vars: # $1_BIN_DIR Full path to the directory containing # the $1Config.sh file #------------------------------------------------------------------------ AC_DEFUN([TEA_PATH_CONFIG], [ # # Ok, lets find the $1 configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-$1 # if test x"${no_$1}" = x ; then # we reset no_$1 in case something fails here no_$1=true AC_ARG_WITH($1, [ --with-$1 directory containing $1 configuration ($1Config.sh)], with_$1config=${withval}) AC_MSG_CHECKING([for $1 configuration]) AC_CACHE_VAL(ac_cv_c_$1config,[ # First check to see if --with-$1 was specified. if test x"${with_$1config}" != x ; then case ${with_$1config} in */$1Config.sh ) if test -f ${with_$1config}; then AC_MSG_WARN([--with-$1 argument should refer to directory containing $1Config.sh, not to $1Config.sh itself]) with_$1config=`echo ${with_$1config} | sed 's!/$1Config\.sh$!!'` fi;; esac if test -f "${with_$1config}/$1Config.sh" ; then ac_cv_c_$1config=`(cd ${with_$1config}; pwd)` else AC_MSG_ERROR([${with_$1config} directory doesn't contain $1Config.sh]) fi fi # then check for a private $1 installation if test x"${ac_cv_c_$1config}" = x ; then for i in \ ../$1 \ `ls -dr ../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ `ls -dr ../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ `ls -dr ../$1*[[0-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ ../../$1 \ `ls -dr ../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ `ls -dr ../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ `ls -dr ../../$1*[[0-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ ../../../$1 \ `ls -dr ../../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ `ls -dr ../../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ `ls -dr ../../../$1*[[0-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ ${srcdir}/../$1 \ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]] 2>/dev/null` \ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ ; do if test -f "$i/$1Config.sh" ; then ac_cv_c_$1config=`(cd $i; pwd)` break fi if test -f "$i/unix/$1Config.sh" ; then ac_cv_c_$1config=`(cd $i/unix; pwd)` break fi done fi # check in a few common install locations if test x"${ac_cv_c_$1config}" = x ; then for i in `ls -d ${libdir} 2>/dev/null` \ `ls -d ${exec_prefix}/lib 2>/dev/null` \ `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/lib64 2>/dev/null` \ ; do if test -f "$i/$1Config.sh" ; then ac_cv_c_$1config=`(cd $i; pwd)` break fi done fi ]) if test x"${ac_cv_c_$1config}" = x ; then $1_BIN_DIR="# no $1 configs found" AC_MSG_WARN([Cannot find $1 configuration definitions]) exit 0 else no_$1= $1_BIN_DIR=${ac_cv_c_$1config} AC_MSG_RESULT([found $$1_BIN_DIR/$1Config.sh]) fi fi ]) #------------------------------------------------------------------------ # TEA_LOAD_CONFIG -- # # Load the $1Config.sh file # # Arguments: # # Requires the following vars to be set: # $1_BIN_DIR # # Results: # # Subst the following vars: # $1_SRC_DIR # $1_LIB_FILE # $1_LIB_SPEC # #------------------------------------------------------------------------ AC_DEFUN([TEA_LOAD_CONFIG], [ AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh]) if test -f "${$1_BIN_DIR}/$1Config.sh" ; then AC_MSG_RESULT([loading]) . "${$1_BIN_DIR}/$1Config.sh" else AC_MSG_RESULT([file not found]) fi # # If the $1_BIN_DIR is the build directory (not the install directory), # then set the common variable name to the value of the build variables. # For example, the variable $1_LIB_SPEC will be set to the value # of $1_BUILD_LIB_SPEC. An extension should make use of $1_LIB_SPEC # instead of $1_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. # if test -f "${$1_BIN_DIR}/Makefile" ; then AC_MSG_WARN([Found Makefile - using build library specs for $1]) $1_LIB_SPEC=${$1_BUILD_LIB_SPEC} $1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC} $1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH} fi AC_SUBST($1_VERSION) AC_SUBST($1_BIN_DIR) AC_SUBST($1_SRC_DIR) AC_SUBST($1_LIB_FILE) AC_SUBST($1_LIB_SPEC) AC_SUBST($1_STUB_LIB_FILE) AC_SUBST($1_STUB_LIB_SPEC) AC_SUBST($1_STUB_LIB_PATH) # Allow the caller to prevent this auto-check by specifying any 2nd arg AS_IF([test "x$2" = x], [ # Check both upper and lower-case variants # If a dev wanted non-stubs libs, this function could take an option # to not use _STUB in the paths below AS_IF([test "x${$1_STUB_LIB_SPEC}" = x], [TEA_LOAD_CONFIG_LIB(translit($1,[a-z],[A-Z])_STUB)], [TEA_LOAD_CONFIG_LIB($1_STUB)]) ]) ]) #------------------------------------------------------------------------ # TEA_LOAD_CONFIG_LIB -- # # Helper function to load correct library from another extension's # ${PACKAGE}Config.sh. # # Results: # Adds to LIBS the appropriate extension library # #------------------------------------------------------------------------ AC_DEFUN([TEA_LOAD_CONFIG_LIB], [ AC_MSG_CHECKING([For $1 library for LIBS]) # This simplifies the use of stub libraries by automatically adding # the stub lib to your path. Normally this would add to SHLIB_LD_LIBS, # but this is called before CONFIG_CFLAGS. More importantly, this adds # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD. if test "x${$1_LIB_SPEC}" != "x" ; then if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then TEA_ADD_LIBS([\"`${CYGPATH} ${$1_LIB_PATH}`\"]) AC_MSG_RESULT([using $1_LIB_PATH ${$1_LIB_PATH}]) else TEA_ADD_LIBS([${$1_LIB_SPEC}]) AC_MSG_RESULT([using $1_LIB_SPEC ${$1_LIB_SPEC}]) fi else AC_MSG_RESULT([file not found]) fi ]) #------------------------------------------------------------------------ # TEA_EXPORT_CONFIG -- # # Define the data to insert into the ${PACKAGE}Config.sh file # # Arguments: # # Requires the following vars to be set: # $1 # # Results: # Subst the following vars: # #------------------------------------------------------------------------ AC_DEFUN([TEA_EXPORT_CONFIG], [ #-------------------------------------------------------------------- # These are for $1Config.sh #-------------------------------------------------------------------- # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib) eval pkglibdir="[$]{libdir}/$1${PACKAGE_VERSION}" if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then eval $1_LIB_FLAG="-l$1${PACKAGE_VERSION}${DBGX}" eval $1_STUB_LIB_FLAG="-l$1stub${PACKAGE_VERSION}${DBGX}" else eval $1_LIB_FLAG="-l$1`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}" eval $1_STUB_LIB_FLAG="-l$1stub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}" fi $1_BUILD_LIB_SPEC="-L`pwd` ${$1_LIB_FLAG}" $1_LIB_SPEC="-L${pkglibdir} ${$1_LIB_FLAG}" $1_BUILD_STUB_LIB_SPEC="-L`pwd` [$]{$1_STUB_LIB_FLAG}" $1_STUB_LIB_SPEC="-L${pkglibdir} [$]{$1_STUB_LIB_FLAG}" $1_BUILD_STUB_LIB_PATH="`pwd`/[$]{PKG_STUB_LIB_FILE}" $1_STUB_LIB_PATH="${pkglibdir}/[$]{PKG_STUB_LIB_FILE}" AC_SUBST($1_BUILD_LIB_SPEC) AC_SUBST($1_LIB_SPEC) AC_SUBST($1_BUILD_STUB_LIB_SPEC) AC_SUBST($1_STUB_LIB_SPEC) AC_SUBST($1_BUILD_STUB_LIB_PATH) AC_SUBST($1_STUB_LIB_PATH) AC_SUBST(MAJOR_VERSION) AC_SUBST(MINOR_VERSION) AC_SUBST(PATCHLEVEL) ]) #------------------------------------------------------------------------ # TEA_PATH_CELIB -- # # Locate Keuchel's celib emulation layer for targeting Win/CE # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-celib=... # # Defines the following vars: # CELIB_DIR Full path to the directory containing # the include and platform lib files #------------------------------------------------------------------------ AC_DEFUN([TEA_PATH_CELIB], [ # First, look for one uninstalled. # the alternative search directory is invoked by --with-celib if test x"${no_celib}" = x ; then # we reset no_celib in case something fails here no_celib=true AC_ARG_WITH(celib,[ --with-celib=DIR use Windows/CE support library from DIR], with_celibconfig=${withval}) AC_MSG_CHECKING([for Windows/CE celib directory]) AC_CACHE_VAL(ac_cv_c_celibconfig,[ # First check to see if --with-celibconfig was specified. if test x"${with_celibconfig}" != x ; then if test -d "${with_celibconfig}/inc" ; then ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)` else AC_MSG_ERROR([${with_celibconfig} directory doesn't contain inc directory]) fi fi # then check for a celib library if test x"${ac_cv_c_celibconfig}" = x ; then for i in \ ../celib-palm-3.0 \ ../celib \ ../../celib-palm-3.0 \ ../../celib \ `ls -dr ../celib-*3.[[0-9]]* 2>/dev/null` \ ${srcdir}/../celib-palm-3.0 \ ${srcdir}/../celib \ `ls -dr ${srcdir}/../celib-*3.[[0-9]]* 2>/dev/null` \ ; do if test -d "$i/inc" ; then ac_cv_c_celibconfig=`(cd $i; pwd)` break fi done fi ]) if test x"${ac_cv_c_celibconfig}" = x ; then AC_MSG_ERROR([Cannot find celib support library directory]) else no_celib= CELIB_DIR=${ac_cv_c_celibconfig} CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'` AC_MSG_RESULT([found $CELIB_DIR]) fi fi ]) # Local Variables: # mode: autoconf # End: rivet-2.3.5/Makefile.am000644 001750 001750 00000004606 12207147377 014372 0ustar00mxmmxm000000 000000 # # top-level Makefile.am for Apache Rivet: gets turned into a Makefile.in by automake # # $Id: Makefile.am 1517859 2013-08-27 16:08:31Z mxmanghi $ # # 2007/12/25: Added target uninistall-local that removes the tcl stuff (mxmanghi) # 2010/06/22: target instal-data-local searches for pkgIndex.tcl files and deletes them # before invoking pkg_mkIndex. # 2013/01/20: removing libtool created .la files ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = LICENSE contrib debian doc rivet win/nmakehlp.c src/testing.c src/TclWebcgi.c SUBDIRS = src doc RIVETLIB_DESTDIR = $(DESTDIR)@RIVET_TCL_TARGET@ RIVET_PACKAGES = $(RIVETLIB_DESTDIR)/packages # I expect this symbol sooner or later to be handled by configure for arch dependent builds # Current value is the rivetlib directory RIVET_LIBS_ARCH = libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck install-data-local: install-binaries install-packages install-binaries: $(mkinstalldirs) $(RIVETLIB_DESTDIR) cp -v rivet/init.tcl $(RIVETLIB_DESTDIR)/ cp -rv rivet/rivet-tcl $(RIVETLIB_DESTDIR)/ -( cd $(RIVETLIB_DESTDIR); rm -f *.la; \ echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH)*[info sharedlibextension]]]' | @TCLSH_PROG@ ; ) uninstall-local: rm -f $(RIVETLIB_DESTDIR)/init.tcl rm -fr $(RIVETLIB_DESTDIR)/rivet-tcl rm -f $(RIVETLIB_DESTDIR)/librivetlib.so rm -f $(RIVETLIB_DESTDIR)/librivetparser.so rm -fr $(RIVETLIB_DESTDIR)/packages rm -f $(RIVETLIB_DESTDIR)/pkgIndex.tcl @if [ -z '$(wildcard $(RIVETLIB_DESTDIR)/*)' ]; then \ rmdir $(RIVETLIB_DESTDIR); \ fi install-packages: $(mkinstalldirs) $(RIVET_PACKAGES) cp -rv rivet/packages/* $(RIVET_PACKAGES) -( cd $(RIVETLIB_DESTDIR); \ echo 'eval file delete [glob [file join packages * pkgIndex.tcl]] pkgIndex.tcl' | @TCLSH_PROG@ ; \ echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH)*[info sharedlibextension]]]' | @TCLSH_PROG@ ; ) uninstall-packages: rm -fr $(RIVET_PACKAGES) rm -f $(RIVETLIB_DESTDIR)/pkgIndex.tcl @if [ -z '$(wildcard $(RIVETLIB_DESTDIR)/*)' ]; then \ @rmdir $(RIVETLIB_DESTDIR); \ fi -( cd $(RIVETLIB_DESTDIR); \ echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH)*[info sharedlibextension]]]' | @TCLSH_PROG@ ; ) # distclean-local: rm -fr rivet_config.h rivet-2.3.5/tests/headers_set.rvt000644 001750 001750 00000000371 12446054126 016510 0ustar00mxmmxm000000 000000

rivet-2.3.5/configure000755 001750 001750 00002207561 13200160274 014235 0ustar00mxmmxm000000 000000 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for Rivet 2.3.5. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Rivet' PACKAGE_TARNAME='rivet' PACKAGE_VERSION='2.3.5' PACKAGE_STRING='Rivet 2.3.5' PACKAGE_BUGREPORT='' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS TCL_PACKAGE_PATH MOD_RIVET_INCLUDES apache_version_dir INIT_VERSION rivet_channel rivet_core_cmds apache_request MAX_POST RIVET_UPLOAD_DIR RIVET_TCL_TARGET APU_LDFLAGS APU_INCLUDES with_apu_config APR_LDFLAGS APR_INCLUDES APR_CPPFLAGS with_apr_config apache_include APXS_PREFIX APXS_SYSCONFDIR APXS_LIBEXECDIR APXS_LD_SHLIB APXS_CPPFLAGS_SHLIB APXS_INCLUDES APXS_LIBS APXS_LDFLAGS APXS_CPPFLAGS with_apxs RIVET_BASE_INCLUDE rivet_core TCLSH_PROG VC_MANIFEST_EMBED_EXE VC_MANIFEST_EMBED_DLL RANLIB_STUB MAKE_STUB_LIB MAKE_STATIC_LIB MAKE_SHARED_LIB MAKE_LIB TCL_DBGX LDFLAGS_DEFAULT CFLAGS_DEFAULT LD_LIBRARY_PATH_VAR SHLIB_CFLAGS SHLIB_LD_LIBS SHLIB_LD STLIB_LD CFLAGS_WARNING CFLAGS_OPTIMIZE CFLAGS_DEBUG CELIB_DIR SHARED_BUILD TCL_THREADS TCL_INCLUDES LIBTOOL_DEPS LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL MATH_LIBS EGREP GREP RANLIB CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC TCL_SHLIB_LD_LIBS TCL_LD_FLAGS TCL_EXTRA_CFLAGS TCL_DEFS TCL_LIBS CLEANFILES TCL_STUB_LIB_SPEC TCL_STUB_LIB_FLAG TCL_STUB_LIB_FILE TCL_LIB_SPEC TCL_LIB_FLAG TCL_LIB_FILE TCL_SRC_DIR TCL_BIN_DIR TCL_PATCH_LEVEL TCL_VERSION AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V 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 PKG_CFLAGS PKG_LIBS PKG_INCLUDES PKG_HEADERS PKG_TCL_SOURCES PKG_STUB_OBJECTS PKG_STUB_SOURCES PKG_STUB_LIB_FILE PKG_LIB_FILE EXEEXT CYGPATH 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 runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_static with_tcl enable_dependency_tracking enable_shared with_pic enable_fast_install with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock with_tclinclude enable_threads enable_64bit enable_64bit_vis enable_rpath enable_wince with_celib enable_symbols with_tclsh with_rivet_core with_apache with_apxs with_apache_include with_apr_config with_apu_config with_rivet_target_dir enable_version_display with_upload_dir enable_head_requests enable_virtual_interps_separation with_post_max enable_upload_var enable_import_rivet_commands with_apache_request with_rivet_core_cmds with_rivet_channel enable_rivet_commands_export ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP LT_SYS_LIBRARY_PATH' # 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' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures Rivet 2.3.5 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] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --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/rivet] --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 Rivet 2.3.5:";; 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] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-static[=PKGS] build static libraries [default=no] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-threads build with threads --enable-shared build and link with shared libraries (default: on) --enable-64bit enable 64bit support (default: off) --enable-64bit-vis enable 64bit Sparc VIS support (default: off) --disable-rpath disable rpath support (default: on) --enable-wince enable Win/CE support (where applicable) --enable-symbols build with debugging symbols (default: off) --enable-version-display Display Rivet version in Apache signature --enable-head-requests Returns real headers in response to a HEAD request --enable-virtual-interps-separation to turn on virtual host separation --disable-upload-var to enable automatic upload to variables --disable-import-rivet-commands requires explicit namespace import --disable-rivet-commands-export to prevent export from ::rivet namespace Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-tcl directory containing tcl configuration (tclConfig.sh) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-tclinclude directory containing the public Tcl header files --with-celib=DIR use Windows/CE support library from DIR --with-tclsh=FILE location of a working tclsh executable --with-rivet-core=path mod_rivet core directory --with-apache=DIR Apache server base directory --with-apxs=FILE location of Apache apxs tool --with-apache-include=DIR Apache server directory --with-apr-config=FILE apr portable apr-1-config path --with-apu-config=FILE apu portable apu-1-config path --with-rivet-target-dir=DIR Rivet tcl library target dir --with-upload-dir=DIR Default directory for uploads --with-post-max=BYTES Maximum size of data to be sent with a POST --with-apache-request=dir choose subdirectory for Apache request handling code --with-rivet-core-cmds=dir select directory for Rivet core commands core --with-rivet-channel=DIR Rivet channel code path Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor LT_SYS_LIBRARY_PATH User-defined run-time library search path. 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 the package provider. _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 Rivet configure 2.3.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel 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 Rivet $as_me 2.3.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # TEA extensions pass this us the version of TEA they think they # are compatible with. TEA_VERSION="3.9" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct TEA configuration" >&5 $as_echo_n "checking for correct TEA configuration... " >&6; } if test x"${PACKAGE_NAME}" = x ; then as_fn_error $? " The PACKAGE_NAME variable must be defined by your TEA configure.in" "$LINENO" 5 fi if test x"3.9" = x ; then as_fn_error $? " TEA version not specified." "$LINENO" 5 elif test "3.9" != "${TEA_VERSION}" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5 $as_echo "warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5 $as_echo "ok (TEA ${TEA_VERSION})" >&6; } fi case "`uname -s`" in *win32*|*WIN32*|*MINGW32_*) # Extract the first word of "cygpath", so it can be a program name with args. set dummy cygpath; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CYGPATH+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CYGPATH"; then ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CYGPATH="cygpath -w" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo" fi fi CYGPATH=$ac_cv_prog_CYGPATH if test -n "$CYGPATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5 $as_echo "$CYGPATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi EXEEXT=".exe" TEA_PLATFORM="windows" ;; *CYGWIN_*) CYGPATH=echo EXEEXT=".exe" # TEA_PLATFORM is determined later in LOAD_TCLCONFIG ;; *) CYGPATH=echo EXEEXT="" TEA_PLATFORM="unix" ;; esac # Check if exec_prefix is set. If not use fall back to prefix. # Note when adjusted, so that TEA_PREFIX can correct for this. # This is needed for recursive configures, since autoconf propagates # $prefix, but not $exec_prefix (doh!). if test x$exec_prefix = xNONE ; then exec_prefix_default=yes exec_prefix=$prefix fi # This package name must be replaced statically for AC_SUBST to work # Substitute STUB_LIB_FILE in case package creates a stub library too. # We AC_SUBST these here to ensure they are subst'ed, # in case the user doesn't call TEA_ADD_... # we are storing here the configure command line, as recursive # invocations change the value of the shell variables $0 $* CONFIGURE_CMD="$0 $*" ac_aux_dir= for ac_dir in tclconfig "$srcdir"/tclconfig; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in tclconfig \"$srcdir\"/tclconfig" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. 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 --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='rivet' VERSION='2.3.5' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ac_config_headers="$ac_config_headers config.h" # AX_PREFIX_CONFIG_H is a macro taken from the autotools macro archive. # The typical configure generated 'config.h' can be renamed and # preprocessor symbols in it can be prefixed in order to avoid clashes # with Apache's config.h # # As of today (27 Sept 2008) this macro is not part of autotools and # it's in the 'm4' directory # ac_config_commands="$ac_config_commands rivet_config.h" #-------------------------------------------------------------------- # Call TEA_INIT as the first TEA_ macro to set up initial vars. # This will define a ${TEA_PLATFORM} variable == "unix" or "windows" # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE. #-------------------------------------------------------------------- # # Init automake stuff # # 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=no fi if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='rivet' VERSION='2.3.5' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi #-------------------------------------------------------------------- # Load the tclConfig.sh file #-------------------------------------------------------------------- # # Ok, lets find the tcl configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tcl # if test x"${no_tcl}" = x ; then # we reset no_tcl in case something fails here no_tcl=true # Check whether --with-tcl was given. if test "${with_tcl+set}" = set; then : withval=$with_tcl; with_tclconfig="${withval}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 $as_echo_n "checking for Tcl configuration... " >&6; } if ${ac_cv_c_tclconfig+:} false; then : $as_echo_n "(cached) " >&6 else # First check to see if --with-tcl was specified. if test x"${with_tclconfig}" != x ; then case "${with_tclconfig}" in */tclConfig.sh ) if test -f "${with_tclconfig}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5 $as_echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;} with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`" fi ;; esac if test -f "${with_tclconfig}/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`" else as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 fi fi # then check for a private Tcl installation if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ../tcl \ `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ ../../tcl \ `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ ../../../tcl \ `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do if test "${TEA_PLATFORM}" = "windows" \ -a -f "$i/win/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i/win; pwd)`" break fi if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i/unix; pwd)`" break fi done fi # on Darwin, check in Framework installation locations if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ `ls -d /Library/Frameworks 2>/dev/null` \ `ls -d /Network/Library/Frameworks 2>/dev/null` \ `ls -d /System/Library/Frameworks 2>/dev/null` \ ; do if test -f "$i/Tcl.framework/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`" break fi done fi # TEA specific: on Windows, check in common installation locations if test "${TEA_PLATFORM}" = "windows" \ -a x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d C:/Tcl/lib 2>/dev/null` \ `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \ ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i; pwd)`" break fi done fi # check in a few common install locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d ${libdir} 2>/dev/null` \ `ls -d ${exec_prefix}/lib 2>/dev/null` \ `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/lib64 2>/dev/null` \ ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i; pwd)`" break fi done fi # check in a few other private locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ${srcdir}/../tcl \ `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do if test "${TEA_PLATFORM}" = "windows" \ -a -f "$i/win/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i/win; pwd)`" break fi if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i/unix; pwd)`" break fi done fi fi if test x"${ac_cv_c_tclconfig}" = x ; then TCL_BIN_DIR="# no Tcl configs found" as_fn_error $? "Can't find Tcl configuration definitions" "$LINENO" 5 else no_tcl= TCL_BIN_DIR="${ac_cv_c_tclconfig}" { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 $as_echo "loading" >&6; } . "${TCL_BIN_DIR}/tclConfig.sh" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } fi # eval is required to do the TCL_DBGX substitution eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" # If the TCL_BIN_DIR is the build directory (not the install directory), # then set the common variable name to the value of the build variables. # For example, the variable TCL_LIB_SPEC will be set to the value # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC # instead of TCL_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. if test -f "${TCL_BIN_DIR}/Makefile" ; then TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}" TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}" TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}" elif test "`uname -s`" = "Darwin"; then # If Tcl was built as a framework, attempt to use the libraries # from the framework at the given location so that linking works # against Tcl.framework installed in an arbitrary location. case ${TCL_DEFS} in *TCL_FRAMEWORK*) if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then for i in "`cd "${TCL_BIN_DIR}"; pwd`" \ "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}" break fi done fi if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}" | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}" TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" fi ;; esac fi # eval is required to do the TCL_DBGX substitution eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" case "`uname -s`" in *CYGWIN_*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin variant" >&5 $as_echo_n "checking for cygwin variant... " >&6; } case ${TCL_EXTRA_CFLAGS} in *-mwin32*|*-mno-cygwin*) TEA_PLATFORM="windows" CFLAGS="$CFLAGS -mwin32" { $as_echo "$as_me:${as_lineno-$LINENO}: result: win32" >&5 $as_echo "win32" >&6; } ;; *) TEA_PLATFORM="unix" { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix" >&5 $as_echo "unix" >&6; } ;; esac EXEEXT=".exe" ;; *) ;; esac # Do this here as we have fully defined TEA_PLATFORM now if test "${TEA_PLATFORM}" = "windows" ; then # The BUILD_$pkg is to define the correct extern storage class # handling when making this package cat >>confdefs.h <<_ACEOF #define BUILD_${PACKAGE_NAME} 1 _ACEOF CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp" fi # TEA specific: #-------------------------------------------------------------------- # Load the tkConfig.sh file if necessary (Tk extension) #-------------------------------------------------------------------- #TEA_PATH_TKCONFIG #TEA_LOAD_TKCONFIG #----------------------------------------------------------------------- # Handle the --prefix=... option by defaulting to what Tcl gave. # Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER. #----------------------------------------------------------------------- if test "${prefix}" = "NONE"; then prefix_default=yes if test x"${TCL_PREFIX}" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5 $as_echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;} prefix=${TCL_PREFIX} else { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to /usr/local" >&5 $as_echo "$as_me: --prefix defaulting to /usr/local" >&6;} prefix=/usr/local fi fi if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \ -o x"${exec_prefix_default}" = x"yes" ; then if test x"${TCL_EXEC_PREFIX}" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5 $as_echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;} exec_prefix=${TCL_EXEC_PREFIX} else { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to ${prefix}" >&5 $as_echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;} exec_prefix=$prefix fi fi #----------------------------------------------------------------------- # Standard compiler checks. # This sets up CC by using the CC env var, or looks for gcc otherwise. # This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create # the basic setup necessary to compile executables. #----------------------------------------------------------------------- DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE) # in this macro, they need to go into TEA_SETUP_COMPILER instead. # If the user did not set CFLAGS, set it now to keep # the AC_PROG_CC macro from adding "-g -O2". if test "${CFLAGS+set}" != "set" ; then CFLAGS="" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. 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 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # 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 ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. 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 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # 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 ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu #-------------------------------------------------------------------- # Checks to see if the make program sets the $MAKE variable. #-------------------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi #-------------------------------------------------------------------- # Find ranlib #-------------------------------------------------------------------- if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi #-------------------------------------------------------------------- # Determines the correct binary file extension (.o, .obj, .exe etc.) #-------------------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here. #------------------------------------------------------------------------ # If we're using GCC, see if the compiler understands -pipe. If so, use it. # It makes compiling go faster. (This is only a performance feature.) #------------------------------------------------------------------------ if test -z "$no_pipe" -a -n "$GCC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5 $as_echo_n "checking if the compiler understands -pipe... " >&6; } if ${tcl_cv_cc_pipe+:} false; then : $as_echo_n "(cached) " >&6 else hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_cc_pipe=yes else tcl_cv_cc_pipe=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_pipe" >&5 $as_echo "$tcl_cv_cc_pipe" >&6; } if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi fi #-------------------------------------------------------------------- # Common compiler flag setup #-------------------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac if test "${TEA_PLATFORM}" = "unix" ; then #-------------------------------------------------------------------- # On a few very rare systems, all of the libm.a stuff is # already in libc.a. Set compiler flags accordingly. # Also, Linux requires the "ieee" library for math to work # right (and it must appear before "-lm"). #-------------------------------------------------------------------- ac_fn_c_check_func "$LINENO" "sin" "ac_cv_func_sin" if test "x$ac_cv_func_sin" = xyes; then : MATH_LIBS="" else MATH_LIBS="-lm" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lieee" >&5 $as_echo_n "checking for main in -lieee... " >&6; } if ${ac_cv_lib_ieee_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lieee $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ieee_main=yes else ac_cv_lib_ieee_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee_main" >&5 $as_echo "$ac_cv_lib_ieee_main" >&6; } if test "x$ac_cv_lib_ieee_main" = xyes; then : MATH_LIBS="-lieee $MATH_LIBS" fi #-------------------------------------------------------------------- # Interactive UNIX requires -linet instead of -lsocket, plus it # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -linet" >&5 $as_echo_n "checking for main in -linet... " >&6; } if ${ac_cv_lib_inet_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inet_main=yes else ac_cv_lib_inet_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_main" >&5 $as_echo "$ac_cv_lib_inet_main" >&6; } if test "x$ac_cv_lib_inet_main" = xyes; then : LIBS="$LIBS -linet" fi ac_fn_c_check_header_mongrel "$LINENO" "net/errno.h" "ac_cv_header_net_errno_h" "$ac_includes_default" if test "x$ac_cv_header_net_errno_h" = xyes; then : $as_echo "#define HAVE_NET_ERRNO_H 1" >>confdefs.h fi #-------------------------------------------------------------------- # Check for the existence of the -lsocket and -lnsl libraries. # The order here is important, so that they end up in the right # order in the command line generated by make. Here are some # special considerations: # 1. Use "connect" and "accept" to check for -lsocket, and # "gethostbyname" to check for -lnsl. # 2. Use each function name only once: can't redo a check because # autoconf caches the results of the last check and won't redo it. # 3. Use -lnsl and -lsocket only if they supply procedures that # aren't already present in the normal libraries. This is because # IRIX 5.2 has libraries, but they aren't needed and they're # bogus: they goof up name resolution if used. # 4. On some SVR4 systems, can't use -lsocket without -lnsl too. # To get around this problem, check for both libraries together # if -lsocket doesn't work by itself. #-------------------------------------------------------------------- tcl_checkBoth=0 ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = xyes; then : tcl_checkSocket=0 else tcl_checkSocket=1 fi if test "$tcl_checkSocket" = 1; then ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt" if test "x$ac_cv_func_setsockopt" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5 $as_echo_n "checking for setsockopt in -lsocket... " >&6; } if ${ac_cv_lib_socket_setsockopt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char setsockopt (); int main () { return setsockopt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_setsockopt=yes else ac_cv_lib_socket_setsockopt=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5 $as_echo "$ac_cv_lib_socket_setsockopt" >&6; } if test "x$ac_cv_lib_socket_setsockopt" = xyes; then : LIBS="$LIBS -lsocket" else tcl_checkBoth=1 fi fi fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" ac_fn_c_check_func "$LINENO" "accept" "ac_cv_func_accept" if test "x$ac_cv_func_accept" = xyes; then : tcl_checkNsl=0 else LIBS=$tk_oldLibs fi fi ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if ${ac_cv_lib_nsl_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : LIBS="$LIBS -lnsl" fi fi # TEA specific: Don't perform the eval of the libraries here because # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking dirent.h" >&5 $as_echo_n "checking dirent.h... " >&6; } if ${tcl_cv_dirent_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #ifndef _POSIX_SOURCE # ifdef __Lynx__ /* * Generate compilation error to make the test fail: Lynx headers * are only valid if really in the POSIX environment. */ missing_procedure(); # endif #endif DIR *d; struct dirent *entryPtr; char *p; d = opendir("foobar"); entryPtr = readdir(d); p = entryPtr->d_name; closedir(d); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : tcl_cv_dirent_h=yes else tcl_cv_dirent_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_dirent_h" >&5 $as_echo "$tcl_cv_dirent_h" >&6; } if test $tcl_cv_dirent_h = no; then $as_echo "#define NO_DIRENT_H 1" >>confdefs.h fi # TEA specific: ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" if test "x$ac_cv_header_errno_h" = xyes; then : else $as_echo "#define NO_ERRNO_H 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default" if test "x$ac_cv_header_float_h" = xyes; then : else $as_echo "#define NO_FLOAT_H 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "values.h" "ac_cv_header_values_h" "$ac_includes_default" if test "x$ac_cv_header_values_h" = xyes; then : else $as_echo "#define NO_VALUES_H 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" if test "x$ac_cv_header_limits_h" = xyes; then : $as_echo "#define HAVE_LIMITS_H 1" >>confdefs.h else $as_echo "#define NO_LIMITS_H 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : tcl_ok=1 else tcl_ok=0 fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "strtol" >/dev/null 2>&1; then : else tcl_ok=0 fi rm -f conftest* cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "strtoul" >/dev/null 2>&1; then : else tcl_ok=0 fi rm -f conftest* cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "strtod" >/dev/null 2>&1; then : else tcl_ok=0 fi rm -f conftest* if test $tcl_ok = 0; then $as_echo "#define NO_STDLIB_H 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes; then : tcl_ok=1 else tcl_ok=0 fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "strstr" >/dev/null 2>&1; then : else tcl_ok=0 fi rm -f conftest* cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "strerror" >/dev/null 2>&1; then : else tcl_ok=0 fi rm -f conftest* # See also memmove check below for a place where NO_STRING_H can be # set and why. if test $tcl_ok = 0; then $as_echo "#define NO_STRING_H 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default" if test "x$ac_cv_header_sys_wait_h" = xyes; then : else $as_echo "#define NO_SYS_WAIT_H 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" if test "x$ac_cv_header_dlfcn_h" = xyes; then : else $as_echo "#define NO_DLFCN_H 1" >>confdefs.h fi # OS/390 lacks sys/param.h (and doesn't need it, by chance). for ac_header in sys/param.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" if test "x$ac_cv_header_sys_param_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_PARAM_H 1 _ACEOF fi done # Let the user call this, because if it triggers, they will # need a compat/strtod.c that is correct. Users can also # use Tcl_GetDouble(FromObj) instead. #TEA_BUGGY_STRTOD fi # # For automake to be happy, we also need AC_PROG_LIBTOOL # # the LIBTOOL_DEPS macro sets up for automatic updating of the # libtool script if it becomes out of date, as per libtool docs # case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' 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_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # 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 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; 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" && \ test undefined != "$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`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that 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 # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; 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 ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi 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 bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; 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 if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # 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"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$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"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/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, # D for any global variable and I for any imported 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};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 $as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_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 dd; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || 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 what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; 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* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; 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" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else pic_mode=default fi # 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 shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## 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... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; 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' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; 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 ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; 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' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_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 yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; 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 | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; 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 no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; 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 tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; 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 yes = "$GCC" && 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 ia64 = "$host_cpu"; 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 GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX 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") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | 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 # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; 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,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; 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 yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; 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 yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' 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,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$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 "x$output_objdir/$soname" = "x$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 yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$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 yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; 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 yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi link_all_deplibs=no else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) 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__`"; 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 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; 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 sequent = "$host_vendor"; 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 yes = "$GCC"; 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 CANNOT 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 yes = "$GCC"; 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 sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && 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 yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac 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" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; 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 # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # 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' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # 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' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $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 # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor 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 ;; 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[23].*) 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$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' 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 ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor 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 yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor 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 ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # 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 dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor 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* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi 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 shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 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' ;; 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 # correct to gnu/linux during the next big refactor 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 yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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=sco 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 yes = "$with_gnu_ld"; 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # 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 no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && 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 yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC ac_config_commands="$ac_config_commands libtool" # Only expand once: #----------------------------------------------------------------------- # __CHANGE__ # Specify the C source files to compile in TEA_ADD_SOURCES, # public headers that need to be installed in TEA_ADD_HEADERS, # stub library C source files to compile in TEA_ADD_STUB_SOURCES, # and runtime Tcl library files in TEA_ADD_TCL_SOURCES. # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS # and PKG_TCL_SOURCES. #----------------------------------------------------------------------- # Unused: src/TclWeb.c #TEA_ADD_SOURCES([src/TclWebcgi.c src/TclWebapache.c src/apache_multipart_buffer.c src/apache_request.c src/mod_rivet.c src/parserPkgInit.c src/rivetChannel.c src/rivetCore.c src/rivetCrypt.c src/rivetList.c src/rivetParser.c src/rivetPkgInit.c src/rivetWWW.c win/nmakehlp.c src/testing.c]) #TEA_ADD_HEADERS([src/TclWeb.h src/apache_multipart_buffer.h src/apache_request.h src/mod_rivet.h src/rivet.h src/rivetChannel.h src/rivetParser.h]) vars="" for i in $vars; do PKG_INCLUDES="$PKG_INCLUDES $i" done vars="" for i in $vars; do if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then # Convert foo.lib to -lfoo for GCC. No-op if not *.lib i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` fi PKG_LIBS="$PKG_LIBS $i" done PKG_CFLAGS="$PKG_CFLAGS " vars="" for i in $vars; do # check for existence - allows for generic/win/unix VPATH if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ -a ! -f "${srcdir}/macosx/$i" \ ; then as_fn_error $? "could not find stub source file '$i'" "$LINENO" 5 fi PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i" # this assumes it is in a VPATH dir i=`basename $i` # handle user calling this before or after TEA_SETUP_COMPILER if test x"${OBJEXT}" != x ; then j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}" else j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}" fi PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j" done vars="" for i in $vars; do # check for existence, be strict because it is installed if test ! -f "${srcdir}/$i" ; then as_fn_error $? "could not find tcl source file '${srcdir}/$i'" "$LINENO" 5 fi PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i" done #-------------------------------------------------------------------- # __CHANGE__ # A few miscellaneous platform-specific items: # # Define a special symbol for Windows (BUILD_sample in this case) so # that we create the export library with the dll. # # Windows creates a few extra files that need to be cleaned up. # You can add more files to clean if your extension creates any extra # files. # # TEA_ADD_* any platform specific compiler/build info here. #-------------------------------------------------------------------- # removed AC_DEFINE(BUILD_rivet....) as per TEA 3.9 (Massimo Manghi 20100825) if test "${TEA_PLATFORM}" = "windows" ; then # AC_DEFINE(BUILD_rivet,1,[Define to define the BUILD_rivet define (?)]) CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch" # #TEA_ADD_SOURCES([win/winFile.c]) # #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"]) else CLEANFILES="pkgIndex.tcl" # #TEA_ADD_SOURCES([unix/unixFile.c]) # #TEA_ADD_LIBS([-lsuperfly]) fi #-------------------------------------------------------------------- # __CHANGE__ # Choose which headers you need. Extension authors should try very # hard to only rely on the Tcl public header files. Internal headers # contain private data structures and are subject to change without # notice. # This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG #-------------------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl public headers" >&5 $as_echo_n "checking for Tcl public headers... " >&6; } # Check whether --with-tclinclude was given. if test "${with_tclinclude+set}" = set; then : withval=$with_tclinclude; with_tclinclude=${withval} fi if ${ac_cv_c_tclh+:} false; then : $as_echo_n "(cached) " >&6 else # Use the value from --with-tclinclude, if it was given if test x"${with_tclinclude}" != x ; then if test -f "${with_tclinclude}/tcl.h" ; then ac_cv_c_tclh=${with_tclinclude} else as_fn_error $? "${with_tclinclude} directory does not contain tcl.h" "$LINENO" 5 fi else list="" if test "`uname -s`" = "Darwin"; then # If Tcl was built as a framework, attempt to use # the framework's Headers directory case ${TCL_DEFS} in *TCL_FRAMEWORK*) list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`" ;; esac fi # Look in the source dir only if Tcl is not installed, # and in that situation, look there before installed locations. if test -f "${TCL_BIN_DIR}/Makefile" ; then list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`" fi # Check order: pkg --prefix location, Tcl's --prefix location, # relative to directory of tclConfig.sh. eval "temp_includedir=${includedir}" list="$list \ `ls -d ${temp_includedir} 2>/dev/null` \ `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`" if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then list="$list /usr/local/include /usr/include" if test x"${TCL_INCLUDE_SPEC}" != x ; then d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'` list="$list `ls -d ${d} 2>/dev/null`" fi fi for i in $list ; do if test -f "$i/tcl.h" ; then ac_cv_c_tclh=$i break fi done fi fi # Print a message based on how we determined the include path if test x"${ac_cv_c_tclh}" = x ; then as_fn_error $? "tcl.h not found. Please specify its location with --with-tclinclude" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tclh}" >&5 $as_echo "${ac_cv_c_tclh}" >&6; } fi # Convert to a native path and substitute into the output files. INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}` TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" #TEA_PRIVATE_TCL_HEADERS #TEA_PUBLIC_TK_HEADERS #TEA_PRIVATE_TK_HEADERS #TEA_PATH_X #-------------------------------------------------------------------- # Check whether --enable-threads or --disable-threads was given. # This auto-enables if Tcl was compiled threaded. #-------------------------------------------------------------------- # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then : enableval=$enable_threads; tcl_ok=$enableval else tcl_ok=yes fi if test "${enable_threads+set}" = set; then enableval="$enable_threads" tcl_ok=$enableval else tcl_ok=yes fi if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then TCL_THREADS=1 if test "${TEA_PLATFORM}" != "windows" ; then # We are always OK on Windows, so check what this platform wants: # USE_THREAD_ALLOC tells us to try the special thread-based # allocator that significantly reduces lock contention $as_echo "#define USE_THREAD_ALLOC 1" >>confdefs.h $as_echo "#define _REENTRANT 1" >>confdefs.h if test "`uname -s`" = "SunOS" ; then $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h fi $as_echo "#define _THREAD_SAFE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_mutex_init=yes else ac_cv_lib_pthread_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then : tcl_ok=yes else tcl_ok=no fi if test "$tcl_ok" = "no"; then # Check a little harder for __pthread_mutex_init in the same # library, as some systems hide it there until pthread.h is # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_mutex_init in -lpthread" >&5 $as_echo_n "checking for __pthread_mutex_init in -lpthread... " >&6; } if ${ac_cv_lib_pthread___pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char __pthread_mutex_init (); int main () { return __pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread___pthread_mutex_init=yes else ac_cv_lib_pthread___pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_pthread___pthread_mutex_init" >&6; } if test "x$ac_cv_lib_pthread___pthread_mutex_init" = xyes; then : tcl_ok=yes else tcl_ok=no fi fi if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -lpthread" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthreads" >&5 $as_echo_n "checking for pthread_mutex_init in -lpthreads... " >&6; } if ${ac_cv_lib_pthreads_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthreads_pthread_mutex_init=yes else ac_cv_lib_pthreads_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = xyes; then : tcl_ok=yes else tcl_ok=no fi if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -lpthreads" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc" >&5 $as_echo_n "checking for pthread_mutex_init in -lc... " >&6; } if ${ac_cv_lib_c_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_pthread_mutex_init=yes else ac_cv_lib_c_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_c_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_c_pthread_mutex_init" = xyes; then : tcl_ok=yes else tcl_ok=no fi if test "$tcl_ok" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc_r" >&5 $as_echo_n "checking for pthread_mutex_init in -lc_r... " >&6; } if ${ac_cv_lib_c_r_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc_r $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_r_pthread_mutex_init=yes else ac_cv_lib_c_r_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_c_r_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_c_r_pthread_mutex_init" = xyes; then : tcl_ok=yes else tcl_ok=no fi if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -pthread" else TCL_THREADS=0 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5 $as_echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;} fi fi fi fi fi else TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5 $as_echo_n "checking for building with threads... " >&6; } if test "${TCL_THREADS}" = 1; then $as_echo "#define TCL_THREADS 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5 $as_echo "yes (default)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # TCL_THREADS sanity checking. See if our request for building with # threads is the same as the way Tcl was built. If not, warn the user. case ${TCL_DEFS} in *THREADS=1*) if test "${TCL_THREADS}" = "0"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Building ${PACKAGE_NAME} without threads enabled, but building against Tcl that IS thread-enabled. It is recommended to use --enable-threads." >&5 $as_echo "$as_me: WARNING: Building ${PACKAGE_NAME} without threads enabled, but building against Tcl that IS thread-enabled. It is recommended to use --enable-threads." >&2;} fi ;; *) if test "${TCL_THREADS}" = "1"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-threads requested, but building against a Tcl that is NOT thread-enabled. This is an OK configuration that will also run in a thread-enabled core." >&5 $as_echo "$as_me: WARNING: --enable-threads requested, but building against a Tcl that is NOT thread-enabled. This is an OK configuration that will also run in a thread-enabled core." >&2;} fi ;; esac #-------------------------------------------------------------------- # The statement below defines a collection of symbols related to # building as a shared library instead of a static library. #-------------------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5 $as_echo_n "checking how to build libraries... " >&6; } # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; tcl_ok=$enableval else tcl_ok=yes fi if test "${enable_shared+set}" = set; then enableval="$enable_shared" tcl_ok=$enableval else tcl_ok=yes fi if test "$tcl_ok" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5 $as_echo "shared" >&6; } SHARED_BUILD=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 $as_echo "static" >&6; } SHARED_BUILD=0 $as_echo "#define STATIC_BUILD 1" >>confdefs.h fi #-------------------------------------------------------------------- # This macro figures out what flags to use with the compiler/linker # when building shared/static debug/optimized objects. This information # can be taken from the tclConfig.sh file, but this figures it all out. #-------------------------------------------------------------------- # Step 0.a: Enable 64 bit support? { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5 $as_echo_n "checking if 64bit support is requested... " >&6; } # Check whether --enable-64bit was given. if test "${enable_64bit+set}" = set; then : enableval=$enable_64bit; do64bit=$enableval else do64bit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5 $as_echo "$do64bit" >&6; } # Step 0.b: Enable Solaris 64 bit VIS support? { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5 $as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; } # Check whether --enable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then : enableval=$enable_64bit_vis; do64bitVIS=$enableval else do64bitVIS=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5 $as_echo "$do64bitVIS" >&6; } # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then : do64bit=yes fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5 $as_echo_n "checking if compiler supports visibility \"hidden\"... " >&6; } if ${tcl_cv_cc_visibility_hidden+:} false; then : $as_echo_n "(cached) " >&6 else hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern __attribute__((__visibility__("hidden"))) void f(void); void f(void) {} int main () { f(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : tcl_cv_cc_visibility_hidden=yes else tcl_cv_cc_visibility_hidden=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5 $as_echo "$tcl_cv_cc_visibility_hidden" >&6; } if test $tcl_cv_cc_visibility_hidden = yes; then : $as_echo "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h fi # Step 0.d: Disable -rpath support? { $as_echo "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5 $as_echo_n "checking if rpath support is requested... " >&6; } # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; doRpath=$enableval else doRpath=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5 $as_echo "$doRpath" >&6; } # TEA specific: Cross-compiling options for Windows/CE builds? if test "${TEA_PLATFORM}" = windows; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Windows/CE build is requested" >&5 $as_echo_n "checking if Windows/CE build is requested... " >&6; } # Check whether --enable-wince was given. if test "${enable_wince+set}" = set; then : enableval=$enable_wince; doWince=$enableval else doWince=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doWince" >&5 $as_echo "$doWince" >&6; } fi # Set the variable "system" to hold the name and version number # for the system. { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5 $as_echo_n "checking system version... " >&6; } if ${tcl_cv_sys_version+:} false; then : $as_echo_n "(cached) " >&6 else # TEA specific: if test "${TEA_PLATFORM}" = "windows" ; then tcl_cv_sys_version=windows else tcl_cv_sys_version=`uname -s`-`uname -r` if test "$?" -ne 0 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5 $as_echo "$as_me: WARNING: can't find uname command" >&2;} tcl_cv_sys_version=unknown else if test "`uname -s`" = "AIX" ; then tcl_cv_sys_version=AIX-`uname -v`.`uname -r` fi fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5 $as_echo "$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version # Require ranlib early so we can override it in special cases below. # Set configuration options based on system name and version. # This is similar to Tcl's unix/tcl.m4 except that we've added a # "windows" case and removed some core-only vars. do64bit_ok=no # default to '{$LIBS}' and set to "" on per-platform necessary basis SHLIB_LD_LIBS='${LIBS}' # When ld needs options to work in 64-bit mode, put them in # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load] # is disabled by the user. [Bug 1016796] LDFLAGS_ARCH="" UNSHARED_LIB_SUFFIX="" # TEA specific: use PACKAGE_VERSION instead of VERSION TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`' ECHO_VERSION='`echo ${PACKAGE_VERSION}`' TCL_LIB_VERSIONS_OK=ok CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE=-O if test "$GCC" = yes; then : # TEA specific: CFLAGS_OPTIMIZE=-O2 CFLAGS_WARNING="-Wall" else CFLAGS_WARNING="" fi # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi STLIB_LD='${AR} cr' LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" if test "x$SHLIB_VERSION" = x; then : SHLIB_VERSION="1.0" fi case $system in # TEA specific: windows) # This is a 2-stage check to make sure we have the 64-bit SDK # We have to know where the SDK is installed. # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs # MACHINE is IX86 for LINK, but this is used by the manifest, # which requires x86|amd64|ia64. MACHINE="X86" if test "$do64bit" != "no" ; then if test "x${MSSDK}x" = "xx" ; then MSSDK="C:/Progra~1/Microsoft Platform SDK" fi MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'` PATH64="" case "$do64bit" in amd64|x64|yes) MACHINE="AMD64" ; # default to AMD64 64-bit build PATH64="${MSSDK}/Bin/Win64/x86/AMD64" ;; ia64) MACHINE="IA64" PATH64="${MSSDK}/Bin/Win64" ;; esac if test ! -d "${PATH64}" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5 $as_echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ensure latest Platform SDK is installed" >&5 $as_echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;} do64bit="no" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using 64-bit $MACHINE mode" >&5 $as_echo " Using 64-bit $MACHINE mode" >&6; } do64bit_ok="yes" fi fi if test "$doWince" != "no" ; then if test "$do64bit" != "no" ; then as_fn_error $? "Windows/CE and 64-bit builds incompatible" "$LINENO" 5 fi if test "$GCC" = "yes" ; then as_fn_error $? "Windows/CE and GCC builds incompatible" "$LINENO" 5 fi # First, look for one uninstalled. # the alternative search directory is invoked by --with-celib if test x"${no_celib}" = x ; then # we reset no_celib in case something fails here no_celib=true # Check whether --with-celib was given. if test "${with_celib+set}" = set; then : withval=$with_celib; with_celibconfig=${withval} fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Windows/CE celib directory" >&5 $as_echo_n "checking for Windows/CE celib directory... " >&6; } if ${ac_cv_c_celibconfig+:} false; then : $as_echo_n "(cached) " >&6 else # First check to see if --with-celibconfig was specified. if test x"${with_celibconfig}" != x ; then if test -d "${with_celibconfig}/inc" ; then ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)` else as_fn_error $? "${with_celibconfig} directory doesn't contain inc directory" "$LINENO" 5 fi fi # then check for a celib library if test x"${ac_cv_c_celibconfig}" = x ; then for i in \ ../celib-palm-3.0 \ ../celib \ ../../celib-palm-3.0 \ ../../celib \ `ls -dr ../celib-*3.[0-9]* 2>/dev/null` \ ${srcdir}/../celib-palm-3.0 \ ${srcdir}/../celib \ `ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \ ; do if test -d "$i/inc" ; then ac_cv_c_celibconfig=`(cd $i; pwd)` break fi done fi fi if test x"${ac_cv_c_celibconfig}" = x ; then as_fn_error $? "Cannot find celib support library directory" "$LINENO" 5 else no_celib= CELIB_DIR=${ac_cv_c_celibconfig} CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $CELIB_DIR" >&5 $as_echo "found $CELIB_DIR" >&6; } fi fi # Set defaults for common evc4/PPC2003 setup # Currently Tcl requires 300+, possibly 420+ for sockets CEVERSION=420; # could be 211 300 301 400 420 ... TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ... ARCH=ARM; # could be ARM MIPS X86EM ... PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002" if test "$doWince" != "yes"; then # If !yes then the user specified something # Reset ARCH to allow user to skip specifying it ARCH= eval `echo $doWince | awk -F, '{ \ if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \ if ($1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \ if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \ if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \ if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \ }'` if test "x${ARCH}" = "x" ; then ARCH=$TARGETCPU; fi fi OSVERSION=WCE$CEVERSION; if test "x${WCEROOT}" = "x" ; then WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0" if test ! -d "${WCEROOT}" ; then WCEROOT="C:/Program Files/Microsoft eMbedded Tools" fi fi if test "x${SDKROOT}" = "x" ; then SDKROOT="C:/Program Files/Windows CE Tools" if test ! -d "${SDKROOT}" ; then SDKROOT="C:/Windows CE Tools" fi fi WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'` SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'` if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \ -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then as_fn_error $? "could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" "$LINENO" 5 doWince="no" else # We could PATH_NOSPACE these, but that's not important, # as long as we quote them when used. CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include" if test -d "${CEINCLUDE}/${TARGETCPU}" ; then CEINCLUDE="${CEINCLUDE}/${TARGETCPU}" fi CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" fi fi if test "$GCC" != "yes" ; then if test "${SHARED_BUILD}" = "0" ; then runtime=-MT else runtime=-MD fi if test "$do64bit" != "no" ; then # All this magic is necessary for the Win64 SDK RC1 - hobbs CC="\"${PATH64}/cl.exe\"" CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\"" RC="\"${MSSDK}/bin/rc.exe\"" lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" LINKBIN="\"${PATH64}/link.exe\"" CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d" CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" # Avoid 'unresolved external symbol __security_cookie' # errors, c.f. http://support.microsoft.com/?id=894573 vars="bufferoverflowU.lib" for i in $vars; do if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then # Convert foo.lib to -lfoo for GCC. No-op if not *.lib i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` fi PKG_LIBS="$PKG_LIBS $i" done elif test "$doWince" != "no" ; then CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin" if test "${TARGETCPU}" = "X86"; then CC="\"${CEBINROOT}/cl.exe\"" else CC="\"${CEBINROOT}/cl${ARCH}.exe\"" fi CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\"" RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\"" arch=`echo ${ARCH} | awk '{print tolower($0)}'` defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS" if test "${SHARED_BUILD}" = "1" ; then # Static CE builds require static celib as well defs="${defs} _DLL" fi for i in $defs ; do cat >>confdefs.h <<_ACEOF #define $i 1 _ACEOF done cat >>confdefs.h <<_ACEOF #define _WIN32_WCE $CEVERSION _ACEOF cat >>confdefs.h <<_ACEOF #define UNDER_CE $CEVERSION _ACEOF CFLAGS_DEBUG="-nologo -Zi -Od" CFLAGS_OPTIMIZE="-nologo -Ox" lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'` lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo" LINKBIN="\"${CEBINROOT}/link.exe\"" else RC="rc" lflags="-nologo" LINKBIN="link" CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d" CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" fi fi if test "$GCC" = "yes"; then # mingw gcc mode RC="windres" CFLAGS_DEBUG="-g" CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" SHLIB_LD="$CC -shared" UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}" LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}" else SHLIB_LD="${LINKBIN} -dll ${lflags}" # link -lib only works when -lib is the first arg STLIB_LD="${LINKBIN} -lib ${lflags}" UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib' PATHTYPE=-w # For information on what debugtype is most useful, see: # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp # and also # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx # This essentially turns it all on. LDFLAGS_DEBUG="-debug -debugtype:cv" LDFLAGS_OPTIMIZE="-release" if test "$doWince" != "no" ; then LDFLAGS_CONSOLE="-link ${lflags}" LDFLAGS_WINDOW=${LDFLAGS_CONSOLE} else LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" fi fi SHLIB_SUFFIX=".dll" SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll' TCL_LIB_VERSIONS_OK=nodots ;; AIX-*) if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then : # AIX requires the _r compiler when gcc isn't being used case "${CC}" in *_r|*_r\ *) # ok ... ;; *) # Make sure only first arg gets _r CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'` ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5 $as_echo "Using $CC for compiling with threads" >&6; } fi LIBS="$LIBS -lc" SHLIB_CFLAGS="" SHLIB_SUFFIX=".so" LD_LIBRARY_PATH_VAR="LIBPATH" # Check to enable 64-bit flags for compiler/linker if test "$do64bit" = yes; then : if test "$GCC" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} else do64bit_ok=yes CFLAGS="$CFLAGS -q64" LDFLAGS_ARCH="-q64" RANLIB="${RANLIB} -X64" AR="${AR} -X64" SHLIB_LD_FLAGS="-b64" fi fi if test "`uname -m`" = ia64; then : # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC SHLIB_LD="/usr/ccs/bin/ld -G -z text" if test "$GCC" = yes; then : CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' else CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' fi LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' else if test "$GCC" = yes; then : SHLIB_LD='${CC} -shared -Wl,-bexpall' else SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry" LDFLAGS="$LDFLAGS -brtl" fi SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} fi ;; BeOS*) SHLIB_CFLAGS="-fPIC" SHLIB_LD='${CC} -nostart' SHLIB_SUFFIX=".so" #----------------------------------------------------------- # Check for inet_ntoa in -lbind, for BeOS (which also needs # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5 $as_echo_n "checking for inet_ntoa in -lbind... " >&6; } if ${ac_cv_lib_bind_inet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbind $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_ntoa (); int main () { return inet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bind_inet_ntoa=yes else ac_cv_lib_bind_inet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5 $as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; } if test "x$ac_cv_lib_bind_inet_ntoa" = xyes; then : LIBS="$LIBS -lbind -lsocket" fi ;; BSD/OS-4.*) SHLIB_CFLAGS="-export-dynamic -fPIC" SHLIB_LD='${CC} -shared' SHLIB_SUFFIX=".so" LDFLAGS="$LDFLAGS -export-dynamic" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; CYGWIN_*) SHLIB_CFLAGS="" SHLIB_LD='${CC} -shared' SHLIB_SUFFIX=".dll" EXE_SUFFIX=".exe" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; Haiku*) LDFLAGS="$LDFLAGS -Wl,--export-dynamic" SHLIB_CFLAGS="-fPIC" SHLIB_SUFFIX=".so" SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnetwork" >&5 $as_echo_n "checking for inet_ntoa in -lnetwork... " >&6; } if ${ac_cv_lib_network_inet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnetwork $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_ntoa (); int main () { return inet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_network_inet_ntoa=yes else ac_cv_lib_network_inet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_inet_ntoa" >&5 $as_echo "$ac_cv_lib_network_inet_ntoa" >&6; } if test "x$ac_cv_lib_network_inet_ntoa" = xyes; then : LIBS="$LIBS -lnetwork" fi ;; HP-UX-*.11.*) # Use updated header definitions where possible $as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h # TEA specific: Needed by Tcl, but not most extensions #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?]) #LIBS="$LIBS -lxnet" # Use the XOPEN network library if test "`uname -m`" = ia64; then : SHLIB_SUFFIX=".so" # Use newer C++ library for C++ extensions #if test "$GCC" != "yes" ; then # CPPFLAGS="-AA" #fi else SHLIB_SUFFIX=".sl" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : tcl_ok=yes else tcl_ok=no fi if test "$tcl_ok" = yes; then : LDFLAGS="$LDFLAGS -E" CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" fi if test "$GCC" = yes; then : SHLIB_LD='${CC} -shared' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} else CFLAGS="$CFLAGS -z" # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc #CFLAGS="$CFLAGS +DAportable" SHLIB_CFLAGS="+z" SHLIB_LD="ld -b" fi # Check to enable 64-bit flags for compiler/linker if test "$do64bit" = "yes"; then : if test "$GCC" = yes; then : case `${CC} -dumpmachine` in hppa64*) # 64-bit gcc in use. Fix flags for GNU ld. do64bit_ok=yes SHLIB_LD='${CC} -shared' if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} ;; esac else do64bit_ok=yes CFLAGS="$CFLAGS +DD64" LDFLAGS_ARCH="+DD64" fi fi ;; IRIX-6.*) SHLIB_CFLAGS="" SHLIB_LD="ld -n32 -shared -rdata_shared" SHLIB_SUFFIX=".so" if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi if test "$GCC" = yes; then : CFLAGS="$CFLAGS -mabi=n32" LDFLAGS="$LDFLAGS -mabi=n32" else case $system in IRIX-6.3) # Use to build 6.2 compatible binaries on 6.3. CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS" ;; *) CFLAGS="$CFLAGS -n32" ;; esac LDFLAGS="$LDFLAGS -n32" fi ;; IRIX64-6.*) SHLIB_CFLAGS="" SHLIB_LD="ld -n32 -shared -rdata_shared" SHLIB_SUFFIX=".so" if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi # Check to enable 64-bit flags for compiler/linker if test "$do64bit" = yes; then : if test "$GCC" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5 $as_echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;} else do64bit_ok=yes SHLIB_LD="ld -64 -shared -rdata_shared" CFLAGS="$CFLAGS -64" LDFLAGS_ARCH="-64" fi fi ;; Linux*) SHLIB_CFLAGS="-fPIC" SHLIB_SUFFIX=".so" # TEA specific: CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}' LDFLAGS="$LDFLAGS -Wl,--export-dynamic" if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} if test "`uname -m`" = "alpha"; then : CFLAGS="$CFLAGS -mieee" fi if test $do64bit = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5 $as_echo_n "checking if compiler accepts -m64 flag... " >&6; } if ${tcl_cv_cc_m64+:} false; then : $as_echo_n "(cached) " >&6 else hold_cflags=$CFLAGS CFLAGS="$CFLAGS -m64" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : tcl_cv_cc_m64=yes else tcl_cv_cc_m64=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5 $as_echo "$tcl_cv_cc_m64" >&6; } if test $tcl_cv_cc_m64 = yes; then : CFLAGS="$CFLAGS -m64" do64bit_ok=yes fi fi # The combo of gcc + glibc has a bug related to inlining of # functions like strtod(). The -fno-builtin flag should address # this problem but it does not work. The -fno-inline flag is kind # of overkill but it works. Disable inlining only when one of the # files in compat/*.c is being linked in. if test x"${USE_COMPAT}" != x; then : CFLAGS="$CFLAGS -fno-inline" fi ;; GNU*) SHLIB_CFLAGS="-fPIC" SHLIB_SUFFIX=".so" SHLIB_LD='${CC} -shared' LDFLAGS="$LDFLAGS -Wl,--export-dynamic" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" if test "`uname -m`" = "alpha"; then : CFLAGS="$CFLAGS -mieee" fi ;; Lynx*) SHLIB_CFLAGS="-fPIC" SHLIB_SUFFIX=".so" CFLAGS_OPTIMIZE=-02 SHLIB_LD='${CC} -shared' LD_FLAGS="-Wl,--export-dynamic" if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' fi ;; OpenBSD-*) SHLIB_CFLAGS="-fPIC" SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' SHLIB_SUFFIX=".so" if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5 $as_echo_n "checking for ELF... " >&6; } if ${tcl_cv_ld_elf+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __ELF__ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : tcl_cv_ld_elf=yes else tcl_cv_ld_elf=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_elf" >&5 $as_echo "$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then : LDFLAGS=-Wl,-export-dynamic else LDFLAGS="" fi if test "${TCL_THREADS}" = "1"; then : # OpenBSD builds and links with -pthread, never -lpthread. LIBS=`echo $LIBS | sed s/-lpthread//` CFLAGS="$CFLAGS -pthread" SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread" fi # OpenBSD doesn't do version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; NetBSD-*|FreeBSD-[3-4].*) # FreeBSD 3.* and greater have ELF. # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs SHLIB_CFLAGS="-fPIC" SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' SHLIB_SUFFIX=".so" LDFLAGS="$LDFLAGS -export-dynamic" if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} if test "${TCL_THREADS}" = "1"; then : # The -pthread needs to go in the CFLAGS, not LIBS LIBS=`echo $LIBS | sed s/-pthread//` CFLAGS="$CFLAGS -pthread" LDFLAGS="$LDFLAGS -pthread" fi case $system in FreeBSD-3.*) # FreeBSD-3 doesn't handle version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' TCL_LIB_VERSIONS_OK=nodots ;; esac ;; FreeBSD-*) # This configuration from FreeBSD Ports. SHLIB_CFLAGS="-fPIC" SHLIB_LD="${CC} -shared" TCL_SHLIB_LD_EXTRAS="-soname \$@" SHLIB_SUFFIX=".so" LDFLAGS="" if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi if test "${TCL_THREADS}" = "1"; then : # The -pthread needs to go in the LDFLAGS, not LIBS LIBS=`echo $LIBS | sed s/-pthread//` CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LDFLAGS="$LDFLAGS $PTHREAD_LIBS" fi # Version numbers are dot-stripped by system policy. TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .` UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1' TCL_LIB_VERSIONS_OK=nodots ;; Darwin-*) CFLAGS_OPTIMIZE="-Os" SHLIB_CFLAGS="-fno-common" # To avoid discrepancies between what headers configure sees during # preprocessing tests and compiling tests, move any -isysroot and # -mmacosx-version-min flags from CFLAGS to CPPFLAGS: CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \ awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`" CFLAGS="`echo " ${CFLAGS}" | \ awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`" if test $do64bit = yes; then : case `arch` in ppc) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5 $as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; } if ${tcl_cv_cc_arch_ppc64+:} false; then : $as_echo_n "(cached) " >&6 else hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : tcl_cv_cc_arch_ppc64=yes else tcl_cv_cc_arch_ppc64=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5 $as_echo "$tcl_cv_cc_arch_ppc64" >&6; } if test $tcl_cv_cc_arch_ppc64 = yes; then : CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" do64bit_ok=yes fi;; i386) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5 $as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; } if ${tcl_cv_cc_arch_x86_64+:} false; then : $as_echo_n "(cached) " >&6 else hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch x86_64" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : tcl_cv_cc_arch_x86_64=yes else tcl_cv_cc_arch_x86_64=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5 $as_echo "$tcl_cv_cc_arch_x86_64" >&6; } if test $tcl_cv_cc_arch_x86_64 = yes; then : CFLAGS="$CFLAGS -arch x86_64" do64bit_ok=yes fi;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5 $as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};; esac else # Check for combined 32-bit and 64-bit fat build if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \ && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then : fat_32_64=yes fi fi # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5 $as_echo_n "checking if ld accepts -single_module flag... " >&6; } if ${tcl_cv_ld_single_module+:} false; then : $as_echo_n "(cached) " >&6 else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int i; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : tcl_cv_ld_single_module=yes else tcl_cv_ld_single_module=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5 $as_echo "$tcl_cv_ld_single_module" >&6; } if test $tcl_cv_ld_single_module = yes; then : SHLIB_LD="${SHLIB_LD} -Wl,-single_module" fi # TEA specific: link shlib with current and compatiblity version flags vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d` SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}" SHLIB_SUFFIX=".dylib" # Don't use -prebind when building for Mac OS X 10.4 or later only: if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \ "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then : LDFLAGS="$LDFLAGS -prebind" fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5 $as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; } if ${tcl_cv_ld_search_paths_first+:} false; then : $as_echo_n "(cached) " >&6 else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-search_paths_first" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int i; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : tcl_cv_ld_search_paths_first=yes else tcl_cv_ld_search_paths_first=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5 $as_echo "$tcl_cv_ld_search_paths_first" >&6; } if test $tcl_cv_ld_search_paths_first = yes; then : LDFLAGS="$LDFLAGS -Wl,-search_paths_first" fi if test "$tcl_cv_cc_visibility_hidden" != yes; then : $as_echo "#define MODULE_SCOPE __private_extern__" >>confdefs.h tcl_cv_cc_visibility_hidden=yes fi CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" # TEA specific: for combined 32 & 64 bit fat builds of Tk # extensions, verify that 64-bit build is possible. if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then : if test "${TEA_WINDOWINGSYSTEM}" = x11; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit X11" >&5 $as_echo_n "checking for 64-bit X11... " >&6; } if ${tcl_cv_lib_x11_64+:} false; then : $as_echo_n "(cached) " >&6 else for v in CFLAGS CPPFLAGS LDFLAGS; do eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' done CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include" LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { XrmInitialize(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : tcl_cv_lib_x11_64=yes else tcl_cv_lib_x11_64=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_x11_64" >&5 $as_echo "$tcl_cv_lib_x11_64" >&6; } fi if test "${TEA_WINDOWINGSYSTEM}" = aqua; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit Tk" >&5 $as_echo_n "checking for 64-bit Tk... " >&6; } if ${tcl_cv_lib_tk_64+:} false; then : $as_echo_n "(cached) " >&6 else for v in CFLAGS CPPFLAGS LDFLAGS; do eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' done CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}" LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { Tk_InitStubs(NULL, "", 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : tcl_cv_lib_tk_64=yes else tcl_cv_lib_tk_64=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_tk_64" >&5 $as_echo "$tcl_cv_lib_tk_64" >&6; } fi # remove 64-bit arch flags from CFLAGS et al. if configuration # does not support 64-bit. if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then : { $as_echo "$as_me:${as_lineno-$LINENO}: Removing 64-bit architectures from compiler & linker flags" >&5 $as_echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;} for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"' done fi fi ;; OS/390-*) CFLAGS_OPTIMIZE="" # Optimizer is buggy $as_echo "#define _OE_SOCKETS 1" >>confdefs.h ;; OSF1-V*) # Digital OSF/1 SHLIB_CFLAGS="" if test "$SHARED_BUILD" = 1; then : SHLIB_LD='ld -shared -expect_unresolved "*"' else SHLIB_LD='ld -non_shared -expect_unresolved "*"' fi SHLIB_SUFFIX=".so" if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi if test "$GCC" = yes; then : CFLAGS="$CFLAGS -mieee" else CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee" fi # see pthread_intro(3) for pthread support on osf1, k.furukawa if test "${TCL_THREADS}" = 1; then : CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE" CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64" LIBS=`echo $LIBS | sed s/-lpthreads//` if test "$GCC" = yes; then : LIBS="$LIBS -lpthread -lmach -lexc" else CFLAGS="$CFLAGS -pthread" LDFLAGS="$LDFLAGS -pthread" fi fi ;; QNX-6*) # QNX RTP # This may work for all QNX, but it was only reported for v6. SHLIB_CFLAGS="-fPIC" SHLIB_LD="ld -Bshareable -x" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; SCO_SV-3.2*) if test "$GCC" = yes; then : SHLIB_CFLAGS="-fPIC -melf" LDFLAGS="$LDFLAGS -melf -Wl,-Bexport" else SHLIB_CFLAGS="-Kpic -belf" LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" fi SHLIB_LD="ld -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; SunOS-5.[0-6]) # Careful to not let 5.10+ fall into this case # Note: If _REENTRANT isn't defined, then Solaris # won't define thread-safe library routines. $as_echo "#define _REENTRANT 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h SHLIB_CFLAGS="-KPIC" SHLIB_SUFFIX=".so" if test "$GCC" = yes; then : SHLIB_LD='${CC} -shared' CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} else SHLIB_LD="/usr/ccs/bin/ld -G -z text" CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} fi ;; SunOS-5*) # Note: If _REENTRANT isn't defined, then Solaris # won't define thread-safe library routines. $as_echo "#define _REENTRANT 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h SHLIB_CFLAGS="-KPIC" # Check to enable 64-bit flags for compiler/linker if test "$do64bit" = yes; then : arch=`isainfo` if test "$arch" = "sparcv9 sparc"; then : if test "$GCC" = yes; then : if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;} else do64bit_ok=yes CFLAGS="$CFLAGS -m64 -mcpu=v9" LDFLAGS="$LDFLAGS -m64 -mcpu=v9" SHLIB_CFLAGS="-fPIC" fi else do64bit_ok=yes if test "$do64bitVIS" = yes; then : CFLAGS="$CFLAGS -xarch=v9a" LDFLAGS_ARCH="-xarch=v9a" else CFLAGS="$CFLAGS -xarch=v9" LDFLAGS_ARCH="-xarch=v9" fi # Solaris 64 uses this as well #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64" fi else if test "$arch" = "amd64 i386"; then : if test "$GCC" = yes; then : case $system in SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*) do64bit_ok=yes CFLAGS="$CFLAGS -m64" LDFLAGS="$LDFLAGS -m64";; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};; esac else do64bit_ok=yes case $system in SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*) CFLAGS="$CFLAGS -m64" LDFLAGS="$LDFLAGS -m64";; *) CFLAGS="$CFLAGS -xarch=amd64" LDFLAGS="$LDFLAGS -xarch=amd64";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5 $as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;} fi fi fi SHLIB_SUFFIX=".so" if test "$GCC" = yes; then : SHLIB_LD='${CC} -shared' CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} if test "$do64bit_ok" = yes; then : if test "$arch" = "sparcv9 sparc"; then : # We need to specify -static-libgcc or we need to # add the path to the sparv9 libgcc. # JH: static-libgcc is necessary for core Tcl, but may # not be necessary for extensions. SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc" # for finding sparcv9 libgcc, get the regular libgcc # path, remove so name and append 'sparcv9' #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" else if test "$arch" = "amd64 i386"; then : # JH: static-libgcc is necessary for core Tcl, but may # not be necessary for extensions. SHLIB_LD="$SHLIB_LD -m64 -static-libgcc" fi fi fi else case $system in SunOS-5.[1-9][0-9]*) # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';; *) SHLIB_LD='/usr/ccs/bin/ld -G -z text';; esac CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' fi ;; esac if test "$do64bit" = yes -a "$do64bit_ok" = no; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5 $as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;} fi # Add in the arch flags late to ensure it wasn't removed. # Not necessary in TEA, but this is aligned with core LDFLAGS="$LDFLAGS $LDFLAGS_ARCH" # If we're running gcc, then change the C flags for compiling shared # libraries to the right flags for gcc, instead of those for the # standard manufacturer compiler. if test "$GCC" = yes; then : case $system in AIX-*) ;; BSD/OS*) ;; CYGWIN_*) ;; IRIX*) ;; NetBSD-*|FreeBSD-*|OpenBSD-*) ;; Darwin-*) ;; SCO_SV-3.2*) ;; windows) ;; *) SHLIB_CFLAGS="-fPIC" ;; esac fi if test "$tcl_cv_cc_visibility_hidden" != yes; then : $as_echo "#define MODULE_SCOPE extern" >>confdefs.h $as_echo "#define NO_VIZ /**/" >>confdefs.h fi if test "$SHARED_LIB_SUFFIX" = ""; then : # TEA specific: use PACKAGE_VERSION instead of VERSION SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}' fi if test "$UNSHARED_LIB_SUFFIX" = ""; then : # TEA specific: use PACKAGE_VERSION instead of VERSION UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a' fi # These must be called after we do the basic CFLAGS checks and # verify any possible 64-bit or similar switches are necessary { $as_echo "$as_me:${as_lineno-$LINENO}: checking for required early compiler flags" >&5 $as_echo_n "checking for required early compiler flags... " >&6; } tcl_flags="" if ${tcl_cv_flag__isoc99_source+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_flag__isoc99_source=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _ISOC99_SOURCE 1 #include int main () { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_flag__isoc99_source=yes else tcl_cv_flag__isoc99_source=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then $as_echo "#define _ISOC99_SOURCE 1" >>confdefs.h tcl_flags="$tcl_flags _ISOC99_SOURCE" fi if ${tcl_cv_flag__largefile64_source+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_flag__largefile64_source=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGEFILE64_SOURCE 1 #include int main () { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_flag__largefile64_source=yes else tcl_cv_flag__largefile64_source=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then $as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h tcl_flags="$tcl_flags _LARGEFILE64_SOURCE" fi if ${tcl_cv_flag__largefile_source64+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *p = (char *)open64; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_flag__largefile_source64=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGEFILE_SOURCE64 1 #include int main () { char *p = (char *)open64; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_flag__largefile_source64=yes else tcl_cv_flag__largefile_source64=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then $as_echo "#define _LARGEFILE_SOURCE64 1" >>confdefs.h tcl_flags="$tcl_flags _LARGEFILE_SOURCE64" fi if test "x${tcl_flags}" = "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_flags}" >&5 $as_echo "${tcl_flags}" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5 $as_echo_n "checking for 64-bit integer type... " >&6; } if ${tcl_cv_type_64bit+:} false; then : $as_echo_n "(cached) " >&6 else tcl_cv_type_64bit=none # See if the compiler knows natively about __int64 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { __int64 value = (__int64) 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_type_64bit=__int64 else tcl_type_64bit="long long" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { switch (0) { case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ; } ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_type_64bit=${tcl_type_64bit} fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then $as_echo "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: using long" >&5 $as_echo "using long" >&6; } elif test "${tcl_cv_type_64bit}" = "__int64" \ -a "${TEA_PLATFORM}" = "windows" ; then # TEA specific: We actually want to use the default tcl.h checks in # this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER* { $as_echo "$as_me:${as_lineno-$LINENO}: result: using Tcl header defaults" >&5 $as_echo "using Tcl header defaults" >&6; } else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5 $as_echo "${tcl_cv_type_64bit}" >&6; } # Now check for auxiliary declarations { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5 $as_echo_n "checking for struct dirent64... " >&6; } if ${tcl_cv_struct_dirent64+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct dirent64 p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_struct_dirent64=yes else tcl_cv_struct_dirent64=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5 $as_echo "$tcl_cv_struct_dirent64" >&6; } if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then $as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5 $as_echo_n "checking for struct stat64... " >&6; } if ${tcl_cv_struct_stat64+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct stat64 p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_struct_stat64=yes else tcl_cv_struct_stat64=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5 $as_echo "$tcl_cv_struct_stat64" >&6; } if test "x${tcl_cv_struct_stat64}" = "xyes" ; then $as_echo "#define HAVE_STRUCT_STAT64 1" >>confdefs.h fi for ac_func in open64 lseek64 do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5 $as_echo_n "checking for off64_t... " >&6; } if ${tcl_cv_type_off64_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { off64_t offset; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_type_off64_t=yes else tcl_cv_type_off64_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ test "x${ac_cv_func_lseek64}" = "xyes" && \ test "x${ac_cv_func_open64}" = "xyes" ; then $as_echo "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi #-------------------------------------------------------------------- # Set the default compiler switches based on the --enable-symbols option. #-------------------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5 $as_echo_n "checking for build with symbols... " >&6; } # Check whether --enable-symbols was given. if test "${enable_symbols+set}" = set; then : enableval=$enable_symbols; tcl_ok=$enableval else tcl_ok=no fi DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}" LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else CFLAGS_DEFAULT="${CFLAGS_DEBUG}" LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}" if test "$tcl_ok" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5 $as_echo "yes (standard debugging)" >&6; } fi fi # TEA specific: if test "${TEA_PLATFORM}" != "windows" ; then LDFLAGS_DEFAULT="${LDFLAGS}" fi if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then $as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h fi if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem debugging" >&5 $as_echo "enabled symbols mem debugging" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5 $as_echo "enabled $tcl_ok debugging" >&6; } fi fi #-------------------------------------------------------------------- # Everyone should be linking against the Tcl stub library. If you # can't for some reason, remove this definition. If you aren't using # stubs, you also need to modify the SHLIB_LD_LIBS setting below to # link against the non-stubbed Tcl library. Add Tk too if necessary. #-------------------------------------------------------------------- # # stubs are causing segmentation violations when mod_rivet is getting # loaded into apache. it would be nice if we did no stubs for this and # still did stubs for librivet and librivetparser, which seem to be OK. # #AC_DEFINE(USE_TCL_STUBS,1,[Define to link against the Tcl stub library]) #AC_DEFINE(USE_TK_STUBS) #-------------------------------------------------------------------- # This macro generates a line to use when building a library. It # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS, # and TEA_LOAD_TCLCONFIG macros above. #-------------------------------------------------------------------- if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)" MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(_MSC_VER) && _MSC_VER >= 1400 print("manifest needed") #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "manifest needed" >/dev/null 2>&1; then : # Could do a CHECK_PROG for mt, but should always be with MSVC8+ VC_MANIFEST_EMBED_DLL="mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2" VC_MANIFEST_EMBED_EXE="mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1" MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}" CLEANFILES="$CLEANFILES *.manifest" fi rm -f conftest* MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)" else MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)" MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}" MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)" fi if test "${SHARED_BUILD}" = "1" ; then MAKE_LIB="${MAKE_SHARED_LIB} " else MAKE_LIB="${MAKE_STATIC_LIB} " fi #-------------------------------------------------------------------- # Shared libraries and static libraries have different names. # Use the double eval to make sure any variables in the suffix is # substituted. (@@@ Might not be necessary anymore) #-------------------------------------------------------------------- if test "${TEA_PLATFORM}" = "windows" ; then if test "${SHARED_BUILD}" = "1" ; then # We force the unresolved linking of symbols that are really in # the private libraries of Tcl and Tk. SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\"" if test x"${TK_BIN_DIR}" != x ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" fi eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" else eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" fi # Some packages build their own stubs libraries eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" if test "$GCC" = "yes"; then PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE} fi # These aren't needed on Windows (either MSVC or gcc) RANLIB=: RANLIB_STUB=: else RANLIB_STUB="${RANLIB}" if test "${SHARED_BUILD}" = "1" ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}" if test x"${TK_BIN_DIR}" != x ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}" fi eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" RANLIB=: else eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" fi # Some packages build their own stubs libraries eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" fi # These are escaped so that only CFLAGS is picked up at configure time. # The other values will be substituted at make time. CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}" if test "${SHARED_BUILD}" = "1" ; then CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}" fi #-------------------------------------------------------------------- # Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl # file during the install process. Don't run the TCLSH_PROG through # ${CYGPATH} because it's being used directly by make. # Require that we use a tclsh shell version 8.2 or later since earlier # versions have bugs in the pkg_mkIndex routine. # Add WISH as well if this is a Tk extension. #-------------------------------------------------------------------- # We have to either find a working tclsh or be told where it is # using --with-tclsh # Check whether --with-tclsh was given. if test "${with_tclsh+set}" = set; then : withval=$with_tclsh; with_tclsh=${withval} fi # # allow them to override the tclsh we think we found # if test x"${with_tclsh}" != x ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5 $as_echo_n "checking for tclsh... " >&6; } if test -f "${with_tclsh}" ; then TCLSH_PROG=${with_tclsh} { $as_echo "$as_me:${as_lineno-$LINENO}: result: manually set by --with-tclsh=$TCLSH_PROG" >&5 $as_echo "manually set by --with-tclsh=$TCLSH_PROG" >&6; } else as_fn_error $? "No tclsh at place specified by --with-tclsh (${with_tclsh})" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5 $as_echo_n "checking for tclsh... " >&6; } if test -f "${TCL_BIN_DIR}/Makefile" ; then # tclConfig.sh is in Tcl build directory if test "${TEA_PLATFORM}" = "windows"; then TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" else TCLSH_PROG="${TCL_BIN_DIR}/tclsh" fi else # tclConfig.sh is in install location if test "${TEA_PLATFORM}" = "windows"; then TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" else TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}" fi list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \ `ls -d ${TCL_BIN_DIR}/.. 2>/dev/null` \ `ls -d ${TCL_PREFIX}/bin 2>/dev/null`" for i in $list ; do if test -f "$i/${TCLSH_PROG}" ; then REAL_TCL_BIN_DIR="`cd "$i"; pwd`/" break fi done TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${TCLSH_PROG}" >&5 $as_echo "${TCLSH_PROG}" >&6; } fi #TEA_PROG_WISH # apache base directory # # We have to either find apxs or be told where it is using --with-apxs # #-------------------------------------------------------------------- # 6-Dec-2011: Introducing new ::rivet namespace. Some components # (namely RivetTcl, providing Tcl level initialization) are required # within mod_rivet.c. Unfortunalely Tcl < 8.5.10 shared # libs exporting names could clash with Apache's binary own names. # Hence we have to make sure we are running a Tcl compatible version. # (See Tcl bug #3216070). # # Effect: If you're running Tcl < 8.5.10 we refuse to build Rivet... # Used to indicate true or false condition ax_compare_version=false # Convert the two version strings to be compared into a format that # allows a simple string comparison. The end result is that a version # string of the form 1.12.5-r617 will be converted to the form # 0001001200050617. In other words, each number is zero padded to four # digits, and non digits are removed. ax_compare_version_A=`echo "$TCL_VERSION$TCL_PATCH_LEVEL" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/[^0-9]//g'` ax_compare_version_B=`echo "8.5.10" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/[^0-9]//g'` ax_compare_version=`echo "x$ax_compare_version_A x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/false/;s/x${ax_compare_version_B}/true/;1q"` if test "$ax_compare_version" = "true" ; then as_fn_error $? "Rivet 2.1 requires Tcl > 8.5.10 (current is $TCL_VERSION$TCL_PATCH_LEVEL)" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: we are building Rivet with Tcl $TCL_VERSION$TCL_PATCH_LEVEL" >&5 $as_echo "$as_me: we are building Rivet with Tcl $TCL_VERSION$TCL_PATCH_LEVEL" >&6;} fi print_fileevent_msg="0" # Used to indicate true or false condition ax_compare_version=false # Convert the two version strings to be compared into a format that # allows a simple string comparison. The end result is that a version # string of the form 1.12.5-r617 will be converted to the form # 0001001200050617. In other words, each number is zero padded to four # digits, and non digits are removed. ax_compare_version_A=`echo "$TCL_VERSION$TCL_PATCH_LEVEL" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/[^0-9]//g'` ax_compare_version_B=`echo "8.5.15" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/[^0-9]//g'` ax_compare_version=`echo "x$ax_compare_version_A x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/false/;s/x${ax_compare_version_B}/true/;1q"` if test "$ax_compare_version" = "true" ; then print_fileevent_msg="1" fi # Used to indicate true or false condition ax_compare_version=false # Convert the two version strings to be compared into a format that # allows a simple string comparison. The end result is that a version # string of the form 1.12.5-r617 will be converted to the form # 0001001200050617. In other words, each number is zero padded to four # digits, and non digits are removed. ax_compare_version_A=`echo "$TCL_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/[^0-9]//g'` ax_compare_version_B=`echo "8.6" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/[^0-9]//g'` # Pad zeros at end of numbers to make same length. ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`" ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`" ax_compare_version_A="$ax_compare_version_tmp_A" # Check for equality or inequality as necessary. test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true if test "$ax_compare_version" = "true" ; then if test "$TCL_PATCH_LEVEL" = ".0" ; then print_fileevent_msg="1" fi fi # APACHE_VERSION # # let's determine whether we are building for apache1.x or apache2.x. # This variable has consequences on the default values for the remaining # site options. We try to guess some of them. # # MOD_RIVET_CORE # # # APACHE_REQUEST # # Choosing where is located the code for handling Apache request data (like # form data etc). Default: 'request' # RIVET_CORE_CMDS # # selecting non default directory for Rivet code commands core # # RIVET_CHANNEL # # selecting the Rivet channel code directory # DISPLAY_RIVET_VERSION # # --enable-version-display=[yes|no] (default: no) # switches on version number display in Apache's signature. # # UPLOAD_DIRECTORY # # Adds '--with-upload-dir=DIR' to configure's arguments # # let's make configuration of the upload directory more flexible for windows builds # (in case someone steps forward and takes up the Windows port) # The upload directory can be changed in the configuration, but we give the # user/packager the chance to set a default at compile time. # Default: /tmp # HONOR_HEAD_REQUESTS (--enable-head-requests) # Rivet answers to HEAD requests with a standard response to avoid the whole workload # of generating the content of a page with to the sole purpose of returning the HTTP # headers.To test the configuration or scripts that manipulate the headers it # can be useful to let Rivet honor a HEAD request as if the whole content was # generated so that the real headers are returned (this can be set in configuration # by adding "RivetServerConf HonorHeaderOnlyRequests yes" to the server configuration) # Default: no # RIVET_COMMANDS_EXPORT (--enable-rivet-commands-export). # Enable export of commands in Rivet's namespace. Definining this symbols # sets the boolean configuration variable rivet_commands_export # Default: yes # IMPORT_RIVET_COMMANDS (--enable-import-rivet-commands). # For compatibility the module can be compiled and installed forcing rivet # to import commands from ::rivet into the global namespace. # Default: yes # SEPARATE_VIRTUAL_INTERPS (--enable-virtual-interps-separation) # Virtual hosts get their own interpreter and configuration. Different # applications running on different virtual hosts don't mix up variables # and namespaces, avoiding conflicts. # Default: no # POST_MAX_SIZE (--with-post-max) # Maximum size of data posted by a form # Default: 0=unlimited # UPLOAD_TO_VAR (--enable-upload-var) # Enables upload of files into Tcl variables # Default: 1=enabled #APACHE_VERSION # Check whether --with-rivet_core was given. if test "${with_rivet_core+set}" = set; then : withval=$with_rivet_core; else with_rivet_core="apache-2" fi rivet_core=${with_rivet_core} { $as_echo "$as_me:${as_lineno-$LINENO}: checking mod_rivet core" >&5 $as_echo_n "checking mod_rivet core... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_rivet_core" >&5 $as_echo "$with_rivet_core" >&6; } RIVET_BASE_INCLUDE=`pwd`/src { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Apache base" >&5 $as_echo_n "checking for Apache base... " >&6; } # Check whether --with-apache was given. if test "${with_apache+set}" = set; then : withval=$with_apache; else with_apache="/usr/local/apache2" fi apache_base="${with_apache}" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apache_base" >&5 $as_echo "$apache_base" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Apache apxs" >&5 $as_echo_n "checking for Apache apxs... " >&6; } # Check whether --with-apxs was given. if test "${with_apxs+set}" = set; then : withval=$with_apxs; if test -x "${with_apxs}" ; then apxs_found="${with_apxs}" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apxs_found" >&5 $as_echo "$apxs_found" >&6; } fi else APXS_NAMES=apxs if test "${apache_version}"="2"; then APXS_NAMES="$APXS_NAMES apxs2" fi for apxs_file in ${APXS_NAMES}; do for apxs_path in bin sbin; do if test -x "${apache_base}"/"${apxs_path}"/"${apxs_file}"; then apxs_found="${apache_base}"/"${apxs_path}"/"${apxs_file}" break 2 fi done done if test x"$apxs_found" = x; then for ac_prog in apxs do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_with_apxs+:} false; then : $as_echo_n "(cached) " >&6 else case $with_apxs in [\\/]* | ?:[\\/]*) ac_cv_path_with_apxs="$with_apxs" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_with_apxs="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi with_apxs=$ac_cv_path_with_apxs if test -n "$with_apxs"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_apxs" >&5 $as_echo "$with_apxs" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$with_apxs" && break done if test "${with_apxs+set}" = set ; then apxs_found="${with_apxs}" fi fi if test x"${apxs_found}" = x; then as_fn_error $? "Could not find apxs. apxs must be in your PATH or you must specify the location of the apxs script using --with-apxs" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apxs_found" >&5 $as_echo "$apxs_found" >&6; } fi fi if test "${apxs_found+set}" = set ; then export PATH=$PATH:`dirname $apxs_found` APXS_CPPFLAGS=`${apxs_found} -q CFLAGS` APXS_LDFLAGS=`${apxs_found} -q LDFLAGS_SHLIB` APXS_LIBS=`${apxs_found} -q LIBS_SHLIB` APXS_INCLUDES=-I`${apxs_found} -q INCLUDEDIR` APXS_CPPFLAGS_SHLIB=`${apxs_found} -q CFLAGS_SHLIB` APXS_LD_SHLIB=`${apxs_found} -q LD_SHLIB` APXS_LIBEXECDIR=`${apxs_found} -q LIBEXECDIR` APXS_SYSCONFDIR=`${apxs_found} -q SYSCONFDIR` APXS_PREFIX=`${apxs_found} -q PREFIX` else as_fn_error $? "Could not find apxs. apxs must be in your PATH or you must specify the location of the apxs script using --with-apxs" "$LINENO" 5 fi # Check whether --with-apache_include was given. if test "${with_apache_include+set}" = set; then : withval=$with_apache_include; apache_include="${with_apache_include}" else apache_include="${APXS_INCLUDES}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Apache apr" >&5 $as_echo_n "checking for Apache apr... " >&6; } # Check whether --with-apr_config was given. if test "${with_apr_config+set}" = set; then : withval=$with_apr_config; if "${with_apr_config}" --version; then apr_found="${with_apr_config}" fi else if test -x "${apache_base}/bin/apr-1-config" ; then apr_found="${apache_base}/bin/apr-1-config" elif test -x "${apache_base}/sbin/apr-1-config" ; then apr_found="${apache_base}/sbin/apr-1-config" elif test "${apache_base+set}" = set; then for ac_prog in apr-1-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_with_apr_config+:} false; then : $as_echo_n "(cached) " >&6 else case $with_apr_config in [\\/]* | ?:[\\/]*) ac_cv_path_with_apr_config="$with_apr_config" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_with_apr_config="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi with_apr_config=$ac_cv_path_with_apr_config if test -n "$with_apr_config"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_apr_config" >&5 $as_echo "$with_apr_config" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$with_apr_config" && break done if test "${with_apr_config+set}" = set ; then apr_found="${with_apr_config}" fi else as_fn_error 1 "Specify the apr-1-config path or program name using --with-apr-config" "$LINENO" 5 fi fi if test "${apr_found+set}" = set ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_found" >&5 $as_echo "$apr_found" >&6; } export PATH=$PATH:`dirname ${apr_found}` APR_CPPFLAGS=`${apr_found} --cppflags` APR_INCLUDES=`${apr_found} --includes` APR_LDLFAGS=`${apr_found} --link-libtool --libs` else as_fn_error $? "Could not find apr-1-config. apr-1-config must be in your PATH or you must specify the location of the apr script using --with-apr-config" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Apache apu" >&5 $as_echo_n "checking for Apache apu... " >&6; } # Check whether --with-apu_config was given. if test "${with_apu_config+set}" = set; then : withval=$with_apu_config; if "${with_apu_config}" --version; then apu_found="${with_apu_config}" fi else if apu-1-config --version; then apu_found=apu-1-config elif test -x "${apache_base}/bin/apu-1-config" ; then apu_found="${apache_base}/bin/apu-1-config" elif test -x "${apache_base}/sbin/apu-1-config" ; then apu_found="${apache_base}/sbin/apu-1-config" elif test "${apache_base+set}" = set; then for ac_prog in apu-1-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_with_apu_config+:} false; then : $as_echo_n "(cached) " >&6 else case $with_apu_config in [\\/]* | ?:[\\/]*) ac_cv_path_with_apu_config="$with_apu_config" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_with_apu_config="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi with_apu_config=$ac_cv_path_with_apu_config if test -n "$with_apu_config"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_apu_config" >&5 $as_echo "$with_apu_config" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$with_apu_config" && break done if test "${with_apu_config+set}" = set ; then apu_found="${with_apu_config}" fi else as_fn_error 1 "Specify the apu-1-config path or program name using --with-apu-config" "$LINENO" 5 fi fi if test "${apu_found+set}" = set ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_found" >&5 $as_echo "$apu_found" >&6; } export PATH=$PATH:`dirname ${apu_found}` APU_INCLUDES=`${apu_found} --includes` APU_LDLFAGS=`${apu_found} --link-libtool --libs` else as_fn_error $? "Could not find apu-1-config. apu-1-config must be in your PATH or you must specify the location of the apu script using --with-apu-config" "$LINENO" 5 fi # Check whether --with-rivet_target_dir was given. if test "${with_rivet_target_dir+set}" = set; then : withval=$with_rivet_target_dir; else with_rivet_target_dir="${apache_base}/lib/rivet${PACKAGE_VERSION}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Rivet tcl library target" >&5 $as_echo_n "checking for Rivet tcl library target... " >&6; } RIVET_TCL_TARGET=${with_rivet_target_dir} { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_rivet_target_dir" >&5 $as_echo "$with_rivet_target_dir" >&6; } # Check whether --enable-version_display was given. if test "${enable_version_display+set}" = set; then : enableval=$enable_version_display; signature_version_display=$enable_version_display else signature_version_display="no" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rivet version is printed in Apache signature" >&5 $as_echo_n "checking whether rivet version is printed in Apache signature... " >&6; } if test "$signature_version_display" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define DISPLAY_VERSION 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, Rivet version will be hidden" >&5 $as_echo "no, Rivet version will be hidden" >&6; } $as_echo "#define DISPLAY_VERSION 0" >>confdefs.h fi # Check whether --with-upload_dir was given. if test "${with_upload_dir+set}" = set; then : withval=$with_upload_dir; else with_upload_dir="/tmp" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking where Rivet will save uploads" >&5 $as_echo_n "checking where Rivet will save uploads... " >&6; } RIVET_UPLOAD_DIR=${with_upload_dir} { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_upload_dir" >&5 $as_echo "$with_upload_dir" >&6; } # Check whether --enable-head_requests was given. if test "${enable_head_requests+set}" = set; then : enableval=$enable_head_requests; honor_head_requests=$enable_head_requests else honor_head_requests="no" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Rivet has to honor HEAD requests" >&5 $as_echo_n "checking whether Rivet has to honor HEAD requests... " >&6; } if test "$honor_head_requests" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HEAD_REQUESTS 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, Rivet will shunt HEAD requests" >&5 $as_echo "no, Rivet will shunt HEAD requests" >&6; } $as_echo "#define HEAD_REQUESTS 0" >>confdefs.h fi # Check whether --enable-virtual-interps-separation was given. if test "${enable_virtual_interps_separation+set}" = set; then : enableval=$enable_virtual_interps_separation; separate_virtual_interps=$enable_virtual_interps_separation else separate_virtual_interps="no" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Rivet will create an interpreter for each virtual host" >&5 $as_echo_n "checking whether Rivet will create an interpreter for each virtual host... " >&6; } if test "$separate_virtual_interps" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define SEPARATE_VIRTUAL_INTERPS 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define SEPARATE_VIRTUAL_INTERPS 0" >>confdefs.h fi # Check whether --with-post_max was given. if test "${with_post_max+set}" = set; then : withval=$with_post_max; else with_post_max=0 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking maximum size of a POST" >&5 $as_echo_n "checking maximum size of a POST... " >&6; } MAX_POST=${with_post_max} if test $with_post_max = 0; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: unlimited size" >&5 $as_echo "unlimited size" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_post_max" >&5 $as_echo "$with_post_max" >&6; } fi # Check whether --enable-upload-var was given. if test "${enable_upload_var+set}" = set; then : enableval=$enable_upload_var; upload_var=$enable_upload_var else upload_var="yes" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether files are uploaded to Tcl variables" >&5 $as_echo_n "checking whether files are uploaded to Tcl variables... " >&6; } if test "$upload_var" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define UPLOAD_FILES_TO_VAR 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define UPLOAD_FILES_TO_VAR 0" >>confdefs.h fi # Check whether --enable-import-rivet-commands was given. if test "${enable_import_rivet_commands+set}" = set; then : enableval=$enable_import_rivet_commands; import_rivet_commands=$enable_import_rivet_commands else import_rivet_commands="yes" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ::rivet namespace will be automatically imported for compatibility" >&5 $as_echo_n "checking if ::rivet namespace will be automatically imported for compatibility... " >&6; } if test "$import_rivet_commands" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define NAMESPACE_IMPORT 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define NAMESPACE_IMPORT 0" >>confdefs.h fi # Check whether --with-apache_request was given. if test "${with_apache_request+set}" = set; then : withval=$with_apache_request; else with_apache_request="request" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking code for request handling" >&5 $as_echo_n "checking code for request handling... " >&6; } apache_request=${with_apache_request} { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_apache_request" >&5 $as_echo "$with_apache_request" >&6; } # Check whether --with-rivet_core_cmds was given. if test "${with_rivet_core_cmds+set}" = set; then : withval=$with_rivet_core_cmds; else with_rivet_core_cmds="rivetcmds" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Rivet core commands code" >&5 $as_echo_n "checking for Rivet core commands code... " >&6; } rivet_core_cmds=${with_rivet_core_cmds} { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_rivet_core_cmds" >&5 $as_echo "$with_rivet_core_cmds" >&6; } # Check whether --with-rivet_channel was given. if test "${with_rivet_channel+set}" = set; then : withval=$with_rivet_channel; else with_rivet_channel="channel" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Rivet channel code path" >&5 $as_echo_n "checking for Rivet channel code path... " >&6; } rivet_channel=${with_rivet_channel} { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_rivet_channel" >&5 $as_echo "$with_rivet_channel" >&6; } # Let's separate the point version from the major and minor version # to build a Rivet version to be substituted as basic version for # package Rivet, central initialization of the Tcl environment VERSION=${PACKAGE_VERSION} AX_MAJOR_VERSION=`echo "$VERSION" | $SED 's/\([^.][^.]*\).*/\1/'` AX_MINOR_VERSION=`echo "$VERSION" | $SED 's/[^.][^.]*.\([^.][^.]*\).*/\1/'` AX_POINT_VERSION=`echo "$VERSION" | $SED 's/[^.][^.]*.[^.][^.]*.\(.*\)/\1/'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking Major version" >&5 $as_echo_n "checking Major version... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AX_MAJOR_VERSION" >&5 $as_echo "$AX_MAJOR_VERSION" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking Minor version" >&5 $as_echo_n "checking Minor version... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AX_MINOR_VERSION" >&5 $as_echo "$AX_MINOR_VERSION" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking Point version" >&5 $as_echo_n "checking Point version... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AX_POINT_VERSION" >&5 $as_echo "$AX_POINT_VERSION" >&6; } cat >>confdefs.h <<_ACEOF #define TCL_PACKAGE_VERSION "${AX_MAJOR_VERSION}.${AX_MINOR_VERSION}" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: Rivet package version is ${AX_MAJOR_VERSION}.${AX_MINOR_VERSION}" >&5 $as_echo "$as_me: Rivet package version is ${AX_MAJOR_VERSION}.${AX_MINOR_VERSION}" >&6;} INIT_VERSION="${AX_MAJOR_VERSION}.${AX_MINOR_VERSION}" if test $import_rivet_commands = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: forcing Rivet to export commands from ::rivet namespace" >&5 $as_echo "$as_me: forcing Rivet to export commands from ::rivet namespace" >&6;} $as_echo "#define NAMESPACE_EXPORT 1" >>confdefs.h else # Check whether --enable-rivet-commands-export was given. if test "${enable_rivet_commands_export+set}" = set; then : enableval=$enable_rivet_commands_export; rivet_commands_export=$enable_rivet_commands_export else rivet_commands_export="yes" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the commands in ::rivet namespace will be exported" >&5 $as_echo_n "checking whether the commands in ::rivet namespace will be exported... " >&6; } if test "$rivet_commands_export" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define NAMESPACE_EXPORT 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define NAMESPACE_EXPORT 0" >>confdefs.h fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac cat >>confdefs.h <<_ACEOF #define RIVETLIB_DESTDIR "${RIVET_TCL_TARGET}" _ACEOF cat >>confdefs.h <<_ACEOF #define NAMEOFEXECUTABLE "${TCLSH_PROG}" _ACEOF cat >>confdefs.h <<_ACEOF #define UPLOAD_DIR "${RIVET_UPLOAD_DIR}" _ACEOF cat >>confdefs.h <<_ACEOF #define MAX_POST $MAX_POST _ACEOF cat >>confdefs.h <<_ACEOF #define CONFIGURE_CMD "${CONFIGURE_CMD}" _ACEOF # We need to use the package path for the installation procedure. On #Debian linux TCL_PACKAGE_PATH may have more than one path in the #TCL_PACKAGE_PATH variable, so we have to handle this # shamelessly stolen from TEA_LOAD_TCLCONFIG { $as_echo "$as_me:${as_lineno-$LINENO}: checking Debian TCL_PACKAGE_PATH workaround" >&5 $as_echo_n "checking Debian TCL_PACKAGE_PATH workaround... " >&6; } if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 $as_echo "loading" >&6; } . "${TCL_BIN_DIR}/tclConfig.sh" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } fi # If we have multiple paths, pull the first one, add end slash if needed res=`echo ${TCL_PACKAGE_PATH} | \ grep '[^\] ' | \ sed -e 's/\([^\]\)\( \)\(.*\)$/\1/' -e 's/\([^\/]\)$/\1\//' ` if test x"${res}" != x; then TCL_PACKAGE_PATH=${res} fi # Finally, substitute all of the various values into the Makefile. # You may alternatively have a special pkgIndex.tcl.in or other files # which require substituting the AC variables in. Include these here. #-------------------------------------------------------------------- ac_config_files="$ac_config_files Makefile src/Makefile src/parser/Makefile doc/Makefile doc/convert_examples.tcl rivet/init.tcl" #case $apache_version_dir in # apache-1) AC_CONFIG_FILES([Makefile src/Makefile src/apache-1/Makefile doc/Makefile]) ;; # apache-2) AC_CONFIG_FILES([Makefile src/Makefile src/apache-2/Makefile doc/Makefile]) ;; #esac cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS="" : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by Rivet $as_me 2.3.5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ Rivet config.status 2.3.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # PACKAGE="$PACKAGE" 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_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that 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' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "rivet_config.h") CONFIG_COMMANDS="$CONFIG_COMMANDS rivet_config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/parser/Makefile") CONFIG_FILES="$CONFIG_FILES src/parser/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/convert_examples.tcl") CONFIG_FILES="$CONFIG_FILES doc/convert_examples.tcl" ;; "rivet/init.tcl") CONFIG_FILES="$CONFIG_FILES rivet/init.tcl" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "rivet_config.h":C) ac_prefix_conf_OUT=`echo rivet_config.h` ac_prefix_conf_DEF=`echo _$ac_prefix_conf_OUT | sed -e "y:abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:" -e "s/[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g"` ac_prefix_conf_PKG=`echo rivet` ac_prefix_conf_LOW=`echo _$ac_prefix_conf_PKG | sed -e "y:ABCDEFGHIJKLMNOPQRSTUVWXYZ-:abcdefghijklmnopqrstuvwxyz_:"` ac_prefix_conf_UPP=`echo $ac_prefix_conf_PKG | sed -e "y:abcdefghijklmnopqrstuvwxyz-:ABCDEFGHIJKLMNOPQRSTUVWXYZ_:" -e "/^[0123456789]/s/^/_/"` ac_prefix_conf_INP=`echo "" | sed -e 's/ *//'` if test ".$ac_prefix_conf_INP" = "."; then for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue case "$ac_file" in *.h) ac_prefix_conf_INP=$ac_file ;; *) esac test ".$ac_prefix_conf_INP" != "." && break done fi if test ".$ac_prefix_conf_INP" = "."; then case "$ac_prefix_conf_OUT" in */*) ac_prefix_conf_INP=`basename "$ac_prefix_conf_OUT"` ;; *-*) ac_prefix_conf_INP=`echo "$ac_prefix_conf_OUT" | sed -e "s/[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*-//"` ;; *) ac_prefix_conf_INP=config.h ;; esac fi if test -z "$ac_prefix_conf_PKG" ; then as_fn_error $? "no prefix for _PREFIX_PKG_CONFIG_H" "$LINENO" 5 else if test ! -f "$ac_prefix_conf_INP" ; then if test -f "$srcdir/$ac_prefix_conf_INP" ; then ac_prefix_conf_INP="$srcdir/$ac_prefix_conf_INP" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_prefix_conf_OUT - prefix $ac_prefix_conf_UPP for $ac_prefix_conf_INP defines" >&5 $as_echo "$as_me: creating $ac_prefix_conf_OUT - prefix $ac_prefix_conf_UPP for $ac_prefix_conf_INP defines" >&6;} if test -f $ac_prefix_conf_INP ; then $as_echo "s/^#undef *\\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]\\)/#undef $ac_prefix_conf_UPP""_\\1/" > conftest.prefix $as_echo "s/^#undef *\\([abcdefghijklmnopqrstuvwxyz]\\)/#undef $ac_prefix_conf_LOW""_\\1/" >> conftest.prefix $as_echo "s/^#define *\\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*\\)\\(.*\\)/#ifndef $ac_prefix_conf_UPP""_\\1\\" >> conftest.prefix $as_echo "#define $ac_prefix_conf_UPP""_\\1\\2\\" >> conftest.prefix $as_echo "#endif/" >> conftest.prefix $as_echo "s/^#define *\\([abcdefghijklmnopqrstuvwxyz][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*\\)\\(.*\\)/#ifndef $ac_prefix_conf_LOW""_\\1\\" >> conftest.prefix $as_echo "#define $ac_prefix_conf_LOW""_\\1\\2\\" >> conftest.prefix $as_echo "#endif/" >> conftest.prefix # now executing _script on _DEF input to create _OUT output file echo "#ifndef $ac_prefix_conf_DEF" >$tmp/pconfig.h echo "#define $ac_prefix_conf_DEF 1" >>$tmp/pconfig.h echo ' ' >>$tmp/pconfig.h echo /'*' $ac_prefix_conf_OUT. Generated automatically at end of configure. '*'/ >>$tmp/pconfig.h sed -f conftest.prefix $ac_prefix_conf_INP >>$tmp/pconfig.h echo ' ' >>$tmp/pconfig.h echo '/* once:' $ac_prefix_conf_DEF '*/' >>$tmp/pconfig.h echo "#endif" >>$tmp/pconfig.h if cmp -s $ac_prefix_conf_OUT $tmp/pconfig.h 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_prefix_conf_OUT is unchanged" >&5 $as_echo "$as_me: $ac_prefix_conf_OUT is unchanged" >&6;} else ac_dir=`$as_dirname -- "$ac_prefix_conf_OUT" || $as_expr X"$ac_prefix_conf_OUT" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_prefix_conf_OUT" : 'X\(//\)[^/]' \| \ X"$ac_prefix_conf_OUT" : 'X\(//\)$' \| \ X"$ac_prefix_conf_OUT" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_prefix_conf_OUT" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p rm -f "$ac_prefix_conf_OUT" mv $tmp/pconfig.h "$ac_prefix_conf_OUT" fi cp conftest.prefix _configs.sed else as_fn_error $? "input file $ac_prefix_conf_INP does not exist - skip generating $ac_prefix_conf_OUT" "$LINENO" 5 fi rm -f conftest.* fi ;; "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) 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"` # 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'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options that 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 # Generated automatically by $as_me ($PACKAGE) $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. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 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 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 this program. If not, see . # The names of the tagged configurations supported by this script. available_tags='' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Whether or not to build static libraries. build_old_libs=$enable_static # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # 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 lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _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 set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi if test "$print_fileevent_msg" = "1"; then { $as_echo "$as_me:${as_lineno-$LINENO}: ========================================================================" >&5 $as_echo "$as_me: ========================================================================" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING!" >&5 $as_echo "$as_me: WARNING!" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: ========================================================================" >&5 $as_echo "$as_me: ========================================================================" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: The Tcl notifier (and consequently the event loop) does not work with" >&5 $as_echo "$as_me: The Tcl notifier (and consequently the event loop) does not work with" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Rivet running Tcl $TCL_VERSION$TCL_PATCH_LEVEL and the 'prefork' MPM of Apache." >&5 $as_echo "$as_me: Rivet running Tcl $TCL_VERSION$TCL_PATCH_LEVEL and the 'prefork' MPM of Apache." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: In order to have asynchronous I/O working the required versions are:" >&5 $as_echo "$as_me: In order to have asynchronous I/O working the required versions are:" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: - threaded builds: Tcl >= 8.5.15 (8.5 version) or Tcl >= 8.6.1" >&5 $as_echo "$as_me: - threaded builds: Tcl >= 8.5.15 (8.5 version) or Tcl >= 8.6.1" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: - any non-threaded build of Tcl >= 8.5.10" >&5 $as_echo "$as_me: - any non-threaded build of Tcl >= 8.5.10" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: " >&5 $as_echo "$as_me: " >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Nonetheless Rivet scripts work with Tcl >= 8.5.10 provided" >&5 $as_echo "$as_me: Nonetheless Rivet scripts work with Tcl >= 8.5.10 provided" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: you do not have to rely on the event loop to do I/O (e.g. you" >&5 $as_echo "$as_me: you do not have to rely on the event loop to do I/O (e.g. you" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: cannot use the 'fileevent' command to set up callbacks)" >&5 $as_echo "$as_me: cannot use the 'fileevent' command to set up callbacks)" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: see https://issues.apache.org/bugzilla/show_bug.cgi?id=55153" >&5 $as_echo "$as_me: see https://issues.apache.org/bugzilla/show_bug.cgi?id=55153" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: ========================================================================" >&5 $as_echo "$as_me: ========================================================================" >&6;} fi rivet-2.3.5/rivet/000755 001750 001750 00000000000 13200157764 013454 5ustar00mxmmxm000000 000000 rivet-2.3.5/tests/parse.test000644 001750 001750 00000001650 12172333443 015477 0ustar00mxmmxm000000 000000 # $Id: parse.test 1505045 2013-07-19 22:01:07Z mxmanghi $ set testfilename1 parse.rvt ::tcltest::test parse-1.1 {Parse command} { set page [ ::http::geturl "${urlbase}$testfilename1" ] ::http::data $page } { Parse Test

Parse Test

Hello, World - El Burro Sabe Ms Que T!

ܸ(EUC-JP Japanese text)

} set testfilename2 parsestring.rvt ::tcltest::test parse-1.2 {Parse command} { set page [ ::http::geturl "${urlbase}$testfilename2" ] ::http::data $page } { Parse String Test

Parse String Test

Hello, World - El Burro Sabe Ms Que T!

ܸ(EUC-JP Japanese text)

} rivet-2.3.5/doc/html/images/caution.png000644 001750 001750 00000002342 13200160527 017441 0ustar00mxmmxm000000 000000 PNG  IHDRשPLTE!!11BBZZcckkss{{sss{s{cZcc19B191_\bKGDHIDATxuێ@ b̮IcAP`bxsBEU_Oh<`'1wp Wȝt:%su&w,Hȯf 59v:\^ F;`HJ'871ZJ+b2B8Q$wRK v)nRpt}VbTzDv@=rPduvz{Nl;a*CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com!*tEXtSignaturec70387830aa4ecd5a4a32a852283b3d6PtEXtPage24x24+0+0r[ 1IENDB`rivet-2.3.5/tests/rivetlib.test000644 001750 001750 00000001711 12301234627 016201 0ustar00mxmmxm000000 000000 package require rivetlib ::tcltest::test rivetlib-1.1 {lassign_array basic assignement} { set array_vars {a b c d} set list_vals {1 2 3 4} ::rivet::lassign_array $list_vals assigned_array {*}$array_vars set l {} foreach av $array_vars { lappend l $assigned_array($av) } set l } {1 2 3 4} ::tcltest::test rivetlib-1.2 {lassign_array returned values} { set array_vars {a b c d} set list_vals {1 2 3 4 5 6 7} set rem [::rivet::lassign_array $list_vals assigned_array {*}$array_vars] set rem } {5 6 7} ::tcltest::test rivetlib-2.1 {lremove regexp removal} { set rem [::rivet::lremove -all -regexp {aa e111 bab aa} aa] } {e111 bab} ::tcltest::test rivetlib-2.1 {lremove multiple regexp removal} { set rem [::rivet::lremove -all -regexp {aa e111 bab aa} aa "e\\d+"] } {bab} ::tcltest::test rivetlib-2.2 {lremove glob style multiple removal} { set rem [::rivet::lremove -all -glob {aa e111 bab aa} e* b*] } {aa aa} rivet-2.3.5/tests/cookies.test000644 001750 001750 00000003274 07444423055 016032 0ustar00mxmmxm000000 000000 # $Id: cookies.test 265164 2002-03-15 16:49:49Z davidw $ set testfilename1 cookies.rvt ::tcltest::test cookies-1.1 {Cookies} { set page [::http::geturl "${urlbase}$testfilename1" -headers {Cookie "foo=bar"}] regexp -line {^cookies\(foo\) = bar$} [ ::http::data $page ] match set match } {cookies(foo) = bar} ::tcltest::test cookies-1.2 {Cookies + I18N} { set page [::http::geturl "${urlbase}$testfilename1" -headers {Cookie "Ms=T"}] regexp -line {^cookies\(Ms\) = T$} [::http::data $page] match set match } {cookies(Ms) = T} ::tcltest::test cookies-1.3 {Cookies + I18N + encoding} { set page [ ::http::geturl "${urlbase}$testfilename1" -headers [ list Cookie [ ::http::formatQuery Ms T ] ] ] regexp -line {^cookies\(Ms\) = T$} [ ::http::data $page ] match set match } {cookies(Ms) = T} ::tcltest::test cookies-1.4 {Multiple Cookies} { set rslt 0 set page [ ::http::geturl "${urlbase}$testfilename1" -headers {Cookie "bop; foo=bar;doo=wah; shoo=be ;doooo=bee;dot=dow "} ] set pgdata [ ::http::data $page ] incr rslt [ regexp -line {^cookies\(foo\) = bar$} $pgdata ] incr rslt [ regexp -line {^cookies\(doo\) = wah} $pgdata ] incr rslt [ regexp -line {^cookies\(shoo\) = be} $pgdata ] incr rslt [ regexp -line {^cookies\(doooo\) = bee} $pgdata ] incr rslt [ regexp -line {^cookies\(dot\) = dow$} $pgdata ] incr rslt [ regexp -line {^cookies\(bop\) = } $pgdata ] } 6 ::tcltest::test servercookies-1.1 {Cookies from Server} { set rslt 0 set page [ ::http::geturl "${urlbase}$testfilename1" ] upvar 0 $page state array set statehash $state(meta) regexp -line {mod=rivet; expires=01-01-2003} $statehash(Set-Cookie) } 1 rivet-2.3.5/rivet/packages/tclrivet/000755 001750 001750 00000000000 13200157764 017066 5ustar00mxmmxm000000 000000 rivet-2.3.5/doc/html/images/table.png000644 001750 001750 00000006430 13200160527 017070 0ustar00mxmmxm000000 000000 PNG  IHDR,4b IDATxAkcGZ ) 9yo^Pc`m-8Q=İeN1ķ ğA{~^,͸~`ZרI袺^rue Ey(, u:BFE!΢QgQ|>V_/LTRSϤRSs5(dY2O>ZpTc%7P #FW : 1JYPM<y_JdTF5`ցa8ǻ Uէ(A2U "ŨFWXQG)E<"S@Q@QB w2G,;,Kn(AQ{EΣwT'I_~D.xsA6N "+~JQxG 2s2E ruuZ)J@U ʡ(a#$|PW VÓ5wBQfMd R Msxtg(9U黡nHxPgQȨ(dRN!E!SR\Ʒ'Tog~RS}}ȢQgQHjnUV\Ml] 6ތPœ-7P ЕWvj~&N@R$k_lbkt%I 8i%U jD)ElCЕI{ ln*S}"iBQfL+[Ng(E !,Uܬ_X%+e6.)E 0[ZMP 0; Q)B$}YԤm<6NH28Wv`M8a)A|_(A>sud+J!"># I"%sU䕢a RYcז;C(AvLֺWRDJ9}7CE!΢J9FLJeƷޱk~[HM_环/JME!΢8yԼI;-آ+a$kҾ}xn@@m ,>o7>i[N-CT֤}x:@NJ6X!+bKSb}|(33tLTp,"Oҷ|!'M4Yrk68 3HI;uIŮy5ּOQزylE&M"y&|r2sԼbRWoϹG ^Ci![>#'m;C(Yk$"w\6[f|K wCǃ:BFE!r , ԣ󧌯jU3vJ>MjRS?)WF:B&w{W;1t,o;@U¼qR p<;K~,mw*; Y&.~7X/Y><ڽN/?Ӱd9 2%̺I%iG&Bl po'\C.eܣ:Q3mSÀA"p@2dr=7RY̾\vTZ°4}s R_(^ + &ސ-aYQ}HfֽMrF80oOW gɩIyCꭳ%:BFE!r , ԣg_2dj|y+5x'5ղE!΢ɞ0YF2P-7PI =9'9ιxCYF5`TC hJ 7A9i'd* vo,o{bsǰr نjO])E+NT{`y۹[,3Xo}_4J(,&_$* ?xb`ŏ಑ TerN2 ĺ IF2dVnS7\F\H&Xv>IFʗ229 W.3UA;qv !+e 9# 0>#PVKfw΂Z0Yk%&-wBQ&Xvns/1MqJz8!E ΢QgQhBF#B&y /$PLaȢQgQdOp@e4@U ArRmm` T` L!,:0c TkR vJ.'&XVn 6dcE@E% p vo <|%W4L!J/8g(nwd=b wN7 XV#[k2IDATcRRR``Pv5P @*4DrqqqRnii J="%tEXtdate:create2012-10-01T18:29:36+02:00f%tEXtdate:modify2004-02-19T05:48:44+01:00"IENDB`rivet-2.3.5/tests/shorthand.rvt000644 001750 001750 00000000102 12025177271 016204 0ustar00mxmmxm000000 000000
rivet-2.3.5/doc/examples-sgml/000755 001750 001750 00000000000 13200157764 015646 5ustar00mxmmxm000000 000000 rivet-2.3.5/VERSION000644 001750 001750 00000000006 13175456424 013375 0ustar00mxmmxm000000 000000 2.3.5 rivet-2.3.5/rivet/packages/asciiglyphs/asciiglyphs.tcl000644 001750 001750 00000016307 12664001544 022600 0ustar00mxmmxm000000 000000 # hexgliphs.tcl -- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you 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. # # The ASCII glyphs appearance was taken from Fossil # http://fossil-scm.org/ and reproduced by permission # of Richard Hipp # # Usage: # # package require AsciiGlyphs # # ::AsciiGlyphs toGlyphs # namespace eval ::AsciiGlyphs:: { variable ASCIIGLYPHS variable glyphs_avail array set ASCIIGLYPHS {} proc glyph {g} { variable ASCIIGLYPHS return $ASCIIGLYPHS([string toupper $g]) } namespace export glyph proc glyph_catalog {} { variable ASCIIGLYPHS return [array names ASCIIGLYPHS] } namespace export glyph_catalog proc build_glyph {c} { variable ASCIIGLYPHS variable glyphs_avail if {[lsearch $glyphs_avail $c] < 0} { if {[string is space $c]} { set c "space" } elseif {$c == "\\"} { set c "backslash" } else { set c "*" } } #puts $c set lines [split $ASCIIGLYPHS($c) "\n"] set lines [lrange $lines 1 end-1] set l 0 foreach gliphline $lines { append hexline($l) $gliphline incr l } return [list $hexline(0) \ $hexline(1) \ $hexline(2) \ $hexline(3) \ $hexline(4) \ $hexline(5)] } proc toGlyphs {hexstring} { variable ASCIIGLYPHS variable glyphs_avail set glyphs_avail [array names ASCIIGLYPHS] set hexstring_l [split [string toupper $hexstring] ""] foreach s $hexstring_l { set s [string trim $s] set string_l [[namespace current]::build_glyph $s] for {set i 0} {$i < 6} {incr i} { lappend bigstring($i) [lindex $string_l $i] } } return [join [list [join $bigstring(0) " "] \ [join $bigstring(1) " "] \ [join $bigstring(2) " "] \ [join $bigstring(3) " "] \ [join $bigstring(4) " "] \ [join $bigstring(5) " "]] "\n"] } namespace export toGlyphs namespace ensemble create } set ::AsciiGlyphs::ASCIIGLYPHS(A) { /\ / \ / /\ \ / ____ \ /_/ \_\ } set ::AsciiGlyphs::ASCIIGLYPHS(B) { ____ | _ \ | |_) | | _ < | |_) | |____/ } set ::AsciiGlyphs::ASCIIGLYPHS(C) { _____ / ____| | | | | | |____ \_____| } set ::AsciiGlyphs::ASCIIGLYPHS(D) { _____ | __ \ | | | | | | | | | |__| | |_____/ } set ::AsciiGlyphs::ASCIIGLYPHS(E) { ______ | ____| | |__ | __| | |____ |______| } set ::AsciiGlyphs::ASCIIGLYPHS(F) { ______ | ____| | |__ | __| | | |_| } set ::AsciiGlyphs::ASCIIGLYPHS(G) { _____ / ____| | | __ | | |_ \ | |___| | \_____/ } set ::AsciiGlyphs::ASCIIGLYPHS(H) { _ _ | | | | | |_| | | _ | | | | | |_| |_| } set ::AsciiGlyphs::ASCIIGLYPHS(I) { ___ | | | | | | | | |___| } set ::AsciiGlyphs::ASCIIGLYPHS(J) { ___ | | | | _ | | | || | \____/ } set ::AsciiGlyphs::ASCIIGLYPHS(K) { _ _ | | / | | |/ / | < | |\ \ |_| \_\ } set ::AsciiGlyphs::ASCIIGLYPHS(L) { _ | | | | | | | |___ |_____| } set ::AsciiGlyphs::ASCIIGLYPHS(M) { _ _ | \ / | | \/ | | | | | | | | | |_| |_| } set ::AsciiGlyphs::ASCIIGLYPHS(N) { _ _ | \ | | | \ | | | \ \| | | |\ | |_| \__| } set ::AsciiGlyphs::ASCIIGLYPHS(O) { _____ | _ | | | | | | | | | | |_| | |_____| } set ::AsciiGlyphs::ASCIIGLYPHS(P) { ____ | _ \ | |_| | | __/ | | |_| } set ::AsciiGlyphs::ASCIIGLYPHS(Q) { _____ | _ | | | | | | |_| | |___\\| \\ } set ::AsciiGlyphs::ASCIIGLYPHS(R) { ____ | _ \ | |_| | | / | |\ \ |_| \_\ } set ::AsciiGlyphs::ASCIIGLYPHS(S) { ____ / __| | |__ \__ \ __| | |____/ } set ::AsciiGlyphs::ASCIIGLYPHS(T) { _____ |_ _| | | | | | | |_| } set ::AsciiGlyphs::ASCIIGLYPHS(U) { _ _ | | | | | | | | | | | | | |_| | \___/ } set ::AsciiGlyphs::ASCIIGLYPHS(V) { __ __ \ \ / / \ \ / / \ v / \ / v } set ::AsciiGlyphs::ASCIIGLYPHS(W) { __ __ \ \ / / \ \ /\/\ / / \ \/ \/ / \ /\ / \_/ \_/ } set ::AsciiGlyphs::ASCIIGLYPHS(X) { __ __ \ \/ / \ / / \ / /\ \ /_/ \_\ } set ::AsciiGlyphs::ASCIIGLYPHS(Y) { __ __ \ \ / / \ \/ / \ / / / /_/ } set ::AsciiGlyphs::ASCIIGLYPHS(Z) { _____ |___ | / / / / / /___ /______| } set ::AsciiGlyphs::ASCIIGLYPHS(0) { ___ / _ \ | | | | | | | | | |_| | \___/ } set ::AsciiGlyphs::ASCIIGLYPHS(1) { __ /_ | | | | | | | |_| } set ::AsciiGlyphs::ASCIIGLYPHS(2) { ___ |__ \ ) | / / / /_ |____| } set ::AsciiGlyphs::ASCIIGLYPHS(3) { ____ |___ \ __) | |__ < ___) | |____/ } set ::AsciiGlyphs::ASCIIGLYPHS(4) { _ _ | || | | || |_ |__ _| | | |_| } set ::AsciiGlyphs::ASCIIGLYPHS(5) { _____ | ____| | |__ |___ \ ___) | |____/ } set ::AsciiGlyphs::ASCIIGLYPHS(6) { __ / / / /_ | '_ \ | (_) | \___/ } set ::AsciiGlyphs::ASCIIGLYPHS(7) { ______ |____ | / / / / / / /_/ } set ::AsciiGlyphs::ASCIIGLYPHS(8) { ___ / _ \ | (_) | > _ < | (_) | \___/ } set ::AsciiGlyphs::ASCIIGLYPHS(9) { ___ / _ \ | (_) | \__, | / / /_/ } set ::AsciiGlyphs::ASCIIGLYPHS(-) { ____ |____| } set ::AsciiGlyphs::ASCIIGLYPHS(_) { ______ |______| } set ::AsciiGlyphs::ASCIIGLYPHS(:) { _ |_| _ |_| } set ::AsciiGlyphs::ASCIIGLYPHS(\;) { _ |_| _ | | |/ } set ::AsciiGlyphs::ASCIIGLYPHS(.) { _ |_| } set ::AsciiGlyphs::ASCIIGLYPHS(/) { __ / / / / / / / / /_/ } set ::AsciiGlyphs::ASCIIGLYPHS(backslash) { __ \ \ \ \ \ \ \ \ \_\ } set ::AsciiGlyphs::ASCIIGLYPHS(~) { ___ / _ \ /_/ \ \__ \__/ } set ::AsciiGlyphs::ASCIIGLYPHS(*) { \ | / _\|/_ /|\ / | \ } set ::AsciiGlyphs::ASCIIGLYPHS(space) { } package provide AsciiGlyphs 0.1 rivet-2.3.5/doc/html/diodisplay.html000644 001750 001750 00000003551 13200160530 017050 0ustar00mxmmxm000000 000000 DIODisplay - Database Interface Objects Display Class

DIODisplay - Database Interface Objects Display Class

rivet-2.3.5/rivet/packages/README000644 001750 001750 00000000257 07416536462 016126 0ustar00mxmmxm000000 000000 ### ## rivet/packages - Version-independent packages for the Rivet Apache module. ## ### This directory contains version-independent packages for Rivet. More to come later. rivet-2.3.5/tests/rivet.test000755 001750 001750 00000003511 12625303776 015530 0ustar00mxmmxm000000 000000 #!/bin/sh # the next line restarts using tclsh \ exec tclsh "$0" "$@" # Rivet test suite, by David N. Welton # See README file for more information. # $Id: rivet.test 1716344 2015-11-25 10:05:50Z mxmanghi $ package require tcltest set auto_path [linsert $auto_path 0 [file join [pwd] rivet]] set urlbase "http://localhost:8081/" # Use this to start and stop the server: set TestList {rivetlib.test shorthand.test headers.test \ cookies.test get.test post.test tclfile.test \ env.test hello.test include.test binary.test \ parse.test upload.test makeurl.test} # Test stanzas are created by giving the test a name and a # description. The code is then executed, and the results compared # with the desired result, which is placed after the block of code. # See man tcltest for more information. set testgroup1 1 set testgroup2 1 set testgroup3 1 # Run all tests against one server process. if { $testgroup1 } { puts -nonewline "Running all tests against one server process." flush stdout apachetest::start {} {} { foreach Test $TestList { puts -nonewline "." flush stdout source $Test } } puts " done" } # Run each test in its own server. if { $testgroup2 } { foreach Test $TestList { apachetest::start {} {} { puts "Running $Test" source $Test } } } # These tests start the server on their own, or don't need the server # at all. set TestList { failtest.test broken.test config.test parsepackage.test virtualhost.test inspect.test bailout.test channel.test } if { $testgroup3 } { foreach Test $TestList { puts "Running $Test" source $Test } } ::tcltest::cleanupTests rivet-2.3.5/doc/examples/color-table.tcl000644 001750 001750 00000001665 12343717013 017621 0ustar00mxmmxm000000 000000 puts "" puts "" puts "" puts "" # we create a 8x8 table selecting a different background for each cell for {set i 0} { $i < 9 } {incr i} { puts "" for {set j 0} {$j < 9} {incr j} { set r [expr int(255 * ($i + $j) / 16)] set g [expr int(255 * (8 - $i + $j) / 16)] set b [expr int(255 * ($i + 8 - $j) / 16)] # determining the background luminosity (YIQ space of NTSC) and choosing # the foreground color accordingly in order maintain maximum contrast if { [expr ($r*0.29894)+($g*0.58704)+($b*0.11402)] > 128} { set cssclass "dark" } else { set cssclass "bright" } puts [format "" $r $g $b $cssclass] } puts "" } puts "
$r $g $b
" puts "" rivet-2.3.5/doc/examples-sgml/rivet_web_service.tcl000644 001750 001750 00000006730 11670231317 022062 0ustar00mxmmxm000000 000000 # # Ajax query servelet: a pseudo database is built into the dictionary 'composers' with the # purpose of emulating the role of a real data source. # The script answers with 2 types of responses: a catalog of the record ids and a database # entry matching a given rec_id. The script obviously misses the error handling and the # likes. Just an example to see rivet sending xml data to a browser. The full Tcl, JavaScript # and HTML code are available from http://people.apache.org/~mxmanghi/rivet-ajax.tar.gz # This example requires Tcl8.5 or Tcl8.4 with package 'dict' # (http://pascal.scheffers.net/software/tclDict-8.5.2.tar.gz) # # A pseudo database. rec_id matches a record in the db set composers [dict create \ 1 {first_name Claudio middle_name "" last_name Monteverdi \ lifespan 1567-1643 era Renaissance/Baroque} \ 2 {first_name Johann middle_name Sebastian last_name Bach \ lifespan 1685-1750 era Baroque } \ 3 {first_name Ludwig middle_name "" last_name "van Beethoven" \ lifespan 1770-1827 era Classical/Romantic} \ 4 {first_name Wolfgang middle_name Amadeus last_name Mozart \ lifespan 1756-1791 era Classical } \ 5 {first_name Robert middle_name "" last_name Schumann \ lifespan 1810-1856 era Romantic} ] # we use the 'load' argument in order to determine the type of query # # load=catalog: we have to return a list of the names in the database # load=composer&amp;res_id=<id>: the script is supposed to return the record # having <id> as record id if {[::rivet::var exists load]} { # the xml declaration is common to every message (error messages included) set xml "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" switch [::rivet::var get load] { catalog { append xml "<catalog>\n" foreach nm [dict keys $composers] { set first_name [dict get $composers $nm first_name] set middle_name [dict get $composers $nm middle_name] set last_name [dict get $composers $nm last_name] append xml " <composer key=\"$nm\">$first_name " if {[string length [string trim $middle_name]] > 0} { append xml "$middle_name " } append xml "$last_name</composer>\n" } append xml "</catalog>\n" } composer { append xml "<composer>\n" if {[::rivet::var exists rec_id]} { set rec_id [::rivet::var get rec_id] if {[dict exists $composers $rec_id]} { foreach {k v} [dict get $composers $rec_id] { append xml "<$k>$v</$k>\n" } } } append xml "</composer>\n" } } # we have to tell the client this is an XML message. Failing to do so # would result in an XMLResponse property set to null ::rivet::headers type "text/xml" ::rivet::headers add Content-Length [string length $xml] puts $xml } rivet-2.3.5/doc/Rivetlogo_medium.jpg000644 001750 001750 00000157061 07612062707 017120 0ustar00mxmmxm000000 000000 JFIFHH]ExifMM*bj(1r2iHHAdobe Photoshop 7.02003:01:17 14:18:35(&/HHJFIFHH Adobe_CMAdobed            Q"?   3!1AQa"q2B#$Rb34rC%Scs5&DTdE£t6UeuF'Vfv7GWgw5!1AQaq"2B#R3$brCScs4%&5DTdEU6teuFVfv'7GWgw ?T\˾~_-5>ݏ{JG J15leτqHG~'YX:oS~ҺYanX /u mNW`cAkF湮okԺL)Xhn6=1/^?}?zg)ϯ.Ν ,lWiu!~?UR|\}d">O#zCu?KduwI%:TƿY6 ~Lun^?~=k(kȡnh}v4\ {\>\汥MkA.q䓽z?1S73ץ?cEv^Wkrm];++,]JrLvGǿITScsr),/ls~Hpku>ҺH㋉/E.!Wbcg!.?ܣ+y%SLrp.k/s~}ῼmf&Nk*C~H9e#Fq#.(z.K {U A\>2vsWݵ[g{voC>u?vRXXWkZeWr.$WXkkwfߠ%j-N, I0U?Y#nn=#udl.~1^̼?WUj4.1uLrb'ck6՜s^=xg1}W7g+s3>u_>"C{xw.kft*_\Ǭ68UZ>/[?P3,Ewt j۷m?b2lo1\ǂ`gfX_gٗI+39y_ZEF׼}"Z뾮cpnukŝbϯ-wg{|6^ǭO [r ?'pgkUenÏneۿ[ʪ?W&ftQ5kk-Ꙙ6_@S?z۳ۊN5 rwl[zeۆIl#hpO}Mv'ՎSi1Yy Ϳ[j4ul3s*l]ƎhW-r?4v 5Ϝ2u'?:VuY1Dv[}Vus̏oܽ$MZ1&cx;_[Һ2),iw4E}^zG[6eSmTkC}vT6ϷX? ,8g=>Iz[sǕ娏8߿Ugv^?WUj3?|dO*ReDcjǭW [+ ig3iw{ꞷ?T/AC+-8_GV̧H~c)K\FxR,|R&rJw/*;ӵAXrV!{:+P~a]`CG/vIO}R}v Wuؖ;۽%C:X 2+2ڍU7)cnkOK7mRs=?{%Wv#YEn}nrL!|듖~z_ҽ}y֯ZiSs_,?EIXr_Qh^,sGy{[^C'J Ivz,7s?Aߝ33+ϢZÐ̃F},v~~kzMNXp{ ;n_^ߤ`acnwO6Wl.o]" 1rr1JF#"a84VCԜYe@1=o9[}S}OJk+v3Ƭ7H:o8;'ߏEWcm:[+_XǎP>9%=bx*<}VsJY0a#/}ejGߺ׵g-_?+?XĨVQ=,#^ּ[I6e{[q%>m51C:du/p}_XnP̑YHopjiF8冓f>F݃-kr,OWN̍gݽ8VO˳_և^3~Uwгi\dz'vgVe'S`~5[H>*=Cw{#~̾۽6}%?X0zw֋UM~^Ueϻݽi52<^r&0(Ϲ L8iulv8 Nvw6]V1mub~?p5ҷ'B}} ջ\U3w}~\~q佯rqNǯ' |,sGy{? >|desUuk'#vc =Z;XR8uC(h'O{zn`56pmrGJ[}[ޕQh'X]!cnr~P>(pps]ln-G/sj&?JΪYgXcL4`ok0BGx|HbɆ$pev|8ի?ؿF,]n?`SYż;~zƏ0;:~t2nw^g?}]gVs@ڞǐY7pkvMu_g䔏)ji[IKrc^XmvTC[E{?0n`5L,DO\Ǯds( 6+i=V=FX˛eC_ֿn`5/G/sj dd.Ϸyi7ft.fc}փIsͭ۽n`5/G/sjl0c1cc'NzORƷceu(J]?F?N#"?Had P8c ?'}'|OIWIF;UI tSa%]$IWI%6UIMtSa f?mmTRI/34Photoshop 3.08BIM%8BIM com.apple.print.PageFormat.PMHorizontalRes com.apple.print.ticket.creator com.apple.printingmanager com.apple.print.ticket.itemArray com.apple.print.PageFormat.PMHorizontalRes 7.200000000000000e+01 com.apple.print.ticket.client com.apple.printingmanager com.apple.print.ticket.modDate 2003-01-17T19:14:56Z com.apple.print.ticket.stateFlag 0 com.apple.print.PageFormat.PMOrientation com.apple.print.ticket.creator com.apple.printingmanager com.apple.print.ticket.itemArray com.apple.print.PageFormat.PMOrientation 1 com.apple.print.ticket.client com.apple.printingmanager com.apple.print.ticket.modDate 2003-01-17T19:14:56Z com.apple.print.ticket.stateFlag 0 com.apple.print.PageFormat.PMScaling com.apple.print.ticket.creator com.apple.printingmanager com.apple.print.ticket.itemArray com.apple.print.PageFormat.PMScaling 1.000000000000000e+00 com.apple.print.ticket.client com.apple.printingmanager com.apple.print.ticket.modDate 2003-01-17T19:14:56Z com.apple.print.ticket.stateFlag 0 com.apple.print.PageFormat.PMVerticalRes com.apple.print.ticket.creator com.apple.printingmanager com.apple.print.ticket.itemArray com.apple.print.PageFormat.PMVerticalRes 7.200000000000000e+01 com.apple.print.ticket.client com.apple.printingmanager com.apple.print.ticket.modDate 2003-01-17T19:14:56Z com.apple.print.ticket.stateFlag 0 com.apple.print.PageFormat.PMVerticalScaling com.apple.print.ticket.creator com.apple.printingmanager com.apple.print.ticket.itemArray com.apple.print.PageFormat.PMVerticalScaling 1.000000000000000e+00 com.apple.print.ticket.client com.apple.printingmanager com.apple.print.ticket.modDate 2003-01-17T19:14:56Z com.apple.print.ticket.stateFlag 0 com.apple.print.subTicket.paper_info_ticket com.apple.print.PageFormat.PMAdjustedPageRect com.apple.print.ticket.creator com.apple.printingmanager com.apple.print.ticket.itemArray com.apple.print.PageFormat.PMAdjustedPageRect 0.000000000000000e+00 0.000000000000000e+00 7.340000000000000e+02 5.760000000000000e+02 com.apple.print.ticket.client com.apple.printingmanager com.apple.print.ticket.modDate 2003-01-17T19:14:56Z com.apple.print.ticket.stateFlag 0 com.apple.print.PageFormat.PMAdjustedPaperRect com.apple.print.ticket.creator com.apple.printingmanager com.apple.print.ticket.itemArray com.apple.print.PageFormat.PMAdjustedPaperRect -1.800000000000000e+01 -1.800000000000000e+01 7.740000000000000e+02 5.940000000000000e+02 com.apple.print.ticket.client com.apple.printingmanager com.apple.print.ticket.modDate 2003-01-17T19:14:56Z com.apple.print.ticket.stateFlag 0 com.apple.print.PaperInfo.PMPaperName com.apple.print.ticket.creator com.apple.print.pm.PostScript com.apple.print.ticket.itemArray com.apple.print.PaperInfo.PMPaperName na-letter com.apple.print.ticket.client com.apple.print.pm.PostScript com.apple.print.ticket.modDate 2000-07-28T22:57:04Z com.apple.print.ticket.stateFlag 1 com.apple.print.PaperInfo.PMUnadjustedPageRect com.apple.print.ticket.creator com.apple.print.pm.PostScript com.apple.print.ticket.itemArray com.apple.print.PaperInfo.PMUnadjustedPageRect 0.000000000000000e+00 0.000000000000000e+00 7.340000000000000e+02 5.760000000000000e+02 com.apple.print.ticket.client com.apple.printingmanager com.apple.print.ticket.modDate 2003-01-17T19:14:56Z com.apple.print.ticket.stateFlag 0 com.apple.print.PaperInfo.PMUnadjustedPaperRect com.apple.print.ticket.creator com.apple.print.pm.PostScript com.apple.print.ticket.itemArray com.apple.print.PaperInfo.PMUnadjustedPaperRect -1.800000000000000e+01 -1.800000000000000e+01 7.740000000000000e+02 5.940000000000000e+02 com.apple.print.ticket.client com.apple.printingmanager com.apple.print.ticket.modDate 2003-01-17T19:14:56Z com.apple.print.ticket.stateFlag 0 com.apple.print.ticket.APIVersion 00.20 com.apple.print.ticket.privateLock com.apple.print.ticket.type com.apple.print.PaperInfoTicket com.apple.print.ticket.APIVersion 00.20 com.apple.print.ticket.privateLock com.apple.print.ticket.type com.apple.print.PageFormatTicket 8BIMxHH@Rg(HH(dh 8BIMHH8BIM&?8BIM x8BIM8BIM 8BIM 8BIM' 8BIMH/fflff/ff2Z5-8BIMp8BIM@@8BIM8BIMSRivetlogo_largenullboundsObjcRct1Top longLeftlongBtomlongRghtlongslicesVlLsObjcslicesliceIDlonggroupIDlongoriginenum ESliceOrigin autoGeneratedTypeenum ESliceTypeImg boundsObjcRct1Top longLeftlongBtomlongRghtlongurlTEXTnullTEXTMsgeTEXTaltTagTEXTcellTextIsHTMLboolcellTextTEXT horzAlignenumESliceHorzAligndefault vertAlignenumESliceVertAligndefault bgColorTypeenumESliceBGColorTypeNone topOutsetlong leftOutsetlong bottomOutsetlong rightOutsetlong8BIM8BIM8BIM KQy/JFIFHH Adobe_CMAdobed            Q"?   3!1AQa"q2B#$Rb34rC%Scs5&DTdE£t6UeuF'Vfv7GWgw5!1AQaq"2B#R3$brCScs4%&5DTdEU6teuFVfv'7GWgw ?T\˾~_-5>ݏ{JG J15leτqHG~'YX:oS~ҺYanX /u mNW`cAkF湮okԺL)Xhn6=1/^?}?zg)ϯ.Ν ,lWiu!~?UR|\}d">O#zCu?KduwI%:TƿY6 ~Lun^?~=k(kȡnh}v4\ {\>\汥MkA.q䓽z?1S73ץ?cEv^Wkrm];++,]JrLvGǿITScsr),/ls~Hpku>ҺH㋉/E.!Wbcg!.?ܣ+y%SLrp.k/s~}ῼmf&Nk*C~H9e#Fq#.(z.K {U A\>2vsWݵ[g{voC>u?vRXXWkZeWr.$WXkkwfߠ%j-N, I0U?Y#nn=#udl.~1^̼?WUj4.1uLrb'ck6՜s^=xg1}W7g+s3>u_>"C{xw.kft*_\Ǭ68UZ>/[?P3,Ewt j۷m?b2lo1\ǂ`gfX_gٗI+39y_ZEF׼}"Z뾮cpnukŝbϯ-wg{|6^ǭO [r ?'pgkUenÏneۿ[ʪ?W&ftQ5kk-Ꙙ6_@S?z۳ۊN5 rwl[zeۆIl#hpO}Mv'ՎSi1Yy Ϳ[j4ul3s*l]ƎhW-r?4v 5Ϝ2u'?:VuY1Dv[}Vus̏oܽ$MZ1&cx;_[Һ2),iw4E}^zG[6eSmTkC}vT6ϷX? ,8g=>Iz[sǕ娏8߿Ugv^?WUj3?|dO*ReDcjǭW [+ ig3iw{ꞷ?T/AC+-8_GV̧H~c)K\FxR,|R&rJw/*;ӵAXrV!{:+P~a]`CG/vIO}R}v Wuؖ;۽%C:X 2+2ڍU7)cnkOK7mRs=?{%Wv#YEn}nrL!|듖~z_ҽ}y֯ZiSs_,?EIXr_Qh^,sGy{[^C'J Ivz,7s?Aߝ33+ϢZÐ̃F},v~~kzMNXp{ ;n_^ߤ`acnwO6Wl.o]" 1rr1JF#"a84VCԜYe@1=o9[}S}OJk+v3Ƭ7H:o8;'ߏEWcm:[+_XǎP>9%=bx*<}VsJY0a#/}ejGߺ׵g-_?+?XĨVQ=,#^ּ[I6e{[q%>m51C:du/p}_XnP̑YHopjiF8冓f>F݃-kr,OWN̍gݽ8VO˳_և^3~Uwгi\dz'vgVe'S`~5[H>*=Cw{#~̾۽6}%?X0zw֋UM~^Ueϻݽi52<^r&0(Ϲ L8iulv8 Nvw6]V1mub~?p5ҷ'B}} ջ\U3w}~\~q佯rqNǯ' |,sGy{? >|desUuk'#vc =Z;XR8uC(h'O{zn`56pmrGJ[}[ޕQh'X]!cnr~P>(pps]ln-G/sj&?JΪYgXcL4`ok0BGx|HbɆ$pev|8ի?ؿF,]n?`SYż;~zƏ0;:~t2nw^g?}]gVs@ڞǐY7pkvMu_g䔏)ji[IKrc^XmvTC[E{?0n`5L,DO\Ǯds( 6+i=V=FX˛eC_ֿn`5/G/sj dd.Ϸyi7ft.fc}փIsͭ۽n`5/G/sjl0c1cc'NzORƷceu(J]?F?N#"?Had P8c ?'}'|OIWIF;UI tSa%]$IWI%6UIMtSa f?mmTRI/8BIM!UAdobe PhotoshopAdobe Photoshop 7.08BIMHhttp://ns.adobe.com/xap/1.0/ adobe:docid:photoshop:0fe2f280-2bb8-11d7-8a53-98037d05b8a1 Adobed@2    o!1AQ"aq2 #BR3$bC4% rS&cD5Ts6'E7F򃓣dU()8GHVe*9:IJWXYZftugvwhijxyzi!1AQa"q2#BR 3br$’Csc%4S5&DTdEU' ()*6789:FGHIJVWXYZefghijtuvwxyz ?ӞW{W{W{W{W{W{UJ#ý@Xc_W`V9©]7Ӊc'[V~?d޼:[>zq'yLa,Z#KBHb9SCkcB: ٻ@cr DzDqJzFBZJfVUi/=ce &MgzCfltM[~3յYE]?3rt+xEn7ˈF `V]WHB.oIz<!bؖRKL6x̍pG=^;W{W{W{W{W{W{W{W{W{W{W{W{W{W{WӞW{W{W{W{W{WDU՘z3z?SU9> , zWxI-~Ub9%CuTSv̾W2f\Ŝg6f~5fS63s.cs,TU3,ij;$O=^^z^z^z^c'?R}3ZLTC7Q5^jLU! BGS IWN.ޚ?~L5'[: *c) 'eoE eEx굞z^z^z^z^z^z^z^z^z^z^z^z^z^z^ӞW{W{W{W{W{V?~a]Qtsz&^mVbpyeib!JeAͳs=^s=^s=^s=^s7~=m+T`$T0jᙃpJ$#ͥEúY=^_돣߈KGJbDztɈezMo[D)"G;W{W{W{W{W{W{W{W{W{W{W{W{W{WӞW{W{W{W{WCNO?o*^`SbYsqųdx;TCT"V3^:NS0͛:\g1 ZZOzԝU* 9h!U|ͪNҀNT@5`Pu o:u bC O{y+oZp|;$V#jӧuǦ5g_W9[WN ya~^Oo/m9^}:-_z`__=E{=H{Zp|;$V#o)~<]zƲBs6VOOqP~+tX0S%%?Y_wx";UKKJ ̑C]}[Xs ['JV4{1-Pu[ο0h=H{Zp|;$V#jӧuǦ5g_W9[WN ya~^Oo/m9^}:-_z`__=E{=H{Zp|;$V#jӧuǦ5g_W9[U,M}jg鯩r^ԡ5ZR5e7v1Cż䳻Y3;$\%!sہ#\ދԺ徉RA :K<ӞW{V_~[܆;sKu/yx.1N^ԱPJ3.G!猯:Y{5Jk&]7G5;+ $qMQJ04I[NY޲pB:8}^˽]Az\b2w_!H0,nvi/튆ٝӹ6"">בpR _n׳ˏ&muҧDKGk2;O++(e!ey;'ȊWPt s&z3,EK9w>;e0,5rHqOGf*>K['My?mq7?W?mq7?W?mq7?W?mq7?W?mq7?W?mq7?W?mq7?W?mq7?WL7T?[Nu6=*CPŇaFE`} S+9h>V@z)wÞ`j3roFbKQ%xqI">l;ܟ_m`OWDz!A' w'K܅{kHR M<)gT6*w)`Q’RD_ZODNt}WeNe,q^t(ţNM)> |vg& #E?*c@=^!u7nbN*"Y,d# 46f[}dRGV~\"Շ\**s+讝8@ rF|Azb-Xa {Wgf{-yQ @Zg#hg<6JC?M}~'ewVzWzW?F*?WO?hnuH|+:{W{W{W}#o5Otم3(ꯙ35ӞW{V_~[܆;sKu/yx.1N^z^յ_]4X]^Ό2L^l; 3s +"T“ivٜ=Dt[9-6fŻeOiqI6}#3\8"Wz ~g1Ap8dthbƾ|J;Ĺz^z^z^z^ :y\iy>c,cWB۞V\z[ҶO?W<.;`ߤpZCѮ=" /nPHx{?v MiQKWʍ|9t+zRө߆~F`enMG#}x 9Wjy"*8?DsW԰ޏ;MQs, cqD{k<~opd|]ؕ9I?ֱZys+`߅/J7/ $HkxnvivW,~Jx/6DUVlQS`!rrW{P?t\Oevq;*}ak;svW|nLPp LՐWia̙C+x:*i#bXЂ2ɯFZx=P'9+w2an˩Jm*$JTDF)M?zNf.=? J‹?ٛs+kU@ip_Bs7qs0+͹Wk* z]/98a_U~f\%M_y*Ϛ:\yc|KGRRU2{{I=dm} a@JH0`vmp7u ґ2B$M_woo? J³Tv͹Wk*=Z.P\w0/* 3nm ~tzt *wxd'hF .aZ\AI r sVKW 0TҰ I"`qj%)QӤ;gûd^ќs]) (baD&^6Ga>nmOq(?j=#ߧ/<]Y+E`'ڏ:@W55z[{Z޹}u1>!ծaWlӋ^0e&,Vw:C$ s̥2^\\P | Z_|/[iSkT5_&{W.2ndZU!#bGm7sHʾu?XͿ2F7W/:ZkȎ#[e[qzSMQt"-S-X5YIDf&>l;NAk?֋4)BTPGXWϭ{P?t\Oevq;*}ak;svW|n?5wB?i1Ĺ5O(X?^z^z^ա*@5(}UV?Lַ\+uv:wCQ?ZW+"js=^ӞW{V_~[܆;sKu/yx.1NBGFo\ .qnY0_}w鯩_KlЮh5\B51х>!A3y5P%%X23)#mɔh<#+32t诪~=Bf:[Yښ1M_Nv=*\ջ/7a0x(p#k>27q>&Tۀ H>I$p9SM yWTrXi:oRfܱDZSI(,oAtО,˳m_C͘Z XgU]zv(P"0#h;AE}L}6VHWR0 C.&SQ2'ާHG3ws&cgAG>{/] ⅏AFSU]ztj3F(qe<&J\zWzWzWzW QYoȵpk0zE5FsOs,V.cE1{vx?H?LOZ۹bl:_rN z]WSWX*|e\.CF^a߻g ᬏAWg҆&&"t,4AԿ+,8oG}Tzk6p̘'M0ڗ /bsKb^d`m{J E\>-s,KtHkkO =^7S$wU| 9Hv鯯}=j:cs2;" ^j~5_b3QWW.~WzWzWCT_J`c>ܿX~Uwj&k[C*O_;Ο M[y+ XB_Ef5|W{WӞW{V_~[܆;sKu/yx.1NBGFo\ .qnY0_}w鯮': _QCҞ5OpxĪ]cArApmqPM`o6:G푊~ifWSj #.!'dm"m2, 3B)de6 "а2 pշ%Ttm6zJؓ1{sDa±#5jYUܛ?a횏+}V% e8:Gemu_\_*s/G~7^Xf,[qsףW{W{W{W},vo?ki!QZ=^s'3Ҷ}Fzk,4i1 WPX֍ǰ&cno{I#)U/vէMuzCbAUyoQ`=3HU3.ںhG$~ﻜJ}Ǽ ¿} SG$+J32h%}O&uϸFfJ/>G%lg-)ñ `80bѿJ _#Ǐb90٣jvT}ey{VͰЄ6:=u}?ޕUbOǺ̱y[룥2'26W*=Wo^2pC*SEa]{P?t\Oevq;*}ak;svW|n?5wB?i1Ĺ5O(X?^z^z^ա*ϥ?K0o1bn_o*U55!]'ΝgO&A-ּkgEȯ3m+zWӞW{V_~[܆;sKu/yx.1NBGFo\ .qnY0_}w鯮': _z_8su/_@xZ<)2 Ryci( +E@,"0ӵ\X)P>zZ=^s=^s=^s=^[G <1T_'J6}{V_𧞕Z4%tpVKkxf`*f7L4nXF/AUO~nT|76:ڒWZ s+tb=".^zh+hyjS<8_V"n`g[=jB> }` )ܭ#PA}[SOI _W:IUe:JXy6kW_hwߗnҘML}~Ӳf"B_&Aw5WԽd)g8 C,2 ifc`O6 I'`NEON=T-lrv[ȳk; )ffodv?i%#Է˘f$uEJ@8Ҁuz@o=r?3喧HsO {_鯒9__]պ0{udvE,k?,f1(]`{W{W{V>,(}UV?Lַ|+Uv:wCQ?ZW+"js=^ӞW{V_~[܆;sKu/yx.1NBGFo\ .qnY0_}w鯮': _zZ£:%fnQ 1n6%P\+4)f>ũ!Qs7L.ŧ EmuOwVӘeJWߴkG~bwvWaUXPԘ,u5PM RAE1sn[R%*_\gHҮu y9/` pArI Dd,ͮ]Z?(_1Yn wO+dyJdAs !?P,jcWzWzWzWz랊s}zL/ }3x9-am=^1Wzs|X*/aYR~ȠYL96$P?G}~g%GBu|&~7佦<>O?b \A9W/wR'NWjU?Q2NXH9lYwHI_"]̬"y%jJ𦮦#(d z_VsSkq.,ӝok5R9k;+z_FOο\̎ȿךߍ|XEF?UKs=^s=^sWҟ%71O/j?ߕ]ItʮgN3u{ ^J}5_3Pv?dWs_6z^ӞW{V_~[܆;sKu/yx.1NBGFo\ .qnY0_}w鯮': _zUd3i~7KW)tÜ90ӇM# ->G[r'Dbʳ;UjQ M,5gWm{WŪ1@^qZ-QWeg S.GyۚVSlOm?O>-hY^?*(ւ?L~V!6/wz *-BUG=^s=^s=^s=^YUEوUĞz_{aMtX :k|6H=^ W&WsOy+O6+H7+bI*qpRB-nXK ؠGL nZ04GWnӪB쯰l7k0f(u XP{%P?}%C,,j Zhl=gvS{dlS&=_3;T`B_6*?QԿnSc`ٓxz\.v{/[i| g'Lƌ8HiJZ{Ε/ħ*晩.ely]YLnw UnþΒ JC]ً y.Hn=k]̾=^sC΁ ,<.?GWϳxl?M|a~NчfG383#/`_5)Qc0Eu|zWzWz7@ f F?SZWRf1]2Ӻz$?גM`(Y\cWͥ{WӞW{V_~[܆;sKu/yx.1NBGFo\ .qnY0_}w鯮': _zUÐ? Y2R/_b\F2_*0kz|2Ayz%d vIb~ovnPi DP=gG[[ضJ_ѿW{W{W{R 0gsnGWMRSG) O(zs=^s0*=J\etXh8rƻQ͔BWAal< |K{cL $@>FWԶ}5z,I:(3Gf}Eg?My? ?{v;30~MIistU$ˆz3oԌ SILoNCEs.`Veo<{aﳵ J} 9weΑ]{Ǵ69]Y[UT T:])j=/^!D a>H3[6,I#zV<Ȫ={W@Zg#hg<6JC?M}~'ewV Wt#cKZWIuz^z^zZ Sأ)-V[PW)3ZUzFtNodk_聆k_.s1ҽWzӞW{V_~[܆;sKu/yx.1NBGFo\ .qnY0_}w鯮': _zTx2Wi:7˭m2> +3N,+)uڽk"{ZGMfw~J_,1kp4?ފk1*+9 YUQrInxUT`W֋nF z5Y&eWY:ږ,l = 7>NkLXZԡ5.7UĿ,#;僩@LPgt{W{W{WޔpX'OMyvU=v "Tp'ss=^s=^O*W֗IK[i&'qJYM4bn6dۣbU~or/,|V$8ֵ|ku%˩zJ*L0u"dZ̹Ӫ-q)|]ֿI"kֱt2$s%*}5!#T謹V*)Ehٞ|e$éYW9ms;8<ugG%\ȈSvjEY g5rhȫ6jHFLyf-÷ |yݍw9*UR_9S{NudZ2^OX^z@o=r?3喧HsO {_鯒9__]պ0{udvE,k?,f1(]`{W{W{V>,(}UV?Lַ|+Uv:wCQ?ZW+"js=^ӞW{V_~[܆;sKu/yx.1NBGFo\ .qnY0_}w鯮': _zZ¥ ѯN>01,uk1Qe&)D?rY'es n@6ۃT|']k=Se>ZK)?8JzZSs븴r?^z鏣5UjUVd%,F Mk~%,Oo͆x p5 }FwgqsLĘSl,'u 5Dﯓw Wvl9gp|.`z_:z^z^z^zGg_,8z_qz^z^ի*[kkHi9VJr|! K l5Y2TGa?kG̲p}[KZAs+c_'/K~VZŢ;aGɸrT]5"3CL{Ⱨe^eV#oQFʚښʹLUnU3I1orIY"Im)X9pgO[S:쫑23(RNem5HO`gY}b<0&]J]eqUJNhbTy> SvRm6e!zWbNKWK[F -OoI9RaX A)9|y{W{W{WZX?çĢ>Yх\?y}y{W{UK8+nhN%p&1qjlBR,>?BmH Ok/~weejQ4z))oY_Nuz^8zfk~C 78e2(hq<^ IXbGcƙ=(ږ v Ęi_Yx iE:ĚD@3_!,EGk/7Ts=^7S$wU| 9Hv鯯}=j:cs2;" ^j~5_b3QWW.~WzWzWCT_J`c>ܿX~Uwj&k[C*O_;Ο M[y+ XB_Ef5|W{WӞW{V_~[܆;sKu/yx.1NBGFo\ .qnY0_}w鯮': _:__9GPf9H>45ѐc$JhwMi_pcx3zy1;9su20uR'j[J:S*KΖ;u#8̙x&Rʸ% Bʋ}EPX}&Ɓ˽g2{ʙWWzWzWzW?<#fƋScO*q~f]ı#AWWzWztJkš.es yBcdy$o9qi#";ɳ;}61a_*'bXmv F'Lx *Hz^z^z^~, 1r.S|pi{57O1z^z^MzV@}]t`i@j=HhV Ø+ᬑq_VK{ﳼQm*=*lwj?h-S{VΖ K:=5O˘Lꗷ8o{ WE!>?kǽ}MuuHkH@OQKkzWzPz~f-O U43_%!sua٫{L%X-yX?cQE]_$=^s=^s=^ P?~})YQrcUwyn WL?=tޣ:'_7nX5c? /cVE}9i^z_ӺOoA袳!/Y DY'9er[]H$>i^0BrXȸy 9aC*)0|Ș?+A=i(s-YR޺$iJu6v*5?qO~L_!ZϿ)+O^ɿ՟O6P{ ײogU߭OZ]>]7gcg/Yo7 *Wimęfy!5$#&ɾwr3del !kPڔˆUb؆axRh\ [ UF1TSJFd k(6 o.ۅ E&nᕴ,GH"S|ϹӪ92u:W.7VdcvYe$`wnqEJQNH7wr&K,4 xKO3bY/4e߃K>/s9EIQ5EQ9`=7G*20с=nq+ "FGEV8E*0Am)CĨ(|i+c;ٌSZ#aSH/p&LťҟvhqJVSr=s = m{t>t+2خAzoR:\*iWN"rlo*x{rAnYf+'hqo2CBu2[p L"F  =A*MOs`XOZy陾|{W{W{Wl ,%b ]@ߖj(7Mz_Yz^z^zZ•[IC(s]'YrFj*J.J a9]wYs8}D} V{ZÈ+ p{TV܈kz[f:VrojcgX/RT_-%. T|o̱JúTڵ`=h-YmmRʖJ+bLUͺ%?&궫}2W_D_LDž8(cw|^J02jnحVkq1bqSӽ#z[p\гhʣK$O $+F ?bY`L0O 43C6Mv`X ,A-s;%RAi 敏S?&篞e=­DqYiLOV_Dz9̴Uy{i+iޚd K#u ߍ=ڮx TA𧏥-~{,mmAI=A88UBr<zVInO 49?bj.eA&|FytY{  2~sk p@Rv&Ϸ7s3,N+u2V 07* ={&aVW?CgzZϿ)+O^ɿ՟O6P{ ײog^)ԏUcϹ_)͘^E:?7h靿G3.b}Pv7m;y-VɌR(z_QDtHI::C.#?coͻ$| uFe(_+LncevҽW Rt3tzC||7Θ;(WJ_2L+'+dUxum;'9Sߩ5 <&Z=^ B߇Kzo~],m>US EL_t;W_h~ӏRvOː!roR4qq'&5],s=^s=^s=^sWk+ Mrq'ZW+w 2?^ա*ϥ?K0o1bn_o*U55!]'ΝgO&A-ּkgEȯ3m+zWӞUK&߄H|0Zu' -1ajpͅ}ohRh@gGMesُZeslڔR¡qM*=53'(k/?9[VW3V,pzn:uR4gɗ plS5X+j e8p]lC}5fmi}/"6gi謥H/xlSY%+m`?ә":)N_LٜUEL?/IYhV:bI+~՞ԣ26v/\%)QӤ`TzisoYX}9 ̟.ZsO·g^TzkqӞ`V?d{Ӛe:Ļ>z)}i]2t8vzñ,\_ J z"x|cK qPFvPUjnw@"p'vYE`v#'6N%E )E8* (8Ȋ+^==Z5va:P+*9t'fk8?{Wڕa(uꂴVZ B3S:a Sp݃qZc(RlmQbw=o+.omk>HIQ e pjqKe:l K5$+O {AYi-$l=߻wp[*''iߎR*=^?Q>R2Qh Fë+鋂zY%.7RA)2fs Eۺ<*q-{C*cHWI)=FF1Z֏JM7z #'a_3'(ksO·gHΣ^s:ys^F\♮,>LAu b2bv&q5at~OMfwɛHu"{ԠkO1] ?'}uzJ\gԖ+ӬC:lO ˔x4ƪpeZ},M5odfz.TIQ8iԧ_\},RN%{ɍyecaX~5ZsO·g^TzkqӞ`V?d{Ӛe:_wP?>3'(kVp+ՒVT6zxz>} ̓61*|GY ,o]G{߃MݼJ& IdԻ7)z6{Ip|*LABcIu5zZ Sأ)-V[PW)3ZUzFtNodk_聆k_.s1ҽWzӞW{V_~[܆;sKu/yx.1NBGFo\ .qnY0_}w鯮': _zU⿆oYB'Ub@J*+Om>^;CF{ K]{OT? Oξbs~?nDKWXi{,{_|}PG?1QT\7kFeJ`Okj+7WzWzWzWw?DV }mf2?KtfQ;~tCWW{W{Q|gȺ{?Hd2u#%\Bw'&(a=HR/d;r-s`1pϒV U|6dJH FydWJU"jҎ -/lv~bc+a8.M#,?1ۦ0WPOV*}oo_~˳wBN6}Tkٯ=^s=^s :ч[XŠO,yHtsaseN"̑ғ>\w9՛yX5=9k!;+z_EO=m5Wih I.J*^٪)O@Mu)> Ms=^s=^sWҟ%71O/j?ߕ]ItʮgN3u{ ^J}5_3Pv?dWs_6z^ӞW{V_~[܆;sKu/yx.1NBGFo\ .qnY0_}w鯮': _zUٵhʋCYQ3$|:=^GfI%军׹?ǵkOW7D|Ko^XCcf`Qc=(&_{Te B >T_ z^z^z^z[0Q&zE BKRa=4bv[O&z^z^z_)\=+{H9PqY 64 ދO+PS绗_*zݥ+m+KK?:ժo6r4"ش>YLu@%,5UVn}^ *WZARzWzW E<5t&F::`~hDn) I1﨎}Z:;D18FJKMJt@#lkv'jG׿f}9fSpnH$z r+Ã7!Q͒J3馨U8KBX\dSz(Lz;z"&-M­/Na!iR$L$‚Asi {Q=RI#X&WJ_N?\j-Yd[S?s5$׿,pSsGN{cFD?\Z? G@+:G.A?IbY ejTw"(o8mۏk[ǃm! iLΩ@a*)s0MyHl<*TZ툁Wa2rWCT_J`c>ܿX~Uwj&k[C*O_;Ο M[y+ XB_Ef5|W{WӞW{V_~[܆;sKu/yx.1NBGFo\ .qnY0_}w鯮': _zUٵhʋCYQ3$|:=^GfI%军׹?ǵkOW7D|FC<=c ˎ\Ã-{VQ[+WzWzWzWav䏧?>f7|)55`=OW|Nz^z^z^1ي:o"ys,2YYքٍ\˅3>ù֮ JU}V2ݒeVMszU\zT{ҧ_:SM7;Chee,:7Ney(a׏=?k?_{ErL{rԧVA[I8W,zWzWz% 2Yp\]\Z, h#gL#4QtSlHkܿX~Uwj&k[C*O_;Ο M[y+ XB_Ef5|W{WӞW{UŠ:^+NKq76d2N^>)ᢎGXIBXr'+R$ƕctw$.ڵeVkHSJT]dc;$99y؜e\J gWo*^@ptĽu: [_[SbġwYUT p'ʃ1Mhʔ䒓xpW={QM^o/Vy >L0r,؅}T!WGkh < oe7m%J)0$ ~<,Դok!)HR:|?᳿N?{?U?;gUl;?翱9ʹ?;gUh=rgȞ}!d뗫roʽ:8fZ:>jz'Uxԫ#A<̝з[Y] TAk+7ĺ˗O)+I JVH)#i&)xd4PH}4m<T3_݅ 5|N )[)^R{W{W{W}"+ ֖b?^a*Ĩ23ziz^z^zZuªzW➑:Kj ҬvO"JL^o_:\>lCWk;2~3έ?H/l;?ONq2??h{8W᳿N?*SWh{8W᳿N?*SWh{8VI>b맧kQ'RVX(g"6o`O&Ʒ~>ʐ 1\׷WxZ1b\RZq !=ĐH@7\dsIO_ht7?ӶsUúqe̻bPEyEI{0>5s(Ȕ-oMze"Dž& *t8|`|-'/ 0Ĥ`}ͳk>[j*>K+{W{W{W{W{W{W{W{W{W{Wׯ?_YN͆FL4^Oki HEa~ypDꩃ$3xs FYm%Gl4Q6=RGF.{Oa^?yٻPl{e{z?IL+Go;7 Ծ{_c#йGi?{Z#fAk}='0Q6=R}􏲽Bj#ǿ_=W\4½-D~wK翵?> ƓW娏?vn|G^sޏ Gc/H+.{Oa^?yٻPl{e{z?IL(i 5Su>:C6+ԮWVbZ"JIQ:m}~ek}$DUEyr_ RXhcX [Q6z^z^z_TGfCW,&71Id#|W}k~~~Cv5EiUKLa)JWv!F(ϾAXIV&0?yٻPl{_c#7z?IL+Go;7 Ծ{_c#йGi?{Z#fAk}='0Q6=R}􏲽Bj#ǿ_=W\4‘=C#~ Su+:gۊ;lυbPbͬGOM[˟ldcAy}oSxd%.$(lZJJGc/?>#sޏ Gc/H+.{Oa^?yٻPl{e{z?IL+Go;7 Ծ{_c#йGi?{Z#fAk}='0Q6=R}􏲽Bj#ǿ_=W\4½-D~wK翵?> ƓW娏?vn|G^sޏ Gc/H+.{Oa^?yٻPl{e{z?IL+Go;7 Ծ{_c#йGi?{Z#fAk}='0Q6=R}􏲽Bj#ǿ_=W\4½-D~wK翵?> ƓW娏?vn|G^sޏ Gc/H+.{Oa^?yٻPl{e{z?IL+Go;7 Ծ{_c#йGi?{Z#fAk}='0#M㘶aJͲW50aT1GUZjVi"cQSO}l2;[kǎ3[6)c.yvʙzjB P*'ߌ&]Y|2K\=q:~49Vg=^s=^s=^sM0ÿ^U!掠X6VQn>W=^΃ztOJ~*Z|O3(LF9a!#E> rivet-2.3.5/doc/html/images/next.png000644 001750 001750 00000001634 13200160527 016760 0ustar00mxmmxm000000 000000 PNG  IHDR !&QsBIT|d pHYsII㉹LtEXtSoftwarewww.inkscape.org<IDATXŗ[HQǿsfΪ{Q/[=mBDKoE^H5/nJ݌t]і\v\lss?7 qM0b~׋tpX,KP!IRK;Myb2rsATnHoNH(ImRFB WVDM1UeעڹՎG<~fSU!{=ZC-IHGDJS92_?p%DZ&{u DI:=<yqLh5MHjCwAqiɓ{a2TD{xcf+I !LB'?5NUU9:+"Y  f&˴ e)bDIr^ q ̗Y,C;Fe٪7@\Vql_XDeْ+ cH\->:qTF0Ycʚ1өА#O> WVW; 8{ XB 8nn77F:%hz$ z{wz935B.ּO}ֆaO$ݍ=/.//gq"9ovXIENDB`rivet-2.3.5/doc/html/images/tip.png000644 001750 001750 00000000701 13200160527 016570 0ustar00mxmmxm000000 000000 PNG  IHDR* bKGD#2IDATxu @!+x6KR+hJTaK >߁Rh~j?g0qF@!eH,0܆x0&p ^J5y=J % P<*ğ{j #7^L~!=&Ṳ; &rgߊFmͩP; ot6BJqC Xdui]}OL4+|) -CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com!*tEXtSignatureee9d877396ce267aeb0179d35f81b2ac3'tEXtPage25x24+0+0 IENDB`rivet-2.3.5/tests/000755 001750 001750 00000000000 13200157764 013465 5ustar00mxmmxm000000 000000 rivet-2.3.5/doc/xml/session.xml000644 001750 001750 00000033777 12221020733 016101 0ustar00mxmmxm000000 000000
Session Package
Introduction This is session management code. It provides an interface to allow you to generate and track a browser's visit as a "session", giving you a unique session ID and an interface for storing and retrieving data for that session on the server. This is an alpha/beta release -- documentation is not in final form, but everything you need should be in this file. Using sessions and their included ability to store and retrieve session-related data on the server, programmers can generate more secure and higher-performance websites. For example, hidden fields do not have to be included in forms (and the risk of them being manipulated by the user mitigated) since data that would be stored in hidden fields can now be stored in the session cache on the server. Forms are then faster since no hidden data is transmitted -- hidden fields must be sent twice, once in the form to the broswer and once in the response from it. Robust login systems, etc, can be built on top of this code.
Requirements Currently has only been tested with Postgresql, MySql and Oracle. All DB interfacing is done through DIO, though, so it should be relatively easy to add support for other databases.
Preparing To Use It Create the tables in your SQL server. With Postgres, do a psql www or whatever DB you connect as, then a backslash-i on session-create.sql (If you need to delete the tables, use session-drop.sql) The session code by default requires a DIO handle called DIO (the name of which can be overridden). We get it by doing a RivetServerConf ChildInitScript "package require DIO" RivetServerConf ChildInitScript "::DIO::handle Postgresql DIO -user www"
Example Usage In your httpd.conf, add: RivetServerConf ChildInitScript "package require Session; Session SESSION" This tells Rivet you want to create a session object named SESSION in every child process Apache creates. You can configure the session at this point using numerous key-value pairs (which are defined later in this doc). Here's a quick example: RivetServerConf ChildInitScript "package require Session; Session SESSION \ -cookieLifetime 120 -debugMode 1" Turn debugging on to figure out what's going on -- it's really useful, if verbose. In your .rvt file, when you're generating the <HEAD> section: SESSION activate Activate handles everything for you with respect to creating new sessions, and for locating, validating, and updating existing sessions. Activate will either locate an existing session, or create a new one. Sessions will automatically be refreshed (their lifetimes extended) as additional requests are received during the session, all under the control of the key-value pairs controlling the session object.
Using Sessions From Your Code The main methods your code will use are: SESSION id After doing a SESSION activate, this will return a 32-byte ASCII-encoded random hexadecimal string. Every time this browser comes to us with a request within the timeout period, this same string will be returned (assuming they have cookies enabled). SESSION is_new_session returns 1 if it's a new session or 0 if it has previously existed (i.e. it's a zero if this request represents a "return" or subsequent visit to a current session.) SESSION new_session_reason This will return why this request is the first request of a new session, either "no_cookie" saying the browser didn't give us a session cookie, "no_session" indicating we got a cookie but couldn't find it in our session table, or "timeout" where they had a cookie and we found the matching session but the session has timed out. SESSION store packageName key data Given the name of a package, a key, and some data. Stores the data in the rivet session cache table. SESSION fetch packageName key Given a package name and a key, return the data stored by the store method, or an empty string if none was set. (Status is set to the DIO error that occurred, it can be fetched using the status method.)
Session Configuration Options The following key-value pairs can be specified when a session object (like SESSION above) is created: how many seconds the session will live for. 7200 == 2 hours sessionRefreshInterval If a request is processed for a browser that currently has a session and this long has elapsed since the session update time was last updated, update it. 900 == 15 minutes. so if at least 15 minutes has elapsed and we've gotten a new request for a page, update the session update time, extending the session lifetime (sessions that are in use keep getting extended). cookieName name of the cookie stored on the user's web browser default rivetSession dioObject The name of the DIO object we'll use to access the database (default DIO) gcProbability The probability that garbage collection will occur in percent. (default 1%, i.e. 1) gcMaxLifetime the number of seconds after which data will be seen as "garbage" and cleaned up -- defaults to 1 day (86400) refererCheck The substring you want to check each HTTP referer for. If the referer was sent by the browser and the substring is not found, the session will be deleted. (not coded yet) entropyFile The name of a file that random binary data can be read from. (/dev/urandom) Data will be used from this file to help generate a super-hard-to-guess session ID. entropyLength The number of bytes which will be read from the entropy file. If 0, the entropy file will not be read (default 0) scrambleCode Set the scramble code to something unique for the site or your app or whatever, to slightly increase the unguessability of session ids (default "some random string") cookieLifetime The lifetime of the cookie in minutes. 0 means until the browser is closed (I think). (default 0) cookiePath The webserver subpath that the session cookie applies to (defaults to /) cookieSecure Specifies whether the cookie should only be sent over secure connections, 0 = any, 1 = secure connections only (default 0) sessionTable The name of the table that session info will be stored in (default rivet_session) sessionCacheTable The name of the table that contains cached session data (default rivet_session_cache) debugMode Set debug mode to 1 to trace through and see the session object do its thing (default 0) debugFile The file handle that debugging messages will be written to (default stdout)
Session Methods The following methods can be invoked to find out information about the current session, store and fetch server data identified with this session, etc: SESSION status Return the status of the last operation SESSION id Get the session ID of the current browser. Returns an empty string if there's no session (will not happen is SESSION activate has been issued.) SESSION new_session_reason Returns the reason why there wasn't a previous session, either "no_cookie" saying the browser didn't give us a session cookie, "no_session" indicating we got a cookie but couldn't find it in the session table, or "timeout" when we had a cookie and a session but the session had timed out. SESSION store packageName key data Given a package name, a key string, and a data string, store the data in the rivet session cache. SESSION fetch packageName key Given a package name and a key, return the data stored by the store method, or an empty string if none was set. Status is set to the DIO error that occurred, it can be fetched using the status method. SESSION delete Given a user ID and looking at their IP address we inherited from the environment (thanks, Apache), remove them from the session table. (the session table is how the server remembers stuff about sessions). If the session ID was not specified the current session is deleted. SESSION activate Find and validate the session ID if they have one. If they don't have one or it isn't valid (timed out, etc), create a session and drop a cookie on them.
Getting Additional Randomness From The Entropy File RivetServerConf ChildInitScript "Session SESSION -entropyFile /dev/urandom \ -entropyLength 10 -debugMode 1" This options say we want to get randomness from an entropy file (random data pseudo-device) of /dev/urandom, to get ten bytes of random data from that entropy device, and to turn on debug mode, which will cause the SESSION object to output all manner of debugging information as it does stuff. This has been tested on FreeBSD and appears to work.
rivet-2.3.5/doc/html/diodisplay_package.html000644 001750 001750 00000136337 13200160530 020534 0ustar00mxmmxm000000 000000 DIODisplay

Name

DIODisplay — Database Interface Objects Display Class

Synopsis

DIODisplay (objectName | #auto) (-option | option | -option | option | ...)

Description

DIODisplay is an HTML display class that uses a DIO object to do the database work and a form object to do the displaying.

Options

-DIO dioObject
The DIO object to be used in conjunction with this display object. This is a required field.
-cleanup (1 | 0)
If cleanup is true, when the display object is shown, it will automatically destroy the DIO object, the form object and itself. Default is true.
-confirmdelete (1 | 0)
If confirmdelete is true, attempting to delete a record from the database first requires that the user confirm that they wish to delete it. If it is false, deletion occurs without prompting the user. Defaults to true.
-errorhandler procName
The name of a procedure to handle errors when they occur. During the processing of requests and pages, sometimes unexpected errors can occur. This procedure will handle any errors. It is called with a single argument, the error string. Use of the Tcl errorInfo and errorCode variables is also recommended though.
If no errorhandler is specified, the handle_error method within the Display object will handle the error.
-fields fieldList
Specify a list of fields to be used in this object. The fields list is actually created by using the field command to add fields to the display, but this option can be useful to sometimes over-set the list of fields created.
-form formObject
A Rivet form object to use when displaying a form. If one is not specified, the display object will automatically create one when it is necessary.
-functions functionList
A list of functions to be displayed in the main menu. This is a list of functions the user is allowed to execute.
-pagesize pageSize
How many records to show per page on a search or list. Default is 25.
-rowfields fieldList
A list of fields to display in each row of a search or list. When a search or list is conducted and the resulting rows are displayed, this list will limit which fields are displayed. Default is all fields.
-rowfunctions functionList
A list of functions to display in each row of a search or list.
-searchfields fieldList
A list of fields to allow a user to search by. This list will appear in the main screen as a drop-down box of fields the user can search on.
-title title
The title of the display object. This will be output as the title of the HTML document.

DIO Display Object Commands

objectName cleanup ?value?
Return the current cleanup value. If value is specified, it sets a new value for the cleanup option.
objectName delete key
Delete the specified key from the database.
The default action of this method is to call the DIO object's delete command. This method can be overridden.
objectName destroy
Destroy the diodisplay object.
objectName DIO ?value?
Return the current DIO value. If value is specified, it sets a new value for DIO.
objectName errorhandler ?value?
Return the current errorhandler value. If value is specified, it sets a new value for errorhandler.
objectName fetch key arrayName
Fetch the specified key from the database and store it as an array in arrayName.
The default of this method is to call the DIO object's fetch command. This method can be overridden.
objectName field fieldName (-arg | arg...)
Create a new field object and add it to the display. When a field is added to the display, a new object of the DIODisplayField class is created with its values. See [FIXME - LINK] DIO Display Fields for options and values.
objectName fields ?value?
Return the current fields value. If value is specified, it sets a new value for fields.
objectName form ?value?
Return the current form value. If value is specified, it sets a new value for form.
objectName function functionName
Add a new function to the list of possible functions. The display object will only execute methods and procs which are defined as functions by the object. This is to protect the program from executing a different procedure other than what is allowed. The function command adds a new function to the list of allowable functions.
objectName functions ?value?
Return the current functions value. If value is specified, it sets a new value for functions. See [FIXME - LINK DIO Display Functions] for a list of default functions.
objectName pagesize ?value?
Return the current form pagesize. If value is specified, it sets a new value for pagesize.
objectName rowfields ?value?
Return the current form rowfields. If value is specified, it sets a new value for rowfields.
objectName rowfooter
Output the footer of a list of rows to the web page.
This method can be overridden.
objectName rowfunctions ?value?
Return the current rowfunctions value. If value is specified, it sets a new value for rowfunctions.
objectName rowheader
Output the header of a list of rows to the web page. By default, this is an HTML table with a top row listing the fields in the table.
This method can be overridden.
objectName searchfields ?value?
Return the current searchfields value. If value is specified, it sets a new value for searchfields.
objectName show
Show the display object.
This is the main method of the display class. It looks for a variable called mode to be passed in through a form response and uses that mode to execute the appropriate function. If mode is not given, the Main function is called.
This function should be called for every page.
objectName showform
Display the form of the object.
This method displays the form for this display object. It is used in the Add and Edit methods but can be called separately if needed.
This method can be overridden if the default look of a form needs to be changed. By default, the form displayed is simply the fields in a table, in order.
objectName showrow arrayName
Display a single row of a resulting list or search.
This method is used to display a single row while displaying the result of a list or search. arrayName is a fetched array of the record.
This method can be overriden if the default look of a row needs to be changed. By default, each row is output as a table row with each field as a table data cell.
objectName showview
Display the view of the object.
This method displays the view for this display object. It is used in the Details methods but can be called separately if needed.
This method can be overridden if the default look of a view needs to be changed. By default, the view displayed is simply the fields in a table, in order.
objectName store arrayName
Store the specified arrayName in the database.
The default of this method is to call the DIO object's store command. This method can be overridden.
objectName text ?value?
Return the current text value. If value is specified, it sets a new value for text.
objectName title ?value?
Return the current title value. If value is specified, it sets a new value for title.
objectName type ?value?
Return the current type value. If value is specified, it sets a new value for type.
objectName value ?value?
Return the current value value. If value is specified, it sets a new value for value.

DIO Display Functions

These functions are called from the show method when a form response variable called mode is set. If no mode has been set, the default mode is Main. The show method will handle the necessary switching of functions. The show method also handles checking to make sure the function given is a true function. If not, an error message is displayed. New functions can be added as methods or by use of the function command, and any of the default functions can be overridden with new methods to create an entirely new class. These are the default functions provided.

Add
Show a form that allows the user to add a new entry to the database. This function calls showform to display the form for adding the entry.
Cancel
The Cancel function does nothing but redirect back to the Main function. This is handy for forms which have a cancel button to point to.
Delete
If confirmdelete is true (the default), the Delete function will ask the user if they're sure they want to delete the record from the database. If confirmdelete is false, or if the user confirms they wish to delete, this function calls the DoDelete function to do the actual deletion of a record.
Details
Display the view of a single record from the database. This function calls the showview method to display a single record from the database.
DoDelete
This function actually deletes a record from the database. Once it has deleted the record, it redirects the user back to the Main function.
Edit
Show a form that allows the user to edit an existing entry to the database. This function calls showform to display the form for editing the entry and fills in the fields with the values retrieved from the database.
List
This function lists the entires contents of the database. Each record is output in a row using the showrow method.
Main
This function is the main function of the display object. If there is no mode, or once most commands complete, the user will be redirected to this function. The default Main function displays a list of functions the user can execute, a list of searchfields the user can search on, and a query field. This query field is used by all of the other functions to determine what the user is trying to find.
In the case of a search, query specifies what string the user is looking for in the specified search field. In the case of delete, details or edit, the query specifies the database key to access.
Save
This function saves any data passed to using the store method. This is primarily used by the add and edit commands to store the results of the form the user has filled out.
Search
This function searches the database for any row whose searchBy field matches query. Once any number of records are found, Search displays the results in rows.

DIO Display Fields

Display fields are created with the field command of the DIODisplay object. Each field is created as a new DIODisplayField object or as a subclass of DIODisplayField. The standard form fields use the standard field class, while specialized field types use a class with different options but still supports all of the same commands and values a generic field does.

displayObject field fieldname (-option | option...)

These are the standard options supported by field types:

-formargs arguments
When a field is created, any argument which is not a standard option is assumed to be an argument passed to the form object when the field is shown in a form. These arguments are all appended to the formargs variable. You can use this option to override or add options after the initial creation of an object
-readonly (1 | 0)
If readonly is set to true, the field will not display a form entry when displaying in a form.
-text text
The text displayed next to the form or view field. By default, DIODisplay tries to figure out a pretty way to display the field name. This text will override that default and display whatever is specified.
-type fieldType
The type of field this is. This type is used when creating the field in the form object. fieldType can be any of the accepted form field types. See [FIXME - LINK DIO Field Types] for a list of types available.

All other arguments, unless specified in an individual field type, are passed directly to the form object when the field is created. So, you can pass -size or -maxsize to specify the length and maximum length of the field entry. Or, if type were textarea, you could define -rows and -cols to specify its row and column count.

DIO Display Field Types

The following is a list of recognized field types by DIODisplay. Some are standard HTML form fields, and others are DIODisplay fields which execute special actions and functions.

rivet-2.3.5/doc/html/clock_to_rfc.html000644 001750 001750 00000005036 13200160527 017344 0ustar00mxmmxm000000 000000 clock_to_rfc850_gmt

Name

clock_to_rfc850_gmt — create a rfc850 time from [clock seconds].

Synopsis

::rivet::clock_to_rfc850_gmt ?seconds?

Description

Convert an integer-seconds-since-1970 click value to RFC850 format, with the additional requirement that it be GMT only.

rivet-2.3.5/doc/xml/request.xml000644 001750 001750 00000030762 12533750442 016112 0ustar00mxmmxm000000 000000
Apache Child Processes Lifecycle and Request Processing Apache Child Process Lifecycle Apache Rivet delegates to the Multi-Processing Module (MPM) the task of managing the agents responding to network requests. An MPM is responsible for creating such agents during the start-up, and is in charge for terminating existing ones and recreating new agents when the workload is requiring it. Apache Rivet is currently supporting only the prefork MPM which creates full fledged child processes as independent agents responding to network requests. Efforts are under way to extend the support to the worker MPM, a hybrid model where forked child processes in turn create threads as real network agents. If we can achieve this the goal would open the possibility of supporting also the Windows© specific winnt MPM, where a single process creates and manages a large number of thread agents. Configuration parameters about this critical point can be read in the Apache documentation. There are 4 stages in the lifetime of an Apache webserver that are relevant to Rivet: Single Process Initialization Apaches starts up as a single process. During this stage Apache performs various preliminary tasks including reading and parsing the configuration. After the configuration has been read Rivet sets up some internal resources and if a Tcl script is set as argument of a ServerInitScript directive the script is executed. Variables, arrays or dictionaries created during the execution of this script will be preserved and later replicated in the child process intepreters, since the prefork MPM creates new child processes with a fork() system call (which involves only in memory copy of sections of a process address space). Thus ServerInitScript is a good place to do global initialization that doesn't involve creation of private data. Example of tasks that can be done in this context are importing namespace commands and loading packages providing code of general interest for every application to be served. Also IPC methods can be initialized in this stage. Child Process Initialization Right after the webserver has forked its child processes there is a chance to perform specific initialization of their Tcl interpreters. This is the stage where most likely you want to open I/O channels, database connections or any other resource that has to be private to an interpreter. When the option SeparateVirtualInterps is turned off child processes will have a single interpreter regardless the number of virtual hosts configured. The GlobalInitScript is the configuration script the child process will run once before getting ready to serve requests When SeparateVirtualInterps is turned on each configured virtual host will have its own slave interpreter which can will run the ChildInitScript directive as initialization script. The ChildInitScript has to be placed within a <VirtualHost...>...</VirtualHost ...> stanza to associate a script to a specific virtual host initialization. This scenario of interpreter separation is extremely useful to prevent resource conflicts when different virtual hosts are serving different web applications. GlobalInitScript has no effect to working interpreters when SeparateVirtualInterps is set. Request Processing and Content Generation After a child has been initialized it's ready to serve requests. A child process' lifetime is almost entirely spent in this phase, waiting for connections and responding to requests. At every request the URL goes through filter processing and, in case, rewritten (mod_rewrite, Alias directives, etc). Parameter values encoded in the request are made available to the environment and finally the script encoded in the URL is run. The developer can tell Rivet if optionally the execution has to be preceded by a BeforeScript and followed by an AfterScript. The real script mod_rivet will execute is the result of the concatenation of the BeforeScript, the script encoded in the URL and the AfterScript. Thus the whole ensemble of code that makes up a web application might be running within the same "before" and "after" scripts to which the programmer can devolve tasks common to every page of an application. Child Process Exit If no error condition forces the child process to a premature exit, his life is determined by the Apache configuration parameters. To reduce the effects of memory leaks in buggy applications the Apache webserver forces a child process to exit after a certain number of requests served. A child process gets replaced with a brand new one if the workload of webserver requires so. Before the process quits an exit handler can be run to do some housekeeping, just in case something the could have been left behind has to be cleaned up. Like the initialization scripts ChildExitScript too is a "one shot" script. The Tcl exit command forces an interpreter to quit, thus removing the ability of the process embedding it to run more Tcl scripts. The child process then is forced to exit and be replaced by a new one when the workload demands it. This operation implies the ChildExitScript be run before the interpreter is actually deleted. Apache Rivet Error and Exception Scripts Directives Rivet is highly configurable and each of the webserver lifecycle stages can be exploited to control a web application. Not only the orderly sequence of stages in a child lifecycle can be controlled with Tcl scripts, but also Tcl error or abnormal conditions taking place during the execution can be caught and handled with specific scripts. Tcl errors (conditions generated when a command exits with code TCL_ERROR) usually result in the printing of a backtrace of the code fragment relevant to the error. Rivet can set up scripts to trap these errors and run instead an ErrorScript to handle it and conceal details that usually have no interest for the end user and it may show lines of code that ought to remain private. The ErrorScript handler might create a polite error page where things can be explained in human readable form, thus enabling the end user to provide meaningful feedback information. In other cases an unmanageable conditions might take place in the data and this could demand an immediate interruption of the content generation. These abort conditions can be fired by the command, which in turn fires the execution of an AbortScript to handle the abnormal condition. Starting with Rivet 2.1.0 accepts a free form parameter that can be retrieved later with the command Tcl Namespaces in Rivet and the <command>::request</command> Namespace With the sole exception of .rvt templates, Rivet runs pure Tcl scripts at the global namespace. That means that every variable or procedure created in Tcl scripts resides by default in the "::" namespace (just like in traditional Tcl scripting) and they are persistent across different requests until explicitly unset or until the interpreter is deleted. You can create your own application namespaces to store data but it is important to remember that subsequent requests will in general be served by different child processes. Your application can rely on the fact that certain application data will be in the interpreter, but you shouldn't assume the state of a transaction spanning several pages can be stored in this way and be safely kept available to a specific client. Sessions exist for this purpose and Rivet ships its own session package with support for most of popular DBMS. Nonetheless storing data in the global namespace can be useful, even though scoping data in a namespace is recommended. I/O channels and database connections are examples of information usually specific to a process for which you don't want to pay the overhead of creating them at every request, probably causing a dramatic loss in the application performance. A special role in the interpreter is played by the ::request namespace. The ::request namespace is deleted and recreated at every request and Rivet templates (.rvt files) are executed within it. Unless you're fully qualifying variable names outside the ::request namespace, every variable and procedure created in .rvt files is by default placed in it and deleted before any other requests gets processed. It is therefore safe to create variables or object instances in template files and foresake about them: Rivet will take care of cleaning the namespace up and everything created inside the namespace will be destroyed.
StageScriptNamespace
Apache InitializationServerInitScript::
Child InitializationGlobalInitScript::
ChildInitScript::
Request ProcessingBeforeScript::
.rvt::request
.tcl::
AfterScript::
AbortScript::
AfterEveryScript::
Child TerminationChildExitScript::
Error HandlingErrorScript::
rivet-2.3.5/doc/images/blank.png000644 001750 001750 00000000566 11436722370 016141 0ustar00mxmmxm000000 000000 PNG  IHDRL\gAMA a-IDATxA 0MF4 z;3'kX` 5kX` 5kX` 5kX` 5kX` 5kX` 5kX` 5kX` 5kX` 5kX` 5kX` 5kX` 5kX` 5kX` 5kX` 5kX` `fHfIENDB`rivet-2.3.5/doc/images/toc-minus.png000644 001750 001750 00000000403 11436722370 016756 0ustar00mxmmxm000000 000000 PNG  IHDR )bKGD#2IDATxch`g  I׏j?}-pZECtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com!*tEXtSignatureecf413ef47524404f90c44d8c7d12a2e݈ tEXtPage15x9+0+07vIENDB`rivet-2.3.5/doc/examples/vars.html000644 001750 001750 00000001301 11562073576 016551 0ustar00mxmmxm000000 000000
Title:
Salary:
Boss:
Skills:
rivet-2.3.5/rivet/rivet-tcl/lmatch.tcl000644 001750 001750 00000003017 11670231317 017336 0ustar00mxmmxm000000 000000 ### ## ## lmatch ?-exact|-glob|-regexp? ## ## Look for elements in that match . This command emulates ## the TclX lmatch command, but if TclX isn't available, it's a decent ## substitute. ## ## Note: Native Tcl's "lsearch" has been greatly enhanced since lmatch was ## written -- programmers should consider using lmatch instead. ## ## $Id: lmatch.tcl 1212149 2011-12-08 21:57:35Z mxmanghi $ ## ### namespace eval ::rivet { proc lmatch {args} { set modes(-exact) 0 set modes(-glob) 1 set modes(-regexp) 2 if {[llength $args] == 3} { lassign $args mode list pattern } elseif {[llength $args] == 2} { set mode -glob lassign $args list pattern } else { return -code error \ {wrong # args: should be "lmatch ?mode? list pattern"} } if {![info exists modes($mode)]} { return -code error \ "bad search mode \"$mode\": must be -exact, -glob, or -regexp" } set mode $modes($mode) set return {} foreach elem $list { if {$mode == 0} { if {[string compare $elem $pattern] == 0} { lappend return $elem } } if {$mode == 1} { if {[string match $pattern $elem]} { lappend return $elem } } if {$mode == 2} { if {[regexp $pattern $elem]} { lappend return $elem } } } return $return } } rivet-2.3.5/rivet/rivet-tcl/import_switch_args.tcl000644 001750 001750 00000002171 11727706131 022001 0ustar00mxmmxm000000 000000 ### ## ## import_switch_args ## ## Detect switches from a string (e.g. "-all -regexp -- foo bar args") ## and extract them into an array. ## ## $Id: import_switch_args.tcl 1300262 2012-03-13 18:05:13Z mxmanghi $ ## ### namespace eval ::rivet { proc import_switch_args {arrayName argsList {switchList ""}} { upvar 1 $arrayName array set index 0 set array(args) "" set array(switches) "" if {[llength $switchList] > 0} { set proofSwitches 1 } else { set proofSwitches 0 } foreach arg $argsList { if {[string index $arg 0] != "-"} { set array(args) [lrange $argsList $index end] break } elseif {$arg == "--"} { set array(args) [lrange $argsList [expr {$index + 1}] end] break } set switch [string range $arg 1 end] if {!$proofSwitches || [lsearch -exact $switchList $switch] >= 0} { set array($switch) $index lappend array(switches) $switch } incr index } } } rivet-2.3.5/NOTICE000644 001750 001750 00000000144 10016623143 013215 0ustar00mxmmxm000000 000000 This product includes software developed by The Apache Software Foundation (http://www.apache.org/).rivet-2.3.5/tclconfig/config.sub000755 001750 001750 00000105327 12152741433 016263 0ustar00mxmmxm000000 000000 #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-04-18' # 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, 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. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) 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*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -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 \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. 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-* \ | aarch64-* | aarch64_be-* \ | 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-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*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-/'` ;; msys) basic_machine=i386-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; 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: rivet-2.3.5/doc/xml/packages.xml000644 001750 001750 00000002201 13042134515 016154 0ustar00mxmmxm000000 000000
Rivet Tcl Packages In addition to the core Apache module, Rivet provides a number of Tcl packages that include potentially useful code. commserver is a package providing a server that can be used for IPC. Still experimental. Requires the comm package from tcllib. dio is a database abstraction layer. dtcl is a compatibility package for mod_dtcl applications. form - for creating forms. rivet - some additional, useful routines. tclrivet calendar - a package providing a simple configurable calendar generator formbroker - a form data validators broker
rivet-2.3.5/doc/images/draft.png000644 001750 001750 00000042056 11436722370 016152 0ustar00mxmmxm000000 000000 PNG  IHDRKZJgAMA a IDATxv۸asV8 BLhp7v8<[ w`9*i$4`-B ! xb^8x5oTGa0 s;&!b;07kBC}b$xkeY?|os$x cx? /󇄎 {w:Rqpt5Ih'xH1' 桕R4EAB;[ ?Hhŏ1}ZBNBHQvC4)rB29턶n}|CCkׯzA= 4ew i}dx4! ZHNWUŸC4b/_a~9B[4l/C4l,+4l)rϟ? 4`3&+m-c 8z%*i@55 WO#xyy9NB7?6ϳ3cNhLkظwNH1&i֮.yB e=9i4M8mrv/ .@b,5ẻVwͬ [ xm=oD% k v R"e2ʽV}Bv=%~n4M0\.OǽKkm{_ބ4Dd桿 8Z9ɧGHhT4{C% μ$ʤ k4!OT,;NB rzAHCyiʲ,NӂZikòvV41} 7}JyeѳIބ4<蛄zӾgiBcB rzi:InL녙~~~.K܅JrWB+iO}%BH$ 3?UNpEz2?,fNnXk]%kg~J~ZK=q ibߛyq|ArBkyݗۉ#1' _Ьvmۮy*[OSIH]Vބ4|ޑZMrnxޣ$eQI w*~o*i{Oθ Rb44Њ.uYTiI_;[IptЩJph:szs {SI8.j#u=M% H44#b=촞p8>OQcN>4! (Hh4! XE4UU" igMӐ{T.r8$u7! eFI??MHHQӄ44;}NLl AvNr.}CӮ$t⬧ iIS 0 iS +Ŗӄ4DND~1)`nEGF% `Hh8ɸ7! `HhxCNvWOFM]bO1U4 i;&9MH ӄ4`O1l.XN?uB>/7" 'ZQI ]p2iB+B@Hhʜ*! B$49sVJ @\H5qaqvuY'"D^Cm[2!אr<6j޻@H^(;4M֕! ;O }N1%oEQ$! /5t4^oy^UUUUί kxI] kPCCi>jh l,zzve8l,iNXNpdrCI>Ӟv,QtkTvF,4-)7Ri546AHث09::! `O@BIرe~iHh(`iqoWHh܎JY? n&qx5]"i2<&ڜ&J4 \*Ih`pnmOXuҴiQIHֆ4 'i)dP8Ih8Ĝ4􅜟󜄆+T!غi8BQy_^^i8AH804\ڭm[Ƙ_~eY%<*iø7pD4vn5rqoĉJqc.˒zq"ڒ{#B wވ40H9(@\q}BN#6Iy}},K9P)4|f~Zko=B$ygYVU1>2D.UU繜 uӈ! lVJYkEQy^UQ ! lBf}A=mnIO\ 9 fNh6ƔeYEe06V&5km4YIaMZ@Nc4 0Ȫ-9+1pFx4^H]ueEQ( kiFHAu]d5cn вjš2WiCHLOITSX;AN# Ba^ XReiY~Qʲmim\nFX8'Cx ! ?niaij^зl ~`~ ooo}?|.Zoa-cw2r"}ߟ1MTUKw] eY>???<8>|^sI=:"y◗5t:ep5,!MF<2i|BCW*RN| D6p/̩_.%w}Ж ._{,\54+*i`38,w&M4ϳXKsߺ,ˤ2:~42HY /diIS׵?U|Ǹ7 / wÕׇ0 r:( 9b+{9CVm+qoWGлC% lm.J)kP0RU/M?Id2i|_Q&$^u~LY]}\duuGa.ޖ-#kss:Haؒ fY2eqs>)y9i/B/7v\}Y[Zske75~QIbuu<[zE% kו;eZQL/b,˺i^-g2ĆeuefY_zW\Z*Q9:YU|c,x¶i j0qW>YKڐ^Xk*7&v)a|Vi vooo]׭Hi}$tQ߷6m4@6,M=;i[%!?69Lؒ F\݃WBN0"9[vG|e ޘ׿_k}:qC#J+Y$@1MӬÚwބPR:+䈎(Xup|ݼWOhHw,G꺮JEvEeMӐP4{uXZ맧`FRCOi.ZNHhB؇y7^u4Mߎ%>KpuCX>Hm:Z(W jmBvc?\IXIӄ&CRX')5{"FT D J,dۉ 4'8_u:8W7&ߑC$e w>NBSUrYsIy F Ry˪ye m$4GH{bq}E0ӫߑC$1KgmHhv/UNo/wxRXB(FԲglGDvZ+GnqZ7_j5mB/Aļ=$J|/ҟ_qW'KetߓEUUOOOө,[އe_n?YF:Y!ӏE#YT-U80 ZIiMI-O>FBe,VJɦfHh܋Jثmjyzz7I[,v,M0PId-BT{wx7ZήUUI}aOi`e)˲;Km+ʷf^6տ#_ WZN1t})VE 6?`ߜ:uݏӮMӐ^W@ve~L~Hh`I#"Z;ϳA$[k-7Z~SwA~X%ҁ.~DHcKKO$t(%9 u5gyJ]EHS}󼪪wNBb4!Nx,zZJjJ8///+w϶u]4A6yXZbpyaMdeZk<ш/&QI#NBk[2x{zǗ?ڲ,1$4B!H+} IDAT)gWUroleOOOr5! $۶dLZ7M|___y}! neOz\&On{'Xk-ےDBk\X`CZ9XW grʯʲl[AbI/^ dOx4ܓ}߯_RWU^N֣cڶm{Gz˧iJ/?1UU$4??pF^__o;/&:^1_x~Ϝ|>;y~}anZeYYeYfY˘Ll;Udw ]j^z_ 1{RC;OOtrʲӠ4r0r䆓K:~DH?xSt:UUUsG7H1d~&W#GH|Z_~eiwG^I74دb4ׯ_n_ZuݮZ+/%_i(a[w>Na 菤vR:}c_J>Ӏo4܏rp]ۮYʲiL68yOd8n|>:5tMlA%v]LN.u\8u!}hkh <#YD++!士m -IM8-/j.(<0b!9Oh+#eY:ajSJMӔD+)4gB L'ڊ8[N])EH?sJeYd`VN\mYk˲trҀ'>UIb_qX;HfsuoD++:HW\'믣 SxO 'J)cL{Vǜm @ABbᔢ*'kpn7OX<^8g 4v ';y1 dkmBv56}2 ]>gq#u]hTeۦQ8Ԟb7r2-f&dY䳋r0 8ק-磆|OWiN)pyu)9ŧ1feNf&)ZّɥdKPtzHZms5<0 Cu@҉!o&bYm[.r+a:Ȁ|A۶m:` -e3R}1( WEc-FʏЏY?~òI۠}O7𰔟ȩ:$+^q-Y00 I$ckmoѢ,KWcfsGy褁QoZWUu( WiX3 <&GsJH5iZ3!mͲ,h0Ƹ:rAo1?@B1MW# #gapr)P@'^celM%W}azGΙ3z^IkuʾnccwZm!Ůicqu?;"3? @1 (O=b{LEa(i|>; &4M0,u km4+{:z_v aGB]Gk&_cpzdQTχFuyElB;Y##Nni첫Oi^Ek4,vrc@9٘b|JEʮ->N:KFe$܈'іڶu:T4־RCZ+.u\ \~q9r#e)> t]v=5kr䟉<_c㑔<ҒZ+gr?Y/j1Ŷ,`wOx ! yyoc$,˲,`VJ}/,9돟$3[)@~1j[ίw;tx؃#WXZ;r߫|tUU5M#ߗeQE~$R巌'ǜ?5nq:RFHo)LNDnZ)U8-ijDKGr|!=G>X-㸮kלNoyB+ny]cO R1Y ޞmz=x qo e`|c?*/Slӷ;TBtwPz<5cRd a7Iΰ10 {r3YFŗs/g2(cEHG9MBozT\)u]dE"ٲH!c8wI,EtJOX˒ǻ]0\ BzӌrGNe܅2އ4 fFAx72Xk0 LBGNvA!`$7IhY<ϳ ^G-[Rt/+jh` $9[!Q2jD냗%654!?^nIbUJxdm9Rb&In q }u{iߣܲ+u]\JmّIJ):i!c{?/_B*޲,<@E$s< )܃s}oNK,˪zm0 {A !yw]z`M.RHw$2-[@lYON\f^^>@o>\`&jۂ&H 崵r(О,TȾ^ߵ"E%izf.NB1#SmNБ%]| bFH'n>2:N׭ga$4-B:}iz"܋;4/pYQ󙄎$?*VOkHB8&*VO;GB8,B@[$4##e_9MB88Bp$4GNÊ9Ihqř$4,C-IhFHݒrwBB;f$뺖7ABGl  oHhIh ! ??MB7rPNo2,}1&sB%Zi71Z,c1J)1F#'ظ4M:ܓqgcLu4 _U˯G]-\Eey/ն/m,*GX%8ھiZf)oRUei[aeiek$8JNoEQcZFɽnk)m CYyWUaxuYmO@i {{{KcH@VZ8 C4A7if8}솱8e GRaƽӉqo㐖sXӆ֧)zim>=0wv7Miǰn+Ƙii~D!=MS۶;3u4z{Qi^^^PsUUeYn}/J\?-eL[k1,3?@"}œHx++qIږI7<,G0 oooZbXV-kS-_ȟ9V7joez=.˲TeYJdYfonQe<8>hHtuu 0 Ȝ=H`|\<BZݵFf9LZe5)7**ߓm}_9xʓЛXa|&r>?&@=͸7} *RV{xezЛ.Z|1rq<^!Б,|l>M|'*JY<n6B1? Iu/Ga}lA8g[Et:i}10 yA&z:׷6MmAw D4Fg{QEYiʲdVxxcHhW꺞贜aby&l{yNO4M1&Ao:eAZ-'R8=b8SsK" ž4HN8!CMGd~QnI䯗Jk-oyv<4bi&,3s454iӓeYQny.bZݐb!w]iGx44M>˲TQr{`]?}dőLodYFB .E91( Wnr5/@NSUo^bkؓ>,Noǎz`_=7 vZ,7;?8;a #!놝\JL;._plJ|d)לz:Czz2}%X|7/7 繓B,yDkm[ n=$iZyd-={8SO-scꖐVө+ɑ4Mn}4G0Io<K Q?өיboN1&˲EvgipHr:=ڢ(VNK*,Ů&#er:1ZkcNn  iźeY npNeDN^_ЪiHƽAJphCNJ-LiX%|!T,e iEN1|g![29g뻻i"wZ+ \%XVG[+Ka-/!؏lֿ$48+ ipcH+]Ӡ׼Nf !#k3B\Ҋ W^7\ *TN'8w BZ#\.qDVEL޽ʸw\}Y(9͸iy$ޑYJ.9f{ǣZ-g{ߛy@;][|{ߛƘ_ťސ$7Gk]%!q}C!-hq|JNhTQv"Ry WH+r:q۶]cLUU(V8^.'b1'ƐVO|IR*ZxZkmuN6뚖1'ސVZ,SRF??aiʳ4EQuROҊvm[W eY]l ^ 90 08Y-icҊ^g]utka6|s~պsuihҊ~ۄ.˒0vҊr9Ϯzz#IDAT. "o6RUUS7ːV weY^CZN$4l"VaBkhB6NHN1yQ/[I*!s({\4 J-rzm&VpuM iuz&5t:4CZ =r+b?.epV"i,^CZn6XNK說؝~H+9--rwB rVI䴿h$8>29qi}dkh"tJZ촞&j9MBa.ծr#;֜秗'ޘ `XIiOO*!"iF݋ƽCW"z,ii<Üj~Z"|&RCw4004_YYk|לw^k$4$לv8}dnBgiCH$& IiREH!œ& a}iFH-& y#6i~І9MBAҏ$Ih8Bz9MBk,Ih8Bځ9]eUU$4 `9,FTOpXKs##st9i:+s(BڟsBڣr,iipƜ&!$4#B:orZ:!Χ9$:-bFH.Ih7Ж&m?`uIENDB`rivet-2.3.5/doc/examples/vars.rvt000644 001750 001750 00000002317 11754433456 016430 0ustar00mxmmxm000000 000000 $err " } } else { puts "Thanks for the information!" ?>
Title:
Boss:
Salary:
Skills:
rivet-2.3.5/src/channel/rivetChannel.h000644 001750 001750 00000001076 12367742542 017330 0ustar00mxmmxm000000 000000 #ifndef _RIVET_CHANNEL_H_ #define _RIVET_CHANNEL_H_ /* Functions for mod_dtcl Tcl output channel .*/ #include "mod_rivet.h" extern int closeproc(ClientData, Tcl_Interp *); extern int inputproc(ClientData, char *, int, int *); extern int outputproc(ClientData, char *, int, int *); extern int setoptionproc(ClientData, Tcl_Interp *, char *, char *); /* extern int getoptionproc(ClientData, Tcl_Interp *, char *, Tcl_DString *); */ extern void watchproc(ClientData, int); extern int gethandleproc(ClientData, int, ClientData *); extern Tcl_ChannelType RivetChan; #endif rivet-2.3.5/rivet/packages/session/session-create-mysql.sql000644 001750 001750 00000001773 12043502774 023534 0ustar00mxmmxm000000 000000 -- -- Define SQL tables for session management code -- -- Author: Arnulf (minor changes by Massimo Manghi) -- -- 02 May 2006 -- DROP TABLE IF EXISTS `rivet_session`; create table rivet_session ( ip_address varchar(16) default NULL, session_start_time datetime default NULL, session_update_time datetime default NULL, session_id varchar(64) NOT NULL default '', PRIMARY KEY (session_id) ) ENGINE=INNODB; DROP TABLE IF EXISTS `rivet_session_cache`; create table rivet_session_cache( session_id varchar(128) default NULL, package_ varchar(64) default NULL, key_ varchar(128) default NULL, data varchar(255) default NULL, UNIQUE KEY riv_sess_cache_ix( session_id, package_, key_ ), KEY rivet_session_cache_idx (session_id), FOREIGN KEY (session_id) REFERENCES rivet_session(session_id) ON DELETE CASCADE ) ENGINE=INNODB; -- create index rivet_session_cache_idx ON rivet_session_cache( session_id ); rivet-2.3.5/rivet/packages/dio/000755 001750 001750 00000000000 13200157764 016005 5ustar00mxmmxm000000 000000 rivet-2.3.5/rivet/packages/commserver/commserver.tcl000644 001750 001750 00000002714 10016623143 022275 0ustar00mxmmxm000000 000000 # commserver.tcl -- # This forks off an external server process with 'comm' loaded in it, # for use as an IPC system. # Copyright 2003-2004 The Apache Software Foundation # 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. # $Id: commserver.tcl 265377 2004-02-24 10:24:35Z davidw $ package provide commserver 0.1 namespace eval ::commserver { set Port 35100 set scriptlocation [info script] set wait 5 } proc ::commserver::start {} { variable Port variable scriptlocation variable wait # Attempt to launch server. exec [info nameofexecutable] \ [file join [file dirname $scriptlocation] server.tcl] $Port & set starttime [clock seconds] # If we don't get a connection in $wait seconds, abort. while { [clock seconds] - $starttime < $wait } { if { ![catch { comm::comm send $Port { puts stderr "Commserver server started on $Port" } }] } { return } } error "Connection to $Port failed after $wait seconds of trying." }rivet-2.3.5/tests/docroot1/beforescript.tcl000644 001750 001750 00000000233 11670231317 020404 0ustar00mxmmxm000000 000000 # beforescript.tcl -- beforescript for tests # $Id: beforescript.tcl 1212149 2011-12-08 21:57:35Z mxmanghi $ set ::beforescript1 1 puts "beforescript1" rivet-2.3.5/src/channel/rivetChannel.c000644 001750 001750 00000006112 12367742542 017317 0ustar00mxmmxm000000 000000 /* rivetChannel.c -- describes the mod_rivet Tcl output channel. */ /* Copyright 2002-2004 The Apache Software Foundation 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. */ /* Rivet config */ #ifdef HAVE_CONFIG_H #include #endif #include "httpd.h" #include "http_config.h" #include "http_request.h" #include #include //#include "apache_request.h" #include "mod_rivet.h" #include "TclWeb.h" static int inputproc(ClientData instancedata, char *buf, int toRead, int *errorCodePtr) { return EINVAL; } /* This is the output 'method' for the Memory Buffer Tcl 'File' Channel that we create to divert stdout to. */ static int outputproc(ClientData instancedata, CONST84 char *buf, int toWrite, int *errorCodePtr) { mod_rivet_globals* rivet_module_globals = (mod_rivet_globals *)instancedata; rivet_server_conf *rsc = rivet_module_globals->rsc_p; rivet_interp_globals *globals = Tcl_GetAssocData(rsc->server_interp, "rivet", NULL); TclWeb_PrintHeaders(globals->req); if (globals->req->content_sent == 0) { ap_rwrite(buf, toWrite, globals->r); ap_rflush(globals->r); } return toWrite; } static int closeproc(ClientData instancedata, Tcl_Interp *interp) { return 0; } static int setoptionproc(ClientData instancedata, Tcl_Interp *interp, CONST84 char *optionname, CONST84 char *value) { return TCL_OK; } static void watchproc(ClientData instancedata, int mask) { /* not much to do here */ return; } static int gethandleproc(ClientData instancedata, int direction, ClientData *handlePtr) { return TCL_ERROR; } Tcl_ChannelType RivetChan = { "apache_channel", /* typeName */ TCL_CHANNEL_VERSION_4, /* channel type version */ closeproc, /* close proc */ inputproc, /* input proc */ outputproc, /* output proc */ NULL, /* seek proc - can be null */ setoptionproc, /* set option proc - can be null */ NULL, /* get option proc - can be null */ watchproc, /* watch proc */ gethandleproc, /* get handle proc */ NULL, /* close 2 proc - can be null */ NULL, /* block mode proc - can be null */ NULL, /* flush proc - can be null */ NULL, /* handler proc - can be null */ NULL, /* wide seek proc - can be null if seekproc is*/ NULL /* thread action proc - can be null */ }; rivet-2.3.5/rivet/packages/dio/sql.tcl000644 001750 001750 00000021602 12337403536 017312 0ustar00mxmmxm000000 000000 # sql.tcl -- SQL code generator # Copyright 2002-2004 The Apache Software Foundation # 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. # This class provides a way to abstract to some extent the # SQL code generation. It's supposed to provide a bridge to # different implementation in various backends for specific # functionalities # # $Id: sql.tcl 1596885 2014-05-22 14:19:10Z mxmanghi $ package require Itcl ### catch { ::itcl::delete class ::DIO::Sql } ### namespace eval ::Aida { proc generator {backend} { } ::itcl::class Sql { public variable backend public variable what public variable table constructor { backend } { } private method where_clause {where_arguments} public method build_select_query {table row_d} public method quote {field_value} protected method field_value {table_name field_name val} { return "'[quote $val]'" } public method build_insert_query {table row_d} public method build_update_query {table row_d} } # -- build_insert_query # # ::itcl::body Sql::build_insert_query {table row_d} { set vars [dict keys $row_d] foreach field $vars { lappend vals [$this field_value $table $field [dict get $row_d $field]] } return "INSERT INTO $table ([join $vars {,}]) VALUES ([join $vals {,}])" } # -- build_update_query # # ::itcl::body Sql::build_update_query {table row_d} { foreach field [dict keys $row_d] { lappend rowfields "$field=[field_value $table $field [dict get $row_d $field]]" } return "UPDATE $table SET [join $rowfields {,}]" } # build_where_clause # # ::itcl::body Sql::where_clause {where_expr} { set sql "" for {set i 0} {$i < [llength [dict keys $where_expr]]} {incr i} { set d [dict get $where_expr $i] set col [dict get $d column] set op [dict get $d operator] if {$i > 0} { append sql " [dict get $d logical]" } switch $op { "eq" { set sqlop "=" } "ne" { set sqlop "!=" } "lt" { set sqlop "<" } "gt" { set sqlop ">" } "le" { set sqlop "<=" } "ge" { set sqlop ">=" } "notnull" { append sql " $col IS NOT NULL" continue } "null" { append sql " $col IS NULL" continue } } set predicate [dict get $d predicate] if {[::string first {%} $predicate] != -1} { append sql " $col LIKE [$this field_value $table $col [[string range $predicate 1 end]]" } else { append sql " $col$sqlop[$this field_value $table $col $predicate]" } } return $sql } # # quote - given a string, return the same string with any single # quote characters preceded by a backslash # ::itcl::body Sql::quote {field_value} { regsub -all {'} $field_value {\'} field_value return $field_value } # build_select_query - build a select query based on given arguments, # which can include a table name, a select statement, switches to # turn on boolean AND or OR processing, and possibly # some key-value pairs that cause the where clause to be # generated accordingly ::itcl::body Sql::build_select_query {args} { set bool AND set first 1 set req "" set table $from_table set what "*" set parser_st state0 set condition_count 0 set where_expr [dict create] # for each argument passed us... # (we go by integers because we mess with the index depending on # what we find) #puts "args: $args" for {set i 0} {$i < [llength $args]} {incr i} { # fetch the argument we're currently processing set elem [lindex $args $i] # puts "cycle: $i (elem: $elem, status: $parser_st, first: $first)" switch $parser_st { state0 { switch -- [::string tolower $elem] { # -table and -select don't drive the parser state machine # and whatever they have as arguments on the command # line they're set "-table" { # -table -- identify which table the query is about set table [lindex $args [incr i]] } "-select" { # -select - set what [lindex $args [incr i]] } "-or" - "-and" { if {$first} { return -code error "$elem can not be the first element of a where clause" } else { incr condition_count dict set where_expr $condition_count logical [string range $elem 1 end] set parser_st where_op } } default { if {[::string index $elem 0] == "-"} { if {!$first} { incr condition_count } dict set where_expr $condition_count column [string range $elem 1 end] set first 0 set parser_st where_op } else { return -code error "Error: expected -" } } } } where_op { switch -- [string tolower $elem] { "-lt" - "-gt" - "-ne" - "-eq" { dict set where_expr $condition_count operator [string range $elem 1 end] set parser_st cond_predicate } "-null" - "-notnull" { dict set where_expr $condition_count operator [string range $elem 1 end] set parser_st state0 } default { if {[::string index $elem 0] == "-"} { dict set where_expr $condition_count column [string range $elem 1 end] } else { dict set where_expr $condition_count operator "eq" dict set where_expr $condition_count predicate $elem set parser_st state0 } } } } cond_predicate { switch -- [string tolower $elem] { "-expr" { dict set where_expr $condition_count predicate [lindex $args [incr i]] } default { # convert any asterisks to percent signs in the # value field regsub -all {\*} $elem {%} elem dict set where_expr $condition_count predicate $elem } } set parser_st state0 } default { return -code error "invalid parser status" } } } set sql "SELECT $what from $table WHERE[$this where_clause $where_expr]" return $sql } } rivet-2.3.5/ChangeLog000644 001750 001750 00000557252 13201433217 014104 0ustar00mxmmxm000000 000000 2017-11-11 Massimo Manghi * : releasing as 2.3.5 2017-11-06 Massimo Manghi * tests/virtualhost.test,channel.test: fixed stanzas that caused these tests to fail in certain cases because the Host: header wasn't interpreted correctly 2017-10-29 Massimo Manghi * win/: removing obsolete directory for windows support * rivet/init.tcl: recreated from init.tcl.in * VERSION: new version 2.3.5 2017-10-24 Massimo Manghi * rivet/packages/dio/dio_Mysql.tcl: handling special field NULL 2017-10-13 Massimo Manghi * rivet/init.tcl.in: Following Jeff Lawson's suggestion we check if init.tcl is loaded from within mod_rivet. If we're not running from it we don't divert the [exit] command * tcl/rivet-tcl/redirect.tcl: now handling generic boolean arguments or any integer > 0 (as for the HTTP status codes) * src/librivet/rivetWWW.c: fixed subtle buffer overflow with sprintfn 2017-08-08 Massimo Manghi * src/apache-2/mod_rivet.c: implementing check on post_config hook calling Rivet_InitHandler. This avoids the module initialization to run twice but only on the second time the hook is called * configure.ac: bumping version number to 2.3.5 2017-08-03 Massimo Manghi * .: releasing as 2.3.4 2017-07-27 Massimo Manghi * src/librivet/rivetWWW.c: Doubling the size of chunks allocated for the buffer in Rivet_EscapeSgmlCharsCmd (6 chars) and setting the chunk size in Rivet_EscapeStringCmd back to the original size (3 chars) (closes bug #61353) 2017-07-20 Massimo Manghi * rivet/packages/formbroker/formbroker.tcl: now using Tcl [string is boolean ...] 2017-07-19 Massimo Manghi * doc/xml/intro.xml: better wording of the ::rivet::catch illustration in the manual introduction 2017-06-09 Massimo Manghi * doc/xml/: more documentation fixing 2017-05-15 Massimo Manghi * src/apache-2/mod_rivet.c: server root interpreter needs to re-seed the random number generator 2017-04-19 Massimo Manghi * doc/xml/directives.xml: fixed typo * VERSION,configure.ac: bumping version number to 2.3.4 * doc/xml/formbroker.xml: various corrections 2017-02-10 Massimo Manghi * rivet/packages/formbroker/formbroker.tcl: now handling natively also boolean in the form y|n or 0|1 2016-12-07 Massimo Manghi * rivet/packages/session/session-class.tcl: fully qualifying ::rivet::* command names in this packages. Add method 'stash' to store form data in the session cache * rivet/packages/session/form*.tcl: fully qualifying ::rivet::* command names in this packages * src/librivet/rivetWWW.c: new buffer size allocation to prevent apache from crashing when too many characters needing escaping are in a string 2016-11-28 Massimo Manghi * .: releasing rivet 2.3.3 2016-11-17 Massimo Manghi * rivet/packages/dio/dio_Postgresql.tcl: applied consistent single quote character handling by calling PgTcl function pg_quote (closes bug #60378) * rivet/packages/formbroker/formbroker.tcl: fixed bug in method response. Package version number bumped up to 1.0 * doc/xml/formbroker.xml: first draft of the manual page of package formbroker with example of implementation of a validator * contrib/validate_mac.tcl: add example of a validator * doc/xml/commands.xml: fixed typo in ::rivet::xml manual page 2016-11-15 Massimo Manghi * rivet/rivet-tcl/catch.tcl|try.tcl: better script evaluation is catch/try construct, specified complete ::rivet::abort_page generated error codes * rivet/packages/formbroker/formbroker.tcl: add package formbroker * doc/xml/formbroker.xml,asciiglyphs.xml: add documentation for packages formbroker and asciiglyphs 2016-11-09 Massimo Manghi * src/mod_rivet/mod_rivet_common.c: the request_rec field to be checked in order to determine whether we are serving the request is 'header' non 'content_type'. This bug didn't surface because their set to the same string when a request is handed to the module chain, but it's been around ever since. * VERSION,configure.ac: version set to 2.3.3 2016-09-21 Massimo Manghi * Changelog: logging release of this artifact as rivet 2.3.2 2016-09-19 Massimo Manghi * rivet/rivet.tcl.in,rivet.tcl: fixed errors in comments 2016-09-13 Massimo Manghi * INSTALL: correct version number * doc/commands.xml: Documenting new ::rivet::url_query command 2016-09-09 Massimo Manghi * tests/bailout.test: add tests for ::rivet::catch and ::rivet::try * tests/catch.rvt,try.rvt: script testing handling various conditions 2016-09-09 Massimo Manghi * tests/runtests.tcl: support for Apache 1.3 dropped. Add modules needed by Apache 2.4 * tests/apachetests/apachetests.tcl: Dropped support for Apache 1.3 * tests/shorthand.test: shorthand notation versioning added * tests/virtualhost.test: removed NameVirtualHost directive no longer supported 2016-09-08 Massimo Manghi * Changelog: removed spurious duplicated entry * rivet/rivet-tcl/try.tcl: enable Id svn keyword * rivet/rivet-tcl/catch.tcl: fixed wrong script invocation, enable Id svn keyword * rivet/rivet-tcl/url_query.tcl: add new command ::rivet::url_query 2016-09-07 Massimo Manghi * rivet/rivet-tcl/catch.tcl: fixed argument management in ::catch call 2016-07-14 Massimo Manghi * doc/xml/intro.xml: amended wrong section title in introduction 2016-07-06 Massimo Manghi * doc/xml/commands.tcl: typo in section ::rivet::xml corrected * rivet/packages/form/form2.tcl: merging recent fix of the select element generation * configure.ac,VERSION: changing version to 2.3.2 2016-06-16 Massimo Manghi * doc/xml/commands.xml: manual page for ::rivet::catch rewritten * Changelog: entry for 2.3.1 release corrected (the date was quite incidentally postponed to 16 June, thus exactly today) 2016-04-16 Massimo Manghi * .: released as 2.3.1 2016-04-13 Massimo Manghi * VERSION,configure.ac: version number set to 2.3.1 2016-04-05 Massimo Manghi * rivet/packages/form/form.tcl: wrong element created by 'file' method * doc/xml/examples.xml: conflicting targets fixed 2016-04-04 Massimo Manghi * doc/rivet.xml: Add 2016 to copyright notice 2016-03-26 Massimo Manghi * .: Relased as 2.3.0 2016-03-18 Massimo Manghi * tclconfig/: reverting to previous release 2016-03-17 Massimo Manghi * tclconfig/tcl.m4,install-sh,ltmain.sh,libtool.m4: updating autotools and libtool macros to the latest versions available 2016-03-07 Massimo Manghi * src/parser/rivetParser.c: Add Apache 2.0 mandatory copyright notice. removed unneed inclusion of config.h (cruft left over since many years) 2016-02-26 Massimo Manghi * rivet/packages/asciiglyphs.tcl: merging changes done in trunk 2015-12-14 Massimo Manghi * rivet/packages/asciiglyphs/asciiglyphs.tcl: removed debugging lines 2015-12-09 Massimo Manghi * rivet/packages/asciiglyphs.tcl: character selection mechanism amended * doc/xml/commands.xml: documenting ::rivet::try 2015-12-07 Massimo Manghi * rivet/packages/asciiglyphs/asciiglyphs.tcl: new file renamed after hexglyphs.tcl which now prints more than the hexadecimal character set 2015-12-05 Massimo Manghi * rivet/rivet-tcl/try.tcl: new command ::rivet::try wraps core same command to trap ::rivet::abort_code and ::rivet::exit interruptions * rivet/rivet-tcl/catch.tcl: using [uplevel] to control Tcl core [catch] command (as it's been customary with Tcl ever since) * rivet/init.tcl: modified to remove ::rivet::try from the export list 2015-12-02 Massimo Manghi * doc/images/*.png, doc/rivet.css: styles and navigation items color changed to mark the difference with Rivet 2.2 and Rivet 2.1 * doc/xml/commands.xml,intro.xml: new commands ::rivet::exit and ::rivet::catch documented * rivet/init.tcl: new version 2.3 of package Rivet 2015-11-27 Massimo Manghi * VERSION,configure.ac: version number increased to 2.3.0 2015-11-25 Massimo Manghi * src/rivet.h: add macro RIVET_EXPORT_COMMAND (wraps Tcl_Export) * src/librivet/rivet[WWW|List|Crypt].c: proper way to put these commands on the export list * src/rivetcmds/rivetCore.c: Commands are now put explicitly on the export list (if build with --enable-rivet-commands-export) * rivet/init.tcl: removed -force switch when importing the ::rivet command set. Rationalization of Tcl commands export list * doc/xml/command.xml: add manual page for ::rivet::exit * tests/bailout.test: add test for bailout commands ::rivet::abort_page and ::rivet::exit * configure.ac: add INIT_VERSION symbol substitution 2015-11-21 Massimo Manghi * src/rivetcmds/rivetCore.c: return EXITPAGECODE when ::rivet::exit is called.Add [::rivet::abort_page -exiting] exit condition detection 2015-11-20 Massimo Manghi * rivet/rivet-tcl/catch.tcl: new command [::rivet::catch ...] wraps the core command but returns an error anyway if raised by either [::rivet::abort_page] or [::rivet::exit] 2015-11-18 Massimo Manghi * rivet/packages/hexglyphs/hexglyphs.tcl: now printing the whole alphabet and some puntuation character * src/rivetcmd/rivetCore.c: Implementing command exit * src/apache-2/mod_rivet.c: New command ::exit required the flag exit_process be checked to see if a child process must exit and also to treat exit like an ::rivet::abort_page invocation that eventually causes the process to go away. Abort page conditions now checked through flag abort_page * rivet/init.tcl.in: now reimplementing the core command exit 2015-10-21 Massimo Manghi * rivet/packages/hexglyphs/hexglyphs.tcl: package to create ASCII art glyphs of hexadecimal characters 2015-09-09 Massimo Manghi * src/apache-2/mod_rivet.c: We don't delete the Tcl interpreter anymore, we just let the process exit do the cleanup. 2015-07-29 Massimo Manghi * src/apache-2/mod_rivet.c: someone noticed the handler was registered as APR_HOOK_LAST instead APR_HOOK_MIDDLE as recommended by the specifications 2015-07-27 Massimo Manghi * src/apache-2/mod_rivet.c: add more comments, improved code readability in Rivet_CreateTclInterp 2015-06-21 Massimo Manghi * VERSION: new version 2.2.4 * configure.ac: changing version to 2.2.4, definition of config.h variable RIVET_CONFIGURE_CMD carring the configure full command that prepared the build of the module * src/apache-2/mod_rivet.c: Improved readability of code in Rivet_ChildHandlers. Add RIVET_CONFIGURE_CMD to 'server' array 2015-06-03 Massimo Manghi * doc/rivet.css: changing selector for namespace table as DocBook seems not to honor the id attribute anymore * doc/xml/request.css: changing the id "namespaces" as class 2015-05-21 Massimo Manghi * doc/xml/installation.html: wrong links fixed 2015-05-05 Massimo Manghi * src/apache-2/mod_rivet.c: New procedures Rivet_PrintErrorMessage and Rivet_ExecuteErrorHandler. Error handling generalized and Tcl status returned by Tcl_EvalObjEx is propagated by Rivet_ExecuteAndCheck to interrupt execution even when an error occurs or abort_page is called from a nested template. Flag globals->page_aborting is used to prevent error loggin because ::rivet::abort_page is called. Therefore globals->page_aborting is reset when a real error occurs (closes bug #57501) 2015-04-26 Massimo Manghi * VERSION,configure.ac: changing version to 2.2.3 looking ahead for a future release 2015-04-22 Massimo Manghi * doc/xml/internals.xml: replaced reference to the old configure.tcl script and replaced with up-to-date directions on how to build with the debugger using the current autotools based scripts 2015-04-16 Massimo Manghi * docs/xml/install.xml: removed documentation for obsolete configure switch --with-apache-version 2015-03-28 Massimo Manghi * INSTALL: update installation and configuration examples 2015-03-11 Massimo Manghi * doc/xml/internals.xml: Improved paragraph on how to extend mod_rivet * src/apache-2/mod_rivet.c: Improper handling of 'HTTP_NOT_FOUND' and HTTP_INTERNAL_SERVER_ERROR caused an access to non existing memory (Bug #57686) 2015-02-20 Massimo Manghi * INSTALL: installation instructions update * VERSION: new version 2.2.2 * configure.ac: new version 2.2.2 2015-02-06 Massimo Manghi * src/apache-2/mod_rivet.c: moving execution of after_every_script before request cleanup (still a null procedure, but just in case we give it something to do) 2015-02-02 Massimo Manghi * src/rivetcmds/rivetCore.c: in Rivet_Parse returned value of Rivet_ParseExecFile is propagated up to the caller. Probably unnecessary now, but just in case we want to have special handling of TCL_CONTINUE or TCL_BREAK (bug #57501) * src/apache-2/mod_rivet.c: moving call to after_every_script out of Rivet_ParseExecFile and into Rivet_SendContent. Any call to ::rivet::abort_page is now trapped by AbortScript (bug #57501) * src/config/TclWebapache.c: if charset is set in the configuration then it's set in the headers just before HTTP headers are sent (moved from mod_rivet.c) 2015-01-12 Massimo Manghi * tests/redirect.test,channel.test: adding tests for new features of Rivet 2.2.1 2015-01-08 Massimo Manghi * doc/xml/commands.xml: documenting the ::rivet::redirect command * doc/xml/directives.xml: add SeparateChannels directive documentation * src/rivetcmds/rivetInspect.c: add handling of SeparateChannels/separate_channels configuration flag 2015-01-06 Massimo Manghi * src/apache-2/mod_rivet.c: handling separate_channel flag to create virtual host specific Rivet channels * src/config/apache_config.c: handling SeparateChannels configuration directive 2015-01-05 Massimo Manghi * configure.ac: adding macro APU_HANDLING for OS where apr-utils have a different installation directory * src/Makefile.am: new macro symbols APU_INCLUDES and APU_CFLAGS 2014-12-22 Massimo Manghi * tests/headers.test: add test for command 'headers get' * src/Tclweb.h: new definition for functions TclWeb_OutputHeaders[Set|Get] * src/config/Tclwebapache.h: New functions TclWeb_OutputHeaders[Set|Get] * src/rivetcmds/rivetCore.c: new subcommand '::rivet::headers get' * tclconfig/libtool.m4: new script for libtool 2014-12-18 Massimo Manghi * rivet/rivet-tcl/redirect.tcl: adding Damon's redirect command based on direct manipulation of the headers * src/rivetcmds/rivetCore.c: adding command [::rivet::headers sent] providing basic introspection for the I/O buffer internal status * src/apache-2/mod_rivet.c: moving Tcl_Flush from Rivet_ExecuteAndCheck to the very end of Rivet_SendContent, avoiding multiple calls in case ::rivet::parse is called. * src/experimental: removing it from this branch. Threaded code will be developed in trunk for rivet 2.3 2014-08-04 Massimo Manghi * configure.ac: adding support for --with-rivet-channel switch for alternate implementations of a Rivet Tcl channel * src/: further modularized to make refactoring a bit easier. But it's still the code we released as 2.2.0 2014-07-14 Massimo Manghi * src/experimental/mod_rivet.c: working toy module capable of running Tcl scripts with a worker MPM * src/experimental/rivetChannel.c: now depending on the thread private data 2014-07-17 Massimo Manghi * src/channel/rivetChannel.[c|h]: add preprocessor symbol to prevent multiple includes 2014-07-16 Massimo Manghi * src/experimental: add experimental code for threaded module 2014-07-10 Massimo Manghi * src/apache-2/apache_config.[h|c]: moved to src/config * src/apache-2/TclWebapache.c: this file moved temporarily into src/config to separate it from the specific module implementation * src/experimental: making room to a new implementation of mod_rivet * src/channel/rivetChannel.c: the request_rec pointer is passed through another pointer as this channel is now the only channel handled by mod_rivet and it's shared across virutal hosts * src/apache-2/mod_rivet.c: now creating only one Rivet channel instance and storing a pointer to the current request_rec in the structure mod_rivet_globals, as the running the prefork MPM we can only handle a request at a time. * src/apache-2/*.tcl: removing obsolete tcl files 2014-07-09 Massimo Manghi * m4/ax_split_version.m4: adding macro for version number manipulation 2014-06-22 Massimo Manghi * configure.ac: new macros MOD_RIVET_CORE and RIVET_CHANNEL. Macro APACHE_VERSION preserved but not called anymore * rivet/init.tcl.in: Add template for rivet/init.tcl * src/Makefile.am: building mod_rivet with code entirely selected by autoconf defined symbols * src/apache-2/mod_rivet.c: comments added. Rivet package version depends now on preprocessor symbol RIVET_TCL_PACKAGE_VERSION 2014-06-10 Massimo Manghi * tests/rivet.test: removed lang.test as it was testing just a tautology 2014-06-04 Massimo Manghi * doc/images/color-table.png, doc/xml/examples.xml,doc/examples/color-table-tcl: Changing old table.rvt example in a more enticing colorful table generation 2014-06-03 Massimo Manghi * 2.2/: merging changes from trunk * doc/xml/intro.xml: Acknowledgements reworded into a list * doc/images/: logo has now a transparent background, navigation icons colors turned into a greenish tint * rivet.xsl,rivet.css: new style based on a green gamut to make pages visually different from Rivet 2.1 2014-06-02 Massimo Manghi * VERSION,configure.ac: tagging this code as 2.2.0 * src/rivet.h,src/rivetcmds/rivetCore.c: macro CHECK_REQUEST_REC moved from rivetCore.c to rivet.h * doc/xml/internals.xml: New section documenting how to extend mod_rivet with new commands written in C 2014-05-22 Massimo Manghi * rivet/packages/dio/aida.sql: redifining responsability of class Aida (not to be officially released) 2014-04-17 Massimo Manghi * src/: reintegrating modularization branch. Now every subsystem mod_rivet is made of (module, channel, parser, commands, request multipart handling) can be developed separately * src/rivetcmds/rivetCore.c: reintroduced handling of the -string argument that disappeared from Rivet_ParseCmd probably because of the merge with modular. * src/apache-2/mod-rivet.c: Corrected comments to Rivet_ParseExecString 2014-04-16 Massimo Manghi * rivet/packages/dio/aida.tcl,dio_Tdbc.tcl,sql.tcl: more methods implemented in aida.tcl * doc/xml/commands.xml: new form '::rivet::inspect server' documented * src/rivetcmds/rivetInspect.c: adding is_virtual flag to dictionary returned by '::rivet::inspect server' * branches/modular: merging latest changes in trunk * trunk/src/rivetcmds/rivetInpect.c: adding is_virtual flag to dictionary returned by '::rivet::inspect server' 2014-04-11 Massimo Manghi * src/rivetcmds/rivetCore.c: misplaced check on request_rec in Rivet_InspectCmd * tests/failtest.tcl,failtest.test,checkfail.tcl: adding tests for ::rivet::inspect 2014-04-07 Massimo Manghi * tests/failtest.[test|tcl],failcheck.tcl: implementing test for consistent error handling by commands that are supposed to refuse execution outside of a request processing * tests/inspect.tcl: implementing test of command '::rivet::inspect script' * src/rivetcmds/rivetCore.c: typo in command ::rivet::apache_table 2014-04-04 Massimo Manghi * tests/failtest.tcl,failtest.test,checkfail.tcl: adding script for commands that must fail outside of a request processing (to be completed) * src/rivetcmds/rivetCore.c: comment rephrased 2014-03-30 Massimo Manghi * src/rivetcmds/rivetInspect.c: Add function Rivet_CurrentServerRec returning a dictionary of some field values stored in the server_rec object * src/rivetcmds/rivetCore.c: Add support for 'server' argument returning the dictionary built by Rivet_CurrentServerRec * src/TclWeb.h: adding declaration of function constructor of a TclWebRequest object * src/apache-2/TclWebapache.c: Add functions TclWeb_NewRequestObject and TclWeb_InitRequest to reinitialize a TclWebRequest object on each request * src/apache-2/apache_request.[c|h]: API change for ApacheRequest_new taking now an apr_pool_t object instance for creating an ApacheRequest oject pointer. Task to reset this object to initial values is now delegated to ApacheRequest_init. * src/apache-2/mod_rivet.[c|h]: new field in globals stores the current server_rec object pointer. This pointer is used in RivetInspect.c to access to field of the object for introspection 2014-03-26 Massimo Manghi * doc/xml/commands.xml: wrong example for lassign_array corrected * src/apache-2/mod_rivet.c: Adding comment explaining the meaning of setting/resetting globals->r as a way to detect if a script is running in the context of a request processing * src/rivetcmds/rivetCore.c,rivetInspect.c: Tcl object handling improved. Code simplified and ap_assert call added in Rivet_CurrentConfDict if there is no handling of a configuration parameter by Rivet_ReadConfParameter (which should never happen) * configure.ac, VERSION: version number bumped to 2.1.5 2014-03-16 Massimo Manghi * doc/images/Rivetlogo_small.png: removed because already in doc/ and duplicate to home.png 2014-02-28 Massimo Manghi * doc/xml/upgrading.xml: Adding Karl's note about upgrading from NeoWebScript 2014-02-24 Massimo Manghi * doc/xml/commands.xml: completed reworking of manual page for command ::rivet::inspect. * .: Preparing RC1 archive for version 2.1.4 2014-02-22 Massimo Manghi * doc/xml/commands.xml: further elaboration of the section about command ::rivet::inspect 2014-02-21 Massimo Manghi * tests/inspect.[test|tcl]: adding tests for introspection command 2014-02-19 Massimo Manghi * src/rivetcmds/rivetCore.c: spurious ref count decrement caused random crashes * src/rivetcmds/rivetInspect.c: fixed behaviour when inspect is passed with an undefined argument value * configure.ac: reindented some function to improve readability and editor independence 2014-02-19 Massimo Manghi * src/rivetcmds/rivetInspect.c,src/librivet/rivetList.c: removing lines of code commented and unused * doc/xml/commands.xml: documenting command lremove * tests/rivetlib.test: adding more tests for lremove 2014-02-11 Massimo Manghi * tests/rivetlib.test: adding tests for rivetlib * rivet/packages/dio/aida.tcl,sql.tcl: new files for development of DIO compatible interface to tdbc * rivet/rivet-tcl/lassign_array.tcl: removed since already provided in rivetlib * docs/xml/commands.xml: documenting features of lassign_array.tcl rivetlib version 2014-02-06 Massimo Manghi * ChangeLog: timestamps of latest entries of this file carried the wrong year (2013) * rivet/packages/dio/dio_Mysql.tcl: fixed comment lines placed within the switch construct that have become incompatibile with Tcl8.6. * configure.ac: add AC_C_INLINE macro 2014-02-04 Massimo Manghi * src/rivetcmd/rivetCore.c: testing globals->r against NULL and in case return a null string * src/apache-2/mod_rivet.c: using only globals->r to flag a request processing under way 2014-02-03 Massimo Manghi * src/apache-2/mod_rivet.c: globals->req had to be set to NULL in Rivet_PerInterpInit! 2014-02-02 Massimo Manghi * src/apache-2/mod_rivet.[c|h]: further optimizing code avoiding to allocate a TclWebRequest structure on every request. This structure is allocate when the interpreter is initialized and a pointer stored in rivet globals * src/rivetcmd/rivetInspect.c: impoved consistence if Tcl objects handling 2014-01-30 Massimo Manghi * src/apache-2/mod_rivet.c: this ChangeLog entry is meant to amend the 2014-01-27 entry that missed to point out as small still important change in mod_rivet.c. Rivet_SendContent is not calling Tcl anymore to coax command 'info script' to return the current Rivet script full path. This will soon be solved by adding a new functionality to command '::rivet::inspect' 2014-01-27 Massimo Manghi * src/apache-2/apache_config.[c|h]: new file with Apache module configuration procedures moved here from mod_rivet.c. This code is likely to be Apache 2.x but totally independent from the running MPM. Therefore it was moved here to improved size and manageability of mod_rivet.c * src/apache-2/mod_rivet.c: The module central code, from which configuration handling procedures were removed 2014-01-08 Massimo Manghi * rivet/packages/dio/aida.tcl: adding aida.tcl experimental file for a DIO compatible interface to TDBC. * rivet/packages/dio/sql.tcl: now able to produce same basic SQL queries ::DIO::Database class is doing now 2013-12-19 Massimo Manghi * rivet/packages/dio/dio_Postgresql.tcl: reindented and tabs converted to spaces * rivet/packages/dio/sql.tcl: class DIO::Sql now returning basic SELECT SQL statements 2013-12-18 Massimo Manghi * rivet/packages/dio/sql.tcl: further developments. Class Sql is now able to build an abstract representation of a SELECT query * rivet/packages/dio/dio.tcl: typo in a comment 2013-12-16 Massimo Manghi * rivet/packages/dio/sql.tcl: trying to redesign rivet in order to comply with Tdbc and aiming at making DIO a pure interface to Tdbc dropping the dependency with DBMS specific drivers 2013-12-13 Massimo Manghi * rivet/packages/dio/dio_Tdbc.tcl: first version of Tdbc driver for DIO. This class is able to execute basic queries and needs further development 2013-12-08 Massimo Manghi * configure.ac: version number bumped up to 2.1.4 2013-12-06 Massimo Manghi * rivet/packages/dio/dio_Postgres.tcl: minor changes (code indentation revised) * rivet/packages/dio/dio_Tdbc.tcl: experimental support for the tdbc abstraction library * doc/xml/install.xml: the manual still suggested to call make install-packages, whereas 'make install' does everything now as it was before 2.1.2 2013-12-04 Massimo Manghi * src/apache-2/apache_request.c: log message in ApacheRequest___parse() commented out (Bug #55845) 2013-12-03 Massimo Manghi * src/apache-2/mod_rivet.c: Rivet template preprocessor symbols renamed in the more expressive RIVET_TEMPLATE and RIVET_TCLFILE * rivet/rivet-tcl/lassing_array.tcl: new command lassing_array taken from DIO's result set class (inspired by Tclx) * doc/xml/commands.xml: lassign_array documented in the manual * rivet/packages/dio/dio.tcl: reformatted during analysis for supporting tdbc based driver 2013-11-04 Massimo Manghi * src/Makefile.am: this Makefile.am is now in charge for building mod_rivet librivet.so and librivetparser.so. This fixes and problem with the 'distclean' target and keeps us from further customization of automake (subdir-objects property) * src/runtests.tcl: changed path to mod_rivet.so and librivetparser.so 2013-10-15 Massimo Manghi * src/rivetcmds/rivetCore.c: 'headers redirect' used to return TCL_RETURN to force the caller to terminate and interrupt the processing. It didn't actually worked exactly that way and starting with Tcl 8.6.1 it also failed returning a Tcl invalid error code (Bug #55583). Turning it into TCL_OK seems to cure the problem 2013-09-26 Massimo Manghi * doc/xml/session.xml: fixed code example indentation * rivet/packages/calendar.xml: fixed class and tag for calendar banner 2013-09-23 Massimo Manghi * rivet/packages/calendar/calendar.tcl: fixed zero length argument list calling method emit 2013-09-22 Massimo Manghi * modular: committing changes from last merge 2013-09-21 Massimo Manghi * contrib/tcl.vim: list of subcommands completed 2013-09-20 Massimo Manghi * contrib/tcl.vim: Vim's syntax highlighting extension including also rivet's command set (experimental) 2013-09-18 Massimo Manghi * rivet/init.tcl: removed paranoid debugging log messages 2013-09-17 Massimo Manghi * src/[parser|apache-2|librivet]/Makefile.am: AM_CPPFLAGS are not a transparent replacement for INCLUDES at least when a Makefile.am is in a subdirectory. Placing include directory switches in the target specific _CPPFLAGS variable 2013-09-15 Massimo Manghi * tclconfig/missing: new version of 'missing' taken from automake 1.14 * src/[parser|apache-2|librivet]/Makefile.am: depracated INCLUDES variables replaces with their recommended counterparts AM_CPPFLAGS * configure.ac: new message about the notifier failing to start in child processes after the child processes fork 2013-09-14 Massimo Manghi * rivet/packages/calendar/calendar.tcl: too restrictive test on Tcl versione fixed * rivet/rivet-tcl/parray_table.tcl: also the parray putting out an HTML table is now escaping SGML characters * INSTALL: new installation instruction amending the rejected installation approach done in 2.1.2 and restoring old target 'install' to get everything moved to their final directory * doc/xml/install.xml: same for INSTALL * doc/xml/commands.xml: new 'parse -string' form documented 2013-09-13 Massimo Manghi * rivet/packages/dio/dio_Mysql.tcl: attempting to correct detection of SELECT query by checking if a SELECT keyword exists at the beginning of query either following a '(' or only space characters (their trimmed away in any case) 2013-08-30 Massimo Manghi * rivet/rivet-tcl/parray.tcl: escaping SGML characters that might appear in the output to avoid cross scripting 2013-08-29 Massimo Manghi * branches/modular: merging latest changes from trunk 2013-08-26 Massimo Manghi * configure.ac: expanded warning message about broken implementations of Tcl when using forks and the event loop * Makefile.am: target 'install' now depends on targets install-binaries and install-packages, thus install the whole Rivet code as it did before 2.1.2. Packagers wanting to separated binary and Tcl code can draw on those 2 targets * INSTALL,doc/xml/install.xml: changed documentation to reflect the restored organization of install targets 2013-08-12 Massimo Manghi * rivet/packages/form/form2.tcl,form.tcl: form packages called Rivet's command '::rivet::env' in its unqualified form. Fixed adding the ::rivet namespace specification. * src/apache-2/rivetCore.c: errata corrige for entry added on 2013-07-19: command 'parse -string' superseded test command parsestr, thus removed from rivetCore.c 2013-08-07 Massimo Manghi * ./: merging changes done in trunk 2013-08-07 Massimo Manghi * src/apache-2/mod_rivet.c: adding MPM descripting fields to the 'server' array * configure.ac: warning message about Tcl version not supporting fork correctly moved to the end of configure.ac, so that it's more readable by the user 2013-08-06 Massimo Manghi * rivetcmds/rivetCore.c,rivetInspect.c: moved core commands into this new directory. Their code is (nearly) independent from Apache version and in future it might be shared between different versions/branches of the module * src/apache-2/Makefile.am: changed reference to rivetCore.c and rivetConf.c to their new position and new names * src/apache-2/mod_rivet.c: conditional compilation to Tcl_InitIdentifier might help preserving event loop on Unices where no pthreads_atfork call exists (Bug #55153) * configure.ac: Tcl version checked to detect when the notifier might not be working (Tcl < 8.5.15 and Tcl < 8.6.1). In case a warning message is printed 2013-07-19 Massimo Manghi * tests/parse.test,parsestring.rvt: adding test for 'parse -string' variant to Rivet command 'parse' 2013-07-17 Massimo Manghi * src/apache-2/mod_rivet.[h|c],rivetCore.c: reverting new command 'parsestr' and turning string parsing command into the support for the new -string modifier of the ordinary parse command 2013-07-06 Massimo Manghi * src/parser/parserPkgInit.c: commands are created through the RIVET_OBJ_CMD macro * rivet/packages/tclrivet/tclrivet.tcl: loading the rivetparser library caused weird side effects and the interpreter failed when this package was required by a script. It's still to be understood why librivetparser was loaded using command 'load' in tclrivet.tcl * src/apache-2/mod_rivet.c: reverting an attempt to include rivetparser as package required by default. 2013-07-05 Massimo Manghi * configure.ac: changed the default path for installation dir * doc/xml/commands.xml: add manual page for command ::rivet::xml 2013-06-28 Massimo Manghi * src/apache-2/mod_rivet.c,rivetCore.c: command 'parsestr' to parse templates stored in Tcl objects coded * doc/Makefile.am: 'clean' target made a little terser 2013-06-26 Massimo Manghi * Makefile.am: forcing install/unistall targets to recreate pkgIndex.tcl in order to have a coherent directory of packages actually available 2013-06-24 Massimo Manghi * INSTALL: It must be made explicit installation is a two stage operation now 2013-06-24 Massimo Manghi * rivet/packages/session/session-class.tcl: two new methods 'load' (loads a whole package data for a given package and session) and 'clear' (it deletes either a whole package or a single data like for a session) 2013-06-22 Massimo Manghi * src/apache-2/mod_rivet.c: cleanup of unused code in mod_rivet.c. Adding comments to undocumented functions * src/parser/rivetParse.c: New TODO comment added 2013-06-12 Massimo Manghi * Makefile.am: splitting install targets into 'make install' (mod_rivet.so, librivet.so,librivetparser.so + Tcl commands in rivet/rivet-tcl) and 'make install-packages' (whole content of rivet/packages), thus decoupling binary and non binary installs. Notice: 'make install' creates a fully functional install of Rivet in case packages such as 'form', 'session', 'DIO' aren't needed. * rivet/rivet-tcl/xml.tcl: Adding svn:keywords Id to svn properties * doc/xml/install.xml: updating manual to document the new installation command sequence 2013-06-04 Massimo Manghi * tclconfig/* : merging into this branch the latest commits done from trunk 2013-06-03 Massimo Manghi * tclconfig/[ltmain.sh,compile,depcomp]: more libtool scripts updated 2013-06-03 Massimo Manghi * src/parser/Makefile.am: adding include paths to INCLUDE * src/Makefile.am: Rivet library build moved to this script * src/librivet/Makefile.am: Rivet library build removed from this file 2013-06-02 Massimo Manghi * src/Makefile.am: including librivet.so build in this file * src/librivet/Makefile.am: kept for reference but without effective code now * tclconfig/[install-sh,config.sub,config.guess]: new versions for script used by the autoconf/automake/libtool toolchain 2013-05-24 Massimo Manghi * src/: branching trunk to branches/modular to reorganize mod_rivet in a way that should enable the development of single components (apache request, Rivet channel, parser) with minimal branching 2013-05-21 Massimo Manghi * src/apache-2/apache_request.c: ApacheRequest___parse further simplified and made less restrictive about the combination of method and mimetype of the request * src/apache-2/mod_rivet.c: add debug message in exit handler 2013-05-06 Massimo Manghi * src/apache-2/rivetCore.c: call to 'panic' changed to fulfill the hardening flags that (quite oddly) fail when building against Tcl8.6 on some platforms or Linux distros 2013-04-30 Massimo Manghi * doc/xml/commands.xml: improved entry for ::rivet::var with an explanation and example provided by Harald * configure.ac,VERSION: version number bumped to 2.1.2 2013-02-12 Massimo Manghi * src/apache-2/mod_rivet.c: To avoid clash on freeing resources Tcl_Finalize is removed from child process cleanup (Bug #54162) 2013-02-11 Massimo Manghi * rivet/packages/dio/dio.tcl: fixing nasty bug introduced with Rivet 2.1. When method 'store' is updating the call to method update needs a flat list as last argument, not just a sigle valued list argument * doc/xml/commands.xml: Improved explanation for command abort_page * src/apache-2/rivetConf.c: corrected typo in header * src/apache-2/apache_request.c: new handling of apache requests largely relaxes checks on the 'Content-Type' header (Bug #53661) 2013-02-02 Massimo Manghi * src/apache-2/apache_request.c,src/apache-2/mod_rivet.c: extending request handling also for PUT and DELETE. Applied patch provided by Jeff Lawson in bug report #53892 2013-02-01 Massimo Manghi * src/apache-2/Makefile.am, src/Makefile.am: removed -v flag from rm command in install-data-hook: target to avoid incompatibility with same command's implementation in Solaris (Bug: #54181) 2013-01-28 Massimo Manghi * src/apache-2/mod_rivet.[c|h],rivetCore.c: removed hardcoded error code generated by abort_page and defined in the preprocessor symbol ABORTCODE. 2013-01-25 Massimo Manghi * rivet/rivet-tcl/xml.tcl,rivet/rivet-tcl/tclIndex: New command for XML fragments composition 2013-01-20 Massimo Manghi * Makefile.am: added removal of libool created .la files for librivetparser and librivet 2012-12-30 Massimo Manghi * rivet/rivet-tcl/xml.tcl: revised command for simple XML string mark up 2012-12-18 Massimo Manghi * src/librivet/rivetPkgInit.c: package version taken from preprocessor symbol RIVET_VERSION so that it's guaranteed mod_rivet.c will get the right library version. * src/apache-2/mod_rivet.c: removed trailing spaces from various lines (offends some patch management tools such as quilt) 2012-12-17 Massimo Manghi * doc/xml/install.xml: fixed link to download page on the website * rivet/packages/dio/dio.tcl: method store uses internally methods 'insert' or 'update' (depending on the existence of a row having the same keyfield). The latest version of DIO shipped a 'store' method that returns the very same value returned either by 'insert' or 'update'. Previous versions of DIO returned invariably 1, which was undocumented and not very well thought out (handled errors in 'store' return a -code error, not necessarily 0). Previous behavior is reinstated (bug #54313) 2012-12-16 Massimo Manghi * rivet/packages/session/session-class.tcl: method 'store' had an hardcoded 'parray' the ran when an error occurred. It also printed a message using 'puts' instead of 'debug' 2012-12-15 Massimo Manghi * src/apache-2/rivetCore.c: command 'headers' returns a meaningful error in case a subcommand is invalid 2012-12-12 Massimo Manghi * src/apache-2/mod_rivet.c: Tcl_PkgRequire for packages Rivet and rivetlib are exchanged so that commands in librivet.so can be imported when they are on the export list and a programmer issues a 'package require ::rivet' (fixes bug #54290) * rivet/init.tcl: this script is now providing package 'Rivet' instead of 'RivetTcl'. init.tcl initializes the Tcl core of Rivet and a package rivet has to exists for compatibility with version 2.0 where it was provided rather pointelessly by librivet.so. 2012-12-03 Massimo Manghi * doc/Makefile.am: Manual pages output encoding set to UTF-8 2012-11-13 Massimo Manghi * doc/xml/form.xml: subcommand 'checkboxes' documented 2012-11-09 Harald Oehlmann * rivet/packages/form/form2.tcl: Checkboxes with no value and an arbitrary default value are initialy checked. *** POTENTIAL INCOMPATIBILITY *** The default value is not taken as checkbox value any more. This was IMHO a security hole. (reported on rivet-dev by Jeff Lawson) 2012-11-05 Harald Oehlmann * rivet/packages/form/form2.tcl: Bug fixed: method textarea did not honor default values. (reported on rivet-dev by Jeff Lawson) 2012-10-29 Massimo Manghi * rivet/packages/session/[session-create-mysql.sql|session-create-sqlite.sql]: index riv_sess_cache_ix had a incomplete unique key definition that missed the 'package_' column (fixes bug #54063) 2012-10-28 Massimo Manghi * doc/xml/commands.xml: Manual entry for makeurl extented to clarify how the protocol is determined. 2012-10-16 Massimo Manghi * doc/xml/directives.xml,doc/xml/commands.xml,doc/xml/install.xml,doc/xml/examples.xml, doc/xml/request.xml,doc/convert_examples.tcl.in,doc/examples-sgml/hello1.rvt: Trying to improve the manual revising and extending it 2012-10-01 Massimo Manghi * doc/xml/request.xml,doc/xml/install.xml: attempting to improve the documentation * doc/images/: Adding missing icons 2012-09-30 Massimo Manghi * tests/parsepackage.test: changed path to librivetparser.so 2012-09-29 Massimo Manghi * rivet/rivet-tcl/xml.tcl: Adding command for simple quick XML fragments generation 2012-09-22 Massimo Manghi * rivet/packages/dio/dio.tcl: various methods used as accessors to some property variables of the class Database were not returning their values as expeected. This also surfaced a bug in method 'string' where a result object wasn't used correctly. Method 'count' failed when no keyfield was set. Since it should be possible to call this method also when there is no keyfield defined private method table_check is returning specific error codes making possible to catch this error and ignore it in 'count' (fixed bugs #53733 and #53732) * rivet/packages/dio/dio_Sqlite.tcl: Class Sqlite did not set the variable 'interface' to value 'Sqlite' as expected. 2012-09-21 Massimo Manghi * doc/README: improved instruction for code examples inclusion into XML manual * doc/rivet-full.xml: removed 2012-09-18 Massimo Manghi * rivet/pkgIndex.tcl: index file regenerated 2012-09-17 Massimo Manghi * src/librivet/rivet[Crypt|WWW|List|pkgInit].c,src/parser/rivetParser.[c|h], src/parser/parserPkgInit.c: files for librivet and the Rivet parser moved into src/librivet and src/parser. * src/Makefile.am,src/librivet/Makefile.am, src/parser/Makefile.am: new automake conf files reflect libraries reorganization. * src/apache-2/Makefile.am: mod_rivet builds from the newly located parser code. Is it sensible to let the module depend on a real package (provided by libparser.c)? * configure.ac: add variable substitution for newly created Makefile.am 2012-09-16 Massimo Manghi * tests/runtests.tcl,tests/apachetest.tcl: User and Group directives removed from conffile template to make test suite independent from the output of command 'id' from which the values for this parameters were inferred (Bug #53396) * tests/shorthand.rvt: oddly enough the template output the same line twice. 2012-09-03 Harald Oehlmann * Thank you accepting me as committer 2012-08-19 Massimo Manghi * src/apache-2/mod_rivet.c: the module returns now a HTTP_INTERNAL_SERVER_ERROR when a request namespace cannot be created 2012-08-16 Massimo Manghi * src/rivetPkgInit.c: improved namespace structure pointer handling (contributed by Georgios Petasis) 2012-08-15 Massimo Manghi * rivet/packages/dio/dio_Oracle.tcl: fixed method makeDBFieldValue in class Oracle (Bug #53703) 2012-08-15 Massimo Manghi * doc/xml/dio.xml: Fixed wrong declariation of 'insert' subcommand in page manual (Bug #53670) * rivet/packages/dio/dio_Postgresql.tcl: method makeDBFieldValue implemented and tested with package Sessiona (Bug #53703). * rivet/packages/session/session-create.sql: file renamed as session-create-postgresql.sql. Schema tested with package Session. * Changelog: entry of Aug 12 corrected: the method of Database (dio.tcl) in question was 'store' not 'fetch' * rivet/packages/session/session-class.tcl: removed 'conf' variable that could clash with application code (and in at least one case it did) (Fixes bug #53544) 2012-08-13 Massimo Manghi * rivet/packages/dio/dio_Sqlite.sql,rivet/packages/dio/dio_Mysql.tcl: These connector classes didn't compute correctly the number of seconds as unix timestamp to be returned for comparison with the same information returned by [clock seconds] (Bug #53703) * rivet/packages/session/session-class.tcl: special datetime field were registered associated to the rivet_session and rivet_session_cache names, whereas the class has member variables for storing these definitions (Bug #53543) 2012-08-12 Massimo Manghi * rivet/packages/dio/dio.tcl: Database's class 'store' method was rewritten on a more simple assumption that methods 'insert' and 'update' know how to actually .... insert and update rows * rivet/packages/dio/dio_Sqlite.tcl: The class was found to fail in various circumstances determining the number of rows affected by a query and determining the set of fields in a table involved by a query. Since a 'select' query is treated in a rather distinctive way from other SQL queries, a new public variable 'select' was added to the properties of the class in order to handle consistently the 2 cases within SqliteResult. The number of rows affected rows is obtained from the 'changes' subcommand of Sqlite3 connector. * rivet/packages/dio_Mysql.tcl: wrong special field handling fixed 2012-08-11 Massimo Manghi * rivet/packages/session/session-create-sqlite.sql: new file with schema of session package tables for Sqlite. 2012-08-07 Massimo Manghi * doc/rivet.css: text in monospace characted made a little smaller * rivet/packages/form/form.tcl: Workaround to avoid wrong parsing of form data when parameter values have spaces in them * src/apache-2/mod_rivet.c: 'server' array uses RIVET_VERSION instead of the lengthy RIVET_PACKAGE_VERSION 2012-07-31 Massimo Manghi * rivet/packages/dio/dio_Sqlite.tcl: Add search case for package sqlite3. Add method makeDBFieldValue to handle time and date special fields support. Add method 'quote' which overrides the same method in Database, as correct way to escape quotes (') characters for Sqlite is doubling them ('') 2012-07-04 Massimo Manghi * doc/examples/download.tcl: The example has been having ever since an error in calling 'source' instead of 'parse'. The multitude of the userbase never realized. 2012-07-03 Massimo Manghi * CHANGES: file emptied from obsolete notes * src/apache-2/mod_rivet.c: Add UploadDirectory to the list of handled options for RivetUserConf 2012-06-27 Massimo Manghi * configure.ac: Version number set as 1.2.0b1 * rivet/packages/form/form.tcl: form package 1.0 taken from branches/2.0 * doc/xml/commands.xml: improved page manual about incr0 being declared deprecated 2012-06-20 Massimo Manghi * contrib/form.tcl: Requiring package TclOO making explicit it's needed to run this version of form.tcl 2012-06-01 Massimo Manghi * rivet/packages/form/form2.tcl: New form2.tcl providing form 2.0 package (proposed name for the file) 2012-05-18 Massimo Manghi * doc/xml/intro.xml: add acknowledgments for contributions made by Cyril, Jeff and Harald * doc/xml/commands.xml: add page manual for ::rivet::inspect * src/apache-2/mod_rivet.c: add handling for Debug, DebugIp and DebugSeparator in user conf table. * rivet/rivet-tcl/debug.tcl: Array ::RivetUserConf (which is used to convey control parameters for the command) is now created on demand using command ::rivet::inspect * doc/rivet.css: adjustments needed to make characters size consistent and nice looking 2012-05-17 Massimo Manghi * doc/xml/examples.xml: "Hello World" example reworked * rivet/packages/dio/dio.tcl: fixed SQL syntax that would break compatibility with Oracle (fixes reopened bug #53222) 2012-05-15 Massimo Manghi * doc/hello1.rvt: add new "Hello World!" example to explain the new shorthand syntax 2012-05-14 Massimo Manghi * doc/rivet.xsl,doc/rivet.css,doc/images/[prev.png,next.png,up.png]: new stylesheet and icons for the page manual 2012-05-13 Massimo Manghi * rivet/packages/tclrivet/tclrivetparser.tcl: Tcl parser implements new shorthand echo syntax (closes bug #53217) * doc/xml/entities.xml: New manual page for package RivetEntities * rivet/packages/tclrivet/parse.tcl: auto_path handling improved (closes bug #52898) * rivet/packages/form/form.tcl: indentation converted to spaces to improve editing across different editors. Fixed problem with variable clash in constructor. Also removed unneeded [expr ...] in conditions that prevented byte compiling (Closes bug #52650) * doc/xml/commands.xml: improved manual entry for 'var list' (Fixes bug #52911) 2012-05-12 Massimo Manghi * src/rivetParser.c: add shorthand expression for (contributed by Jeff Lawson, addresses #53217, tclrivetparser still to be fixed) * tests/shorthand.[test|rvt]: add test of shorthand notation for string output * rivet/rivet-tcl/cookie.tcl: add support for HttpOnly flag (contributed by Cyril Shtumf, fixes bug #53224) * rivet/packages/session/session-class.tcl: support for HttpOnly flag improves security and reduces the risk of cross-site scripting attacks (contributed by Cyril Shtumf, fixes #52224) * rivet/packages/dio/dio.tcl: wrong SQL syntax generated in delete method when multiple fields are used in the selection clause (contributed by Cyril Shtumf, fixes bug #53222) * rivet/packages/dio/dio_Mysql.tcl: Mysql connection must be checked when connection reference is reused because it could have dropped (contributed by Cyril Shtumf, fixes #53221) 2012-05-09 Massimo Manghi * rivet/rivet-tcl/http_accept.tcl: new command ::rivet::http_accept * doc/xml/commands.xml: new manual entry for ::rivet::http_accept * doc/rivet.xml: Add new file entities.xml describing package 'RivetEntities' (only a stub, to be elaborated) * doc/xml/entities.xml: New manual page for package 'RivetEntities' 2012-05-08 Massimo Manghi * src/rivetPkgInit.c: reinstated safe interpreters initialization * doc/xml/install.xml: corrections and further elaboration of explanation for the --disable-import-rivet-commands 2012-05-07 Massimo Manghi * src/apache-2/rivetCore.c: new command ::rivet::inspect implementing function Rivet_InspectCmd * src/apache-2/rivetConf.c: Ancillary functions for instrospection procedure Rivet_InspectCmd * src/apache-2/Makefile.am: Added handling of rivetConf.c * src/apache-2/mod_rivet.c: Handling of configuration directives restricted to meaningful options when RivetDirConf or RivetUserConf directives are set. An error message is printed when child process initialization directives are set by RivetDirConf and RivetUserConf. Rivet_PropagatePerDirConfArrays and Rivet_PropagateServerConfArray functions disabled as the ::rivet::inspect command can work out a better alternative creating the RivetServerConf, RivetDirConf and RivetUserConf on demand. * src/apache-2/mod_rivet.h: Added declaration for functions in rivetConf.c * rivet/rivet-tcl/lassign.tcl: removed, since Tcl 8.5 lassign implements and extends the same functionalities 2012-04-30 Massimo Manghi * rivet/packages/form/form.tcl: Patch provided by Jeff Lawson to manage -label switches. The package now requires package uuid from Tcllib. * : Entry of 2012-04-07 amended as the path to mod_rivet.[c|h] was clearly wrong 2012-04-07 Massimo Manghi * rivet/apache-2/mod_rivet.[c|h]: One more change to an ap_log_error call suggested by the compilation hardening flags 2012-03-26 Massimo Manghi * rivet/packages/entities.tcl: new package RivetEntities, replacement for tcllib ::html::entities but with no extra dependecies (as a matter of fact it works without Rivet too) 2012-03-13 Karl Lehenbauer * configure.ac: Default separate virtual interps to "no". (--enable-virtual-interps-separation option implies disabled if not set.) * rivet/packages/form/form.tcl: In the forms package, stop bleeding the raw value of radio buttons and checkboxes into the generated HTML. * src/apache-2/mod_rivet.c: Rework ap_log_error calls to include the mod_rivet module name. Emit debug-level messages for successful execution of GlobalInitScript and ServerInitScript. * README.freebsd: Update to reflect the modern world. * README.configure: Document how to regenerate the configure script, etc. * tclconfig/depcomp, tclconfig/missing, tclconfig/config.guess, tclconfig/config.sub, tclconfig/ltmain.sh: Update from newer libtools, etc. 2012-03-08 Massimo Manghi * rivet/rivet-tcl/,/rivet/packages/simpledb: various changes suggested by code profiler (thanks to Harald Oehlmann) * rivet/packages/tclrivetparse.tcl: wrong handling of swich cases made method 'parse' unusable * src/rivet.h: obsolete comment amended 2012-01-16 Massimo Manghi * rivet/rivet-tcl/tclIndex.tcl: regenerated with auto_mkindex. 2012-01-15 Massimo Manghi * rivet/rivet-tcl/parray_table.tcl: this file was erroneously introduced as tablearray.tcl. Renamed. * rivet/rivet-tcl/putsnnl.tcl: experimental putsnnl command rewritten to improve features and make it more flexible by adding option for padding with   entities. 2012-01-10 Massimo Manghi * rivet/rivet-tcl/parray_table.tcl: New command parray_table to print the content of an array into an HTML table * rivet/rivet-tcl/putsnnl.tcl: More consistent form for 'putsnnl'. If the second argument is given and it's an integer then the string is at most characters long. If > [string lenghth ] then the output is still wide. If is a positive integer the string is printed right-aligned, if negative the string is left-aligned 2011-12-26 Massimo Manghi * rivet/rivet-tcl/putsnnl.tcl: Add new command 'putsnnl', a wrapper for 'puts -nonewline' with the extra optional feature of prepending the output with a definite number of spaces (it helps pretty printing of HTML) 2011-12-09 Massimo Manghi * src/rivetPkgInit.c,src/parserPkgInit.c: libs now are fully based on stubs and the tcl version parameter passed with Tcl_InitStubs is the same Tcl version their linked against. Probably too strict, but a cautious point as we are moving towards Tcl8.6 and Tcl9, which will probably require recompilation of the whole Tcl software 2011-12-08 Massimo Manghi * trunk/: Final commit merging changes to scoping commands in the ::rivet namespace 2011-12-07 Massimo Manghi * doc/examples, doc/convert_examples.tcl.in: Add ::rivet namespace to examples and examples code converter * doc/examples/*.rvt: removed unneeded sgml chars escaping * doc/xml/install.xml: removed duplicated entry of a 'configure' switch 2011-12-06 Massimo Manghi * rivet/rivet-tcl/tablearray.tcl: new procedure 'tablearray' prints an array content in an HTML construct. Test procedure, we maybe want to have something more general for printing also dictionaries. 2011-12-06 Massimo Manghi * configure_ac: add new test on Tcl version using AX_VERSION_COMPARE. 2011-12-06 Massimo Manghi * doc/xml/request.xml,doc/xml/install.xml: documenting new configure switches 2011-12-05 Massimo Manghi * src/apache-2/mod_rivet.c: child init sets also the array module_conf to signal the compilation flags --enable-rivet-commands-export and --enable-import-namespace-commands for the benefit of init.tcl * configure.ac: new macro created to handle --enable-rivet-commands-export and --enable-import-namespace-commands * rivet/init.tcl: module_conf signals when commands have to be exported from ::rivet and when they have to be implicitly imported into the global namespace for compatibility with previous versions of Rivet. 2011-11-21 Massimo Manghi * doc/xml/directives.xml,doc/xml/commands.xml: removed note about 'rivetlib' package no more needed. Notes about ServerInitScript not having effect when virtual hosts have their own private slave interpreters. 2011-11-20 Massimo Manghi * doc/xml/commands.xml,doc/xml/install.xml: documentation for building Rivet updated. * configure.ac: corrected help message for --disable-rivet-commands-export 2011-11-20 Massimo Manghi * src/rivet.h: Macro definition for Rivet command objects has rolled back to its previous form and doesn't call Tcl_Export anymore. In case commands are exported by calling Tcl_Export in rivetCore.c and rivetPkgInit.c * tests/*: test suite reviewed for new tests 2011-11-16 Massimo Manghi * src/apache-2/rivetCore.c: code rationalization. namespace reference will not be passed to the RIVET_OBJ_COMMAND macro and commands are exported by calling Tcl_Export on the whole command set in ::rivet. The whole process is controlled by the macro symbol RIVET_NAMESPACE_EXPORT * src/rivet.h: only one RIVET_OBJ_COMMAND object exists now. Call to Rivet_WWWInit, Rivet_CryptInit and Rivet_ListInit haved changed. Rivet namespace pointer in not passed around anymore and it's handled only in rivetPkgInit.c * src/rivetPkgInit.c: 2011-11-14 Massimo Manghi * configure.ac: new switch --enable-rivet-commands-export to enable/disable commands in ::rivet namespace 2011-11-12 Massimo Manghi * src/apache-2/rivetCore.c: reindented to improve readability. * doc/xml/commands.xml: typo corrected * tclconfig/ltmain.sh: new script from recently released libtools * configure.ac: new macro AC_CONFIG_MACRO_DIR to include macros in m4 2011-10-12 Massimo Manghi * debian/*: actually removed from trunk (yesterday it was removed from branches/2.0) 2011-10-11 Massimo Manghi * debian/*: removed from trunk and moved into parent directory. Maintaining scripts and configuration for Debianizing a package in the same package repository is deprecated and error prone. 2011-10-09 Massimo Manghi * debian/*: preparing to move the debian stuff away from development branches of Rivet. I'm committing the latest changes done in the process of releasing the Debian package for 2.0.4 2011-09-26 Massimo Manghi * m4/ax_compare_version.m4: add macro for version comparison from the GNU macro archive 2011-09-23 Massimo Manghi * src/apache-2/rivetCore.c,src/apache-2/TclWebapache.c: merging changes made to fix bugs and requests to command 'makeurl', 'load_env' and 'load_headers' 2011-09-07 Massimo Manghi * doc/xml/commands.xml: Add existing undocumented commands - import_keyvalue_pairs - lempty - lmatch - lassign (consider to remove, as it overlaps for name and features with identical Tcl core command) - read_file - wrap - wrapline Changed 'makeurl' documentation to account for new features recently committed 2011-09-06 Massimo Manghi * src/apache-2/mod_rivet.c: Add Id svn keyword. * src/apache-2/TclWebapache.c: Command load_env and load_headers now resolve the array name parameter following the default method (removed TCL_NAMESPACE_ONLY flag that prevented creation of an array in a proc's scope). Still default values for the arguments create such arrays in the ::request namespace * src/apache-2/rivetCode.c: preprocess macros ENV_ARRAY_NAME and HEADERS_ARRAY_NAME modified to explicitly put in ::request namespace the default arrays. Procedure Rivet_MakeURL chages so that command 'makeurl' now accepts relative paths and prepends them with the value of the SCRIPT_NAME environment variable. When run without arguments 'makeurl' returns the value in the SCRIPT_NAME env variable. 2011-06-03 Massimo Manghi * tclconfig/ltmain.sh: new version shipped with libtool 2011-06-01 Massimo Manghi * tclconfig/libtool.m4: autoconf 2.68 has a new IF..ELSE.. statement in m4 macros and libtool.m4 needs to get along it. New version copied into tclconfig. 2011-05-09 Massimo Manghi * src/apache-2/mod_rivet.c: fixed misleading error message displayed when rivet_abort_script fails 2011-05-05 Massimo Manghi * configure.ac: APACHE_VERSION returns an error message for--with-apache-version=1. * src/apache-1/: removed from trunk 2011-04-14 Massimo Manghi * src/Makefile.am,src/apache-2/Makefile.am: Add target install-data-hook with command line for removing unneeded .la files from target directories * configure.ac: doc/convert_examples.tcl is generated from template: added to AC_CONFIG_FILES * debian/changelog,debian/control: changed to reflect improvement in the script for Debian 2011-06-07 Massimo Manghi * rivet/init.tcl: because of bug #3216070 of Tcl we cannot preload rivetlib, so it doesn't make sense to import the rivet namespace, because we cannot have all the command set loaded in and an import has to be done for them in the application scripts * rivet/rivet-tcl/incr0.tcl: Tcl8.5 provides identical functionalities, so this command is now aliased in the interpreter by the native incr command. * rivet/rivet-tcl/tclIndex: recreated 2011-04-06 Massimo Manghi * configure.ac: Added doc/convert_examples.tcl to files created from its .in template 2011-04-03 Massimo Manghi * doc/convert_examples.tcl.in,doc/convert_examples.tcl: Added script to convert code examples from their native form to a sgml escaped form. * doc/Makefile.am: Target 'examples' added * doc/xml/install.xml: Expanded --with-apxs explanation. * doc/README: expanded with instructions for adding new examples to the docs. 2011-04-01 Massimo Manghi * doc/: new directory doc/examples-sgml. This is the directory where examples ready for inclusion in the manual must stay. The directory doc/examples is now meant to keep examples suitable for actual test and exectution * doc/convert_examples.tcl: New procedure that check for changes in doc/examples and, if needed, creates/recreates the corrisponding file in doc/examples-sgml escaping characters 2011-03-03 Massimo Manghi * rivet/rivet-tcl/*.tcl: all the commands in here moved into ::rivet namespace. File tclIndex recreated * doc/xml/directives.xml,doc/xml/commands.tcl: Documentation changed to reflect the new scoping of the command set. Commands in rivet-tcl/ not yet documented have been briefly explained with some examples. * src/apache-2/mod_rivet.[c|h],src/apache-2/rivetCore.c: changes in trunk merged into the rivet-namespace branch 2011-03-01 Massimo Manghi * src/apache-2/rivetCode.c: 'abort_code' command is now created through the RIVET_CMD_OBJ macro 2011-02-18 Massimo Manghi * src/rivet.h,src/apache-2/rivetCore.c,src/rivetPkgInit.c: Core commands namespace is now '::rivet' and the package provided by the core module is "::rivet". Also package RivetLib was renamed as 'rivetlib'. 2011-02-14 Karl Lehenbauer * src/apache-2/mod_rivet.c: Only create root interpreter once, not twice. In Rivet_CopyConfig cache_size and cache_free were getting copied twice. Only once now. * src/apache-2/rivetCore.c: Remove unused command var from Rivet_Upload. Remove unneeded loglevel var from Rivet_LogErrorCmd. 2011-02-14 Massimo Manghi * src/apache-2/mod_rivet.[h|c],src/apache-2/rivetCore.c: Removed loading of RivetLib by default. Getting RivetLib into the module keeps Apache to segfault in other calls. In order to gain access to commands provided by RivetLib (formerly called Rivet) a 'package require RivetLib' must be in a Rivet script or in one of the initialization script (e.g. ServerInitScript ChildInitScript or GlobalInitScript). Notice: RivetLib exports the commands to the '::Rivet' namespace. * src/rivetCrypt.c, src/rivetWWW.c, src/rivetList.c: they now export their commands to the '::Rivet' 2011-02-11 Massimo Manghi * src/apache-2/mod_rivet.[c|h]: new conf scripts rivet_abort_script and rivet_force_script. rivet_abort_script is run when an abort_page command is called in the page content generation * src/apache-2/rivetCode.c: add new command abort_code that returns the code passed to abort_page 2011-02-08 Massimo Manghi * src/apache-2/rivetCore.c: call to Rivet_InitWWW to include into Rivet's core the commands provided in src/rivetWWW.c * src/apache-2/mod_rivet.c: the inclusion into the module of RivetLib through Tcl_PkgRequire proved to cause segfaults in Rivet_ServerConf. The commands in rivetWWW.c are temporarily loaded by rivetCore.c * src/apache-2/Makefile.am: build of mod_rivet.so includes also code from src/libWWW.o 2011-02-07 Massimo Manghi * branches/rivet-namespace: new branch to experiment with the Rivet namespace and Rivet package * src/rivetPkgInit.c: Provides RivetLib package now when loaded by mod_rivet. Commands are now in the ::Rivet namespace * src/rivet.h: new macro RIVET_OBJ_CMD creates a command in the ::Rivet namespace and puts the command object on the namespace export list * src/apache-2/mod_rivet.h: the globals structure now holds a pointer to the Tcl_Namespace object representing ::Rivet namespace * src/apache-2/rivetCore.c: commands are now created with the RIVET_OBJ_CMD macro * rivet/init.tcl: provides package RivetTcl 2.1. This makes possible to consistently peek the init.tcl associated to the module. Command 'incr0' is now aliased by Tcl standard 'incr' * rivet/apache-2/mod_rivet.c: Rivet_PerInterpInit loads package RivetTcl 2.1 and package RivetLib 1.2. the latter ships the commands in rivetWWW.c rivetCrypt.c and rivetList.c * rivet/rivet-tcl/tclIndex: Command 'incr0' removed (see init.tcl) 2011-01-31 Massimo Manghi * configure.ac: default value for directive SeparateVirtualInterps changed to 'yes'. * VERSION: version number set as 2.1.0r1 ('r' is for 'revision') * doc/xml/directives.xml: New directive ServerInitScript is documented. 2011-01-23 Massimo Manghi * src/apache-2/mod_rivet.[c|h]: Created new ServerInitScript configuration directive: it assigns rivet_server_init_script with a script run in Rivet_InitHandler after configuration has been built and before server children are forked. A master interpreter is created in Rivet_InitHandler. Children interpreters should hopefully be pure clones of this interpreter created by 'fork' 2011-01-09 Massimo Manghi * configure.ac: fixed AC_DEFINE_UNQUOTED macro call for definition of proprocessor symbol RIVET_MAX_POST, an integer valued symbol which was put in quotation marks. File indentation was fixed and tabs replaced with spaces 2010-12-03 Massimo Manghi * configure.ac: new macros to set default values of configuration parameters. * src/apache-2/mod_rivet.c,mod_rivet.h: Default values are set in rivet_config.h through autotools. The Tcl Rivet environment is now loaded from mod_rivet by calling Tcl_PackageRequire("RivetTcl","1.1"); after auto_path is properly set. Configuration scripts are now stored in Tcl_Obj objects * doc/xml/install.xml: Add documentation for new 'configure' switch. * rivet/init.tcl: the path to RIVETLIB_DESTDIR is added to auto_path in mod_rivet. 2010-12-02 Massimo Manghi * debian/libapache2-mod-rivet.*,debian/changelog: removed redundant lines from postist script (Debian package) * rivet/rivet-tcl/cookie.tcl: add command "cookie unset" * contrib/form.tcl,contrib/README: add a form.tcl based on TclOO. New README explanatory file * doc/xml/commands.xml: new command "cookie unset" explained 2010-10-27 Massimo Manghi * branches/2_0: changes done in branches 2_0 reintegrated into trunk. This implied the following changes in trunk * debian/[clean,docs,*.substvars,dirs,files,install]: not needed, hence removed from repository * debian/[changelog,copyright,rules]: files changed to produce a clean package out of the source tree * VERSION,configure.ac: version number bumped up to 2.0.2 * doc/rivet-chunk.xsl: obsolete and misplaced copyright statement removed 2010-10-20 Massimo Manghi * debian/[clean,install,docs,dirs]: removed because not needed or redundant * debian/copyright: completed to include also the Tcl license. Added copyright notes for stuff in win/ 2010-10-19 Massimo Manghi * debian/control,debian/Makefile.am: Minor adjustments to debian/control to fulfill Debian policy * debian/libapache2-mod-rivet-doc.docs: the 'contrib' directory is installed now in this package. * src/apache-2/rivetCore.c: In Rivet_ApacheTable the variable table is initialized to NULL to silence a compilation warning * doc/Makefile.am: the 'distclean' target must remove the Makefile * Makefile.am: rivet_config.h removal added to 'distclean-local' 2010-10-18 Massimo Manghi * rivet/packages/tclrivet/parse.tcl: add svn:executable property as suggested by the debian consistency scripts * debian/*: more changes to remove unnecessary files from the binary packages of Debian 2010-10-14 Massimo Manghi * debian/: more adjustments in the way of getting a working setup for Debian. Some information was moved to make it 'package specific'. More tweaking on debian/control and /debian/changelog 2010-10-13 Massimo Manghi * src/buildscripts: trying to keep the source tree as tidy as possible. src/buildscripts/* are removed because they were\ then initial and later abandoned Rivet build scripts * branches/2_0/src/buildscripts: removed also from the branch development * branches/2_0/debian/*: merging the debian scripts largely rewritten in trunk. Added control files to build 2 packages for debian (binary module and docs) 2010-10-11 Massimo Manghi * tclconfig/config.sub,tclconfig/config.guess: Debian package build system signalled that these 2 files were too old and suggested to update them with newer versions shipped by automake-1.11 * debian/*: various stuff was changed trying to shape scripts to make debian packages as uneventful as possible * doc/Makefile.am: The 'clean' target in doc/Makefile was renamed as 'distclean'. HTML files are deleted only when a deep cleaning is required. 2010-10-07 Massimo Manghi * debian/*: various changes that fix some consistency faults in the debian packages 2010-10-06 Massimo Manghi * debian/*: most files in this directory have been modified to comply with the latest version of debian packaging system. Some files were deleted because superseded by others which have been added to produce 2 separate packages: one for the module and the Tcl library, the other for the html manual. 2010-09-20 Massimo Manghi * debian/*: changing some info in files needed by the debian 2010-09-18 Massimo Manghi * debian/*: files modified and added in the process to build a debian package * doc/Makefile.am: comments added. Better target handling 2010-09-15 Massimo Manghi * debian/README.Debian, debian/rivet.load: add files needed to build a Debian package * debian/rules, debian/changelog, debian/control: experimental versions of files needed by .deb packages 2010-09-14 Massimo Manghi * doc/html/*: directory removed from repository * doc/Makefile.am: New targets for creating the doc/html/ directory and copying new or modified graphic files from doc/images to doc/html/images 2010-08-30 Massimo Manghi * doc/images: Graphics displayed in the manual is copied in this directory. This is a first step in the transition to a manual generation procedure that should achieve a cleaner repository structure 2010-08-26 Massimo Manghi * configure.ac: removed AC_DEFINE(BUILD_rivet....) as the tcl.m4 providing TEA 3.9 makes redundant this definition. Argument to TEA_INIT changed accordingly * tclconfig/tcl.m4: overwritten by the new tcl.m4 and made a couple of adjustments that make it autoreconf/autoheader friendly. 2010-07-20 Massimo Manghi * doc/examples/rivet_web_service.tcl,doc/html/*.html: Improved example of Ajax servlet. Manual changed accordingly. 2010-07-18 Massimo Manghi * src/apache-2/mod_rivet.c: static void ap_chdir_file renamed as static int Rivet_chdir_file. Rivet_chdir_file returns the value returned by chdir. This value is checked and in case of error the request aborts with an HTTP_INTERNAL_ERROR and a message is printed in the log file. * VERSION,configure.ac: version number changes as 2.0.1 (temporarily) 2010-07-13 Massimo Manghi * doc/rivet.xml,doc/html/*.html: Latest minor changes before releasing * VERSION,configure.ac: Release number changed as 2.0.1 2010-07-12 Massimo Manghi * branches/2_0: Merge of trunk changes into the 2_0 branch. 2010-07-12 Massimo Manghi * rivet/packages/calendar/calendar.tcl: new comments added. Fixed misspelled -errorinfo option in a return statement. * rivet/packages/session/session-create.sql: columns 'key' and 'package' are renamed as 'key_" and 'package_'. * rivet/packages/dio/dio_Postgresql.tcl: fixed typo in variable name * doc/xml/calendar.xml: More correction made on calendar.xml * doc/html/*.html: The whole manual has been rebuilt with the latest changes 2010-07-07 Massimo Manghi * INSTALL: improved installation instructions before merging trunk into branches/2_0 2010-07-03 Massimo Manghi * rivet/package/calendar/calendar.tcl: Add check on tcl version. If Tcl8.4 is being used we also need 'dict' backport as Calendar uses a dictionary to store some internal data. * doc/xml/calendar.xml: Wrong header corrected. Added explicit note about the requirements of the package 2010-07-03 Massimo Manghi * rivet/packages/calendar/calendar.tcl: Fixed indentation in weekdays row * doc/html/: Manual pages regenerated to include latest changes in section about package Calendar 2010-07-02 Massimo Manghi * rivet/packages/calendar/calendar.tcl: Add experimental package Calendar 2010-07-02 Massimo Manghi * doc/html/calendar.html, doc/html/xml_calendar.html: Add html manual pages for Calendar * doc/xml/calendar.xml: more changes to calendar.xml 2010-07-02 Massimo Manghi * doc/xml/calendar.xml: Add manual page for package Calendar (package still to be added to repository) * doc/xml/form.xml: Page for package 'form' written with a more structured docbook organization that allows finer styling of a manual page. * doc/rivet.xsl: Add xsl configurations for elements refsect1,refsect2 and refsect3 * configure.ac: Add message when building for Apache 1.x 2010-07-01 Massimo Manghi * doc/xml/Makefile.am: removed target 'html/rivet.html" from 'docs' depends. The no-chunks version of the manual can be build running 'make docs-nochunk' 2010-06-30 Massimo Manghi * doc/xml/form.xml: Add 'checkbox' subcommand documentation * doc/html/*.html: Updated manual pages 2010-06-30 Massimo Manghi * rivet/packages/form/form.tcl: fixed various methods in package form: 'field' method must treat checkboxes and radiobuttons alike, so that labels are printed next to the button. 'radiobuttons' specialized method should not propagate the '-labels' switch to the attributes of the tag. * doc/rivet.xml: add new documentation in file doc/xml/form.xml * doc/xml/form.xml: add to repository * doc/html/form.html,doc/html/form_package.html: add to repository * doc/html/*.html: new manual pages including the form package 2010-06-22 Massimo Manghi * Makefile.am: Rivet install target deletes every pkgIndex.tcl file that might have been left around in the Rivet directory tree, before calling pkg_mkIndex.tcl to regenerate the library index file in the root directory. * rivet/packages/tclrivet/parse.tcl,rivet/packages/commserver/server.tcl: add existence test on argv variable that wept during the installation process. If not set exits silently (variable is required for a sensible use of the procedures) * rivet/packages/tclrivet/tclrivet.tcl: wrong path to librivetparser.[so|dll] corrected 2010-06-19 Massimo Manghi * src/apache-2/mod_rivet.c: filled SERVER_CONF variable in the 'server' array with value generated by the build system of the directory holding the conf files. This fulfills a TODO comment in the code. The array server is undocumented and is not clear if it was added for the benefit of the programmer or for debugging of the module. * src/apache-2/mod_rivet.h: structure definitions beautified and aligned. 2010-05-14 Massimo Manghi * BUGS,INSTALL,Changelog: small improvements in the documentation 2010-05-14 Massimo Manghi * tclconfig/install-sh: the install-sh script is replaced with the same script shipped with automake-1.11 2010-05-13 Massimo Manghi * src/apache-1/TclWebapache.c: call to ap_send_http_headers centralized in TclWeb_SendHeaders * src/apache-2/TclWebapache.c: bugfix for string assigned to the content_type field that has to be duplicated to preserve from memory deallocation by Tcl, includes to modules from apache APR library added, call to ap_send_http_headers centralized in TclWeb_SendHeaders 2010-04-29 Massimo Manghi * src/apache-2/apache_multipart_buffer.c: Add include to silence a compilation warning. * src/apache-2/apache_multipart_buffer.h: set svn property to enable $Id: keyword expansion * doc/xml/session.xml: Commented line about a 'CookieDomain' command of Session that appears to be non coded yet. To be added to the TODO file. 2010-04-29 Massimo Manghi * configure.ac,VERSION: Pre-branching operations: AC_INIT now uses 2.0.0 as version number to be used across the build system. Also the file VERSION has been updated to reflect the release number. 2010-04-27 Massimo Manghi * src/apache-1/TclWebapache.c,src/apache-1/rivetCore.c,src/apache-1/mod_rivet.c, src/apache-1/apache_request.c,src/apache-1/apache_multipart_buffer.c: changes and additions made for apache 2 added to the code for apache 1.x 2010-04-22 Massimo Manghi * rivet/init.tcl: add to auto_path the directory where init.tcl is located, as this is also the directory for package Rivet 2010-04-19 Massimo Manghi * tests/upload.[rvt|test]: fix upload message sent to server. The end boundary went undetected and Rivet added it to the uploaded file. Thus the problem affected only the test, not the module. Added delimiter to the returned message to allow easy spotting of an empty string. 2009-12-08 Karl Lehenbauer * rivet/packages/form/form.tcl, form.txt: Add new form methods for HTML 5 form elements "color", "date", "datetime", "datetime_local", "email", "file", "image", "month", "number", "range", "search", "tel", "time", "url", "week" 2009-11-03 Massimo Manghi * src/apache-2/rivetCore.c: in function Rivet_Upload the list of subcommands had 2 entries for 'tempname" leading Tcl_GetIndexfromObject to mismatch the entry for the 'names' subcommand with its numerical counterpart. This caused the child process to segfault when processing a 'upload names' command. 2009-11-02 Massimo Manghi * tests/apachetest/apachetest.tcl: apachetest::getallincludes failed to properly handle glob style file patterns. 2009-09-17 Karl Lehenbauer * rivet/packages/form/form.tcl, form.txt: Add a new form method, "button", that's just like "submit" except pressing enter doesn't cause it to be invoked. Add quick doc, form.txt, on the forms package. Terminate in form selectors. 2009-09-15 Karl Lehenbauer * rivet/packages/form/form.tcl: If the array containing default values for the form is passed in when the form is created (for instance: form myform -defaults response -method post), make sure form classes public variable "defaults" is set to that array name. 2009-09-03 Karl Lehenbauer * src/apache-2/rivetCore.c: Add new command, apache_log_error, which allows consistent logging to the Apache error log file. 2009-06-24 Karl Lehenbauer * acinclude.m4: Include m4/ax_prefix_config_h.m4 to define the AX_PREFIX_CONFIG_H macro. * tclconfig/libtool.m4, tclconfig/config.guess, tclconfig/config.sub, tclconfig/ltmain.sh: Freshened these files with the latest versions from libtool. * configure.ac, tclconfig/tcl.m4, tclconfig/ChangeLog, tclconfig/README.txt, tclconfig/install-sh: Updated to Tcl Extension Architecture (TEA) 3.7. 2009-05-05 Karl Lehenbauer * src/apache-2/mod_rivet.c: When Rivet is shutting down and per-vhost separate virtual interpreters were in use, the shutdown code deleted the master interpreter and all of the slave interpreters using Tcl_DepeteInterp(). This was an error as it should only delete the mater interpreter, as deleting the master interpreter causes its slaves to be deleted. It now does this. (Had it checked using Tcl_InterpDeleted to see if the interpreter was already marked as deleted, it probably would have been OK.) * src/rivetChannel.c - update Tcl channel handler to channel version 4. 2009-05-05 Karl Lehenbauer * Add new Rivet Tcl command,apache_table, which can query, get and set values in the Apache "notes", "headers_in", "headers_out", "err_headers_out" and "subprocess_env" tables. * Add new "upload" option "tempname" that'll return the name of the temporary file containing the upload. * When instantiating separate virtual interpreters, postpend an interpreter count to the self-created slave interpreter name, to keep Tcl_CreateSlave from failing if two or more virtual hosts have the same ServerName and don't have a port defined in the ServerName directive. * Detect and report failure of Tcl_CreateSlave rather than assuming it succeeded and dereferencing a null pointer when it didn't. Also added asserts to detect null interpreter pointer. * Slightly improved error messages when a child init or exit function fails. 2009-05-01 Karl Lehenbauer * Rename global request rec pointer from globalrr to rivet_panic_request_rec, add rivet_panic_pool and rivet_panic_server_rec, grabbing those values from Rivet initialization rather than request handling so that they are initialized enough that Rivet_Panic can use them. (Previously Rivet_Panic or Tcl_Panic at initialization time caused a null-pointer-dereference segmentation violation because no request was being served. In Rivet_Panic, avoid emitting the unparsed URI unless a request is being processed. 2009-04-27 Karl Lehenbauer * src/apache-2/mod_rivet.c: In Rivet_SendContent, when checking to see if the file doesn't exist, check r->finfo.filetype rather than r->finfo.protection. (The prior check failed to detect that the Rivet source file did not exist, causing zero length webpages to be sent rather than 404's.) 2009-01-16 Massimo Manghi * Makefile.am: Add DESTLIB variable handling as suggested by kikusz@gmail.com and accordingly with Automake directives for local install rules. 2008-12-21 Massimo Manghi * src/apache-2/rivetCode.c: add handling for subcommand 'tempname' 2008-12-15 Massimo Manghi * src/apache-2/TclWebapache.c: fixed test on configuaration flag 'upload_files_to_var' 2008-12-11 Massimo Manghi * src/apache-2/mod_rivet.c: fixed call to apr_strcat in function Rivet_ExecuteAndCheck (the corresponding call in the apache-1 code has been checked and appears to be correct). * doc/xml/internals.xml: Removed broken external link pointing to a no more existing gdb tutorial. 2008-12-03 Massimo Manghi * doc/rivet.xml: document timestamp is generated with the EXSLT datetime() function controlled through the element. The timestamp now reflects the actual time when the xsl processor is run, instead of time when the svn commit is carried out. * doc/rivet.xsl: customization added to make a list of examples appear at the end of the table of contents. * doc/html/*.html: manual pages rebuilt and committed to repository 2008-11-21 Massimo Manghi * doc/rivet.xml: file broken up into chunks containing the toplevel sections of the manual. For every file an xml entity was created. * doc/xml/*.xml: added xml files containing every toplevel section of the manual. * doc/Makefile.am: added dependency from xml/*.xml for html pages generation 2008-11-17 Karl Lehenbauer * src/apache-2/TclWebapache.c: Make TclWeb_UploadChannel open the uploaded file and make the file handle available through standard Tcl mechanisms, removing OS depdendencies. Make TclWeb_UploadData access the uploaded file through standard Tcl mechanisms, making the uploaded data available and also removing OS dependencies. Add TclWeb_UploadTempname to get the name of the temp file the uploaded file was saved to. Include apr_strings.h to remove compiler warning of implicit definitions of apr_pstrdup and apr_psprintf as well as multiple warnings about casts to pointer from integer of different size. Force rsc->upload_files_to_var to be set, temporarily, pending figuring out why the configuration directive to set that is not working. * src/apache-2/rivetCore.c: Check return from Tcl_GetIndexFromObj call in "upload" command processing (Rivet_Upload command). Return an error when the subcommand (channel, save, data, exists, size, type, filename, tempname, or names) is invalid. Add "tempname" option to "upload" command. "upload tempname" will return the name of the temporary file a file uploaded via a POST command was saved to. * src/apache-2/mod_rivet.c: Change "char *" arguments to Rivet_ServerConf, Rivet_DirConf and Rivet_UserConf to be "const char *" to bring them in line with what Apache expects, fixing compiler warnings warnings about "assignment discards qualifiers from pointer target type". Use a "void *" argument where expected in calls to AP_INIT_TAKE2 for Rivet_DirConf and Rivet_UserConf and do an assigment to the Rivet-desired types of rivet_server_conf to eliminate "initialization from incompatible pointer type" compiler warnings. Make Rivet_SetScript's script and string arguments be const char * instead of char *. * src/apache-2/apache_request.c: Change "char *error[1024]" to "char error[1024]" to fix "incompatible pointer type" error in the call to apr_strerror. * src/apache-2/apache_request.h - make temp_dir be a const char * instead of a char *. * src/apache-2/apache_multipart_buffer.c: Add include of apr_strings.h to remove compiler warning of implicit definitions of apr_pstrcat and warnings about casts to pointer from integer of different size (which occurred on 64-bit machines, anyway.) * doc/rivet.xml: added the "tempname" option to "upload". 2008-11-13 Massimo Manghi * src/apache-2/rivetCore.c: In function 'Rivet_Parse' the call to Tcl_FSStat was turned into the corresponding apr function 'apr_stat'. This change was motivated by a possibile mismatch between Rivet's allocation of the structure 'Tcl_StatBuf' and the handling of the structure done within the Tcl C library. This seems to have healed a pointer corruption that caused segfaults when the 'parse' command was executed. 2008-10-07 Massimo Manghi * src/apache-2/apache_multipart_buffer.c, src/apache-2/rivetCore.c, src/apache-2/TclWebapache.c,src/rivetChannel.c,src/rivetCrypt.c: Inclusion of config.h changed to reflect renaming of config.h. * configure.ac: new AX_PREFIX_CONFIG_H added to 'configure' generation. Added switch --enable-display-version for having Rivet's version printed in Apache signature * m4/ax_prefix_config_h: added macro for renaming config.h into rivet_config.h (or whatever we deem a good name for this file). Preprocessor symbols in this file are also prefixed with RIVET_ * Makefile.am: added handling of the macros in the 'm4' directory. * src/apache-2/mod_rivet.h: removed definition of preprocessor symbol for hiding version number in apache logs (feature now controlled in 'configure') * src/apache-2/mod_rivet.c: Changed preprocessor symbols that are now prefixed by 'RIVET_'. Moved misplaced #ifdef APACHE2 test. Maybe this test is useless as we certainly are building against APACHE2 when compiling this file 2008-09-06 Massimo Manghi * INSTALL: instructions for builing Rivet expanded with examples taken from real builds for Debian and Slackware. * src/apache-2/apache_request.[c|h]: removed TODO comments concerning ap_hard_timeout and ap_kill_timeout as these functions doesn't not exist anymore in the apache 2.x api. Added the Content-type as a new argumento to ApacheRequest_parse_multipart for parts boundary determination. The correctness of the content type has to be done before calling in order to do the check only once. Commented declarations of variables not used. The 'tempname' string is allocated now from the apache pool. Changed template for temporary file name generation. If apr_file_mktemp fails a more descriptive error is logged. * src/apache-2/apache_multipart_buffer.[c|h]: removed line in multipart_buffer_read that lead the buffer pointer to fail following the parsing process. Input buffer size changed to a larger and more common size of 8192 bytes 2008-08-30 Massimo Manghi * doc/rivet.[xml|xsl], doc/html/*.html: changed a couple of rule in rivet.xsl: they basically make example boxes a bit more flexible for html browsing and made their background color a bit more "neutral". I also made the character in them slighly smaller in order to have more space for code lines. 2008-08-28 Massimo Manghi * src/apache-2/mod_rivet.c: using the 'parse' command twice within the innermost nested level would trick rivet into treating the second template as a Tcl script. Condition on the flag 'toplevel' has been reintroduced in the on the file type (Rivet_ParseExecFile), but the whole mechanism has to be revised. Adopting a reverse logic in this test should achive the same result in more linear way if (Rivet_CheckType(req->req) == TCL_FILE) { ---> Tcl script } else { ---> Rivet template } 2008-07-03 Massimo Manghi * src/apache-1/mod_rivet.[c|h]: done modifications needed to replicate for the apache 1 code the functionalities added to the apache 2 module 2008-07-01 Massimo Manghi * src/rivet.h: added macro STRNEQU(s1,s2) which efficiently compares 2 strings. Unlike STREQU(s1,s2) this new macro compares at most strlen(s2) characters. * src/TclWeb.h: added charset field to TclWebRequest. This new property gets initialized to NULL every time this structure is instantiated. If used it stores a pointer to a string that specifies a header value fragment for the page being generated. * src/apache-2/TclWebapache.c: request_rec is treated as an opaque structure and the field 'content_type' is set by calling the ap_set_content_type apache core function * src/apache-2/mod_rivet.h: a 'honor_header_only_reqs' is added to the rivet_server_conf for handling of the HonorHeaderOnlyRequests configuration option * src/apache-2/mod_rivet.c: Every content_type is checked for possible charset specifications. When found this is stored in the TclWebRequest structure to be processed later. If a script or template doesn't set a content type on its own (with the 'headers type ' command) the charset is written in the http headers. Added support for the 'HonorHeaderOnlyRequests' switch. Other minor changes include better code formatting in some functions and commenting out some cruft left around. 2008-01-08 Massimo Manghi * rivet/packages/dio/dio.tcl: auto_path shouldn't be set or modified outsite init.tcl * rivet/init.tcl: We want the Tcl code specific to an installation to take precedence over other Tcl packages or other versions of the same stuff. Therefore I put the references to the rivetlib directory in the first positions in auto_path. 2008-01-07 Massimo Manghi * src/apache-2/TclWebapache.c: Fixed timestamp printed in the DATE_LOCAL and DATE_GMT fields of the environment table. * src/apache-2/mod_rivet.h: Fixed definitions for RIVET_INIT and RIVET_DIR. I couldn't fix SERVER_CONF though 2008-01-06 Massimo Manghi * Makefile.am: target 'uninstall-local' added. Stuff in RIVETLIB_DESTDIR gets removed upon deinstallation * rivet/packages/dio/dio_Mysql.tcl: small fixes for 2 methods. In method 'open' the switch '-host' was not handled. In method 'exec' the handling of 'select' queries has been changed because the previous method failed in certain circumstances (queries build with lists) * src/apache-[1|2]/mod_rivet.c: Status returned by Tcl_EvalFile is now checked explicitly against TCL_ERROR * doc/html/*.en.html: Html pages regenerated after changes in rivet.xml * src/rivetCore.c: Moved into src/apache-1. This file was compiled by src/apache-1/Makefile.am, whereas src/apache-2 had its own rivetCore.c module. * src/apache-1/Makefile.am: Changed to reflect rivetCore's new location. rivetWWW.c removed from module's compilation: stuff in it has to be loaded into the interpreter with 'package require Rivet' * src/apache-2/Makefile.am: Reordered list of files to allow better comparison with apache-1 build. 2008-01-05 Massimo Manghi * src/apache-[1|2]/mod_rivet.c: Added comments as per David Welton's suggestion. 2007-12-03 Valery Masiutsin * tests/apachetest/: multiple changes has been made to tests to get them working with apache2 * src/apache-2/mod_rivet.c, src/apache-2/apache_multipart_buffer.c: fixes for issues that has been discovered with tests, mostly there were problems with multipart buffer parsing during POST * configure.ac: minor issue with apache includes handling has been fixed 2007-11-18 Massimo Manghi * doc/rivet.xml: note added to description of commands listed in the 'Rivet' package. 2007-11-05 Massimo Manghi * configure.ac: the macro rivet_target_dir was added to 'configure'. This macro generates a name for the directory where Rivet libraries must be copied during the installation phase. User is enabled to change the default value by feeding 'configure' with the switch '--with-rivet-target-dir'. This macro defines also the variable RIVET_TCL_TARGET and calls AC_SUBST on it. The target directory gets inserted also in the auto_path list variable of every script run by the module. Defined configuration symbol RIVETLIB_DESTDIR in config.h. * Makefile.am,src/Makefile.am: RIVET_TCL_TARGET variable propagation. * src/apache-1/Makefile.am: rivetWWW.c removed from linking into mod_rivet.so (this requires docs to be updated, as commands in this file have to be loaded explicitly using 'package require Rivet') * src/apache-1/mod_rivet.c: Tcl_DeleteInterp called upon child exit. ${RIVETLIB_DESTDIR)/init.tcl is run during the interpreter initialization. * src/apache-2/mod_rivet.c: Exit handler reenabled, and Tcl_DeleteInterp called upon child exit. ${RIVETLIB_DESTDIR)/init.tcl is run during the interpreter initialization. Code clean up in Rivet_GetConf. Minor changes in order to get rid of some compilation warnings. * src/apache-2/TclWebapache.c: Test checking for null values in the table of environment variables has been extended to the value field. Failure to do so caused a child to segfault when rivet was used in conjuction with dir_module 2007-10-19 Massimo Manghi * src/apache-2/mod_rivet.c: Included a more correct statement in aknowledgement of mod_ruby (BSD license) for the code in ap_chdir_file. * ChangeLog: the whole batch of patches described in the previous entry (2007-10-17), came from Valery Masiutsin . I forgot to mention it in this document. My fault. 2007-10-17 Massimo Manghi * configure.ac: added APACHE2 define to config.h, added also a message when the apxs program is found. * doc/Makefile.am: 'clean' target fixed * src/apache-2/Makefile.am: added -I"." to the INCLUDE symbol * src/apache-2/mod_rivet.c: Changed function that determines if this is a request rivet must serve. We now correctly rely on the module configuration and on the headers handed on to us by apache. Added also a ap_chdir_file implementation. This function was dropped by the apache developers: we are reintroducing it using a code snippet inspired by mod_ruby. * src/apache-2/apache_request.h: Changed prototype of ApacheRequest_tmpfile function to return apr_file_t instead of FILE, also modified ApacheUpload structure * src/apache-2/apache_request.c: ApacheRequest_tmpfile rewritten using calls to apr_* functions * src/apache-2/TclWebapache_c: TclWeb_UploadSave in a more robust way using apr_* calls 2007-10-14 Massimo Manghi * doc/rivet.xml: Front page updated, page for the 'load_response' command updated and extended, link to the Italian and Russian translations removed, html pages in Italian and Russian removed from repository * rivet/rivet-tcl: new 'load_response.tcl'. This version deals in a more consistent way with the case of parameters that receive multiple values (see docs) 2007-10-12 David N. Welton * doc/rivet.xml: Fixed "dio" id's. 2007-10-11 David N. Welton * doc/rivet.xml: Added missing ID's. * doc/Makefile.am (docs): Removed Russian and Italian translations from the build. * doc/norefchunk.xsl, doc/refentry.xsl: Ditch fancy-pants XSLT stuff. 2007-09-19 Massimo Manghi * configure.ac: TEA_INIT argument was changed to 3.6 to match the new TEA version in the tcl.m4. Macro for --with-apache was simplified. Macro for --with-apxs changed in order to check for possible multiple version of apxs installed. Defined compilation parameters generated by apxs. Same for apr-1-config that returns compilation parameters for apr. * Makefile.am src/Makefile.am src/apache-[12]/Makefile.am: changed to handle new symbols and parameters * src/apache-1/mod_rivet.[hc] rivet version logging enabled: I enabled this to check if I was loading the expected module but maybe can be used to generate, at least for the code in trunk, more refined version numbers to be used in the development cycle. * src/rivetCore.c: added call to initialize commands in rivetWWW. 2007-09-09 David N. Welton * src/apache-2/Makefile.am: Another patch from Valery Masiutsin : Propagated variables from configure.ac, did some cleanups. * src/apache-1/Makefile.am: More of Valery's patch: Propogate variables from configure.ac. * configure.ac: More of Valery's patch: Separated cases for apache-1 and apache-2 in APACHE function. Added handling for apache-2 for platforms i am developing on. Probably it will need to be unified later. Touched CHECK_APXS a bit. Replaced APR_INCLUDES function with APR_HANDLING, now we are requiring full path for apr-1-config and getting cppflags and includes from it. APR tool has platform specific set of cppflags, just includes is not enough. Added GET_RIVET_BASE function, which allows us to get rid of relative pathes in include flags. Rearranged functions a bit - mostly to find out version of apache we are building for, before doing any substitutions. * src/Makefile.am: More of Valery's patch: Propagated variables introduced in configure.ac. * src/apache-2/mod_rivet.c (Rivet_TranslateUri): More of Valery's patch: Changed a bit Rivet_ParseFileArgString a bit, it fixed segfaults, but still needs some work. I've added apr_pool_t pointer to parameters we are passing to function. 2007-08-29 David N. Welton * src/apache-1/Makefile.am: Another patch from Valery correcting a mistaken application of his patches on my part. 2007-08-27 David N. Welton * configure.ac: Added missing quote. * configure.ac: Another patch from Valery, making compilation smoother on Debian. * src/apache-1/Makefile.am: Accepted patch from Valery for improved compilation. * src/apache-1/apache_multipart_buffer.c: Accepted patch from Valery to make this file compile. * tclconfig/tcl.m4: Moved to latest tcl.m4 at Valery's suggestion. 2007-08-22 David N. Welton * configure.ac: Added patch from Valery Masiutsin improving the configure setup. 2006-07-03 Karl Lehenbauer * rivet/packages/dio/dio_Postgresql.tcl: when handling a PostgreSQL result, if numrows is zero, see if cmdTuples (Pg_result $resultHandle -cmdTuples) contains anything, and if it does, put that in of numrows, hiding a PostgreSQL interface quirk from DIO. 2006-06-07 David N. Welton * rivet/packages/session/session-create-mysql.sql: Minor update from Massimo Manghi for Mysql 4. * rivet/packages/session/session-class.tcl: Minor update from Massimo Manghi. 2006-05-14 David N. Welton * rivet/packages/session/, rivet/packages/dio/: Added Mysql and Oracle session creation packages. Updates to dio and session packages. Modifications to the Mysql driver. Added an Oracle driver. Thanks to Arnulf Wiedemann (arnulf@wiedemann-pri.de) and Massimo Manghi (manghi@biol.unipr.it). 2006-02-03 Karl Lehenbauer * rivet/packages/dio/[dio,diodisplay].tcl: Uncovered a serious flaw in DIO -- there is no way to update a row in a way that changes the key value. As a result, DIOdisplay punts and deletes the row then reinserts it with the new key. This is not the same thing as the delete can trigger integrity checks that fail because of constraints from other tables. Added the somewhat kludgey update_with_explicit_key method to let us specify the key rather than having the key always be dug out of the data array (so that the key in the data array can be different) and altered the row edit code in DIOdisplay to use this rather than doing the delete/insert thing. 2006-01-25 Karl Lehenbauer * rivet/packages/dio/diodisplay.tcl: When editing, made select boxes have the current value selected by default. 2006-01-14 Eckhard Lehmann * configure.ac: edited for 2 directories src/apache-1 and src/apache-2 to be the source directory for either Apache1.x or Apache2.x. Added new autoconf macros to check for apache base directory, apache/apr include directories (on debian for instance, they are in /usr/include/apache1.3 resp. /usr/include/apache2 and /usr/include/apr-0) and apache version ( --apache-version=1 or --apache-version=2). According to the macros, the sources either in src/apache-1 or src/apache-2 are compiled. * src/: put all sources for rivet for Apache1.x into a subdirectory apache-1, left the Makefile.am unchanged. Copied the files to a subdirectory apache-2 and started port of rivet to Apache2.2 with these files. * Checked in by davidw. 2005-12-12 Karl Lehenbauer * rivet/packages/dio/dio.tcl: Reverted change to "store" method that removed fields from the store array that were part of the key and took out this behaviour from the update method. The problem was that "DIO store" or "DIO update" could cause fields to disappear from the data array as a side effect, and the caller had no reason to expect that, hence it broke some code. 2005-11-08 Karl Lehenbauer * rivet/packages/dio/dio.tcl: Add new "update" method that works just like "store" except that it assumes you're doing an update and, unlike store, does not check to see if the row is already there or not. Also modified the "store" method, when doing an update, to not attempt to change row fields that are specified in the where clause. * doc/rivet.xml: Documented all undocumented public DIO methods, such as count, db, forall, interface, insert, makekey, quote, search and update. 2005-11-08 Pat Thoyts * win/makefile.vc: Update for new version. * win/Rivet.nsi: Update for new version. * src/apache_request.c: Cast aways some warnings. * src/rivetCore.c: Make it work with MSVC (wierd bug). * src/TclWeb.h: Declare TclWeb_GetRawPost (MSVC complains). 2005-11-03 David N. Welton * src/Makefile.am (lib_libexecdir): Install everything to rivet@VERSION@. * tests/runtests.tcl (runtests_usage): Check for utf-8 environment - this causes some problems with a number of tests. I'm not sure precisely why, but it causes a large portion of otherwise successful tests to choke. 2005-10-31 David N. Welton * doc/rivet.xml: Woops, fix spelling error: Seperate->Separate. 2005-10-01 David N. Welton * rivet/pkgIndex.tcl: Added a package index here so that when used for tests, something exists. * tests/runtests.tcl: Add local path to TCLLIBPATH, add CoreDumpDirectory so that we can get any core files generated by bad tests. * src/mod_rivet.c (Rivet_PerInterpExit): Run any per-interp child exit things that need taking care of. (Rivet_ChildExit): Walk through the list of interpreters and do any shut down work necessary prior to shutting the whole thing down. * src/rivetChannel.c (outputproc): If the AssocData is NULL, we don't try and output anything. This is probably some residual data stuck in the channel. 2005-09-29 Karl Lehenbauer * rivet/packages/dio/dio.tcl: Fix typo in "DIO insert" method 2005-09-25 Karl Lehenbauer * src/rivetCore.c, src/mod_rivet.c, src/mod_rivet.h: Updated code comments. In particular, every function in src/mod_rivet.c now has a standard header. * rivet/rivet-tcl: README, cookie.tcl, debug.tcl, html.tcl, import_keyvalue_pairs.tcl, import_switch_args.tcl, incr0.tcl, lassign.tcl, lempty.tcl, lmatch.tcl, load_cookies.tcl, load_response.tcl, parray.tcl, random.tcl, read_file.tcl, rivet_command_document.tcl, wrap.tcl: Updated code comments and added subversion "Id" tags where they weren't present. 2005-09-23 David N. Welton * genconf.sh: Added autoheaders. * doc/Makefile.am (docs): Documentation is now its own target - this means it doesn't get run as part of 'all'. 2005-09-22 Karl Lehenbauer * rivet/packages/dio/dio.tcl: "DIO insert" method is much more efficient than "DIO store" when you know you want an insert and not an update and now actually works. * README.MacOSX: GNU autoconf/configure script does not actually work to make the Rivet module on Mac OS X so the README has been reverted to show it the old-school way using the Tcl build scripts. 2005-08-21 David N. Welton * doc/html/rivet.css: CSS tweaks for documentation. * doc/rivet.xml: Updated build directions to ./configure ; make ; make install. * src/rivetCore.c (Rivet_Upload): Fixed a line that is complained about in newer GCC's (casting lvalues). 2005-08-19 David N. Welton * src/mod_rivet.c (Rivet_InitTclStuff): Use both the hostname and the port in creating names for the slave. This fixes a bug where you have different virtual hosts running on the same server name but different ports. 2005-08-13 David N. Welton * tests/apachetest/apachetest.tcl: Make sure we get our own version of http.tcl. Tcl Feature request 928154 means that we need our own copy of http.tcl for now. * tests/runtests.tcl (runtests_usage): Print out an error message if the arguments aren't right. Fixed paths to load .so files, as the auto tools put them in a different place. * tests/apachetest/apachetest.tcl (apachetest::getbinname): Check to make sure the server is executable. * src/apache_request.c (ApacheRequest_parse_urlencoded): Patch from Arnulf Wiedemann to allow XML POST data. * src/rivetCore.c (Rivet_RawPost): Tcl command implementation to fetch raw POST data or an empty string if none is available. * src/apache_request.h: Added element to struct, and accessor function. * src/apache_request.c (ApacheRequest_parse_urlencoded): Save a pointer to the raw data. * src/TclWebapache.c (TclWeb_GetRawPost): Added a raw POST data fetcher here. 2005-08-12 David N. Welton * configure.ac: Bump the version to 0.6.0. * src/apache_request.c (ApacheRequest_parse_multipart): Added code from httpd-apreq that supposedly deals with a problem in Opera file uploads. 2005-08-01 Karl Lehenbauer * : abort_page was, for all intents and purposes, completely and utterly broken -- it forced a return from whatever called it, as if it was a "return" statement, but it didn't stop evaluating Tcl beyond that, which was broken, and it discarded output by setting an "aborted" flag in Apache which, under certain circumstances caused browsers to render blank pages, apparently related to keep-alive connections. It now works correctly by causing the interpreter to stop interpreting, and doesn't mess up keep-alive connections, etc. How it does this is it unwinds the interpreter by generating an error with the errorCode set to "RIVET ABORTPAGE". The error handling code in Rivet checks for this, and if this is received, it completes the page in the normal manner without executing the user-registered or built-in error handlers. One potential incompatibility is that abort_page's execution can now be caught with Tcl's "catch" routine, although this could also be considered a feature -- Rivet coders who use "catch" should check errorCode to see if the first element of the list is RIVET and the second is ABORTPAGE and either regenerate the abort_page, pass the error up, or handle it in some custom manner in their catch handler. 2005-07-15 David N. Welton * src/mod_rivet.c (Rivet_ServerConf): Use Tcl_GetBoolean on the *val*, not the *var*. Big difference! 2005-06-14 Karl Lehenbauer * configure.ac, src/Makefile.am, tclconfig/config.guess, config.sub, ltmain.sh: Updated with libtoolize 1.5.18 -- Rivet now builds cleanly under Mac OS X. 2005-06-06 Karl Lehenbauer * rivet/packages/dio/dio.tcl: Delete now returns the number of records that were deleted rather than just a 1 if it deleted one or more and a 0 if it didn't. The forall method now does the forall on the result handle prior to checking for an error, in case an error occurs inside the forall. From Peter da Silva. * rivet/packages/dio/dioSQLite.tcl: SQLite implementation for DIO. From Peter da Silva. 2005-04-14 Pat Thoyts * win/Makefile.vc: Update the makefile and installer script * win/Rivet.nsi: for the 0.5.0 release. 2005-03-24 David N. Welton * Makefile.am (EXTRA_DIST): Added the doc, rivet and debian directories to the distribution. 2005-03-23 David N. Welton * doc/norefchunk.xsl: Removed chunk-first-section-with-parent and chunk-all-sections. * genconf.sh: Updated to use 1.8 autotools. 2005-03-12 David N. Welton * src/mod_rivet.c (Rivet_SendContent): Use static objects for scripts that are used for each request, in order to keep reusing them. (Rivet_PerInterpInit): Switch back to using Tcl_PkgRequire. 2005-01-08 Karl Lehenbauer * rivet/packages/dio/diodisplay.tcl: Accept arguments to the showform_prolog method that are passed through to the form's start method. This allows things like naming the form and accessing the fields from javascript by name. * rivet/packages/form/form.tcl: Allow start method to take key-value arguments that will be expressed in the
tag. 2005-01-07 Karl Lehenbauer * /rivet/packages/dio/diodisplay.tcl: Factor showform prolog and epilog code into showform_prolog and showform_epilog methods so that when a derived DIODisplay class is overriding, for example, an Add or Edit method, the author doesn't have to dup all of showform's functionality. * rivet/packages/form/form.tcl: Commented the package. 2005-01-03 David N. Welton * doc/rivet.xml: Use 'mail-archives' instead of nagoya. 2004-12-22 David N. Welton * Makefile.am (install-data-local): Added this target to install the Tcl packages and generate a pkgIndex.tcl file. 2004-12-16 David N. Welton * src/Makefile.am (lib_libexecdir): Did some rearanging of things to get the directories in a better state. * configure.ac: Added TCL_PACKAGE_PATH. 2004-12-14 David N. Welton * doc/Makefile.am: Added html doc targets. 2004-12-08 David N. Welton * Makefile.am, configure.ac: Added the doc/ directory. 2004-12-07 Karl Lehenbauer * rivet/packages/dio/dio.tcl: "DIO delete" method now return the number of rows affected. 2004-12-03 Karl Lehenbauer * rivet/packages/dio/dio.tcl: Cause fatal database errors such as bad syntax, etc, to raise a Tcl error in many methods that used to just return 1 or 0 (like DIO store). * configure.ac: Remove superfluous commented-out lines * Add BUGS file. Update STATUS and VERSION files. 2004-12-02 David N. Welton * Removed libtool - it appears to be under the GPL! * Removed aclocal.m4 configure Makefile.in src/Makefile.in to avoid CVS churn. * configure.ac: Commented out AC_DEFINE(USE_TCL_STUBS), as it was causing some problems for mod_rivet.so. 2004-12-02 Karl Lehenbauer * Collected some build notes in README.configure * : Clean up presentation of --with-apxs and --with-tclsh and have them show up when configure --help is run. * tclconfig/tcl.m4, configure.ac, config.h, src/*.c: Switch most autoconf-generated elements that get put on compiler command lines as -DHAVE_NET_ERRNO_H, etc, to put that stuff in config.h instead. This included altering all AC_DEFINE and AC_DEFINE_UNQUOTED macros to have three arguments, where the third argument is a description, so that autoheader can generate the config.h.in, significantly decluttering the compiler command lines. tcl.m4 changes should be fed back to the TEA project, as well as the technique for using automake to simplify the build * Move aclocal.m4 to acinclude.m4 -- we need the aclocal command to generate acinclude.m4 based on aclocal.m4 and stuff it gleans from the configure.ac script, etc. * configure.ac: A path to tclsh is automatically figured out by the TEA 3.1 build stuff. However it is also possible to override with --with-tclsh, and the configure script also makes sure there at least is a file there as well. * src/configure.ac et al: Get automake, aclocal, and autoconf to run without complaint, generating the configure script, Makefile.in files, etc. * configure.ac: Propagate the NAMEOFEXECUTABLE define via the autoconf scripts src/Makefile.am: (same) * configure: check in configure script, it's hard to make unless you have everything just right. We will probably revisit this later. * src/Makefile.in: (same) * Makefile.in: (same) * libtool: Added libtool and friends in tclconfig dir using libtoolize -- this is what figures out how to build shared libraries, etc. 2004-12-01 Karl Lehenbauer * Update autoconf build to TEA 3.1 * configure.am: Automatically locate apxs in the PATH if it hasn't been overridden by --with-apxs. Likewise automatically locate tclsh if it hasn't been overridden by --with-tclsh. * Add of README.freebsd for FreeBSD. 2004-11-17 Karl Lehenbauer * rivet/packages/dio/dio.tcl: Fixed comments incorrectly placed outside of a switch body. 2004-11-11 Karl Lehenbauer * rivet/packages/dio/dio.tcl: Added "insert" method that doesn't try to see if it's there already all the other stuff that "store" does. * doc/rivet.xml: Documentation for above. 2004-11-05 Karl Lehenbauer * rivet/packages/session/session-class.tcl: Quote backslashes when storing so they won't be stripped by the database. Needs to be tested for MySQL and SQLlite. 2004-11-04 Karl Lehenbauer * rivet/packages/dio/*.tcl: Documented the code for DIO and DIOdisplay. 2004-11-04 David N. Welton * src/mod_rivet.c (Rivet_ServerConf): Use Tcl_GetBoolean, at Karl's suggestion. 2004-11-03 David N. Welton * src/mod_rivet.c (Rivet_ServerConf): Instead of just "on", accept "yes" and "1" as well. 2004-10-29 Karl Lehenbauer * rivet/packages/dio/dio_Mysql.tcl: The "DIO handle" method, which returns the underlying database's connection handle, now forces the database connection to be made, if it hasn't already been made, just like DIO exec. * rivet/packages/dio/dio_Postgresql.tcl: (same) 2004-09-29 David N. Welton * src/rivetCore.c (TestpanicCmd): Added command to test panics. * src/mod_rivet.c (Rivet_Panic): Added panic proc that tries to log the error to disk. 2004-09-20 David N. Welton * rivet/packages/rivet_ncgi/rivet_ncgi.tcl: Compatibility layer for tcllib's ncgi package. 2004-09-20 Karl Lehenbauer * src/mod_rivet.c (Rivet_PerInterpInit): Load the init.tcl file with an explicit path rather than using Tcl_PkgRequire. Previously, if Rivet was installed with a PREFIX/lib that wasn't already in Tcl's package search path (auto_path, probably because it was the same lib directory as Tcl used, typically /usr/local/lib), Tcl startup is unable to find the RivetTcl package, and Rivet is unable to start. 2004-09-17 Karl Lehenbauer * rivet/packages/rivet/pkgIndex.tcl: Removed. It had a hard-coded assumption about the shared library extensions (.so). This file is now generated in the target directory by the install node of make.tcl. * rivet/pkgIndex.tcl: Removed. It is generated by the make.tcl install process, as above. * src/make.tcl: The above changes, specifically the install node now generates the target rivet/pkgIndex.tcl and rivet/packages/rivet/pkgIndex.tcl file using pkg_mkIndex, causing all Tcl-defined and shared-library-defined packages to be discovered and generated into the pkgIndex.tcl. 2004-09-16 Karl Lehenbauer * src/parserPkgInit.c: Added a Rivetparser_SafeInit so the C-based standalone Rivet parser library can be loaded from safe interpreters. After inspection, we believe that rivet::parserivetdata can be loaded into safe interpreters without compromising their security. rivet::parserivet definitely cannot be made available to a safe interpreter -- it could be manipulated to read files. * src/rivetPkgInit.c: Added a Rivet_SafeInit so lib can be loaded from safe interpreters, which also makes it work better under Mac OS X. * src/rivetCrypt.c: Added function header to init routine. * src/rivetList.c: (same) * src/rivetWWW.c: (same) * README.MacOSX: Temporary file to document Mac OS X build quirks. * src/configure.tcl: If a configuration variable in tclConfig.sh ever had an equal sign in the "value" portion of the key=value pair, configure.tcl would malfunction. A missing variable caused a variable referencing that missing variable to be silently dropped. We now complain, although the right answer is probably to substitute an empty string for all missing variables. Still, this way at least gives a hint as to the problem. * src/Makefile: Add simple rules for "clean", "distclean", and "install" that simply invoke make.tcl appropriately. 2004-08-07 David N. Welton * rivet/packages/dtcl/dtcl.tcl (hgetvars): Added code from Arnulf Wiedemann to set up VARS array. 2004-08-03 Pat Thoyts * win/Rivet.nsi: Added a NSIS script. This is used with the Nullsoft scriptable installer system to create an installer for Rivet to install onto a Windows system. * win/makefile.vc: Added htmlhelp and installer targets. 2004-06-25 Pat Thoyts * src/rivetCrypt.c: Fix const-ness of resultBuffer to match apache's crypt function. * win/makefile.vc: Fixed the version string to match rivet project version. Support use of MSVC.NET or VC++Toolkit compilers. 2004-06-04 David N. Welton * contrib/two-mode-mode.el: Updated two-mode-mode. 2004-06-02 David N. Welton * src/buildscripts/aardvark.tcl: Use 'Output' instead of puts. It might be useful were we ever to do something like make an aardvark GUI. 2004-06-01 David N. Welton * Following changes by Pat Thoyts : * win/makefile.vc: Updated to deal with the START_TAG END_TAG macros. * src/rivetParser.h: Declare missing prototype. * tests/binary.rvt: The stdout channel under Windows needs to be told to use translation binary for binary data. 2004-05-18 David N. Welton * src/make.tcl: Quote Tcl argument. * doc/rivet.xml: Added clearer instructions for mailing list subscription. 2004-05-05 Karl Lehenbauer * src/rivetWWW.c: Made the escape_string command map spaces to plus signs (+) rather than %20. They're equivalent and unescape the same, but the plus signs are visually easier to take. 2004-05-05 Karl Lehenbauer * /rivet/packages/dio/diodisplay.tcl: Got "-type boolean" working. There's some problem with using a method that uses configvar to set a var as a method in a class where the class is being inherited by a subclass that redefines the variable. I had to substitute "cget -varName" style to get it to work. 2004-05-05 Karl Lehenbauer * /rivet/packages/dio/diodisplay.tcl: Added "-type select" option to DIOdisplay fields, and a new option, "-values $list" which takes a list of values to be made available with a form selector. 2004-05-05 Karl Lehenbauer * /rivet/packages/dio/diodisplay.tcl: When adding a new record, if they've typed anything into the "is" field, set the default value of the field specified in the "where" part to match. 2004-05-05 Karl Lehenbauer * doc/rivet.xml: Documented the escape_string, unescape_string, escape_sgml_chars, and escape_shell_command functions. 2004-05-04 Karl Lehenbauer * rivet/packages/dio/diodisplay.tcl: Added enhancements from Peter da Silva (peter@taronga.com): Add support for hidden variables. (This is so that you can have state variables that are maintained by the function outside of DIOdisplay, retained as you jump through DIOdisplay.) Added DIORowHeader to the style sheet. Turned the search table into a navigation bar. Added a filter method that allows you to edit the display of fields on the fly, for example, you have a time in integer seconds since 1970 and you can add a filter that does a "clock format" using -filter, or, for example, it can look up an IP address from a table. * rivet/packages/dio/dio.tcl: Added enhancements from Peter da Silva (peter@taronga.com): New "forall" method will apply a result across a code body for each record returned in the result and then delete the result handle, all in one fell swoop. 2004-04-24 David N. Welton * src/buildscripts/aardvark.tcl (aardvark::runbuildcommand): If the node doesn't exist, always "rebuild" it. * src/make.tcl: Make sure make install message is only printed when the correct target is called. 2004-04-21 David N. Welton * rivet/packages/dio/pkgIndex.tcl: Add sqlite interface. * rivet/packages/dio/dio_Sqlite.tcl: Added incomplete sqlite interface to DIO. 2004-04-14 David N. Welton * rivet/packages/dio/dio.tcl: Removed mysql and postgres specific code from main DIO package, which now loads the subclass package automatically. * rivet/packages/dio/dio_Mysql.tcl: Added new package to remove separate mysql DIO interface. * rivet/packages/dio/dio_Postgresql.tcl: Added new package to separate postgres DIO interface. 2004-04-12 Andy Doerr * rivet/packages/dio/diodisplay.tcl: - Modified searchBy form field to use the -labels and -values parallel lists in form.tcl class method (select). - Modified Search proc to not use FieldTextMap as the search now does not need to look up the db field name. 2004-04-05 David N. Welton * tests/docroot1/ tests/docroot2/: Files used to test virtual hosts with. * tests/virtualhost.test: New file: tests for virtual hosts. * tests/apachetest/apachetest.tcl: Require our own version of http.tcl, due to Tcl feature request #928154 (it's impossible to set the Host header). (apachetest::start): We now take 3 arguments. The new one is 'conftext', which is used to write to the test.conf file before running the test. * tests/runtests.tcl: Changed test config to add an "Include test.conf" directive. We can write out our own configs for each test with that. * src/mod_rivet.c (Rivet_PerInterpInit): New function that groups together everything that has to happen when a new interpreter is created - either the main one, or for virtual hosts. (Rivet_InitTclStuff): Redid the way virtual hosts are treated here: make sure there is a unique rivet_server_conf for each one, either because MergeConfig has been called, or we create one ourselves. (Rivet_CreateConfig): We don't initialize objCache and outchannel members of rivet_server_conf here anymore. They are now taken care of in Rivet_InitTclStuff. (Rivet_MergeConfig): Either take care of all members of rivet_server_conf struct, or include a comment explaining why it's not there. (Rivet_ChildHandlers): New function - takes care of either child init or exit scripts, depending on how it's called. * doc/rivet.xml: Describe how each RivetServerConf directive interacts with virtual hosts. 2004-02-26 David N. Welton * doc/rivet.xml: Added DIODisplay section. 2004-02-25 David N. Welton * src/rivetParser.h: start/end tags removed from here. * src/make.tcl: START_TAG and END_TAG are now defined here, so that they are easier to configure at build time. * doc/rivet.xml: Initial cut at including DIO docs in the main set of docs. 2004-02-23 David N. Welton * LICENSE: Switch to Apache 2.0 License. 2004-02-20 David N. Welton * src/TclWebapache.c (TclWeb_SetHeaderType): strdup object's string value so we have our own copy of it. 2004-02-19 David N. Welton * doc/rivet.xml: Added some additional comments regarding the installation. Thanks to Tom Krehbiel for the suggestions. 2004-02-17 David N. Welton * src/make.tcl: Created better dependency system for DocBook docs. * doc/html/rivet.*.html: Added non-chunked versions of the docs. * doc/rivet-nochunk.xsl: Change include of docbook.xsl to an import at the top of the file. Seems to make things work ok. 2004-02-11 David N. Welton * src/make.tcl: Don't delete rivet packages directory during install. This used to happen in order to keep things clean, but people are using this directory for local packages/modifications, so this is not a good thing to have. 2004-02-06 David N. Welton * tests/headers.test: Include current version of http package in result automatically, so as to avoid having to update it by hand. * tests/apachetest/apachetest.tcl (apachetest::getallincludes): Create function to fetch a conf file and all the files Included it from it. * doc/rivet.xml: Add section for session package. * doc/rivet.xml: Added SESSION documentation. * rivet/packages/session/README.txt: Removed text, indicate HTML/XML docs - I don't want to maintain the same docs in two places. * src/make.tcl: Create directory before installing. 2004-01-20 Karl Lehenbauer * rivet/packages/dio/diodisplay.tcl: Removed calls to abort_page when relatively benign conditions like no records matching a search occur. This allows us to emit all the code we need, like closing the table (
) and emiting our page trailer, etc, instead of having the page cut off somewhere in the middle. 2004-01-15 David N. Welton * rivet/rivet-tcl/load_response.tcl (load_response): Fixed a bug in load_response that was tickled by calling it multiple times. Thanks to Brad for catching it. 2004-01-15 Brad Morrison * rivet/rivet-tcl/load_response.tcl: Changed behavior from appending discovered values to existing elements in the response array to simple assignment. 2004-01-15 David N. Welton * rivet/packages/simpledb/simpledb.tcl (simpledb::synctostorage): Added fix from Massimo Manghi for bug in procedure to write database to disk. * rivet/packages/simpledb/simpledb.test (populatetables): Commented out stuff to add into the test later. 2004-01-08 David N. Welton * src/make.tcl: Added warning to default make.tcl target in order to encourage people to run ./make.tcl install. 2004-01-08 Karl Lehenbauer * src/buildscripts/findapxs.tcl: When the apxs program cannot be located, the message now mentions that the location of apxs can also be specified using the "-with-apxs" option on the command line. 2004-01-05 Karl Lehenbauer * rivet/packages/session/*: Checkin of session management code. This is a from-scratch rewrite of Superconnect's session management code, donated to Rivet under the terms of the Apache Software License. See rivet/packages/session/README.txt for details of what it does and how it works. 2004-01-02 Karl Lehenbauer * src/buildscripts/findapxs.tcl: Added /usr/local/bin and /usr/local/sbin to the directories that Rivet configuration looks in to find apxs, when the path to apxs wasn't specified on the configure command line. Changed findapxs::FindAPXS to generate an error if it couldn't find a working apxs utility, rather than just returning an empty string. Previously if apxs could not be found, the error message emitted by configure.tcl was: "Error in CFLAGS test: couldn't execute "": no such file or directory" Now it says it couldn't find the Apache Extension Tool apxs and lists everywhere it looked. 2003-12-20 David N. Welton * tests/parsepackage.test: Added tests for the Rivet parser standalone package and pure Tcl Rivet parser. * INSTALL: Added basic configuration directives to INSTALL file. * rivet/packages/tclrivet/tclrivetparser.tcl: Added pure Tcl Rivet parser. This doesn't have all the Rivet commands available, it just parses a style Rivet file into the corresponding Tcl script. * src/parserPkgInit.c (Parse_RivetData): We no longer automatically add the namespace. The user ought to be able to add that should they so choose. This makes the command more flexible. * src/rivetParser.c (Rivet_Parser): Removed an unnecessary Tcl_UtfNext from the parser. (Rivet_GetRivetFile): Removed useless 'inside' variable from this function. * doc/rivet.xml: Add abort_page, no_body and env commands, reordered the load_* commands. * doc/rivet.it.xml: Updated author. * doc/rivet.ru.xml: Updated author. * doc/rivet.xml: Changed documention author to "The Rivet Team". * src/rivetCore.c (Rivet_NoBody): Return an error if content has already been sent. * src/rivetCore.c: Added fancy headers to all functions. 2003-12-13 David N. Welton * tests/broken.test: Updated test results for what is actually returned on error. * src/rivetParser.c (Rivet_Parser): "export" function in that it's no longer static. * src/parserPkgInit.c (Parse_RivetData): New alpha-ish command to parse data passed to the script. * src/configure.in.tcl: Merge apxs and Tcl CFLAGS in order to include what we need from both. Hopefully there won't be any conflicts. 2003-11-27 David N. Welton * doc/rivet.xml: Added information about debugging Apache/Rivet. 2003-11-20 David N. Welton * src/make.tcl: Changed xsltproc lines to deal with new link styles. * doc/rivet.xml: Changed links as in Russian translation. * doc/rivet.it.xml: Changed links as in Russian translation. * doc/rivet.ru.xml: Changed links to use "en.html" style instead of "html.en". This will make google pick up the pages. 2003-10-22 David N. Welton * win/: Numerous updates from Pat Thoyts . 2003-09-30 David N. Welton * src/rivetCore.c (Rivet_Include): More ref count management. * src/mod_rivet.c (Rivet_PropagatePerDirConfArrays): Added more ref count management. * src/rivetParser.c (Rivet_GetRivetFile): Add ref counting for 'inbuf'. * src/mod_rivet.c (Rivet_ParseExecFile): Manage ref count for outbuf better. (Rivet_SendContent): Clean up 'info script' code. (Rivet_InitTclStuff): Rework 'if' to eliminate double assignment. * src/TclWebapache.c (TclWeb_GetEnvVars): Add ref counting for envvar. (TclWeb_GetHeaderVars): Fix ref counting for headersvar. * tests/headers.test: Added test for load_headers. * src/apache_request.h: Updates from httpd-apreq. * src/apache_request.c: Updates from httpd-apreq. 2003-09-29 David N. Welton * rivet/packages/commserver/server.tcl: Exit 1 on failure. * rivet/packages/commserver/commserver.tcl: Check to make sure the server is really running before returning from commserver::start. * rivet/packages/simpledb/simpledb.tcl: Added 'simpledb', although it's not ready for production use. * src/mod_rivet.c (Rivet_ChildInit): If we don't have separate virtual servers, we only need to run the ChildInitScript once. If we do have interpreters for each virtual server, each one gets to run the script. * doc/rivet.ru.xml: Big update of the Russian translation by Dmitry the Zuryanovich . Thanks! 2003-09-26 David N. Welton * src/mod_rivet.c: Spelling check: seperate->separate. 2003-09-24 David N. Welton * doc/rivet.xml: Mention the global command in the 'internals' section. 2003-08-30 David N. Welton * doc/rivet.xml: Added var_qs and var_post cmdsynopsis's. 2003-08-29 David N. Welton * doc/rivet.xml: Use refentry and sub-elements instead of variablelist. This is more correct. * doc/norefchunk.xsl: New file - handle refentries without making them new files. * doc/rivet.xsl: Scratch the last changes and go with refentry's for all commands. This is a more difficult solution to parse, but in the end is more correct. * doc/refentry.xsl: New file to handle refentry stuff. 2003-08-28 David N. Welton * doc/rivet.xsl: Minor changes to look and feel. * doc/rivet.xml: Added tags for commands, in order to create the index. * doc/rivet.xsl: Added XSL to parse , needed to create an index of commands on the index page. 2003-08-26 David N. Welton * doc/rivet.xml: Added section to documentation about emacs and vim modesl for Rivet files. * src/configure.in.tcl: -with-apxs option no longer takes a default. It should work that out on its own using the findapxs.tcl script. 2003-08-23 David N. Welton * src/configure.in.tcl: Remove test for broken Tcl installations on FreeBSD and MacOS X. Apparently, things work ok with 8.4. 2003-08-22 David N. Welton * src/configure.in.tcl: Add test for broken Tcl installations on FreeBSD and MacOS X. * doc/rivet.xml: Added installation instructions corresponding to the new ./configure.tcl system. Ran the spellchecker. * src/buildscripts/aardvark.tcl (aardvark::runbuildcommand): Rebuild only if file depended on is newer than the target, rather than >=. This prevents some files from being remade if make is run again. * src/configure.tcl (configure::ProcessOptions): Added 'verbose' flag to configure. (configure::test): Exit on tcl failure in test procedures. (configure::assert): Added assert command. Fail on error or 0. 2003-08-21 David N. Welton * src/configure.in.tcl: Changed INC variable to use TCL_INCLUDE_SPEC. * INSTALL: Updated instructions. * src/configure.tcl (configure::parsetclconfig): We need access to previously parsed variables, so we do this in the ::configs namespace. 2003-08-20 David N. Welton * src/buildscripts/aardvark.tcl (aardvark::getconfigs): Added new function to fetch the config info out of configs.tcl. * src/make.tcl: Removed debinstall target, because we can now accomplish the same thing by overriding configure options on make's command line. Removed the configure-style code at the top of the file. * src/configure.in.tcl: Specify the variables to test for/create, as well as some command line options specific to Rivet. * src/configure.tcl: Added new configure-like system to obtain information about the environment where Rivet is being compiled. Running ./configure.tcl creates a file, configs.tcl, with the its findings. make.tcl now uses those values as its defaults, unless they are overridden on make.tcl's command line. 2003-08-11 David N. Welton * src/make.tcl: Added fileutils Tcl package to buildscripts, in order to utilize the 'install' command. 2003-08-05 David N. Welton * contrib/rvt.vim: Added contributed vim mode for editing Rivet files. * contrib/two-mode-mode.el: Added emacs mode for editing Rivet files. 2003-07-22 David N. Welton * doc/rivet.ru.xml: Added lang=ru to article, so that markup like produces the correct language. * doc/rivet.it.xml: Added Italian translation of Rivet docs by Fabio Zanotti . 2003-07-16 David N. Welton * doc/rivet.xml: Explain example script just a bit more clearly. * src/make.tcl: Fix up clean target. Use MOD_SHLIB as target instead of explicit mod_rivet.so. 2003-07-08 David N. Welton * src/buildscripts/findapxs.tcl: Added /usr/local/sbin as a place to check for apxs. Thanks to Andy Doerr for pointing out that this is where it's kept on FreeBSD. 2003-07-07 David N. Welton * doc/examples/upload.html: Added submit button to file upload example. 2003-07-05 David N. Welton * src/rivetWWW.c (snprintf): Added snprintf define from Pat. * src/rivetParser.h: Added bit of defines for windows builds, declared some of the functions EXTERN's here. * src/rivetList.c: Make list commands created here 'static' - Pat. * src/rivetCrypt.c: Use ap_config.h to grab other header files we might need, like crypt.h. This is not an ideal solution, because it adds a dependency we didn't have before. Added change by Pat to conditionally compile or not the 'Rivet_Crypt' command. * src/rivet.h: Added EXTERN definitions for functions. * src/parserPkgInit.c (Rivetparser_Init): Added EXTERN decleration for win builds. * win/rules.vc: New file: include file for Microsoft makefile. * win/rivet.dsp: New file: Microsoft Developer Studio Project File. * win/nmakehlp.c: New file: helper for windows building. * win/makefile.vc: New file: makefile for windows. All from Pat Thoyts . * doc/examples/vars.html: Use a table to make the form look nicer. * doc/examples/vars.rvt: Now we display some results. 2003-07-01 David N. Welton * src/rivetCore.c (Rivet_Upload): Pass the correct element of objv to TclWeb_UploadSave. * tests/uploadsave.rvt: New file to test 'upload save'. * tests/upload.test: New test for 'upload save'. 2003-06-30 David N. Welton * src/mod_rivet.c (Rivet_ParseExecFile): Use Tcl_FSStat instead of Tcl_Stat. * src/rivetCore.c (Rivet_Parse): Use Tcl_FSStat instead of Tcl_Stat. 2003-06-29 David N. Welton * doc/rivet.xml: Add IRC reference to the help section of the manual. 2003-06-23 David N. Welton * doc/rivet.ru.xml: Updated Russian version to indicate which version of the original it was based on. * doc/rivet.xml: Added version string to English version. 2003-06-14 David N. Welton * doc/rivet.xml: Added CVS Id tag. * doc/rivet.ru.xml: Added comment to indicate the version of rivet.xml that the Russian translation is based on. 2003-06-12 David N. Welton * src/mod_rivet.c (Rivet_ParseExecFile): Rework checks for .htaccess file changes. This code was causing an obscure bug where a file would be in the cache twice, thus causing crashes. * Moved russian translation around again. * src/TclWebapache.c (TclWeb_GetEnvVars): Use TCL_NAMESPACE_ONLY here and in TclWeb_GetHeaderVars in order to set the variable in the correct place. * src/make.tcl: Added changes to build Russian documentation. * doc/rivet.xml: Added link to Russian translation. * doc/rivet.ru_UTF.xml: Added link back to English version. 2003-06-10 David N. Welton * doc/rivet_utf_ru.xml: Added Russian translation of documentation by Dmitry Zuryanovich. 2003-06-09 David N. Welton * doc/rivet.xml: Cleaned up docs about fetching the httpd sources. 2003-05-26 David N. Welton * src/rivetCore.c (Rivet_Headers): Change error message to better reflect that there is only one argument to 'headers numeric'. Thanks to "Dmitry Zuryanovich". * src/mod_rivet.c (Rivet_ParseExecFile): Updated Rivet_GetRivetFile and Rivet_GetTclFile to use the right arguments. 2003-05-24 David N. Welton * rivet/packages/tclrivet/tclrivet.tcl: Added commands that need to be filled in. * tests/runtests.tcl: Use apachetest::need_modules. * tests/apachetest/apachetest.tcl (apachetest::need_modules): New proc, utilized to tell the test suite which apache modules are needed. 2003-05-23 David N. Welton * src/buildscripts/aardvark.test: Do a version check on gcc. We used that for the tests, so we might as well be sure we're using the same version. * src/make.tcl: Use buildscripts.tcl to load up all the other scripts we need. Add PARSER_SHLIB as a dependency for the shared build. * src/buildscripts/aardvark.test: Updated aardvark tests to current GCC. * src/buildscripts/buildscripts.tcl: New file: use this file to load up all the other scripts. * src/buildscripts/findconfig.tcl: Moved all the functionality into parsetclConfig.tcl. * src/buildscripts/aardvark.tcl: Just source the graph.tcl file directly instead of dealing with packages. Thanks to Pat Thoyts. 2003-05-22 David N. Welton * src/rivetParser.c (Rivet_GetRivetFile): API Change: instead of taking a TclWebRequest argument, we just give this function a Tcl_Interp, which makes it easier to seperate this code from Rivet. * src/mod_rivet.h: STARTING_SEQUENCE and ENDING_SEQUENCE moved to rivetParser.h, in order to make that file independant of mod_rivet.h. * src/make.tcl: Use slightly more descriptive variable names. Add code to compile librivetparser.so. * src/parserPkgInit.c: New file. Provides a Tcl extension to the Tcl parser, so that regular (not running under Apache) scripts can access it. * doc/html/rivet.css: Updated a few stylesheet properties to make the docs look a bit classier. 2003-05-21 David N. Welton * doc/rivet.xsl: Switch on parameter to use images in HTML output from docbook. * doc/rivet.xml: Added c.l.t. newsgroup to resources section. 2003-05-20 David N. Welton * doc/html/rivet.css: Added CSS file. * src/make.tcl: Added parameter to xsltproc to link the html output to a CSS file. 2003-05-14 David N. Welton * src/make.tcl: Added PKGINDEX to the list of dependencies for rolling a distribution. Updated STATUS file. * rivet/packages/commserver/commserver.tcl: Added commserver package as one potential IPC method. * src/make.tcl: Target ../VERSION node correctly. New target $PKGINDEX to automatically generate a top-level (which is where Tcl searches) package index for all the sub-packages in the Rivet distribution. * src/buildscripts/aardvark.tcl (aardvark::runbuildcommand): A few stylistic changes: [ cmd ] -> [cmd]. 2003-05-13 David N. Welton * doc/rivet.xml: Added a few options - numeric and add to the header documentation. Removed 'setcookie', which has been replaced by the 'cookie' command. * src/make.tcl: Pass [info nameofexecutable] to mod_rivet.c compilation, in order to make Rivet aware of the location of tclsh. * src/mod_rivet.c (Rivet_InitTclStuff): Use name of tclsh executable passed in via the build script. This isn't really the name of the executable Rivet is part of (Apache), but I think this is more useful. 2003-05-11 David N. Welton * src/apache_request.c: Updated to the latest from the httpd-apreq package. 2003-04-07 David N. Welton * src/make.tcl: Make sure that auto_path gets extra stuff at the beginning, so as not to create problems when using it to fetch the prefix. * VERSION: Bump point number for new release. * src/make.tcl: Use package require to load aardvark. * src/buildscripts/graph.tcl: This file should provide the 'struct' package. 2003-03-30 David N. Welton * doc/rivet.xml: Fixed example configuration directive. 2003-03-27 David N. Welton * src/TclWebapache.c (TclWeb_UploadData): Comment out unused alloc. * src/rivetWWW.c (Rivet_UnescapeStringCmd): Free memory allocated with Tcl_Alloc. (Rivet_EscapeStringCmd): Free memory allocated with Tcl_Alloc. (Rivet_EscapeSgmlCharsCmd): Free memory allocated with Tcl_Alloc. (Rivet_EscapeShellCommandCmd): Free memory allocated with Tcl_Alloc. * src/rivetCrypt.c (Rivet_DecryptCmd): Free memory allocated with Tcl_Alloc. (Rivet_EncryptCmd): Free memory allocated with Tcl_Alloc. 2003-03-26 David N. Welton * Remove index.html and help.html. * rivet/pkgIndex.tcl: Added index file for RivetTcl package - i.e. init.tcl. 2003-03-25 David N. Welton * src/rivetPkgInit.c (Rivet_Init): Bump version number to 1.1. * src/mod_rivet.c (Rivet_InitTclStuff): Use Tcl_PkgRequire to load Rivet's init.tcl. * src/make.tcl: Use Tcl file location instead of Apache-based file location, in order to use Tcl_PkgRequire to load Rivet's init.tcl. * rivet/init.tcl: Provide 'RivetTcl' package. (init): Use [info script] instead of server(RIVET_DIR) variable. * src/make.tcl: Add a debinstall target as a temporary way to build .deb files. * debian/copyright: Added copyright file for debian. * debian/dirs: Added dirs file that lists directories used by Rivet on Debian. * debian/control: Added debian/control file with information about Rivet for the debian package. * debian/changelog: Added debian changelog file to track versions of the debian package. * debian/rules: Use 'rules' file from mod_dtcl. 2003-03-14 David N. Welton * src/mod_rivet.c (Rivet_AppendToScript): Don't append Before/After/Error scripts. Just override them. (Rivet_UserConf): Switch back to using Rivet_AppendToScript. (Rivet_SetScript): Change Rivet_AppendToScript to Rivet_SetScript to reflect the fact that it doesn't always append - specifically, in After/Before/Error scripts. * doc/rivet.xml: Use eyebrowse link instead of apachelabs for mailing list. 2003-03-13 David N. Welton * src/mod_rivet.h: Backed out extra entries in rivet_server_conf - they aren't necessary, as the overrides are taken care of for us. The only things we really need are 1) to use the flag user_scripts_updated to recompile scripts when UserConf variables have changed 2) to not append to existing scripts, but instead create new ones. 2003-03-12 David N. Welton * src/mod_rivet.c (Rivet_UserConf): Set user_scripts_updated flag. (Rivet_ParseExecFile): Check and clear flag. * src/mod_rivet.h: Added user_scripts_updated flag to signal that UserConf options have been set. This means that we need to recompile the script. 2003-03-01 David N. Welton * debian/debian.tcl: Helper file for generating .debs. 2003-02-28 David N. Welton * src/Makefile (all): Clean out Makefile - force use of make.tcl. * src/buildscripts/aardvark.tcl (aardvark::runbuildcommand): Use 'w' for shell command pipe, in order to not get broken pipes with commands that output something to stdout (such as tcl scripts!). 2003-02-21 David N. Welton * tests/config.test: Test to see if Rivet picks up changes in ".htaccess" files. * tests/README: Add descriptions of the various tests. * src/buildscripts/aardvark.tcl (aardvark::Nodes): Add command to return list of all nodes. * doc/rivet.xml: Add some information on the precedence of the different Conf options. Change information about DirConf - it isn't allowed in .htaccess files. 2003-02-19 David N. Welton * src/buildscripts/aardvark.test: Add test script and files for aardvark system. * src/buildscripts/graph.tcl: Include latest 'graph.tcl' from upstream. * src/make.tcl: We no longer force 'tcl' and 'sh' to take only one argument. In the case where we aren't forcing evaluation later with {}, this is nicer looking, as we don't have to quote everything with "". 2003-02-12 David N. Welton * src/mod_rivet.c: Mirror Craig Huckabee's mod_dtcl.c changes: - Use TCL_DECLARE_MUTEX to create the mutex, and change the mutex lock/unlock calls. - Remove the 'load only once' stuff from TclInitStuff. - InitTclStuff can now only be called from Child Init. 2003-01-17 David N. Welton * Added logos. 2003-01-08 David N. Welton * src/mod_rivet.c (Rivet_ChildInit): Patch from Karl Lehenbauer to print out errorInfo upon ChildInit failure. 2003-01-07 David N. Welton * src/TclWebapache.c (TclWeb_UploadData): Fix from Holger Zeinert that makes file uploads work on windows. 2002-12-30 David N. Welton * doc/examples/upload.html: Changed .ttml to .rvt - thanks to Holger Zeinert for catching this. 2002-12-18 David N. Welton * doc/rivet.xml: Noted the var_qs/var_post changes in the documentation. 2002-12-17 David N. Welton * tests/post.test: * tests/post.rvt: * tests/get.test: * tests/get.rvt: Added tests for David Brancato's var_qs and var_post improvements. * src/TclWebapache.c: Made "ugly" for loops into while loops. Created macro to set up loop parameters correctly. 2002-12-14 David N. Welton * src/TclWebapache.c: Redid indendation. * src/rivetCore.c: Implemented Tcl commands (via objv[0]) to retrieve variables from different, specified sources (query string, POST). (David Brancato). * src/mod_rivet.h: Added defines for variable sources. (David Brancato). * src/apache_request.c: Added functions to get query and post params. (David Brancato). * src/TclWebapache.c: Implemented TclWeb.h API change. (David Brancato). * src/TclWeb.h: Changed API to include a source option in order to indicate the origin (query string, POST) of a variable. (David Brancato). 2002-12-13 David N. Welton * src/mod_rivet.c (Rivet_InitTclStuff): Apache actually loads all the modules twice, just to see if it can. This is a pain, because things don't seem to get completely cleaned up on the Tcl side. So this little hack should make us *really* load only the second time around. 2002-12-10 David N. Welton * table.png: Transformed table.png so that it ought to display correctly on older(?) browsers. Thanks to Elchonon Edelson for his help. 2002-12-09 David N. Welton * src/mod_rivet.c (Rivet_SendContent): Switched from EvalObj to EvalObjEx. (Rivet_SendContent): EXPERIMENTAL: added Mutex locks on SendContent, in order to keep windows safe. This needs testing out! 2002-12-04 David N. Welton * src/TclWebapache.c (TclWeb_GetEnvVars): Put DecrRefCount back in - must have taken it out by mistake while hunting a previous memory leak. 2002-11-23 David N. Welton * src/mod_rivet.c (Rivet_SendContent): Set up information for [info script] by using r->filename. 2002-11-19 David N. Welton * doc/examples/table.rvt: Fixed up format operation to make nicer tables. 2002-11-18 David N. Welton * cvsversion.tcl (main): Added catch to make sure that VERSION has something in it and isn't. 2002-11-09 David N. Welton * doc/rivet.xml: Make docs reflect behavior of 'var get foobar' when foobar doesn't exist - "" is returned. * tests/apachetest/apachetest.tcl: Updates to testing utility procedures. 2002-11-04 David N. Welton * tests/get.test: Backed out changes to 'var get': no longer throws an error if the variable does not exist, but instead returns "". Use 'var exists' to see if it really exists or not. * src/mod_rivet.c (Rivet_ChildExit): Add call to Tcl_Finalize. This still needs more investigation. * tests/upload.test: Added proper end boundary to upload test. * src/apache_*: New apache request code from upstream. 2002-10-29 David N. Welton * src/rivetWWW.c (Rivet_EscapeStringCmd): Eliminate warning on Solaris by casting a char to an int. 2002-10-28 David N. Welton * src/rivetCore.c (Rivet_Include): Changed Tcl_Channel name to tclstdout to avoid any conflicts with the real stdout. 2002-10-23 David N. Welton * doc/rivet.xsl: Use
 tag for source code examples.

2002-10-22  David N. Welton  

	* src/TclWebapache.c (TclWeb_StringToUtf): One more CONST84 - now
	we pass the tests!

2002-10-21  David N. Welton  

	* src/*.c: "CONST"ification.  See http://mini.net/tcl/3669 for
	more information.

	* src/: Minor build script updates.

2002-10-20  David N. Welton  

	* doc/rivet.xml: "make" needed to be "make.tcl".  Thanks to Makoto
	SATOH.

2002-10-18  David N. Welton  

	* tests/get.test: Added tests for new "var get" behavior.

	* doc/rivet.xml: Documented new "var get" behavior.

	* src/rivetCore.c (Rivet_Var): Added ?default? option to "var
	get".

	* doc/examples/: Added examples for XML document.

	* doc/rivet.xml: Several examples of how to use Rivet.

2002-10-17  David N. Welton  

	* doc/rivet.xml: Added Entities to deal with included files.  This
	makes it easier to correctly format the source code that is to be
	included.

2002-10-09  David N. Welton  

	* src/buildscripts/findapxs.tcl: Added /usr/sbin/ at the request
	of David Brancato, who notes that Redhat often locates apxs there.

2002-10-02  David N. Welton  

	* doc/rivet.xml: Added 'Introduction' section.

2002-09-29  David N. Welton  

	* doc/rivet.xml: Reworked several elements to better utilize
	docbook.

	* doc/rivet.xsl: Major reworking of several elements, including
	group and arg.  Added lots of style changes.

	* src/make.tcl: Add commands and dependencies to build extensions
	documents without chunks, and the main Rivet docs in chunks
	(seperate HTML files are output).

	* doc/rivet.xml: Updated docs to reflect new Apache directives.

2002-09-27  David N. Welton  

	* src/mod_rivet.c (Rivet_InitTclStuff): Change default CacheSize
	to MaxRequestsPerChild / 5, which should still be plenty, but will
	waste less space.

	* src/rivetCore.c (Rivet_Include): "include" command now saves
	channel encoding/translation, outputs the included file to stdout
	with binary translation/encoding, and then resets the original
	settings.  Fixes problem with EUC-JP characters in included
	files.  Thanks to Makoto SATOH for his help in finding this.

	* tests/lang.test: Added file to test LANG setting in server, to
	check character encodings.

	* tests/parse.test: Added EUC-JP characters to test that they come
	through ok.

	* tests/include.test: Added EUC-JP characters to test that they come
	through ok.

2002-09-11  David N. Welton  

	* src/TclWebapache.c (TclWeb_InitEnvVars): Don't do an
	ap_clear_table on the environmental variables.  The include module
	no longer does this, and neither does PHP, so I guess it's safe to
	remove, and it's useful for users of modules like mod_uniqe_id.

2002-09-08  David N. Welton  

	* src/TclWebapache.c: Fix up ObjSetVar2 use.

	* src/mod_rivet.c: Fix up another instance of ObjSetVar2.

2002-09-07  David N. Welton  

	* src/mod_rivet.c (Rivet_PropagatePerDirConfArrays): Do the right
	tricks with IncrRefCount and DecrRefCount to stop the leak.

2002-08-03  David N. Welton  

	* src/mod_rivet.c (Rivet_AppendToScript): Changed before, after,
	and error scripts back to plain old ascii, in order to plug a
	memory leak.

	* src/mod_rivet.h: New macro: FILEDEBUGINFO off by default.
	Useful for debugging the order of functions called.

2002-07-28  David N. Welton  

	* doc/rivet.xsl: Updated rivet.xsl from Websh's xsl.

2002-07-21  David N. Welton  

	* doc/rivet.xml: Several new sections.  We now have most of what
	is in the HTML documents.

2002-07-19  David N. Welton  

	* src/buildscripts/aardvark.tcl (aardvark::runbuildcommand):
	Attempt to use 'open' to execute shell commands, in order to both
	catch the output as well as the return code.

	* doc/rivet.xml: New file.  Removed directives.xml in favor of
	this, which we will use to build individual HTML files and other
	forms of documentation.

2002-07-18  David N. Welton  

	* src/rivetCore.c (Rivet_Upload): Changed format of 'upload'
	command to be more like 'var'.  Changed relevant tests.

2002-07-14  David N. Welton  

	* doc/directives.xml: New file - XML version of directives.html.

2002-07-12  David N. Welton  

	* src/buildscripts/aardvark.tcl (aardvark::runbuildcommand):
	Updated functionality to hopefully better handle errors, warnings,
	and output.

	* src/make.tcl: Created a 'dist' target which rolls a tarball.

2002-07-11  David N. Welton  

	* src/TclWebapache.c (TclWeb_GetHeaderVars): New function to get
	client headers, which are now seperate from environmental
	variables.

2002-06-18  David N. Welton  

	* cvsversion.tcl: Added tool to manage version numbers based on
	CVS changes.

2002-06-17  David N. Welton  

	* src/make.tcl: Updated build scripts to build the HTML
	documentation from XML files.

	* src/buildscripts/aardvark.tcl: Changed commands to 'sh' for
	shell commands and 'tcl' for Tcl commands.

2002-06-10  David N. Welton  

	* doc/packages/dio/dio.xml: Further updates.

2002-06-08  David N. Welton  

	* doc/packages/dio/dio.xml: Finished up adding material to
	dio.xml.

2002-06-06  David N. Welton  

	* doc/packages/dio/dio.xml: Initial commit of (incomplete) docbook
	documentation.

	* doc/packages/dio/rivet.xsl: Added XSL file for docbook
	documentation.

2002-05-03  David N. Welton  

	* src/TclWebapache.c (TclWeb_GetVarAsList): Added check to length
	to make sure we fully compare the two variables.  Idem for
	TclWeb_VarExists.

2002-04-19  Damon J. Courtney 
	* src/TclWebapache.c
	    Added 'TclWeb_GetVirtualFile' command which returns the full
	    path to a virtual file.

	* src/rivetCore.c
	    Added command 'virtual_filename' to return the full path to a
	    virtual file.

	    Added -virtual option to include and parse commands to enable
	    them to parse a virtual file which is relative to the webserver.

2002-03-26  Damon J. Courtney 

	* rivet/packages/form
	    Added a new package for handling forms in Rivet.

2002-03-26  Damon J. Courtney 

	* src/TclWebapache.c
	    Moved the setting of include variables from LoadEnv to the
	    InitEnv command.  This will allow us to retrieve these variables
	    via the env command as well as load_env.

2002-03-21  Damon J. Courtney 

	* src/TclWebapache.c
	* src/TclWeb.h
	    Added new command 'TclWeb_HeaderAdd'.

	* src/rivetCore.c
	    Added 'add' option to headers command to add a header instead
	    of just setting over one.

	* rivet/rivet-tcl/cookie.tcl
	    The cookie command adds a header instead of setting one.  This
	    allows multiple cookies in a single page.

2002-03-21  Damon J. Courtney 

	* src/TclWebapache.c
	    If the header being set is Set-Cookie, we add it to the table
	    instead of overwriting it.  This allows us to set more than
	    one cookie per page, which is legal to all browsers.

2002-03-19  Damon J. Courtney 

	* rivet/init.tcl
	    Appended packages-local to the auto_path.  This will be a great
	    place for people to place local packages that we won't mess with.

2002-03-18  David N. Welton  

	* tests/apachetest/apachetest.tcl: Added TclX to requirements.
	Damn.

2002-03-16  David N. Welton  

	* tests/runtests.tcl: Updated to run with apachetest, eliminating
	makeconf.tcl, and moving template.conf.tcl to the apachetest
	directory.

	* tests/apachetest/apachetest.tcl: New file, grouping together
	the test functions in one place, and in a namespace.

2002-03-15  David N. Welton  

	* tests/config.test: Added some new, automatically generated
	tests.

	* src/mod_rivet.c (Rivet_MergeDirConfigVars): Make sure that both
	arguments to overlay_tables exist!

	* src/mod_rivet.h: Add a default error script.

	* src/TclWebapache.c (TclWeb_GetEnvVars): DecrRef for the name of
	the environment variable.

	* rivet/rivet-tcl/cookie.tcl (make_cookie_attributes): Add an
	interface to add the 'expire' field directly.
	(cookie): "Set-Cookie" is uppercase for both words.

2002-03-15  Damon J. Courtney 

	* src/apache_cookie.c
	* src/apache_cookie.h
	    Removed in favor of doing cookies through a Tcl interface.

	* src/channel.c
	* src/channel.h
	    Renamed to rivetChannel.c and rivetChannel.h

	* src/rivetCore.c
	* src/TclWebapache.c
	    Removed references to Apache cookie functions.

2002-03-14  Damon J. Courtney 

	* src/TclWebapache.c
	    Added a routine to setup the environment variables and mark
	    that they have been set.  This will save us from having to
	    reload them all the time.  Once they're loaded, they don't
	    load again.

	* rivet/rivet-tcl/cookie.tcl
	    Added a new 'cookie' command for setting and getting cookies.

	* rivet/rivet-tcl/import_keyvalue_pairs.tcl
	    Added a command to import keyvalue pairs from arguments.

	* rivet/rivet-tcl/load_cookies.tcl
	    Made load_cookies use the env command to get the one variable
	    it needs instead of load_env, which gets a bunch it doesn't
	    need.

	* rivet/rivet-tcl/debug.tcl
	    Made debug use the env and import_keyvalue_pairs commands.

2002-03-13  Damon J. Courtney 

	* src/mod_rivet.c
	    Cleaned up the error handling a little.  There was a really nasty
	    bug that if the ErrorScript was defined, it wouldn't actually
	    error out.  This had something to do with the header output and
	    flush being before the ErrorScript was executed.

	* rivet/init.tcl
	    Changed the default error handler to a Tcl proc.

2002-03-13  Damon J. Courtney 
	* src/make.tcl
	* src/TclWebapache.c
	    Cleaned up the remainder of the compiler warnings.
	    Rivet should build cleanly without warnings now.

2002-03-13  David N. Welton  

	* src/mod_rivet.c (Rivet_PropagatePerDirConfArrays): Clean up
	arrayName object after we're done with it.

	* src/TclWebapache.c (TclWeb_GetVar): Make sure to compare all of
	the variable key.

	* src/mod_rivet.c (Rivet_InitTclStuff): Moved creation of "rivet"
	AssocData here.

2002-03-12  Damon J. Courtney 

	* src/mod_rivet.c
	* src/mod_rivet.h
	* src/rivetParser.c
	* src/rivetCore.c
	* src/TclWebapache.c
	    Cleaned up a lot of memory leaks.  Still working on finding more.

2002-03-12  David N. Welton  

	* tests/makeurl.test: New test.

	* src/TclWebapache.c (TclWeb_MakeURL): Use Tcl_SetStringObj
	instead of creating a new object.

	* src/rivetCore.c (Rivet_MakeURL): Pass already created object to
	TclWeb_MakeURL.

2002-03-11  Damon J. Courtney 

	* src/TclWeb.h
	    Added declaration for TclWeb_GetEnvVar.

	* src/TclWebapache.c
	    Added command TclWeb_GetEnvVar.  Gets a single environment
	    variable.

	* src/mod_rivet.c
	    Added some extra stuff to the default error functions.
	    If the error_script fails, we output the failure.

	* src/rivetCore.c
	    Added Tcl 'env' command to get a single environment variable.

	* src/make.tcl
	* src/buildscripts/aardvark.tcl
	* src/buildscripts/graph.tcl
	    Cleaning up a bug with the struct package.

2002-03-10  Damon J. Courtney 

	* src/mod_rivet.c
	    The Scripts output to the UserConf arrays now properly display
	    the scripts in their entirety.

	    Cleaned up the handling of directory configuration merging.

	    Fixed a bug where Rivet_GetRivetFile was stomping the BeforeScript.

2002-02-23  David N. Welton  

	* tests/upload.test: Added upload test.

	* src/TclWebapache.c: Added functions: TclWeb_PrepareUpload,
	TclWeb_UploadChannel, TclWeb_UploadSave, TclWeb_UploadData,
	TclWeb_UploadSize, TclWeb_UploadType, TclWeb_UploadFilename,
	TclWeb_UploadNames.

	* src/rivetCore.c (Rivet_Upload): Offloaded functionality to
	TclWebApache.c.

2002-02-17  Damon J. Courtney 

	* src/make.tcl
	    Added a script to look around a little more for Apache's apxs tool.
	    If we can't find it, we output an error message to the user.

	* src/buildscripts/findapxs.tcl
	    Added to repository.

2002-02-12  David N. Welton  

	* src/TclWebapache.c: Added some INLINE's.

	* src/mod_rivet.c (Rivet_ParseExecFile): Tweaking of parameters to
	enable the modification stated below.

	* src/rivetCore.c (Rivet_Parse): Removed 'rsc' from this
	function.

2002-02-07  David N. Welton  

	* src/TclWebapache.c (TclWebMakeURL): New command, extracted out
	of rivetCore.c.

2002-02-01  David N. Welton  

	* src/rivetCore.c: Deleted rivet_info command.

	* src/TclWebapache.c (TclWeb_GetEnvVars): Added RIVET_CACHE_FREE
	# and RIVET_CACHE_SIZE as environmental variables.

2002-01-29  David N. Welton  

	* doc/help.html: Updated mailing list archive location.

2002-01-28  David N. Welton  

	* src/rivetCore.c (Rivet_Include): Get channel via Tcl_GetChannel
	instead of through the apache config structure.

2002-01-27  David N. Welton  

	* tests/parse.test: Added test for 'parse' command.

	* src/mod_rivet.c (Rivet_ParseExecFile): Moved the addition of
	before and after scripts to this file, so that GetRivetFile is
	independant of any Apache specific code.

	* src/rivetParser.c, src/rivetParser.h: New files, which replace
	parser.c and parser.h.
	(Rivet_GetRivetFile): Moved from mod_rivet.c.  Now capable of
	operating independantly of mod_rivet.  Use Tcl file functions
	instead of Apache functions.
	(Rivet_Parser): Parser now operates on a Tcl_Obj input buffer.

	* src/mod_rivet.h: Moved content_sent to TclWebRequest in TclWeb.h

2002-01-26  David N. Welton  

	* tests/binary.test: Added test file for binary file handling.

	* src/mod_rivet.c (Rivet_SendContent): Moved 'header_only' option
	so that the request is set up and we don't segfault.
	(Rivet_GetRivetFile): changed puts to puts -nonewline, so as to
	not add spurious newlines.

	* src/rivetCore.c (Rivet_Include): Simplified code some, with '-1'
	argument to Tcl_ReadChars.  Eliminated "lf" -translation option.

2002-01-24  David N. Welton  

	* tests/include.test: Added test for 'include' command.

2002-01-22  David N. Welton  

	* src/mod_rivet.c, src/channel.c, src/rivetCore.c: Switched to
	TclWeb functions for error, headers.

	* src/mod_rivet.h: Moved headers_set and headers_printed out of
	the rivet_server_conf struct and into the TclWebRequest struct.

	* src/TclWebapache.c: Moved PrintHeaders, PrintError and
	SetHeaderType from mod_rivet.c.

	* src/TclWeb.h: Added ER1, ER2 and DEFAULT_HEADER_TYPE here.

	* tests/get.test: Added some tests related to [var *].

	* tests/post.test: Added some tests related to [var *].

	* src/rivetList.c (Rivet_LassignArrayObjCmd): Use -1 instead of
	NULL when doing NewStringObj.

	* src/rivetCrypt.c: Added header file.

	* src/make.tcl: Added slightly nicer apxs handling.

	* src/mod_rivet.c: Moved StringToUtf to TclWeb.

	* src/mod_rivet.h: Removed StringToUtf macro.

	* src/TclWebapache.c: Lots of bug fixes and corrections.

	* src/rivetCore.c (Rivet_LoadEnv): Switched to TclWeb API.
	(Rivet_LoadCookies): Switched to TclWeb API.
	(Rivet_Var): Switched to TclWeb API.

2002-01-19  Damon J. Courtney 

	* src/rivetCore.c
	    Moved authorization from its own array into the env array as
	    HTTP_USER and HTTP_PASS.

	    Added an abort_page command which halts the sending of a request.

2002-01-19  David N. Welton  

	* src/TclWebapache.c: Added individual functions for CGI variable
	access.  Much simpler than trying to devise a data structure to
	pass them around with.

	* src/rivetCore.c (Rivet_LoadEnv): Roll back authorization
	information command.

2002-01-18  David N. Welton  

	* src/rivetCore.c (Rivet_LoadAuth): New command to load
	authorization information in its own array.

	* src/TclWebcgi.c: New file for stand-alone implementations of
	common web API.

	* src/TclWebapache.c: New file for apache-based implementations of
	web API.

	* src/TclWeb.c: Common code for TclWeb API.

	* src/TclWeb.h: TclWeb web interaction API.

2002-01-11  Damon J. Courtney 

	* src/make.tcl
	    Updated some of the make nodes.

	    librivet.so now gets copied into the rivet package directory.


	* src/mod_rivet.c
	    Changed Rivet_Init to Rivet_InitCore to fix bug.

	    All Script directives now append to each other instead of
	    overwriting the last directive.  Directory directives still
	    override in standard fashion though.

	* rivet/packages/rivet
	    Added as the default package of Rivet commands in C.

2002-01-10  Damon J. Courtney 
	* src/rivet.h
	    Added macro 'TCL_CMD_HEADER'.  Prints the default command header
	    for Tcl commands in Rivet.

	    Added macro 'TCL_OBJ_CMD'.  Prints the default object command
	    creation for Tcl commands in Rivet.

	* src/rivetInit.c
	    Renamed to rivetPkgInit.c

	* src/rivetCrypt.c
	    Added.  Contains commands for encryption and decryption.
		encrypt
		decrypt
		crypt

	* src/rivetWWW.c
	    Added.  Contains commands for the world wide web.
		escape_string
		unescape_string
		escape_sgml_chars
		escape_shell_command

	* src/rivetList.c
	    Added the following commands:
		comma_split
		comma_join
		lassign_array

	* src/make.tcl
	    Moved all of the Rivet Tcl commands into their own library
	    called librivet.  This will be automatically loaded into Rivet
	    as the default configuration.  Anyone who wants can take it
	    out if they choose.

2002-01-10  David N. Welton  

	* tests/template.conf.tcl: Re-add srm.conf and access.conf - if
	they aren't present, it tries to grab the ones from /etc/ - not
	what we want.

2002-01-09  Damon J. Courtney 
	* src/tcl_commands.c
	    Renamed to rivetCore.c

	* src/tcl_commands.h
	    Removed.

	* src/rivet.h
	    Added as the default header file for Rivet Tcl commands.

	* src/rivetList.c
	    Added.  Only contains 'lremove' right now.

	* src/rivetInit.c
	    Added.  Contains the Tcl initialization routine for Rivet's Tcl
	    commands.

	* src/make.tcl
	    Added rivetCore.c, rivetList.c and rivetInit.c to the make.

2002-01-08  Damon J. Courtney 
	* src/mod_rivet.h
	    Added RIVET_NEW_CONF macro to create a new rivet_server_conf.

	* src/mod_rivet.c
	    Added Rivet_MergeDirConfig to merge directory configurations.

	    Fixed bug where RivetDirConf was giving erroneous information.

2002-01-08  Damon J. Courtney 

	* tests/makeconf.tcl
	    Went ahead and copied over the entire rivet directory.

	* tests/rivet.test
	    Changed the default port to 8081.

	* tests/template.conf.tcl
	    Changed the default port to 8081.
	    Removed access.conf and srm.conf.

2002-01-08  David N. Welton  

	* tests/makeconf.tcl (makeconf): Added a command to copy over the
	    init.tcl file to the testing directory.  It would probably be
	    best to copy the whole directory, though.

2002-01-08  Damon J. Courtney 

	* src/channel.c
	    Just a text change.

	* src/make.tcl
	    Added a command to install that will copy the contents of the
	    rivet/ directory into Apache's install location.

	* src/mod_rivet.h
	    Removed some superfluous code and deprecated options.

	* src/mod_rivet.c
	    Finished renaming the rest of the remaining commands into the
	    standard Rivet_ naming scheme.  This will prevent any further
	    interferance with other modules.

	    Renamed namespacePrologue to request_init and re-coded the
	    namespace initialization code in Tcl.

	    Removed leftover references to the ::request::UPLOAD array.

	    Added an array called 'server' to the global namespace which
	    briefly contains important information about Apache and Rivet.

	    Propagated RivetServerConf, RivetDirConf and RivetUserConf arrays
	    at the tcl level.

	    Gave RivetUserConf the ability to set BeforeScript, AfterScript
	    and ErrorScript.

	* src/tcl_commands.c
	    Updated makeurl to use Tcl objects instead of the old Tcl_SetResult
	    command.

	* rivet/
	    Added a rivet/ directory of Tcl code.

	    Added init.tcl to rivet/.  This file contains initialization code
	    in a ::Rivet namespace that is called when the server starts up.

	* rivet/init.tcl
	    Added a command for cleanup after each request.  It currently
	    does nothing but could come in handy later.

	* rivet/packages
	    Created a rivet/packages directory for future Rivet packages.

	* rivet/rivet-tcl
	    Created a rivet/rivet-tcl directory containing a few procs.

	* rivet/rivet-tcl/load_response.tcl
	    Added 'load_response' command to rivet-tcl/.

	* rivet/rivet-tcl/parray.tcl
	    Added 'parray' command to rivet-tcl/.

2002-01-07  David N. Welton  

	* General: Renamed some more commands so that Rivet may be run
	alongside mod_dtcl.

	* src/mod_rivet.c (get_parse_exec_file): Oops - change httpd-tcl
	to httpd-rivet in strcmp.

2002-01-06  David N. Welton  

	* Documentation: Big cleanup, updating everything from mod_dtcl.

	* General: Changed .ttml to .rvt.  Also changed mime type to
	x-httpd-rivet.  Changed all references in documentation to .rvt
	from .ttml.

2002-01-05  David N. Welton  

	* src/parser.c (Rivet_Parser): A few, mostly cosmetic, cleanups in
	the parser.

	* src/make.tcl: Add nodes for testing library.

	* src/channel.c (outputproc): Change printheaders to
	Rivet_PrintHeaders.

	* General: whitespace cleanups.

2001-11-21  David N. Welton  

	* src/channel.c: Almost all output is based on the ApacheChan
	channel, and uses Tcl's buffering, flushing, etc...

	* tests/rivet.test: Updated testing scheme to work with lots of
	test files/ttml files.

2001-11-21  Damon J. Courtney 

	* src/mod_rivet.c
	    Renamed more commands into the Rivet_ naming scheme.

2001-11-20  Damon J. Courtney 

	* src/tcl_commands.c
	    load_env and load_cookies now accept an optional argument of
	    ?arrayName?.
	* src/tcl_commands.c
	    Renamed a lot of the commands into a standard naming scheme.

2001-11-20  Damon J. Courtney 

	* src/tcl_commands.c
	    Cleaned up some more code.  Just textual changes.
	* src/mod_rivet.c
	    Cleaned up some run-over lines and code.
	* src/mod_rivet.c
	    Changed module signature from "mod_rivet" to "Rivet"
	* src/tcl_commands.c
	    Changed hgetvars command to load_env command.
	* src/tcl_command.c
	    Moved loading of cookies to load_cookies command.
	* src/tcl_command.c
	    Renamed default load_env array from ENVS array to env.
	* src/tcl_command.c
	    Renamed default load_cookies array from COOKIES to cookies.

2001-11-08  David N. Welton  

	* src/mod_rivet.c (rivet_child_init): Fix loop, pass correct
	parameter to RIVET_SERVER_CONF.

2001-10-19  David N. Welton  

	* src/mod_rivet.c (get_parse_exec_file): Fixed up problems with
	Parse command.

2001-09-30  David N. Welton  

	* src/parser.c (rivet_parser): Quote { and } to avoid problems.

2001-09-23  David N. Welton  

	* Initial commit and cleanup of old mod_dtcl code.
rivet-2.3.5/doc/examples.rvt000644 001750 001750 00000007044 07723457735 015466 0ustar00mxmmxm000000 000000 


Rivet examples


Rivet examples

These are some examples, rather limited ones, of what can be done with Rivet.

\n" for {set j 1} {$j <= 8} {incr j} { set num [ expr {$i * $j * 4 - 1} ] puts [ format "\n" $num $num $num ] } incr i puts "\n" } puts "

Hello world

<?
cookie "foo" "bar" # we have to put this before any 'puts' statements

puts "Hello world"
?>

Produces:


Conditionals:

<? if { 1 } { ?>

<h2> True </h2>

<? }  ?>

Produces:

True


Loops:

<? 
set x 0 
while { $x < 5 } { 
 puts "\$x = $x<br>"
 incr x
?>

LOOP<br>

<? }  ?>

Produces:

" incr x ?> LOOP


Variables (environmental as well as those passed to the script)


<? 
 hgetvars
if { [ array exists VARS ] } {
    puts "< ul>"
    foreach { vr } [ array names VARS ]  {
        puts "<li>(VARS) $vr = $VARS($vr)"
    }
    puts "</ul>"
}

if { [ array exists ENVS ] } {
    
    puts "<ul>"
    foreach { vr } [ array names ENVS ]  {
        puts "<li>(ENVS) $vr = $ENVS($vr)"
    }
    puts "</ul>"
}

if { [ array exists COOKIES ] } {
    
    puts "<ul>"
    foreach { vr } [ array names COOKIES ]  {
        puts "<li>(COOKIES) $vr = $COOKIES($vr)"
    }
    puts "</ul>"
}

?>

Produces:

" foreach { vr } [ array names VARS ] { puts "

  • (VARS) $vr = $VARS($vr)" } puts "" } if { [ array exists ENVS ] } { puts "
      " foreach { vr } [ array names ENVS ] { puts "
    • (ENVS) $vr = $ENVS($vr)" } puts "
    " } if { [ array exists COOKIES ] } { puts "
      " foreach { vr } [ array names COOKIES ] { puts "
    • (COOKIES) $vr = $COOKIES($vr)" } puts "
    " } ?>

  • Create a table on the fly

    
    <?
    set i 1
    puts "<table>\n"
    
    while { $i <= 8 } {
        puts "<tr>\n"
        for {set j 1} {$j <= 8} {incr j} {
    	set num [ expr $i * $j * 4 - 1]
    	puts [ format "<td bgcolor=%2x%2x%2x > $num $num $num </td>\n" $num $num $num ]
        }
        incr i
        puts "</tr>\n"
    }
    
    puts "</table>\n"
    ?>
    
    Produces:

    \n" while { $i <= 8 } { puts "

    $num $num $num
    \n" ?>


    In addition
    There are many, many other things you can do with Rivet. You can, if everything is compiled right, load tcl modules, like libpgtcl.so (the Postgresql interface), so that you can interact with a database!

    Return to the Rivet homepage

    rivet-2.3.5/tests/docroot1/childinit.tcl000644 001750 001750 00000000165 11670231317 017670 0ustar00mxmmxm000000 000000 # childinit.tcl -- ChildInitScript # $Id: childinit.tcl 1212149 2011-12-08 21:57:35Z mxmanghi $ set ::childinit1 1 rivet-2.3.5/tclconfig/config.guess000755 001750 001750 00000127432 12152741433 016621 0ustar00mxmmxm000000 000000 #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-02-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (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 Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 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 tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 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 ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-gnueabi else echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-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 ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # 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: rivet-2.3.5/tests/hello.rvt000644 001750 001750 00000000213 07545112461 015321 0ustar00mxmmxm000000 000000

    ܸ(EUC-JP Japanese text)

    rivet-2.3.5/doc/examples-sgml/hello1.rvt000644 001750 001750 00000000045 12037355623 017567 0ustar00mxmmxm000000 000000 <?= "Hello World" ?> rivet-2.3.5/rivet/packages/dio/aida.tcl000644 001750 001750 00000015720 12337403536 017415 0ustar00mxmmxm000000 000000 # aida.tcl -- agnostic interface to TDBC # Copyright 2002-2004 The Apache Software Foundation # 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. # $Id: aida.tcl 1596885 2014-05-22 14:19:10Z mxmanghi $ package require Tcl 8.6 package require Itcl source [file join [file dirname [info script]] sql.tcl] namespace eval ::aida { proc handle {interface args} { set obj \#auto set first [lindex $args 0] if {![lempty $first] && [string index $first 0] != "-"} { set args [lassign $args obj] } #uplevel \#0 package require dio_$interface #return [uplevel \#0 ::DIO::$interface $obj $args] return [uplevel \#0 ::aida::Aida [Sql $interface] $interface $obj $args] } # -- aida database interface class ::itcl::class Aida { constructor { sqlobj args } { set sql $sqlobj eval $this configure $args } destructor { close } protected method result {backend args} public method quote {string} {} protected method build_select_query {args} { } protected method build_insert_query {arrayName fields {myTable ""}} {} protected method build_update_query {arrayName fields {myTable ""}} {} protected method lassign_array {list arrayName args} {} private variable sql } ::itcl::body Aida::build_select_query {args} { return [$sqlobj build_select_query {*}$args] } # -- result # # returns a return object # ::itcl::class Result { public variable resultid "" public variable fields "" public variable rowid 0 public variable numrows 0 public variable error 0 public variable errorcode 0 public variable errorinfo "" public variable autocache 1 protected variable cached 0 protected variable cacheSize 0 protected variable cacheArray constructor {args} { eval configure $args } destructor { } method destroy {} { ::itcl::delete object $this } # # seek - set the current row ID (our internal row cursor, if you will) # to the specified row ID # method seek {newrowid} { set rowid $newrowid } protected method configure_variable {varName string} protected method lassign_array {list arrayName args} public method cache {{size "all"}} public method forall {type varName body} public method next {type {varName ""}} public method resultid {{string ""}} { return [configure_variable resultid $string] } public method fields {{string ""}} { return [configure_variable fields $string] } public method rowid {{string ""}} { return [configure_variable rowid $string] } public method numrows {{string ""}} { return [configure_variable numrows $string] } public method error {{string ""}} { return [configure_variable error $string] } public method errorcode {{string ""}} { return [configure_variable errorcode $string] } public method errorinfo {{string ""}} { return [configure_variable errorinfo $string] } public method autocache {{string ""}} { return [configure_variable autocache $string] } } # # configure_variable - given a variable name and a string, if the # string is empty return the variable name, otherwise set the # variable to the strings # ::itcl::body Result::configure_variable {varName string} { if {[lempty $string]} { return [cget -$varName] } $this configure -$varName $string } # # lassign_array - given a list, an array name, and a variable number # of arguments consisting of variable names, assign each element in # the list, in turn, to elements corresponding to the variable # arguments, into the named array. From TclX. # ::itcl::body Result::lassign_array {list arrayName args} { upvar 1 $arrayName array foreach elem $list field $args { set array($field) $elem } } ::itcl::body Result::cache {{size "all"}} { set cacheSize $size if {$size == "all"} { set cacheSize $numrows } ## Delete the previous cache array. catch {unset cacheArray} set autostatus $autocache set currrow $rowid set autocache 1 seek 0 set i 0 while {[$this next -list list]} { if {[incr i] >= $cacheSize} { break } } set autocache $autostatus seek $currrow set cached 1 } # # forall -- walk the result object, executing the code body over it # ::itcl::body Result::forall {type varName body} { upvar 1 $varName $varName set currrow $rowid seek 0 while {[next $type $varName]} { uplevel 1 $body } set rowid $currrow return } ::itcl::body Result::next {type {varName ""}} { set return 1 if {![lempty $varName]} { upvar 1 $varName var set return 0 } catch {unset var} set list "" ## If we have a cached result for this row, use it. if {[info exists cacheArray($rowid)]} { set list $cacheArray($rowid) } else { set list [$this nextrow] if {[lempty $list]} { if {$return} { return } set var "" return 0 } if {$autocache} { set cacheArray($rowid) $list } } incr rowid switch -- $type { "-list" { if {$return} { return $list } else { set var $list } } "-array" { if {$return} { foreach field $fields elem $list { lappend var $field $elem } return $var } else { eval lassign_array [list $list] var $fields } } "-keyvalue" { foreach field $fields elem $list { lappend var -$field $elem } if {$return} { return $var } } default { incr rowid -1 return -code error \ "In-valid type: must be -list, -array or -keyvalue" } } return [expr [lempty $list] == 0] } } rivet-2.3.5/doc/html/wrapline.html000644 001750 001750 00000005614 13200160527 016540 0ustar00mxmmxm000000 000000 wrapline

    Name

    wrapline — Split the line into multiple lines by splitting on space characters

    Synopsis

    ::rivet::wrapline ?string? ?maxlen? html

    Description

    Given a line and a maximum length and option "-html" argument, split the line into multiple lines by splitting on space characters and making sure each line is less than maximum length.

    If the third argument, "-html", is present, return the result with the lines separated by html <br> line breaks, otherwise the lines are returned separated by newline characters.

    rivet-2.3.5/tests/headers.test000644 001750 001750 00000001570 12446053130 015775 0ustar00mxmmxm000000 000000 # $Id: headers.test 1647357 2014-12-22 17:35:20Z mxmanghi $ set testfilename1 headers.rvt set testfilename2 headers_set.rvt # We do this in order to always match the version present. set httpversion [package require http] set result "hdrs(Accept) = */* hdrs(Host) = localhost:8081 hdrs(User-Agent) = Tcl http client package $httpversion" ::tcltest::test headers-1.1 {load_headers test} { set page [::http::geturl "${urlbase}$testfilename1"] regexp -all -lineanchor "(^hdrs.*?$\n){3}" [::http::data $page] match set match [string trim $match] ::http::cleanup $page set match } $result ::tcltest::test headers-1.2 {headers set test} { set page [::http::geturl "${urlbase}$testfilename2"] regexp -all -lineanchor "(hdr hdrvalue)" [::http::data $page] match set match [string trim $match] ::http::cleanup $page set match } {hdr hdrvalue} rivet-2.3.5/doc/xml/help.xml000644 001750 001750 00000005706 11220162434 015340 0ustar00mxmmxm000000 000000
    Resources - How to Get Help
    Mailing Lists The Rivet mailing list is the first place you should turn for help. If you haven't found the solution to your problem in the documentation or you have a question, idea, or comment about the Rivet code itself send email to rivet-dev@tcl.apache.org. To subscribe to the list, post email to rivet-dev-subscribe@tcl.apache.org. The mailing list archives are available at
    Newsgroup The newsgroup is a good place to ask about Tcl questions in general. Rivet developers also follow the newsgroup, but it's best to ask Rivet-specific questions on the Rivet list.
    Web Sites There are several web sites that cover Apache and Tcl extensively. is the home for the Apache Tcl project. Go there for the latest versions of our software (if you aren't reading these pages off of the site!). is the first place to go for questions about the Apache web server. is the canonical site for Tcl information. is the Tcl'ers Wiki, a free-form place to search for answers and ask for help.
    Bug Tracking System Apache Rivet uses the Apache Bug Tracking system at . Here, you can report problems, or check and see if existing issues are already known and being dealt with.
    IRC Occasionally, someone from the Rivet team is on IRC at irc.freenode.net, channel #tcl.
    Editing Rivet Template Files Rivet makes available code for two popular editors, emacs and vim to facilitate the editing of Rivet template files. The key concept is that the editor is aware of the <? and ?> tags and switches back and forth between Tcl and HTML modes as the cursor moves. These files, two-mode-mode.el and rvt.vim are available in the contrib/ directory.
    rivet-2.3.5/doc/images/color-table.png000644 001750 001750 00000211313 12343717013 017243 0ustar00mxmmxm000000 000000 PNG  IHDRǚubKGD pHYs  tIME  BtEXtCommentCreated with GIMPW IDATxwU?ޘІޥ F,A߈%1151X7yHLy@4b, ( C>a)s{;s4^>}Zkk>{ |H]̰Wp/[!ɰW(iva~@`ƅ=nR,n*jسrhXN5X=a 0`@ۀ 0` u aiRD>7nb3KfevEK9f,h[z~U! `Ƌ~ NbYaݤ5;9_gᑅ ;ܦX3?yfu<~ ~55W^,)"/<M~TWܽ:I/DF]Y6:)Ur߁4v~ig I n(sw/.ӗxx3hqL %=H.{\ysGMKMyeLsu|^))qI-kgeGMCu~K ~tnu#tloF0cnjYYA|.{;q? LfՁZ+9:PuP_bN|Yt o2#抄Џ VZU%#.< 4=so:))Y-8~,B:Cg'XY#[ c)TbVcK>[a߽MS.C;o9*y}-oDv"UK2y2P-K X!0-2!Q,oMD4)8leW4^OP46Qgo&? lMew/⯅Iߧqp/ج *IZ&EhZ6:\یS%CZǁggHy1c}Y1yI1Peʄp#-m/k㑆pI`"/ r\du*5Fp07?XC_D{K{Z*ç.f ʋd  R-HBWֽXò3w< u.f:xm<Ӫ+Տq`/3y9yyX'YV ? *_/s?O==`u7κepKi=:G&jzܡN^dЋ)pS ݻu]st]r2sn槙~ Oͯ>yj!~Z떟5ΘcYvi&y%4Q6;Ⱥ͎HiE58o™KOiGӫq#[I h]#9dmB6yR EO}:0~|T**&ʏ#.P0GGPSM࿭msA?Iό^Q2Js#?Q;AvAtxi]ħ'o?ShLcW@6ޢR>Bc(C2:im j-Ql[Ơд KHdJ茞cǥ Vh|o8|f"F坪_mЇ%boOB9&ߠP Cr%gWb$U nμZz+[M(7c~+WZMo!bӛ:3;l12ښ_1r1Zk6?Ň=J"~|XKaF{Ԏ8^y51bՋ_aJ&0esx;A`$nAWm\1K1&!%y#.Ɉ*TFU0'£;8?4u:⡥f7}ϻXAm0>k eNS^e':]k5譇kR`= n߶ yN@ oqN2W=o$ hҜC b軑[Xri 8ixduZ'f}mMw}=t\ B]qY3^úz4@-o :j۹6T%X3I"*ΛpDW ahM'N2gڋJ192a<8}M%(& mdUJAڴHDJI:1*_3c&eRq"y UG.HEV3i9=_g+Iv4,%9á>(6uJ8)qF /M9?7.uK:~.IJ:d/~'-y ;i!F'%jOi㇣ d(}4Sr‘2y2xJ.|l ␨?Lk5cEwW3huyTTJ~19tLfᗆcf;Q:&<~OڑykX>FN6q =hnl5>kZ9$4Fzj>iNFKyK"rq,_!'=GrkS֥U,Jgצ6㎀Dgno -':'iZZbA>Q=,llo) B !~LN-i_ɟEL9iz@X9lC;4ACP?Q@%zSn$}`ASdW`;aMLmh|h@ |4I _P8d-2l녢yp4s~n+4;:)E$-'{ h5tnn`,~;:+u wZ] vA^_au#20i? Taܸay~[^UoAlisxH~/h]<↮>39W?|Wѳ%lc\!xkHywH7)L8PBjd&L  I8&x\ѽ dX<~\j ~:ͭy-:/)?ĵ~VzO f8*5B j.>9ҲISP~RoD^ý A8{yQI2DN@F~ WO=v71kk;V!Lh[WF'#k8hR`TC -~nIX z pAdܑ(O#:CF%JNPBP[yFN3=7Ep?FwIbAgGańI@) {Eg&gc$vܚLM5>s.lf83I I,cjdxm_*뿖KJ& w&Rb7Ь@[ m0?o?gÜ-:ׅbo>DkΟjX:6{*Β)ټ0IyBopKuLؿ|.Y/kyؿj`B@Ȼ6q5k Dww/ECyn:^ol_Õhz/WZӹdА="YD"@UA8lR hT;D=.jhأ.rƳ)$%LJoO=_a mj 1DIy,L &Pew5!I݌?IJgs:_5~G<-~4 QA^n/Ց @S0FP-[0rG噒aNa⬁{Jol dYA=y?[P peJٮHTj$_anB*eϪ}>Wr1Qk7ɖ^+6)%4b}#zfO6oh╟~(Z4fis-@ M}Mi\\>{GC1]Ҡj~[^I.z> -,.mz皵Yypġ|\y̛x`wJi=,흜vx^2Lω 㲧b ?-srwUx54W硕 l "A~do̪p~/gS3uM 9f/ -0xVUH4w_xY'"5M[41v/M @p}̀T~1gpYN=h$A?WؿFy92$&5 qT?,/2'Z`<+O=IeT ts vc#C̄%`h3vޙU{9Kb(넎( 9tw:۪4A C;LnZ;Q?``;\Ic= 5(aQ4&mLqYvjħ8h\|l7hE0'ܡm̞͎=4qV^]FSt=㲙xĈl\ 0"D%v6VYR㥒Ȓ@HC10V|O<9^;Z$P[R׆xСhFXi52YV}´|y`2 m IrgfվBrZp]Spu+G0[=q2]<1gQ^W֥T &ɓ`WPT M 2")l$}F҉4svpOl,Ӱ-&n3ỹuBq.i~Oxs' . U rTbD_Ib$@$p(P%+NGOb0 ~S~y3@@pl${ [P@k5ՠw*u.H82O%9oy+N^c[BS8iL?_JWÕr٬3BF 71 iaF}JPssfSgpdGn25Rq_6jYpIZ4y$t)j~m=~~+V ,=bx^fTF:gmZ~h=>_@QȍZzbka)w~ьj61h:vhҫX]sOxv lGļ}8_ n1n/\j̳avx[ϧA0bٜœ%N*d)c0,(őe j s<[\bCY>%˦\j&D# l8ƣ'g^݇⇸sCܹ qܵl\m/-G$T5O GUGv5u48TJ\ˀOՊ?@&Y[Uxևtn 'O])_8vaH%v!N_l @C MBeBC}\ ; +Qu.P^45ZZ|P$=w4>ˤt ;myKӫRJ|-bp>'sBɡˋ!5v/z3Kr1 HjNYW^z4s𐟑S TJ&J^k৒"!^ygFAdaFG~O]cg'3( ~Wuʖ=ߟ9)*S發[/4ff3E;'?sm::Vl8[^h.gͤ~7%;w[ b{-u.ῆMdLv2y;x}|tO?[5!p' !\VWM/6G\hOYhV$vSdqi1ևZTޠ!&euAӒ/m?dNBIKmdNT. QTO5Q~B{ʯ Kx~d6dق{j3A:ESW >}[E${nk$\#u5vF4z -G u)qZƤ~;ſT*=ħvη'ٻMxHfO?[bt {=B <oΤd 5rJVJ/g Sx9% (ؿęl~A!l6lp/H~0 ^|5ÿ) ϙd8;)T;HB?3 x1`wr_nN8T͸g{}@e{ 0tM@M+ { 7.4ظpX\<Űg?`bpSPÞC2wa~TX0P 0` 0` 0`  0`BHi1` 0`ad 0` ?j{Ų-˗Je[Z$-- [Z,6nqrqK`ee-.[\ GoqYa/02 0`  0`0AzxY2/qVO!s`^N_no+ʋ$m kn~Q3w nnɫwXE])fM_ͅ}:).%qgGh0iyg%H۲vѿkzaN™s" a y.-O'[lE'ٰ5;9Efؕ0wF,hD'~d w|w3zi/<-~dW<$kygXZx)K%p2xu+R$1i\eq9SW mq IDATݍgAӗs=c|04;&s JM?KyM_>~ҟyYY xuȝi&!JXYMьcnX\y:{))H`#Hu.KZ2b9*OJv~ڱ--^CvR le-eBu//󧊓x69RVIRň Bqȑ=:dA&:%Q YNcҩ|>@yXૃk?ԩx"zPv&{{lGm8ycލdun ;7*C`¦{4.IlaYS 7L_Py.ҹgrWǟUع83%sJl }W-W1}Nă\uBJm es~gvvE\-Vfϓ ӎY6jhRH_Ѻ}T8hofTZmIsdǸֽ;=^X`ɮ1{g:s|~\wcӇxyYGqd r%??Y/ <#_/%} kea6!콷F'#ѿJ'3CvFmXMT{& c `mv,$y#h5>ɾ-A |zJ1z{?(?iT6m%~6>[;5cʂ{LlC*Shl}NEŪt[IsNou?= ը=[$s~/ɰChջU\OieE3$WTbE +O`rllQacĸ׿7ly;%Nxl_Aşj}@PAaC-Lȕz ]bt713>8o^,v$U>OWjYokt3~^ieDz1r⡖>Ut`8z^ǯ彣f[R6v}y3k")tbM]ތz}> VkLwG+yz.GgOm ;ΈBU~SPohr9,3ֺuR zP_8O:]K~ ftRk^e'~:]kɣ2sFfhZt2X} "JVY_mhkSItZ/ԶavNW=7z`?5rىw#aqsYbQP-iSKj3ic#Hrq]247dbw\^Է-Zu]>fRɞ:Da7P k딚D-JfwIr^S3a_ | QrF:#gFJidGWaj!(10N+i(V$h`f&M9^qbգQ$<fDʐ:G"AfI3(tW8jfpN^Ξ:\cEoJQU TG2V.1$&TngW FΰH.HO"==}=|W~%w3Jlm 0&f2:'oFVBs]SoetA"!~ZecE2JFq#UxE<@DuH?=XsVPi5/:K>x;| |^+v.\˧!ˈSY6C$|1?QUjOBVEADn51^+GȘrh eY%$Κ:g1"4u28gMP| ި'R)8 .[$Rj; Myń5cƤ&KCSOtTQ- a N΀ЃYqx&]Gjf\ ra:MqjQ0!݊0OSK4M%G+]fLY&е^SVH+ka>eJ2CX";Bֶ {i9PFήQ`FǾ( gؒt[YOtB\KF̬85K,GԿ{/̹o셆dB:$%m2ݖrl+~q pm/T%' b wW^*unl?)ՃFC'}F+g$)2[I 3f~G{ $%I&OoQ HuHX$/TZڋUO5$KL'|ǔh X]{*-gr}4z/E_5ٲI5qy`˛TE|cK{ۂQ6' C_oǢFKs)[-wKBg:)$ǪBH$,"';O߽k YCڎq>^ Rn!F+$(|X["rėLa A HII_kg*1&BvSC9 ,D^ !B G;?%ղ2 s;Ln9(f&9i["7Dsq"m#=:!)Z;8$6ؠyC۹Na(Y((k$¯?%pJ.o|[`Xyl7*uWJv ޭ1,Ιٞ$B{H+}k-|K;#hftvb?F'OMհcI@) Zd!SXG6˄1A;koM&&fJ ve}[>cuU j$I$,H Yk{r/_û(9o^=WLy_Bۀ_s/X19Ń[x_"OI)ټ0q\.mc럠<ͷ}/\'r_kxbD]wp\* O +? |9S,G/_x Svx-oH$Ox1 bBՔƢk*+@(YOA3icڏ2iԇ.Aֺ/* hTM%kp[X3A0՛h2rDIn 秒=?;)Q>ثzs`SA8l䞥ҴއcA̸EwTXjv3I^0)OaW_l?*K%1~JAc[ٵ+VV{%y8&176^e׳j(,7L;Drۗޕ҆OҺ<טX/OTCJ+xf.V@:Ӹܹ8?{'C1;sx&7S$9MFsi֑u_{"$=Xjŏ`= ,1$Ժ[X8 t&aky'Ygμ;F:\RWKB=,o  xq9: lBCHk#Tl2׆lc#ԕ .w9N\^&9M}=<nj)ń)VHYpֻ@y Kܦ l {):5o"N3jxeS``ݧj̀S9e=|0DcnNmͳz6;V̖?zX\3iT@:OPS(M~ ȋ,L%@ɳP ;xWp0of}e)70sl7Ϥ1fy$֭k4,Y6S?TXH:#J‰Ě2,3/n>N}ӄ5^_t6#pN`!'Kتd(Kts,o.ymc`PCZ# DgW,\p =z:N6NfߞgO<08D%<<(6ˎ'Lo|gvE>֕Է_(m~=#LՈwFn"Mx>/ƣ$Ppp5:fV3@;z/eL8cGvz cypȺEXnmB^O0 ]mZtxWҝfkl|FA5=1Ⱦ :IGM}[y=j : v nAά@e_~ۘ>WOW@49{{K%1aF"k7jIKV`cM-!-J' TNb΂&$9CJy/PrZ>8=:AY؉S=h4nV sm.hOB̸KnffjS"Z_M!r:xTiY@s|~JZ05Z^s{c0Y}C8L)3'p+kC¬VU/_k\wX>6hz#?O ,,Y83yaIQ6ļXX<{ 'X4*t g\̭fTAhI -\^KU/? 7;Yŝax[!aʥGx6gœg3>=9N*+eXyу$%Na1 )9.?iCu4g"r5Sdze4>Klec}PH?қ6+UZ6 }?ps`U@[i91kاX)iIg+{6Eo 9WP>LH8r@aתQ~Te";A{̾F H]bgG ;UYD|;5=X#_r^PA#H>~&fŏ2n$.|HmfϤWZ;ҥI|x92v$~¾F j ŇB:_$PNy]՛dp‰6:kD:'*y/n߭kqqFrʍroiYxy|;JJ㥋jHJq[67cWPƕ^˶_Gg͞}gelJYWcs-g| _gJ?ڶ$V8-|-VNHaTO}'T~ yK*i'bX )}iQzyEc#xO1I`]_1$%|g{%_Aj7{`ttƝ==GɣXS 1),Y){ }*cci;l]ds|IKn\eg>e'q,1bp'/#oc!v=쐅IכڂÞ֞P?T69NIrG-^|[NvW~q%KFLl[ř! :|U^x'@]{og,Ԕ ZIs'?G,Tp?gĞbt + <^Y?;h"Ϸ={4HE5w3X(E+SzY?kqX)+Y`BҷZX0S&Dw{c@^L ]ܰW([\LY̰W(^B,\ya~ƛV k]Vܴqa~ʅ)=+ eC {-+ܩ=a 0`@ۀ 0`#6` 0`W)#8 0` 7 0`1Ƨv([ySe+ {%-- [Z--[Zkd/XeqK`E-.[\V EoqYi/02 0`  0`|L2뼉n[#Nןq<>մu?ه׽>6n~¶t.D\e5OF]xR7wz򺩟bgڼ\7BW'9Ձo6.Z:L sb'?e^`\]hq%|>;[zw߿d)[V]-m s:g͜yYz-Duo ;O͆uI,2ƋNK0r9 }HuYS'eᖅ I;]30]ꍴp2n\gqT;KhAwQF% ӰQĈɎhA-ѣ%3d;( WTLg4k׽>CB,cj9N_IkySQ~-ԯθ/$LsvgZQ`V6 \.^O” ,4@t&O|q\8|EEx$IS1ܡ~?ۋzw,Y .`M(& $/$70$&&3 0զ\n˶$[jV/sǽdst->}[{^{^{u?Yv*:8~TUA%4 9^O6NLd- bw^w[:!R}a6(*5o{&ྠf`ѝRO7Z`zfN{tS8VzT7O`n_yVk EȺ_ 8WjW-٬zb +mgHԉz|fY OVxh"{n5 ʳ4񋧏lѳ8|>Gybg*e977wϙ Qsh?2$ zy#O407^hƿ>6G7UN}bB=ҡ >]pbPEc ް] '׭ZXF->˿`Y^v7g`ʞϪ7иm؃ķ>:ٮHdMZwԚ:TkD02f5 hmQCM  a ߿+,_JEاLbϝ:cyRLѣZzQDgNIE5&sRqA"lJZ_S4'cG%K1X\zEr::f0{|F8렀IhwQr\b_{ht֎M+ч>A1?%,V.cC3>䏕^\wCBM*^VԽ=D/"Bar2 I$B`ҒlQqt1S?Jǭ?ԓi"V-2.e ?f(%$Y" ]ItԐ3Ӓ)*T\ܕD%gBBMrP_AkFS5G5(Pp/Tr}q$h jGyq2!+]J1d#BieVdؠ-BYWD[ihpuk̚]/U9Z] wh*ȴw/ ]!6ĶĭO: N@$G/QKoQ]mPoͰKf*/[z۩gJdǷ*P?ZMn{d1G[󾰆,3hTE/^q5'q~[i#=ϺzOV-|m RER _PL*b4f?3?MCg ?ʳ`}QIWϾnLB gw;:@r!X2)Q Rϟ֎1%c':+-2P%N,opWD@viZY֓4s9ôWM((%UJ!MсJ/jdv;i%1=wGWdYK FD AOq:Z5n|)b9j4wۢWDCQĖK: c㧸d|' xx=1?Eس1ϭb:t" OT|.j  (npnL]:?hq ?~ɣVQzOGPh JϚ/گQ$,@RnN^-i&,>+?V?ߩ0}BбUdi1 evu1AeKi{Hl{ Tf­Xgh_OB߻WQGlv$m dՀN-9sƲ[Mn ob.GТA'Ydzd'l ԘHԦlq~>5`5jAci!OB^(zwΚǬ ;_aaТɈ; FTC{-dH6L kN"2bEyyuЎaư^{Yf2 2#oaWvE€f=zܸ\*ijb[#ԡB Jnƹ18G F|8PU<*xd1O8u-߷az8/epNn餢\`7S#Wr? Zn*p,mv?@z"}sOkk-S U#mN kG+=2 NPR W?(M t+pO^lphRYR0r%x/IȌK?1u *ȹg?iFLa@Pd|jp*~kY_J 7CGW[_bx=/2dTh@,D pjc 4wPU$"\e'[uz9L8{J`L./F*hD@b s%.lq( F߹N9gZp!%{.3:?AU† e0i@Wpg('u ŀ&mD;8*?Z/5m'f>ES?a:?4&x#[d1MB\8)qW:i2eJPX*]lc+?P֦ACZ E>>E@H&NTЃ*稗lc2, S#©k&Y x=s }4jɵw\Y J*S&/D֯U )*h#xS72+'}_\sTfς xaO/@4%|;SGA2ušZXb3kC<с@k޹ZJ&`Jx~|0 lbhAƬ ~-C%lf^z.(AǸ)>Kݾb7x|[~hЇ^ F`b0JC/G}2^F mhbL̿9Pt6h:{/FM\$fSUgTTqO1ꚉԟo!y>]':4X&yca^==X>lj#xuQs}Q`z)Oϲ 2E[ Umh{7rW k_)"_0"v`gj݊GydO#IHuoXUh#y~+xj`7 \$NF|:Ԙ#Ѥ `W": T'FzyS2(9a0 /<~ܯYSbd+2%GFC$QT*^psp!)Y@Hȴhj22tUG/TU7ˤ-GT-i ^Tmmrϭ~0+@5jd2_ w,P%RIII*טAv<>H#ڂ>3!toCXR|I[0؀}5#=y]&1{2[`$#srM(\.Yӹ#_f/*XXC_dʶoz9ـ`&>bB}O̍ PlHbHuM7F>8htVL/P}mgNd"4hhcK9_Nu!j$dN"%c.KB]~a8ϳf9o`BḥYX )W~~%~zw::|RdVoA\35YwvD Ni m!cS\Hd-/r_-.'M& ,,hBc(jS]!1=vm=!W;:h0S4*mlTZ9.%0cի=ɡv饼^OaJTAmh2W\3~[ zFϔh ɕ/t)z͡| GQnzĽjb/,LHȲTգpuB -S~@%qj<ڨ*ps@q"ܥ^v ]5K]$P%GCLdu%:dJj% +`e;"g[C&pݤ7 HyT̻6B";$)I(Gc/8. ɳ.V\+b#i씱$QNf'=MNZ0Uyxv9yCMߞWZ_>ދ EGd{pK:I7חeZLz>>g~ 5Ԇm|&5*&{: @wnd})Ф4輪ƞ}Z S$hHaְa4w-mN9vYq+-" ]{4$] hLd Խqf@?nrOڱ7+xr&7`^_|_)f~`QŽVFߕ}oJTem 3]_:*VWQot(1PHϕO-Y_ˎ~]/}b[ZUz$jAb^xyGAlw$\"āsЊ^>LyH {8^W?zr}ޑ5|':YA-Jfb "1' d),\@-/h?#1:Rz'FpfYޯh=6Xۢ"N1r^=O'v{~4n Lr)1?:s8Áҋ9+"-'P%]U&^+"R rUЋq9*'DhWxݞ=,\HP0I`O$RTMLTS?j{mbBĕZ),xɸmO>),_2AW9Xbr>ܶ A NsrQ`u>b\qGqGqw#8#8#hGqGqVGqGqGxD;8#8#8 މhXW?-ey.)-gS?eEc q,SD\R|WIH?RSy!q3@syNj(m~RZ&㎛xQZ#؃uh15wA'ʠ_h$<:坵IOpF\3u\ DCmg]j ydKCRx7H]/}6l^9슼dOޛf`NػL>i H(Jg<[yy5m/_9l(;s!s/_Vg%_>pR>3xi9t:Å& R|o]oT?~U;)oT1h]Y Pmc3%4\ޏ|,BT \ >ItpxCm-c\ ^o~اMq__ĝa`jk+okc}bJOLhpgh%'bϫ9ydbe VQni>ڻO`9 >ɞZh4.lMMU,\ ҧJ_Xs`5?k48U%-ژ^?NqW;ʠ*6 7ƉBvv(\MtC?}:O8\򀛲7]Kgwַ^419!U‘7[`zNeNoG%e󄠽CHP}Q/J  w-S @T)s.5t\7Վ^Z_^bV-_=55yJ *gSeZeH(?Oq]_F'8n4z:gv*;V]AdS-<{6G5V?4=n5h_ʚP{Kx[v>`!;MxN{xiidFjl]GnXOy"l^S wӃ={xam-W-9Ia~wcu,rP:;VZGV?R8J^,ʸ r%3 $RB(By: Fd'_=PZ8phɴJaDڴ;vԇOL,أU E_Yy_tRwdD_ fTK/+0Ja_MΜT;{˃M&3LKA}#zFyliE`dor^P}vESKE4B%urԇ<ZLQU~^? Gia/}t0+:9A]hx+R2 |._bbLN_~}FF1$Ny,j=9 ]f'r%AڧƢ;rI5~ւ1 H ^mf GZ+%c҉h"G]H~)B/:n O.깙- Qpb ùŲO֯%".7sЙȨ#Pڭ F=if. ?XE:I@2CF-FkjfLS{tO0QdEOf'*5D%f*$y P1mQ9]29kd3Z#t[EQ.N0c$cL-5r\+^s*)EuN".MILO9:d$-b1,e͞*47G97&Uh4`d:=p8dHhVOgzmpA~W $sL_ ^ij>S|gy6x&t.q:dMwDkP_42eAe>"QMn{0e1Y[χ}Ao_և%cMO"Oi$$A@+)=]]Knţ\ije:IE慈ϛ_'PZTU*@3Ǡn4J$h0^toQNcDӾ$w1W0zIzjm: b"n}tjE! ɞ9QÂS% :Zg48* h˻>u):P*~mt4.y\Ěom 4郟!)Y]>v 8ye &zۏW0"qQLhŁS%pVN)*Y":ӋD@vx1u#` 8=6q`y{/'?"U]1ǭb: bl'*je~ ŘӐ!{u2LlSy7Ge"#o1XS+"rgvi=% + [R8Vf]:?06e'jen#wM ;NүuedZDp*AðI`XӈttwdC<of4V zUШMq6>vv,ypA[" .tQ`o3|T@]SߝOy>eE׷-&)|05WK(;O%vd=/7/sTiF0=E"mgm^2l|#əL wMcm'GO7t6r cdX˖5'? "Ɉ; FTCߡ?o.3EEN;ߺ@i@( gփv3+2W@}  - dcčݥIUե7O᪤l0)ecPW Ϗ2?D@j0 N=ЉˎC KxfcG?a[+P&1{Naz=fw8:pGN?F4EEs0|[_s2dvr Lٟ7/|)I IT-&0"Opck?~cR22b^1$JBDE_-qa?æZ ᳸ ^<3&:RmL)V(ĉ WFCz2<AĔ"m y3,=QǸQlobËټ5@}O4O_0T&vv[YZЉ='DX{- '*Ѓ*r?UZ QLnPۋ_ayndII&A!,b.먗#:g R-u 0taq!b[V33xswr7JaQ+^[-gR}ȎL~Z w,ְLV og N[fSfHO&)ţl;~Q G _ka}[~m(':okm2W֭-8zc^TybS:| xw6Z^@V<|!U!k%+Y2mwQ&1˞]WA4#sղmK-ۂFuch<hҙ?AǧjC!b0i𻼱GDc/e\f^,sldh49{G Md?~ށT WD$+?eHKQ@҉(#24SQQ)5Ê?F^> ^ 5@aɓG?̧gٺ2KO:dc̭6Ƅ#HeZn?WB{{S5돘vO&ي3'_O$U8*SMK#~v(Z`ϮJ_D&}¤^ y!۾}?>%۩&Z Y>~EmL'MOJԑnRpJt೫FǑfhۣ15QZ7T29KF} ;7(LY1t.1˄<,6d1QbGm g[exiH\6*x+~*xm8_wN34z# '_9C>w: eKx^N6 X9oF/Y`AiT^FϴC'ڒHfv;m|pGѴ12} Y|}>Bn zs46.qL ,nláޒIs t˗ٿ#6G/z}kĎ,sn]J ? &@mw/mw6xCzA%3w ILi3P0mCY07!{03jF_9G4 evN'csandr7Nu!j3r sEys,f.['0&8}*3oMwR'u^yIW~nA{g8. a_[[á[(̑BhZb$Kp!WT{ЩDg *Dn+XHeL@uXLr zݜEݔH,6q%II⡗mdUZE9Y!?5uDz3k MjG'G̘:>vvtsLh.UdAy(Z8Pgt)6yAu{<`{Jˤ_c"Az5ǩ2 W+1VNL{H2{K`b1FWU~&Q׊pzyoW(k^b"-\ 2Df]'](ex_Mz ^8_p9ω54w)>=ħސ̐ Ip#ČɖϽ}jI; lIa9$j@ieNtglr/$y*q\Q1QP,pTYE]~1*8 ʓ4a#_W~_bYQ򁝦FZޯ2TRzrsַSӪ\͆\{sF]koqn^h/}Sqa/ ptu6_ui 9Q!]s%%)Rk 1fw[U6EXI:- c  ei\?E/zL3E@bÉGI_?ʽ#k:xN Z]5Hj3a-h&!Q&#O7J37}[GDHc~ȽG`ǿ9,iUI QeZpƞg3Qnd^k?:J} NDy"z?o觼oY}Vkѻ&,{7]M]\Xbu\_++W[RXq} V?rʸ>V\"A+V -sr:`q}V,&;:1AWAqGqGq8#8#8;qGqGqƯGqGq`#ю#8#8#av?mۂ`օgiVgi eqy2ePd(˪xAP,.,.Y\CY\ų 8#8#8;qGqGq@wዲkD 99"^CTQ۳cKŒs?aC@y!0:8kgF?jm42UiS-џ)<DZ,V~TDr^ ej0u~>IYxԫk_w} -9Aֽx{#$¯/;4m^v|>@_+|1{G LC 땖"Iƣ3PYˋ'=/_F5:<.c _!ـSS0fO溛f`&S4}i H(߿}!y[zxiںokcW7SԟcӆR3rXcبYɛ/Dn)?a^s$0E.t,1bJ?]SǺ7qΟʃSzQ}){ON`lrG oQԀ[&irK'~AE7CYW7⸾_~^Mv{3}ιw˲e7Wd\ n  d7aCqCl˸*dIdZ{+Y6e3<̜g3S+RHeή.ҮL|gL2 zv>|23Y6MC{ݞ3N^~,']ўMn^J~S"vb?q>EfgkKC) r_'"2e9A01qkd܎v\kϴ&mf.Wd*%v=SFfWG'V<3K%Z~4 yj%1vW)bSS qx+mˀĭO`ȖC<ŋbK㉟eYAުo<#)!B`+_^rpNDvo]nk|o:/na]M_q䨳7I2Q^< "¨z 3Y:p lҜmbhK5 W+e56^^ ?)8J2b[yٞ.8uXfڷ(N7Ff!@g}&?h(oGk&V>%2ĨwG'7c[}>Az.uLk'_9p;8v7"BgΥ%ɢva)ދ>FSdx:9HcJ@lb /g[ ǮPzsiV+1 '0"T z ivw3wC`|o.9㓤jŎ?A\FJ GD ^>>kEś?_Oc~:}5":aŦDtRH*4HzO>%| 6^˔Qᨺh535;^V|#J쬓9!5mf s?8_(.0`#&%|Z$ .I$f$]NYu4̴l҂ Ӏ"к7xp)"XYE$)Q }|N)2j^U[3+ YCew?F!k}-KRv눯C/hF*Nҥ)$ P:G lFPz^o$wh iq N> Z·Ҙ1Q]kIPzu<]_IY&3t` *&H":'n9!<|r|q0@V3:n%HbWoρw(e!-Ë3["/ Q$z#j8=d:4i@>z!܈X;VGe'EOOv8R/27qy'&pO")+ nJqO &QO]ӛ?qzGw@s"%x;VgGsamjvvLdXp* $$`0J- IXCrxp`%"KAj@Ы>-N T ~03YSw2Ef2ftz " ˸j[8yjho6]^%Q^e7ZXxx8&쑤cGS0j2zkqP~8)cMz:E:"Ο c)>4 dČ6F3~'O|2uX2A0e=,Y9"&Bo cI)ZƬǂ&]_̀jHO>@Eޮ73'}~61oHyyyQɊٝ{6_Ξ3SMpeF@±u\ ras1KmH]YyMd*JQq'wUvToXJIwmC\0(1}cզ3fUnj?| cBKsn/f}?Ŗ+2C)! fe{9߉Ҙ^T@#g }gL.bvN8bJd ?w}ȓRmg~>m캠$"]yf ;v*wC AF-4*h20oD&-]+1?lV㎡;-ΥoGC#!ʷ"69 0 fZ^YIIba>O~Ab>-~i(Ȥ2g.;g-o>>Gop`OgWUh ]|e{#XOSB-;x]BA1hy}Ewy}GEO 1sl`i 30^KǮIb̂|[ucj9N{\%IN2& Q~i4""D oKd+h`cob[ O]Gx[LO$X~k)x 4_TyY_tGzm 2aCX 4D*s\3#Z6 'D $vmIPAQGm['O %`3uy1Dw Sbb["/( %}<⚕;Yo'S׍vx oRlxѶ66 dcrད- 5Z]`Ev6&FݰQ-*2, }d S<ȶwQ%Q4c|2AUJԖi'FEk1=6ۮ\hro8kPxd$.Eʉ*-[" H:GF} ȸBkv|L'l̼H`FZ0|Jzub\dK -̻¼qxd`qğ+Md-#$crϡQ$TkyChv#n6cis\NS12`42{D7Q-WKDRm,sNuHKl?׍E3aLk@JNeaNkt͠Ȩ!=@KyCnq\2ty?OZS;r@gelr'uA̧!릹|ޙ,[6ewN`M$}Z:(vUp)ҙ(vΜ8$+7jFG #,5q& ߐMcjz.6M?e;8ep~n=>|1QHLnkgGEsCbϫm| TigϠg {BA 1h)gZ'g#Q[gi-S7SO4H'ypYpt,:fS`5<񠕂\;QvV?ȅȸ<]-u!EJq>?7љURTl:˦] 48J. ۫x<+!Q^,& Ӄ_,1Oߵ_DT[m+ܞCИ8F`[9iك؊ǰdHd_"l1'i= eh[8Wh^+,b*YK -f#iaJJm6CPύQ+؛"Z%*Uv^}KeBsI ?kއFfB6=]$<Ș.[1z{(7Wߺ0d|k PzfoINǧŚW8-Zq`yekT{Ł5k ˗RVZ.XR`O?sO XR=˗"jekߣs &PB *TPBuUPB *TPm*TPB *BPu *TPB  5B *TPBupׄ#jH;)>EcV^q`U䔖)-qae䔖SZOGNqY2 X9ezˀ`y5).eS\ ENq)UOqm*TPB *TG[ *TPB|tƈ,"LKwYm{du-zDLʲ$#{  ߤ_WF-Ja􉤦)X̚Λt~; ~@)_2\ۿFv(V5/bs.|r=@A${Aj@Ԑ#r >D '$-o+Mr6+ UY}lCà. E.ZJd~_3a'b.tE%TLɒǧ8h$kT pM{G|ךIOp5JqMGDmT;+iŌՇoo 9/Ѿ2=$Ngq+c)vN-HI 2qrL5w7Ht\:s՞1o5v_g?E8?$1yL׷#<:Ir{8-yPqeCTdqSSy ؋dmMED xBOL]<ɜzg/>;nW+scgI=j42mQ]tn- }2syd.>{'{+RHQVӾdիfDwfsWS w\.:-"! J'^NgٹZ:C/~FHk%$]Q;&oR$~L* ѠLgf/%޿Wh 6~DW\n'zuv}EZX;/=ӆC\n7 "i6] v7*6ww/'䨃nR %c|?|aJG~5|NJܑNeo k_^RfHXڋXLd @QJbh'Wx]h 7üODěf@ix+6[y{9,t_®6HYgʋG>A<~67 !f3ՓU]͞VnuY_NZDQi}l)/e6N|Jyކ"Z{dKJeC_.lk4"g,{>Ξ3̴ (Z^Y}s@kM-NIDQV7p~r?lgϿT{Eܛ)|_־z33Y:p^͜a<#9x|6ϣ JL{  -^vVH̹SףGͷrŞ: '7fv/_vP xz8'<$҈:&R Jeo׆gT}uvhsJǴ%ΈyȟB(֜Dg}&*>h6:H9ck8}%RD"=.ҳT:~l%XC_F vo/?H>!@΄,Gr{5z&lQ둿!x9k|:OTO3TqL/Q$R-~/H$3dB7h/-Q.N GeG#eu&FN윉+ |Aנoҧo1G =`}W4άȬ\iqiZ4O|`HȗǐbN%WPna\LHr閘+= t C'#4Sܠ79˺TO@Fح G{Auv6N+ULn'F G.GM[.ٛÔ!xČqcfw(Ko|ך}0fŽ(jdgQgbcvx|ü^+v]=9La6qmGlo̱1BR2z¢%{a}t&|A'b:.P\џ+WS-J<4Hz/f{hjcsH_9;^|}h2uU]<3=N~1h`d謫U!a苾BUm(?u3W>vIKzZev5tVTi9:,>g=dm2#E huL{," Ry",ff˔dLKLkU+d,HbX|_$uJ`4uX3W &=A,.cη`i _G#Rs+_E)z^v6SvA/hw&4_Z Fz!i3i ؂]4&F3"h$?U[_-/.}N{X EC(vA Ύ\5AZNTwt3(AGo, =i wUG> A܂[Ig>Q!W9Oё;"] jBw= 6#(u#=UQM.t vRE&20hssbmw@rt#Fl8ϥ+אh{ZNҘZӯoL2}p+V]g3EuNr)b/La223ppq]3_3cz2nY"xUpڥa^M˕h?!I5dt>og.&ƶ)Er'yA?[ީb, iPM"/ R$BG,jvDZFD+d#<.ڂ8Г CAĚ,QĠh.(KL IDAT=v~_!Fڝ7XǛɭuzdh0_8]FH56h Va{D0H$@VpU9y΅͟Ӭ5X FMoqeaigss.%۸LWHrs9)X-XIA1$k]swӧ+8XB3h_x fk8t͕uKʴ t(!\ ;׮iR?Gu8nC pek"XueM☤&3:g4w{.KRwށ4|-EbGY[OqN`¢iWlST &# 8h*`@;C NY2lLZ8ʅdly՛OLLA< GqD'`23eXsD|M 1/e }1IE./%r\ŠcnQm::7[NKߪ 6̂1Q|j\^i.jG4lu;;=v.5뜖 V#"Pܵ_d0B+17 ir{s6l]PK;k4&R( ~I9J(:;J Hg0d9z{F>xĮF,W.)8Y%2S=Rjc 0!_9$Ӵ8Gk*VWO{׻> Jaqv(;8u2,wz> /Dƨ)LI" K,`Vu0S\mƯ@Q&DM;z}J#` G.Y(1 Hh>11mp׺ɞ8i@2nv &NKԃҢ%;n/ihoW, RR7gqĉW@K/*\Z$wPnΔ^w>Z7Xx*'Dk >/hY0R30GE'08%9᭵Dg7~ӤX2Ϧ6qAID#GF[(rRuz0G?nd[r"y> p (eJ/.*_,Di`]Q3K1wI( 5T}e%{3X|}x[~;$c1fi:&;ΥrWC%HmS`#0?~vA&yuuT:Ő;a[>=>ei8ɍՋ'tΦ ݵ9 c+U=ӽ>6UA?tLK\ (Si 'H-Z7 )of(ߺ'aCo?)pd!|㋹)9ztB`7WQGAVK_wU9G Κ qp3ς-1uV›xewSL-NMWR$!Q #W};_?Ykav~&5\2Q>ӓg!.yHbou,`:x*kKY Xl/ .SA+eˆ!y(3i: 6xVDr,~e+n\"EO2hm !4dC5+}w&\ R(8(Ƕ;ʰo'S1/8S( 6@mn.,/ 6#`11}R/( A7F)5פn;{ ;6D"pexqmŧ0c׷E~[%w|_L|păb0u_В=3z]M~Ñn!+yk (lKSD*taIh&pCZly2=Dưa>wg"O|V3ntW>oQ_ f`f®s%qJ,Kg&8i I1IL3çbqF(*3fGL.JuЙuB4T95fZ 2yt bʾ*-S["F'iDwX lm { t ̙6.oB,?; A[A|o~j|rl"pS#.Qh a7v 0dF6(v)g[{zO4[~ wF}om3uUm!@`/ۻ'id&D6KfvK0@pu~z~&]TS>/ʌt 6_ CK3:!@ ]yw|]:>Ø/RyN2tF%kKL0k±莂͎m!o6_ s~d5ȌUhdT#?^lK9r[$=ȦI19i9ml绦14z bXbϖ!Nmsz},>sTlAk0.d$9-e8X.,&d6pkๅG"\5qCCOǷ7y3uǍlF6u[B4oQtMe/PDpO5>.Ξ:Nr^È ]>EYܔo %@mlq[A܍),qLJ [7<_{[mIPYNEcG>k-|ޙ˲˝nɝ6^:(v﫠w픞6$ ga/c{ljH1i,8vcUN ,Oo{볽dNTƿL"eӑȩh:#I©pJˢ+ڟvQ`baX9;89,Cv8(9/2ulj|Lyrmor0E\z0B6*g3wQ!_4sK*C[-`*=.'cdٻ:{s_5N_Y_j>6i WY3'~tw5P"Zz?et~YRW׽F~%\Krv5Cwk-!җqWp~ y +~18i ̟VU&nI]< ߓ~Fͫ/V)EJ6Ek‘okJ' mUVm'XFWXfUOZ.\R`V9X+T{X)l]\`U@e=j*TPB *TG[ *TPB VB *TP+EQPB *TP1P#*TPB *T\PCq`Ue~)-Oą#TOiJ=e@09cX")WP^?EnVud^]~O4Rc <7p?%ʤ E¹ v G^$>[K]%;ؾŞRE.|-%~gKKf}d?Y{Y=ֿwȸZ׃p*l*Æu`MH=G^zei_Y|tB$|\Y>%dSljRHB4:O 6 :ټ(94!2M&z~?ˑ:?ܟOj{qԞw>c>ό5Fo//oY/ #7>:߫X"67ơcTlbZӻ^ L.・#8`iob>M$٫/˷.V<&:*S^s~g L.?YQ 5iO0żhD4ߒQR<ŧ+t힒zb2 ~:!Yˣkq_)@R.{()iyn"D\=w}>hbGVd62EI箒-se$SM̜d7[~\x& iOӷxLR*3\b| `-ĒY2rJ4Qݨh<'|#ռO/,1c\62f2( !gęg*8֨ ly9^rGk`ҏ4oCb"K;:|>4%;ٴd5dQy4"-t_d,J&2J^КRb/-69T)K-~y{g#Ld 9oqٙwi Dvoe.75iߛȋ[8YֿW(|kZlB!}OM*,h<\.;E<`>;]HB?5)?Erx:/L;+[6~AqԴ <>^J{۞s1{˃T J]{~fq}ңΊ̲8V\dvߣJ΁c[Q#˾{#NY5C"rȅePZ.0vmxfG>K}:W.JL/Nl /Ƚnv2!wiD{O vFA'~_é}4%lIc@=JdTS椬J%% dӋ54zfg3F+μ|-yܴ84X|vт"  -!H pP8Wf+R/Br/D'#`)-B$'0(EIOFLNZI=3xl$G@kuT>6E')ӅOtIN?8i.ژQ4!2N&G$V'x Q v[cFDc&\<݂?'YT4ATrB3G"s4KF^A/z8Z-23?!f{|1;fq^iY]/1zl*DS*2<I˳3HJˡ fbV{[.7…)ĉz C!ܡ7kMrG{gQ2S-: Ǖhර Yp_uXS0W2=k'^vZYd`pD]XeA'ި_X|qGEQPp;- )Dk L"IAQ(_c!9@HqqKz/ʠoථZ Ev%x@ NzQ TjC+ $TեyfFy~)zvj/(bZeJ:m;-c$|~1&R.\^ vyOKrN5D,8眳}WZb*-ے;nĦBK ɅĹ$'$$BB fpH-YV+m=Zͫݕ,J>оs;sfygΌ1 Yq Mux𩀪Y>4$2S V=FAQ{KS|8}f/H@M 4m8z_~+8k=!7цvNy88iyU uF [>_9φYtYň?J63bDI6Uq?̭*V7H֎tr?=,t<=lB/|8eŶKWUbII?j #9&MMQe1sY7N>@B.oY6 věg#/8ͮzy+fۦIBgu#Iܟ!It[Ul b C|ܐ!m/y4֤-fYU)/'KHb`m'EQ(to%Y8!^Tw϶RՅ/x6ذƧ ':u^C|>L_^AMORrH)Z/ęXt;hGCƜ9d3F œ|ʅ78.3j[[is'-?8%SujrcgLZf ۫.q-_$U=әS^>cc'(/ WnnĸVHiL+\F(o>`M̌_Cy:wRYӽT-WSQm%oQ"QyBl;:Ĕ, a7z>n#g7s%i>mObԘ̷04}'emL+M\?p G?#\$} * }ob7W͛Hf8" L#rHSed 8ZcaYqSܼ{yӈ;tnOݚG\ihr1.n_ɤ?fDÍ`NKQ^6tt08okZtR%zbv YdkgmRpu4**Xv5RĎ)zXWb#FLϹzK;h23MlT;rbO=3N&vnQ2Ug`PA z#* 'YFMU]w2>[9dsA +qU&[y\}D[>|mK5Srȯ;OESlݔDvmdV_OO[=U)<=PĂ:{ɗY]R2 tISѧtTUq\O'@5@}7UbElxqV= mbL:~J<0dz /1PJ{!-D'ض$Y357?h*tzF4VSd0.cw8ǖ>!2;$-~Eܕ)]Z?T(ٺρsDs" 6_)yn/Sj~i`L Vx1xh%VۃXdGs#Qbg)$F%WymGth޴^`7L.q U$ݢ.G$g XNᮥ~vHݛaH7.0X +ZteZZUVxFDܥ9/Oǘ{s(8y7P-FL~d,HZaiK7.D]wB ӻ."A0KÎZ('tr84j?`dE˒@ž.btrs4ޏ e`E.#8Zw?jW'c %]1w4CҧQ\ǙMqAGÉ,Sn >]qQ-}n3s98w0<*b}Gͦ|YW?iGnaw+ Bx}A F#A9~@ q3,v%ch@YVDan\3/kBeTNm>=Θϗs-pR0a@~**Z)US|8d$Ds 9w}kjcόXN:/tj'ަr~A5HC^ݨ"Zx](GP.=ğȟZZx{}l@71#'3X$wADΊe!G[ LXDM\Q@9f}QW"<(lG0 SYp@3.I.NE{)ĊYiIWSɼm̸YC@"?bgj{>?'l^F 's4zqIݘMulrPqv}%#%;ˈI)Lo0}:#&; S'R8^ήg̤-Gz($ĥ7Fa_̌c2OHdLF {—?Zh>n#skdnNrT|ռתcRNZĭ ɛt_}sWsߜe̱Jd?gͣ@/9X~@ԟ`3Gܤ!U]GC*jgrCùqN pN6|5\ߪ\ڋo`#R,}jC%"徉LgC/Tڻ>k<тS3+&k-,ϸ k:&\JY=Gn2H`D @.s>2{94Fv 5ਹӥ?\;ٴދbG¸A>:xBp%Mu%ز,CJg3lJŃl>#ڪWi+WV (|27,_+SOv2V:TL"nϽQO0udCfGԇu>wTt+~ _"ϐ_qvnĨ\-)1'hL~64Y_{u:8_]Adel{;3 lhh_U%3)6Ar j]{GpqBуmS0$pm(_qX=MIJxs8t`'s%::jU'hOC@?EJb(]oQXx7 Fw)*\2ycLfdv9^?DL/$ uT9dZO2(X$6-3jeY$k&sE@gh͘Jn ~G/v_lV;{b̙ܾ~?Hڼ+׎*jS;ۧ]8֩8Tp߼t$f7X$Nbt367)]=[j.u8LI˲cxk鿔'rǍZ-?NYBӁ2!/^EYX3N$mQ1_mR,b'qHF >XbwV1<`#b#uwhv,֯~M`k_k!PuyUb)-SZb)-kքNqyM;eD:t).GS\FBTiBth 4hРA A 4hРAÿ]cr^/q+gY7?g [^`I"W !SzCyJ0* 9"Ipe,1D[Ht#W?a;']o *^@|:T?fn;MM;,Hiϖ?k}H=&f𵩘E;l}.[%/j 80󵼹Q{ǵNBq ooe&Jd~.W:0J"}/zDida󳚹zcWm]=7mVϘ;>kJ/ؠcW":7qhk&ơ 81Hivc/1'?ז5g *ٙT첌'\ñmLDe2~D,Wr$*I( J:Uz9j3?~:㲙@Lyr|ŖS$sڻs˩|@SW!Z~ 0XM·}G?&(8;t>2EmS~3e3)}@D/ӿ}?a^E/_P6`kB#0eRHr^.W15CWJ$S=g*発u*> Af71`V /ws oISxx oug[e] aoU|ϥW_K |=&?]Aq!w v[NqA r)ZƙTڗ |P]ʼpK% |fʊ0YzI?*O^*.W,T=3lFI ]h 5}EJe $X!7U$=o0}'KԨ|"^\HSg/n;I"­T"cH#͔7Gjs45X~@`+kW4Txx:RA/''r)tiLSLc׿o+8v^>0/|2o_RP{^t_71ۣI| e>8y6s>wSxe6Et̑}fngos(.=GCdę2~ݨ,?́ZBcz jqe[Z:{;V?ƈ-xlp]/S)~ty\5i#4Hq̦op.^+l~[l9?@*Y1;Eax !@cC/-GNӶ7d5" SU69yXgŮِp+غss Q@ Svq UZjNO)ʇ˱*U(z/gfWc )wK-/Jm_ u*C|a2n\JUh%sU@⩌V.lu>D>QU9CS[N Q :S:"=sdy%m>?stk/>{9fI w(tNrgRT)lNgtI6hsY~g.Wg}q.W>J > >~!wRF C p!]mU:"J2iw@džo4)sI?-!> ~V UeU2'pS]g'LJ;h'"hR^v[?65u%G ypU`P"{T k˩hЬh`J7P۽TQx{V;D} 6 zП~H q$N \k @g$V mo:z"Ծj`O(q5Դ)aI/j̜S5t}T WFȲ M<fUE(>AOFFzcQiAC%qF?R18N%80{ \dGDC>oCϯ{r E}ϟ8LO ~dtIbBr.)&haEB[Z2S>/]HJěEښ+Idf7x~+fss'=#\\SRϿ 8Y,Hxg@Z1 DeL(o u7* t# `I,*aaa / IDATux^sጢGL3F&L(kwL>|ttRa`O0Lʟ4Q٬^V~_kj )V m$ G:Iu_*7 '<+#2GcU*Ç 8*"DL:KfbLvƤ'0_큞bɞQ:*"vǯ8\褵*qh~s s2<d K`!]vG0e]28 @Ѝ{g'`0վ6~~~qϸ'ն q |ZOs:@.,G:@N} $0ȶO&Iηt9oUɋU`Yh-xʸBO$W5<{[/X2H4ʳ5$]6 G<6`ۇlvz+fsm(3[I:Te\Aqe4]Lxy |>Q?sL`mEaCP h xQ`oUV. qqA]>̞!xcΗn],Q<[t54ؽƒt$1>:=9_y˝ؾ+b̯k60vzCrL=!{tA?rvA;k<=3ϷSQa Jʳz f&0fFPiyÁ+MvUvLRߕ#?)g7[<8)SuêHa#cҾ_*6JMΙ".z&?* Hid@QPOa@2z@].D=:OGv,0ZvG?EoqWʜ,6l1d ,lmgYH1em+%/${

    3ܴ,~dKgux W9[9dc RA!7[ G {}=mGѥyW(z +u4oul?Y7{OdI,w'kِİJCOGɀ4tz^كkܧ޻-mX ٧m|}W='(3Vq6dmK#z8VgywD{v\SqWR@4yH!.;FZڈr1sTP?#Q#Ovڶ8g޴,,˼y.zlVƛ%+\vC z`0n~W2pV˙>Ν#{?gBɳIv^s]-tB "=ܵv*SUTCPT:wD)hmܭ26-D2UJxC ,ͿhtXqVUJnU)Zm>YSRҗ |}%{-Q|lߨ"X̓,V'4Fı^`(H^,p r*MgMlz#ByJ -l^)6&oEO<}>PEě(Rq" iA$4;`0ٙL~|~NʄQ!DaQ7Ǫ/XO4{G!F^J搣*@^;cr3ҙ͹2IK+z 8uf3xNYC?I}T%9AaeI&/Ӻ+'Ig,ɡMHJ!+|wVH6WơNՙ )a8QS8^@cGi sڨt+,ˎCt нi\cdu-N_5[Xn_g& @τIW<2gˬ+y6(e!{f6LO Nɟɬ-8Kym(r5Ʀc8ῨdgDܪ0OO5#U)3HS?T3X3тiod@ 8xcl9ct~bTon-ew(j*;kK*DXԫ[䷫.2aL~j"3 18#ںbaQ`~[72KGJ#ܧU _KuTnZ I+{l>'lT1f L;G| \g+kFΡ`dŃ:!N3O Q?-~~ V`_2@A/M(~̉z֊IŐ.n \= hX\[3^ɹ[RX:'hOʶ1wdB'=Ⰵ+~EE&{l[ 0h~<ӆZQ¼81Oڊ[n3?rѹo{_MfcqgZ8Qտƪ@ƌ;g XnaNNRG[jUѧHxVɱc!k ABre6$ m/VQvs%t'.pО.7'P<*=8{$#_Qa1^=IZ9\ٺ(ө*Y LJ.IoC)'WjOUx Bfc/OWR?A,U uBn7{_*ajx2Agk(( QRX*_8d{I w&]q?Z~1o(t}hzϞ8bDؕ^.,6S' 08OМ2't[,ɓ9%rn3?mΩ{^|<{\2Y4ݐsp`#)F ׉v5)H $pǚ?wFQLrјʵk|eic4yG5NC%<8K')a\U{ѿwtUiӎhkL_C`͎k_9Xj`ǚ5{?F8vfku4{֭:֯95hРA 4hР94hРA 4h 4hРA BPUm  4hРA # -A 4hРAÇv,Xv>CW X:y픖&tJk)-#աS\vhNq92":ťJ;eD:ťC;eD:֠A 4hРAs5hРA 4h@;s\cv^{UfC^'x=ՏYؿ9&>MgH1˖?,3>Le -*?XHػʢGesnY]ѷh 㶔"L3UL|)h]koQ/L^V0@p'#O_Uwk <cT^kJzCWOVcH WxSqO1ɮ+} <k>,Y꼵=o3b* x8A 3$z¹6}Hp#ɱh/{N趗%rS[M#Oc?_^~V3S6(x*ڶ쿿 "l.}[N@SG6-d1I?v9F}21I+̱RUڟoj2td|54$٭n{ U_LML%H/;~-R*&YF lf_D2IQ)KJjJ (ҦJȝ*R`=5vP>!#@UӴ^xGs@bJ rg[Q|$$w&S@Oy 0.Q^E%Gz-|!1/#WrWH6'%rOiy"O'}׎_d>C;WB#0{ROusR=<7E:]X2$wG(L~?ٹKxxtb> m>kpʇ/Ԕ]3.lt#]%I R?m.k,!A;{mo*n0 1"M'#NZzO.{sؽQGюŵ7`dqf`W]8q60Y-IePb_oMr9XoA?]z6Ol9ҷ$|ޤrէc#kU$^m[No2V@՗kAHQY]{ SS`Ul9DZV]ʀ@3T 3*Kނi4!̫L\|~ lom#= "cכI|Wd=_2P e@CnU$=s6)~56>}T=cv覛X.ˣ^L\X`+~PCtQs{9--}>)P].$m&x|sH+AʿNɉz<Ϛ&o3!1WwtRG_O0 &;.e8##-!@,S014tS W K 4LSEf=% Gm+П|/Af4]n'CCCԺ .2*}+~m!G6pRYrUƎs,pLq飭sp{n`_/)G< #jk [2P؝ThbþS~!{˂):2 1ɣ c?IgWG<*GEJ$/w~UE(_Ϟż8F]4ի~R\c/ЩIh`J7gK);!ə9'q;/@b(᤭@ⵖ2IՂM{5\"}P}x:%'n ק#O M̓/\`jEQR6D]!+,lilFɢh$tQ)Ȟ>;v_ַZ|-RY?wsPnN4vE&Q?}![fR ukMHc;1cy(:(R(_xOɝɐϵN67&u/᱉(4=x~B4s&Sk0ElbGWh\s 9}> *wϪ8$@2.6o-i.7s ‡ ^zqge@E)%4qL Ӗt-DW+?ҦELS|td\%zxx~w^yFU]{w43bɖd!w168 ) (/Bca^$$@HVq\&[d[Œ%MaȞ`ޛ7ki{ϱ|c㡫*jMXg4:b TTK>2ݸKX.U1 ^u*~c$=na{bda$#‡OL9ˆ;u菀c8`/صepʽP/(Aa&;BV=(ۙ?QF_Bb1  ҥf)2~dFQgBO KN("2c%cՓOMtajs zd3*Ћrx}#%0H:><>'&=QS4?0X) xiMA;K +9ޮNdʖq=DێeٻBݐh EcEBFoH}s01faRANqk5 84Tт"k~"lV4܍L^bF zy#FP8aC?##7p~a"~B {aZv.0(Lņ݅GL(&X.~dH13WU>JfSd\.z}],c1 ̆>=OAW vK6[NζLfQix Lr0RY`+^o vXHDnp#%^\d"Htn㌚ aMQ? KKŞI\Zh^Dpq^ % 5ţ)LQbϐ^Mud+N5b)ϡeÜ1qpb'Tэ%Nyxa;i5 ̚ˍ摍L2 7yf#L4&8\aW;+}0#pyi/Gpd3m(3t.lۓP|ݎIDATHeOvAA{1Ș*ES8VёL|OnA02E:LEȤ'SC::1/) :6G`]l!jᄨ*f`V *Q졳-NyI75&/miV^u "4".K@(<>}c+JFBB.,#0h\*2-Tu_2ژT­e%ox& =|?ֱmnoUsÄCJ8&V /P::noI$d?}DpE z~ISoK&B{qE=ݮ[6aLr-ֳL SvR7z|!3Au f$];{꿳Ԧ4G^f>㳧s`/s5ownӿG( P F!?n> ΏxN> HuJ9t}iDnߢ >_̿(pÛq_EY׾'UK 3o(rO5vab ٹ\$ZJ|0&/8{ ;/V6SoU[ 4}:#%[o<9Пao?B2/o^`qϑPaڷ˃xc|0:=Jjtƌrx¤x@RǞ I_{ݤ+p ,i\h3PzI.lU@r>?kU:0ȉ|.tG5ʧtml_4UK>fw\3j-hM8Ya^OM;/{)_?ܦӱGE̱7`a񏪴/Qjfo FO#bp=L^*c}2S1asO4@eqȋӕޞ &yNa~!Nz7lU?(ByCJTP,#2xDЗ+!@Q%?gʕ2WCa?'Q4'!OE8IAɕ 8=[GV᫸,0IX $r1wgZȩYV.@)>?"_͸̭ Z|Sz3<-$̚#$= ,}5_ý^.?O*j,P$_و7!2!OtrۻxCj{YXZGw:K\]_瞶KR^yٸ6mYq?==<<%JM"!Sf3v"Ϻ}3M=8ehSѸJvf3ilLSfd".muyO)xתI6Q(Si$DMTeЭ !Ԅf4R{9imHOg;`%Q]#XFϋqXЗ Dem  JGB$"-ѯE߸7?:|` џ9|`$uBvHHV@yWG)B[f5p6ȑH,-FR0Mqsp8 (9qg % زR4f~)jš!>WX $I)EdžWtwAuJ̘FEJ@+02Q5L$Ÿ u|mڵ?+t6 0ueUzjx3lvɞ~|ue$"=Ezyk(ɓ0*2lKxEQa|JLu_*"z 9֙2'}ᥫo^oGoG=5ZRqBUBEnyFtNqG\gڙO (U<0ԩ'[J0c`9$*1Qy1-U/iEbr3Uq}hf>ܞ T 0jbb)fLsf$ABJ㎭(1Sݬ3r(zw{GctxVc e/IPx}uע@B9fPW5.5c@gUdt{fo^C)^z 疮slsjs rX(^łcLh?&Fi{EZTqbk?KlëmeEգ6V깨ZhL@W;u\RÁ|RFcZ9i <-aYE~'^Gy&v믫GY7ࣶ&bul{UZh/z,as6#5|UNgWVVg5Z;ahh+uyQ=KקGYgree^WÿT@wOIq?@?-ߝu![efL"/8y' XϣT~hEFo_l=|ºq{u 5Ğ$g .gΜPN tgx;f@F)»覛F~F?>`(!YnYx7TՁv\ gQC5'S#L/^YO| )դs2(D_X gCDL9]i.K3L̻CY8knB*^iIGP '||&3 +ut?ӗ"@wtn60wV}:J _6q9^Fݦ`CYtqCGCg${59~{2sA~69N)B"T?JJ6nQ4I`3ܴ!0 wwXjBŢ%OVhyle+M`uv,Ò)tx?kz7Rڣz 'ߟY{jhX^JTVj(?;g*[ӱ2u'?="ul9:>;dVu>E RVy X-9ݹ7rߡCtsk{F^װ0+deq^h;F_ȍTr?I\.S gXe^3.a#E/ pkv9eBU{|QWr{4-Eg^&>cu=qwk7Ҏ7̜%yxKTdA/r;^X6T[_ιdf%=]ގ>:܄ ̛/E|^/E0,7e' ZttyorYLzU̜,?n}➏ ,c}"g^Y`3T}G^Y`iGX9w[^˷.Xums0wcSy{NZ*sP|yޞ)o<#<#<;yGyGyw#<#<+osIENDB`rivet-2.3.5/doc/examples-sgml/table.rvt000644 001750 001750 00000000635 11545343461 017477 0ustar00mxmmxm000000 000000 <? puts "<table>\n" for {set i 1} { $i <= 8 } {incr i} { puts "<tr>\n" for {set j 1} {$j <= 8} {incr j} { set num [ expr $i * $j * 4 - 1] puts [ format "<td bgcolor=\"%02x%02x%02x\" > $num $num $num </td>\n" \ $num $num $num ] } puts "</tr>\n" } puts "</table>\n" ?> rivet-2.3.5/doc/html/cookie.html000644 001750 001750 00000013047 13200160527 016167 0ustar00mxmmxm000000 000000 cookie


    Name

    cookie — get, set and delete cookies.

    Synopsis

    ::rivet::cookie ?set? ?cookieName? ??cookiValue?? ?-days expireInDays? ?-hours expireInHours? ?-minutes expireInMinutes? ?-expires Wdy, DD-Mon-YYYY HH:MM:SS GMT? ?-path uriPathCookieAppliesTo? ?-secure 1/0? ?-HttpOnly 1/0?
    ::rivet::cookie ?get? ?cookieName?
    ::rivet::cookie ?delete? ?cookieName?
    ::rivet::cookie ?unset? ?cookieName?

    Description

    cookie gets, sets, unsets or deletes a cookie. When you get a cookie, the command returns the value of the cookie, or an empty string if no cookie exists.

    cookie delete will set the timeout value to -1 minutes - deleting the cookie in the browser.

    cookie unset will remove the defined cookie in the server (perhaps preparatory to checking/resetting the cookie).

    The command has a number of switches setting a cookie attributes

    rivet-2.3.5/doc/xml/intro.xml000644 001750 001750 00000005633 13133667410 015553 0ustar00mxmmxm000000 000000
    Introduction to Apache Rivet Apache Rivet is a system for creating dynamic web content via a programming language integrated with Apache Web Server. It is designed to be fast, powerful and extensible, consume few system resources, be easy to learn, and to provide the user with a platform that can also be used for other programming tasks outside the web (GUI's, system administration tasks, text processing, database manipulation, XML, and so on). In order to meet these goals, we have chosen the Tcl programming language to combine with the Apache Web Server. In this manual, we aim to help get you started, and then writing productive code as quickly as possible, as well as giving you ideas on how to best take advantage of Rivet's architecture to create different styles of web site. This documentation is focused on the current version of Rivet, but still a work in progress, and, like everything else about Apache Rivet, it is Free Software. If you see something that needs improving, and have ideas or suggestions, don't hesitate to let us know. If you want to contribute directly, better yet! New commands in Rivet 2.3 Rivet 2.3 introduces 2 new commands ::rivet::exit and ::rivet::catch ::rivet::exit was introduced to help mod_rivet to give the command exit a more sensible behavior within the context of the Apache HTTP Web Server. In fact the core command has become an alias of ::rivet::exit which interrupts the script execution and hands control to any AbortScript, completes the request and just before returning to the web server framework terminates the child process by calling Tcl_Exit Since ::rivet::abort_page and ::rivet::exit interrupt a script execution returning a TCL_ERROR code any call to a catch construct would trap this error and AbortScript could be executed only by throwing the error condition again. We introduced the ::rivet::catch in order to simplify these operations. If any real error occurs the procedure returns 1 and fills the optional arguments with their expected values, otherwise execution is interrupted control passed on to AbortScript
    rivet-2.3.5/src/librivet/rivetCrypt.c000644 001750 001750 00000011464 12625303776 017265 0ustar00mxmmxm000000 000000 /* * rivetCrypt.c - Commands to do encryption and decryption. */ /* Copyright 2002-2004 The Apache Software Foundation 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. */ /* Rivet config */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "rivet.h" #include "ap_config.h" #define MODE_DECRYPT 0 #define MODE_ENCRYPT 1 /* encrypt/decrypt string in place using key, * mode = 1 to encrypt and 0 to decrypt */ static void Rivet_Crypt(char *string, const char *key, long offset, int mode) { const char *kp = key; offset = offset % strlen(key); while (offset--) kp++; /* printf("encrypt '%s' with key '%s', mode %d\n",string,key,mode); */ while (*string != '\0') { if (*string >= 32 && *string <= 126) { if (mode) *string = (((*string - 32) + (*kp - 32)) % 94) + 32; else *string = (((*string - 32) - (*kp - 32) + 94) % 94) + 32; } string++; kp++; if (*kp == '\0') { kp = key; } } } TCL_CMD_HEADER( Rivet_EncryptCmd ) { char *data, *key; char *resultBuffer; int dataLen; int keyIndex; if( objc < 3 ) { Tcl_WrongNumArgs( interp, 1, objv, "data key" ); return TCL_ERROR; } data = Tcl_GetStringFromObj( objv[1], &dataLen ); resultBuffer = (char *)Tcl_Alloc( (unsigned)dataLen + 1 ); strcpy ( resultBuffer, data ); for( keyIndex = 2; keyIndex < objc; keyIndex++ ) { key = Tcl_GetStringFromObj( objv[keyIndex], NULL ); Rivet_Crypt( resultBuffer, key, 0L, MODE_ENCRYPT ); } Tcl_SetObjResult( interp, Tcl_NewStringObj( resultBuffer, -1 ) ); Tcl_Free(resultBuffer); return TCL_OK; } TCL_CMD_HEADER( Rivet_DecryptCmd ) { char *data, *key; char *resultBuffer; int dataLen; int keyIndex; if( objc < 3 ) { Tcl_WrongNumArgs( interp, 1, objv, "data key" ); return TCL_ERROR; } data = Tcl_GetStringFromObj( objv[1], &dataLen ); resultBuffer = (char *)Tcl_Alloc( (unsigned)dataLen + 1 ); strcpy ( resultBuffer, data ); for( keyIndex = 2; keyIndex < objc; keyIndex++ ) { key = Tcl_GetStringFromObj( objv[keyIndex], NULL ); Rivet_Crypt( resultBuffer, key, 0L, MODE_DECRYPT ); } Tcl_SetObjResult( interp, Tcl_NewStringObj( resultBuffer, -1 ) ); Tcl_Free(resultBuffer); return TCL_OK; } TCL_CMD_HEADER( Rivet_CryptCmd ) { #ifdef crypt char *key, *salt; const char *resultBuffer; if( objc != 3 ) { Tcl_WrongNumArgs( interp, 1, objv, "key salt" ); return TCL_ERROR; } key = Tcl_GetStringFromObj( objv[1], NULL ); salt = Tcl_GetStringFromObj( objv[2], NULL ); resultBuffer = crypt((const char *)key, (const char *)salt); if( resultBuffer == NULL ) { Tcl_AppendResult (interp, "crypt function failed: ", Tcl_GetStringFromObj(objv[1], NULL), (char *)NULL ); return TCL_ERROR; } Tcl_SetObjResult( interp, Tcl_NewStringObj( resultBuffer, -1 ) ); return TCL_OK; #else /* ! crypt */ Tcl_SetObjResult(interp,Tcl_NewStringObj("error: command not available", -1)); return TCL_ERROR; #endif /* ! crypt */ } /*----------------------------------------------------------------------------- * Rivet_initCrypt -- * * Initialize the encrypt, decrypt and crypt commands in an interpreter. * * These routines have been examined and are believed to be safe in a safe * interpreter, as they only manipulate and return Tcl strings. * * Parameters: * o interp - Interpreter to add commands to. *----------------------------------------------------------------------------- */ #if RIVET_NAMESPACE_EXPORT == 1 extern Tcl_Namespace* Rivet_GetNamespace( Tcl_Interp* interp); #endif int Rivet_InitCrypt( Tcl_Interp *interp) { RIVET_OBJ_CMD("encrypt", Rivet_EncryptCmd); RIVET_OBJ_CMD("decrypt", Rivet_DecryptCmd); RIVET_OBJ_CMD("crypt", Rivet_CryptCmd); #if RIVET_NAMESPACE_EXPORT == 1 { Tcl_Namespace* rivet_ns = Rivet_GetNamespace(interp); RIVET_EXPORT_CMD(interp,rivet_ns,"encrypt"); RIVET_EXPORT_CMD(interp,rivet_ns,"decrypt"); RIVET_EXPORT_CMD(interp,rivet_ns,"crypt"); } #endif return TCL_OK; } rivet-2.3.5/tests/failtest.test000644 001750 001750 00000001522 12322611233 016167 0ustar00mxmmxm000000 000000 # This test is for those commands that must not run outside of a request processing # Also command ::rivet::inspect is tested in either forms, those that allow a call from # outside request processing and those that must denied it. ::tcltest::test failtest-1.1 {commands that must refuse to run in child init or exit} { apachetest::start { -c "RivetServerConf ChildInitScript \" source checkfails.tcl \"" } {} { catch { set inspect_page [::http::geturl "${urlbase}failtest.tcl"] set match [::http::data $inspect_page] ::http::cleanup $inspect_page } } set match } {apache_table->1 env->1 headers->1 include->1 inspect0->1 inspect1->1 inspect2->1 inspect3->0 inspect4->0 load_env->1 load_headers->1 makeurl->1 no_body->1 parse->1 raw_post->1 var->1 virtual_filename->1 } rivet-2.3.5/doc/html/images/remote.png000644 001750 001750 00000001067 13200160527 017275 0ustar00mxmmxm000000 000000 PNG  IHDR rgAMA asRGB cHRMz&u0`:pQ<PLTE|9H )wvr%" #5 "Op((Z$ y{{ :Tyzy+-?!% $11TcyyxZ1Rc((%#,)ҽ)* )"Gb{%+  vtoYy'tRNS@fbKGDH pHYsHHFk>pIDAT-0-X*x.ނhe2y a3OTM i$ilZ;(WX+1fnώR'&/v~g o$%tEXtdate:create2012-10-01T18:27:32+02:00Qrz%tEXtdate:modify2012-10-01T18:27:32+02:00 IENDB`rivet-2.3.5/doc/images/warning.png000644 001750 001750 00000002331 11436722370 016507 0ustar00mxmmxm000000 000000 PNG  IHDRשPLTE!)1BJRZks{{{RRZZ{{99JJ11))))))!!p;bKGDHIDATxm}o0M5%%m szP^UDKnk[;һ?0n!qCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com!*tEXtSignaturec42b7d2d564aab588891979703f02b45OߓtEXtPage24x24+0+0r[ 1IENDB`rivet-2.3.5/rivet/rivet-tcl/000755 001750 001750 00000000000 13200157764 015365 5ustar00mxmmxm000000 000000 rivet-2.3.5/tests/makeurl.rvt000644 001750 001750 00000000572 11670231317 015662 0ustar00mxmmxm000000 000000 rivet-2.3.5/rivet/packages/dtcl/000755 001750 001750 00000000000 13200157764 016160 5ustar00mxmmxm000000 000000 rivet-2.3.5/doc/html/html.html000644 001750 001750 00000005356 13200160527 015666 0ustar00mxmmxm000000 000000 html

    Name

    html — construct html tagged text.

    Synopsis

    ::rivet::html ?string? ?arg...?

    Description

    Print text with the added ability to pass HTML tags following the string. Example:

    ::rivet::html "Test" b i

    produces: <b><i>Test</i></b>

    rivet-2.3.5/tests/virtualhost.test000644 001750 001750 00000017207 13200157042 016746 0ustar00mxmmxm000000 000000 # virtualhost.test -- test virtual host setups. # $Id: virtualhost.test 1814443 2017-11-06 22:11:46Z mxmanghi $ set docroot1 [file join [pwd] docroot1] set docroot2 [file join [pwd] docroot2] set vhostconf { #NameVirtualHost 127.0.0.1 DocumentRoot $docroot1 ServerName vhost1 DocumentRoot $docroot2 ServerName vhost2 } # Make sure virtual hosts work. ::tcltest::test vhost-1.1 {basic virtual host} { apachetest::start {} $vhostconf { set page1 [::http::geturl "${urlbase}basic1.rvt" -headers [list Host vhost1]] set page2 [::http::geturl "${urlbase}basic2.rvt" -headers [list Host vhost2]] set match1 [::http::data $page1] set match2 [::http::data $page2] ::http::cleanup $page1 ::http::cleanup $page2 } list [string match {Virtual Host1 Test*} $match1] \ [string match {Virtual Host2 Test*} $match2] } {1 1} # Try virtual hosts with and without a childinitscript. ::tcltest::test vhost-2.1 {virtual host w/ ChildInitScript} { set data {} apachetest::start {} { RivetServerConf SeparateVirtualInterps off RivetServerConf ChildInitScript "source [file join $docroot1 childinit.tcl]" #NameVirtualHost 127.0.0.1 DocumentRoot $docroot1 ServerName vhost1 RivetServerConf ChildInitScript "source [file join $docroot2 childinit.tcl]" DocumentRoot $docroot2 ServerName vhost2 } { set page2 [::http::geturl "${urlbase}vhost2.rvt" -headers [list Host vhost2]] set page1 [::http::geturl "${urlbase}vhost1.rvt" -headers [list Host vhost1]] set data "[::http::data $page1][::http::data $page2]" ::http::cleanup $page1 ::http::cleanup $page2 } # puts ">>>$data<<<" regexp "::childinit1 exists.*::childinit2 exists" $data match } 1 # Test out a ChildInitScript that is only in a vhost. ::tcltest::test vhost-2.2 {virtual host w/ ChildInitScript in vhost} { set data {} apachetest::start {} { #NameVirtualHost 127.0.0.1 DocumentRoot $docroot1 ServerName vhost1 RivetServerConf ChildInitScript "source [file join $docroot2 childinit.tcl]" DocumentRoot $docroot2 ServerName vhost2 } { set page {} lappend page [::http::geturl "${urlbase}vhost2.rvt" -headers [list Host vhost2]] lappend page [::http::geturl "${urlbase}vhost1.rvt" -headers [list Host vhost1]] foreach p $page { lappend data [::http::data $p] ::http::cleanup $p } } # set data regexp "vhost2 hello world
    \n::childinit2 exists
    " $data match } 1 # Test out a beforescript in a virtual host. ::tcltest::test vhost-3.1 {virtual host w/ BeforeScript} { set data {} apachetest::start {} { RivetServerConf BeforeScript "source [file join $docroot1 beforescript.tcl]" #NameVirtualHost 127.0.0.1 DocumentRoot $docroot1 ServerName vhost1 RivetServerConf BeforeScript "source [file join $docroot2 beforescript.tcl]" DocumentRoot $docroot2 ServerName vhost2 } { set page1 [::http::geturl "${urlbase}vhost2.rvt" -headers [list Host vhost2]] set page2 [::http::geturl "${urlbase}vhost1.rvt" -headers [list Host vhost1]] set data1 [::http::data $page1] set data2 [::http::data $page2] ::http::cleanup $page1 ::http::cleanup $page2 } list [regexp "^beforescript2\nVirtual Host2 Test" $data1 match] \ [regexp "^beforescript1\nVirtual Host1 Test" $data2 match] # list $data1 $data2 } {1 1} # Turn on separate interpreters per virtual host. ::tcltest::test vhost-4.1 {virtual host w/ separate interps} { set data {} apachetest::start {} { RivetServerConf SeparateVirtualInterps on #NameVirtualHost 127.0.0.1 RivetServerConf ChildInitScript "set ::childinit1 1" DocumentRoot $docroot1 ServerName vhost1 RivetServerConf ChildInitScript "set ::childinit2 1" DocumentRoot $docroot2 ServerName vhost2 } { set page1 [::http::geturl "${urlbase}vhost2.rvt" -headers [list Host vhost2]] set page2 [::http::geturl "${urlbase}vhost1.rvt" -headers [list Host vhost1]] set data1 [::http::data $page1] set data2 [::http::data $page2] ::http::cleanup $page1 ::http::cleanup $page2 } # puts "--$data1--" # puts "--$data2--" list \ [regexp "vhost2 hello world
    \n::childinit2 exists
    " $data1 match] \ [regexp "vhost1 hello world
    \n::childinit1 exists
    " $data2 match] # list $data1 $data2 } {1 1} # Run through a list of config options, the files they use and the # regexps that match the results. # Format: directive, file, 2 regexps to match set configs { ChildInitScript childinit.tcl "vhost2 hello world
    \n::childinit2 exists
    \n::childinit1 exists
    \n" \ "vhost1 hello world
    \n::childinit1 exists
    \n::childinit2 exists
    " BeforeScript beforescript.tcl "^beforescript2\nVirtual Host2 Test" "^beforescript1\nVirtual Host1 Test" AfterScript afterscript.tcl "afterscript2" "afterscript1" } set i 1 foreach {conf file re1 re2} $configs { ::tcltest::test vhost-5.$i [list vhost with $conf] { apachetest::start {} " RivetServerConf SeparateVirtualInterps off RivetServerConf $conf \"source [file join $docroot1 $file]\" #NameVirtualHost 127.0.0.1 DocumentRoot $docroot1 ServerName vhost1 RivetServerConf $conf \"source [file join $docroot2 $file]\" DocumentRoot $docroot2 ServerName vhost2 " { set page1 [::http::geturl "${urlbase}vhost2.rvt" -headers [list Host vhost2]] set page2 [::http::geturl "${urlbase}vhost1.rvt" -headers [list Host vhost1]] set data1 [::http::data $page1] set data2 [::http::data $page2] ::http::cleanup $page1 ::http::cleanup $page2 } #puts "--$re1--\n--$data1--" #puts "--$re2--\n--$data2--" list [regexp $re1 $data1 match] [regexp $re1 $data1 match] #list $data1 $data2 } {1 1} } set configs { ChildInitScript childinit.tcl "vhost2 hello world
    \n::childinit2 exists
    \n" "vhost1 hello world
    \n::childinit1 exists
    \n" BeforeScript beforescript.tcl "^beforescript2\nVirtual Host2 Test" "^beforescript1\nVirtual Host1 Test" AfterScript afterscript.tcl "afterscript2" "afterscript1" } # Now run through a similar list, using per vhost interps. set i 1 foreach {conf file re1 re2} $configs { ::tcltest::test vhost-6.$i [list vhost with $conf and SeparateVirtualInterps] { apachetest::start {} " RivetServerConf SeparateVirtualInterps on RivetServerConf $conf \"source [file join $docroot1 $file]\" #NameVirtualHost 127.0.0.1 DocumentRoot $docroot1 ServerName vhost1 RivetServerConf $conf \"source [file join $docroot2 $file]\" DocumentRoot $docroot2 ServerName vhost2 " { set page1 [::http::geturl "${urlbase}vhost2.rvt" -headers [list Host vhost2]] set page2 [::http::geturl "${urlbase}vhost1.rvt" -headers [list Host vhost1]] set data1 [::http::data $page1] set data2 [::http::data $page2] ::http::cleanup $page1 ::http::cleanup $page2 } #puts "--$re1--\n--$data1--" #puts "--$re2--\n--$data2--" list [regexp $re1 $data1 match] [regexp $re1 $data1 match] } {1 1} incr i } rivet-2.3.5/tests/binary.test000644 001750 001750 00000001424 11670231317 015647 0ustar00mxmmxm000000 000000 # $Id: binary.test 1212149 2011-12-08 21:57:35Z mxmanghi $ set testfilename1 binary.rvt set binaryfile AngeloFish.jpg ::tcltest::test binary-1.1 {binary data test} { set page [ ::http::geturl "${urlbase}$testfilename1?test1=1" ] set fl [open $binaryfile r] fconfigure $fl -translation binary fconfigure $fl -encoding binary set ret [string equal -length 42747 [::http::data $page] [read $fl]] close $fl set ret } 1 ::tcltest::test binary-2.1 {binary data test with 'include'} { set page [ ::http::geturl "${urlbase}$testfilename1?test2=1" ] set fl [open $binaryfile r] fconfigure $fl -translation binary fconfigure $fl -encoding binary set ret [string equal -length 42747 [::http::data $page] [read $fl]] close $fl set ret } 1 rivet-2.3.5/m4/000755 001750 001750 00000000000 13200157764 012643 5ustar00mxmmxm000000 000000 rivet-2.3.5/doc/xml/asciiglyphs.xml000644 001750 001750 00000005272 13012642106 016725 0ustar00mxmmxm000000 000000
    AsciiGlyphs
    Introduction The AsciiGlyphs package provides a command to print large ASCII glyphs in an HTML fragment based on a <pre>...</pre:> element. The shape of the glyphs was inspired by the challenge response used by Fossil to let anonymous users to log into a repository. The glyph set was extended to support the whole English alphabet and some punctuation characters. The string to be represented has to be made of pure 7-bit ASCII characters. The package also runs standalone outside of mod_rivet
    toGlyphs print large ASCII glyphs ::AsciiGlyphs toGlyphs string Description prints the ASCII glyphs corresponding to the characters forming the argument string
    Example package require AsciiGlyphs ::AsciiGlyphs toGlyphs "Date: 07-12-2015" _____ _____ ______ ___ ______ __ ___ ___ ___ __ _____ | __ \ /\ |_ _| | ____| _ / _ \ |____ | /_ ||__ \ |__ \ / _ \ /_ || ____| | | | | / \ | | | |__ |_| | | | | / / ____ | | ) | ____ ) || | | | | || |__ | | | | / /\ \ | | | __| _ | | | | / / |____| | | / / |____| / / | | | | | ||___ \ | |__| | / ____ \ | | | |____ |_| | |_| | / / | | / /_ / /_ | |_| | | | ___) | |_____/ /_/ \_\ |_| |______| \___/ /_/ |_||____| |____| \___/ |_||____/ ::AsciiGlyphs toGlyphs "Time: 18:10:19" _____ ___ _ _ ______ __ ___ __ ___ __ ___ |_ _| | || \ / | | ____| _ /_ | / _ \ _ /_ | / _ \ _ /_ | / _ \ | | | | | \/ | | |__ |_| | || (_) | |_| | || | | | |_| | || (_) | | | | | | | | | | __| _ | | > _ < _ | || | | | _ | | \__, | | | | | | | | | | |____ |_| | || (_) | |_| | || |_| | |_| | | / / |_| |___||_| |_| |______| |_| \___/ |_| \___/ |_| /_/
    rivet-2.3.5/tests/inspect.tcl000644 001750 001750 00000000554 12301766370 015642 0ustar00mxmmxm000000 000000 if {[::rivet::var_qs exists p]} { set fpar [::rivet::var_qs get p] switch $fpar { childinit { puts -nonewline [::rivet::inspect ChildInitScript] } script { puts -nonewline [::rivet::inspect script] } default { } } } else { puts -nonewline [::rivet::inspect] } rivet-2.3.5/doc/html/parray.html000644 001750 001750 00000005533 13200160527 016215 0ustar00mxmmxm000000 000000 parray

    Name

    parray — Tcl's parray with html formatting.

    Synopsis

    ::rivet::parray ?arrayName? ??pattern??

    Description

    An html version of the standard Tcl parray command. Displays the entire contents of an array in a sorted, nicely-formatted way. Mostly used for debugging purposes.

    rivet-2.3.5/doc/html/load_headers.html000644 001750 001750 00000005050 13200160527 017323 0ustar00mxmmxm000000 000000 load_headers

    Name

    load_headers — get client request's headers.

    Synopsis

    ::rivet::load_headers ?array_name?

    Description

    Load the headers that come from a client request into the provided array name, or use headers if no name is provided.

    rivet-2.3.5/tests/docroot1/basic1.rvt000644 001750 001750 00000000023 11670231317 017105 0ustar00mxmmxm000000 000000 Virtual Host1 Test rivet-2.3.5/doc/images/note.png000644 001750 001750 00000000752 11436722370 016014 0ustar00mxmmxm000000 000000 PNG  IHDRb$bKGD#2IDATxe!0 E}K C tAQCACQA+g4mɌoK. qc  D="s %dǜH1y%M8fK wֵ>i6g-NpYtL#ߟ ab;U#2V} ԣrVx]zTT1O H4]o zΧg"ӒNHlUu߯9DIO - Database Interface Objects

    DIO - Database Interface Objects

    rivet-2.3.5/doc/html/dio_package.html000644 001750 001750 00000137001 13200160530 017133 0ustar00mxmmxm000000 000000 DIO

    Name

    DIO — Database Interface Objects

    Synopsis

    ::DIO::handle interface ?objectName? (-option | option | -option | option | ...)

    Description

    DIO is designed to be a generic, object-oriented interface to SQL databases. Its main goal is to be as generic as possible, but since not all SQL databases support the exact same syntaxes, keeping code generic between databases is left to the abilities of the programmer. DIO simply provides a way to keep the Tcl interface generic.

    interface - The name of the database interface. Currently supported interfaces are Postgresql and Mysql.

    If objectName is specified, DIO creates an object of that name. If there is no objectName given, DIO will automatically generate a unique object ID

    Options

    -host ?hostname?
    The hostname of the computer to connect to. If none is given, DIO assumes the local host.
    -port ?portNumber?
    The port number to connect to on hostname.
    -user ?username?
    The username you wish to login to the server as.
    -pass ?password?
    The password to login to the server with.
    -db ?database?
    The name of the database to connect to.
    -table ?tableName?
    The default table to use when using built-in commands for storing and fetching.
    -keyfield ?keyFieldname?
    The default field to use as the primary key when using built-in commands for storing and fetching.
    -autokey (1 | 0)
    If this option is set to 1, DIO will attempt to determine an automatic key for keyField when storing and fetching. In most databases, this requires that the sequence also be specified. In the case of MySQL, where sequences do not exist, autokey must be used in conjunction with a table which has a field specified as AUTO.
    -sequence ?sequenceName?
    If DIO is automatically generating keys, it will use this sequence as a means to gain a unique number for the stored key.

    DIO Object Commands

    objectName ?array? ?request?
    Execute request as a SQL query and create an array from the first record found. The array is set with the fields of the table and the values of the record found.
    objectName ?autokey? (value | boolean)
    Return the current autokey value. If value is specified, it sets a new value for the autokey option.
    objectName ?close?
    Close the current database connection. This command is automatically called when the DIO object is destroyed.
    objectName ?count?
    Return a count of the number of rows in the specified (or current) table.
    objectName ?db? ?value?
    Return the current database. If value is specified, it sets a new value for the database. In most cases, the DIO object will automatically connect to the new database when this option is changed.
    objectName ?delete? ?key? (-option | option | ...)
    Delete a record from the database where the primary key matches key.
    objectName ?destroy?
    Destroy the DIO object.
    objectName ?errorinfo? ?value?
    errorinfo contains the value of the last error, if any, to occur while executing a request. When a request fails for any reason, this variable is filled with the error message from the SQL interface package.
    objectName ?exec? ?request?
    Execute request as an SQL query. When the exec command is called, the query is executed, and a DIO result object is returned. From there, the result object can be used to obtain information about the query status and records in a generic way. See Result Object Commands
    objectName ?fetch? ?key? ?arrayName? (-option | option | ...)
    Fetch a record from the database where the primary key matches key and store the result in an array called arrayName.
    objectName ?forall? ?request? ?arrayName? ?body?
    Execute an SQL select request and iteratively fill the array named arrayName with elements named with the matching field names, and values containing the matching values, repeatedly executing the specified code body for each row returned.
    objectName ?host? ?value?
    Return the current host value. If value is specified, it sets a new value for the host.
    objectName ?insert? ?table? ?arrayName? (-option | option | ...)
    Insert fields from arrayName into the specified table in the database.
    objectName ?interface?
    Return the database interface type, such as Postgresql or Mysql.
    objectName ?keyfield? ?value?
    Return the current keyfield. If value is specified, it sets a new value for the keyfield. Value can contain multiple key fields as a Tcl list, if the table has multiple key fields.
    objectName ?keys? ?pattern? (-option | option | ...)
    Return a list of keys in the database. If pattern is specified, only the keys matching will be returned.
    objectName ?lastkey?
    Return the last key that was used from sequence. If sequence has not been specified, this command returns an empty string.
    objectName ?list? ?request?
    Execute request as a SQL query and return a list of the first column of each record found.
    objectName ?makekey? ?arrayName? ?keyfield?
    Given an array containing key-value pairs and an optional list of key fields (we use the object's keyfield if none is specified), if we're doing auto keys, create and return a new key, otherwise if it's a single key, just return its value from the array, else if there are multiple keys, return all the keys' values from the array as a list.
    objectName ?nextkey?
    Increment sequence and return the next key to be used. If sequence has not been specified, this command returns an empty string.
    objectName ?open?
    Open the connection to the current database. This command is automatically called from any command which accesses the database.
    objectName ?pass? ?value?
    Return the current pass value. If value is specified, it sets a new value for the password.
    objectName ?port? ?value?
    Return the current port value. If value is specified, it sets a new value for the port.
    objectName ?quote? ?string?
    Return the specified string quoted in a way that makes it acceptable as a value in a SQL statement.
    objectName ?search? (-option | option | ...)
    Search the current table, or the specified table if -table tableName is specified, for rows matching one or more fields as key-value pairs, and return a query result handle. See Result Object Commands
    For example,
    set res [DIO search -table people -firstname Bob]
    objectName ?sequence? ?value?
    Return the current sequence value. If value is specified, it sets a new value for the sequence.
    objectName ?store? ?arrayName? (-option | option | ...)
    Store the contents of arrayName in the database, where the keys are the field names and the array's values are the corresponding values. Do an SQL insert if the corresponding row doesn't exist, or an update if it does.
    The table name must have been previously set or specified with ?-table?, and the key field(s) must have been previously set or specified with ?-keyfield?.
    Please note that the store method has significantly higher overhead than the update or insert methods, so if you know you are inserting a row rather than updating one, it is advisable to use the insert method and, likewise, if you know you are updating rather than inserting, to use the update method.
    objectName ?string? ?request?
    Execute request as a SQL query and return a string containing the first record found.
    objectName ?table? ?value?
    Return the current table. If value is specified, it sets a new value for the table.
    objectName ?update? ?arrayName? (-option | option | ...)
    Updates the row matching the contents of arrayName in the database. The matching row must already exist. The table can have already been set or can be specified with ?-table?, and the key field(s) must either have been set or specified with ?-keyfield?.
    objectName ?user? ?value?
    Return the current user value. If value is specified, it sets a new value for the user.

    Result Object Commands

    resultObj ?autocache? ?value?
    Return the current autocache value. If value is specified, it sets a new value for autocache.
    If autocache is true, the result object will automatically cache rows as you use them. This means that the first time you execute a forall command, each row is being cached in the result object itself and will no longer need to access the SQL result. Default is true.
    resultObj ?cache?
    Cache the results of the current SQL result in the result object itself. This means that even if the database connection is closed and all the results of the DIO object are lost, this result object will still maintain a cached copy of its records.
    resultObj ?errorcode? ?value?
    Return the current errorcode value. If value is specified, it sets a new value for errorcode.
    errorcode contains the current code from the SQL database which specifies the result of the query statement which created this object. This variable can be used to determine the success or failure of a query.
    resultObj ?errorinfo? ?value?
    Return the current errorinfo value. If value is specified, it sets a new value for errorinfo.
    If an error occurred during the SQL query, DIO attempts to set the value of errorinfo to the resulting error message.
    resultObj ?fields? ?value?
    Return the current fields value. If value is specified, it sets a new value for fields.
    fields contains the list of fields used in this query. The fields are in order of the fields retrieved for each row.
    resultObj ?forall? ?-type? ?varName? ?body?
    Execute body over each record in the result object.
    Types:
    -array
    Create varName as an array where the indexes are the names of the fields in the table and the values are the values of the current row.
    -keyvalue
    Set varName to a list containing key-value pairs of fields and values from the current row. (-field value -field value)
    -list
    Set varName to a list that contains the values of the current row.
    resultObj ?next? ?-type? ?varName?
    Retrieve the next record in the result object.
    Types:
    -array
    Create varName as an array where the indexes are the names of the fields in the table and the values are the values of the current row.
    -keyvalue
    Set varName to a list containing key-value pairs of fields and values from the current row. (-field value -field value)
    -list
    Set varName to a list that contains the values of the current row.
    resultObj ?numrows? ?value?
    Return the current numrows value. If value is specified, it sets a new value for numrows.
    numrows is the number of rows in this result.
    resultObj ?resultid? ?value?
    Return the current resultid value. If value is specified, it sets a new value for resultid.
    resultid in most databases is the result pointer which was given us by the database. This variable is not generic and should not really be used, but it's there if you want it.
    resultObj ?rowid? ?value?
    Return the current rowid value. If value is specified, it sets a new value for rowid.
    rowid contains the number of the current result record in the result object. This variable should not really be accessed outside of the result object, but it's there if you want it.
    rivet-2.3.5/STATUS000644 001750 001750 00000000447 12453610043 013267 0ustar00mxmmxm000000 000000 tcl-rivet STATUS: $Id: STATUS 1650416 2015-01-08 23:17:55Z mxmanghi $ Committers: ========== David Welton Damon Courtney Karl Lehenbauer Harald Oehlmann Brice Hamon George Petasis Massimo Manghi Rivet 2.2 builds for most Unix-like systems and runs with Apache 2.2 and 2.4 and the prefork MPM rivet-2.3.5/rivet/packages/tclrivet/pkgIndex.tcl000644 001750 001750 00000001034 07771155501 021344 0ustar00mxmmxm000000 000000 # Tcl package index file, version 1.1 # This file is generated by the "pkg_mkIndex" command # and sourced either when an application starts up or # by a "package unknown" script. It invokes the # "package ifneeded" command to set up package-related # information so that packages will be loaded automatically # in response to "package require" commands. When this # script is sourced, the variable $dir must contain the # full path name of this file's directory. package ifneeded tclrivet 0.1 [list source [file join $dir tclrivet.tcl]] rivet-2.3.5/doc/images/scrollup.png000644 001750 001750 00000000541 12032344336 016701 0ustar00mxmmxm000000 000000 PNG  IHDR _w(gAMA asRGB cHRMz&u0`:pQ<PLTE5us0tRNS@fbKGDH pHYsHHFk>0IDATc```d! l$Ag"\@Ɔ B (hi6P%tEXtdate:create2012-10-01T18:29:07+02:00j%tEXtdate:modify2004-02-19T05:50:42+01:00%:,IENDB`rivet-2.3.5/rivet/README000644 001750 001750 00000000732 07446502311 014333 0ustar00mxmmxm000000 000000 ### ## rivet/ - Initialization code for the Rivet Apache module. ## ### init.tcl - Contains the initialization routines for Rivet in a ::Rivet namespace. packages - Contains packages for use with Rivet. Place any new packages or procedure libraries in this directory. rivet-tcl - Contains .tcl files for procedures in Rivet. Place new commands to Rivet in this directory. packages-local - If it exists, a directory of local packages. rivet-2.3.5/rivet/packages/simpledb/pkgIndex.tcl000644 001750 001750 00000001034 07736027420 021306 0ustar00mxmmxm000000 000000 # Tcl package index file, version 1.1 # This file is generated by the "pkg_mkIndex" command # and sourced either when an application starts up or # by a "package unknown" script. It invokes the # "package ifneeded" command to set up package-related # information so that packages will be loaded automatically # in response to "package require" commands. When this # script is sourced, the variable $dir must contain the # full path name of this file's directory. package ifneeded simpledb 0.1 [list source [file join $dir simpledb.tcl]] rivet-2.3.5/tests/get.rvt000644 001750 001750 00000002047 11670231317 015000 0ustar00mxmmxm000000 000000 0 } { if { [::rivet::var exists foobar] } { puts "\[::rivet::var get foobar\] = [::rivet::var get foobar]\n" puts "\[::rivet::var_qs get foobar\] = [::rivet::var_qs get foobar]\n" } if { [::rivet::var exists xst] } { puts "\[::rivet::var exists xst\]\[::rivet::var exists noxst\] = [::rivet::var exists xst] [::rivet::var exists noxst]\n" puts "\[::rivet::var_qs exists xst\]\[::rivet::var_qs exists noxst\] = [::rivet::var_qs exists xst] [::rivet::var_qs exists noxst]\n" } if { [::rivet::var exists Ms] } { puts "\[::rivet::var get Ms\] = [::rivet::var get Ms]\n" } if { [::rivet::var exists lstvar1] } { puts "\[::rivet::var get lstvar1\] = [::rivet::var get lstvar1]\n" } if { [::rivet::var exists lstvar2] } { puts "\[::rivet::var list lstvar2\] = [::rivet::var list lstvar2]\n" } puts "\[::rivet::var get xst foo\] = [::rivet::var get xst foo]" } else { puts "\[::rivet::var get xst\] = [::rivet::var get xst]" } ?> rivet-2.3.5/tests/channel.tcl000644 001750 001750 00000000061 12455060164 015574 0ustar00mxmmxm000000 000000 puts -nonewline [fconfigure stdout -buffersize] rivet-2.3.5/src/apache-2/mod_rivet.h000644 001750 001750 00000013536 12630671503 016641 0ustar00mxmmxm000000 000000 /* mod_rivet.h -- The apache module itself, for Apache 2.x. */ /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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. */ /* $Id: mod_rivet.h 1718136 2015-12-05 23:29:07Z mxmanghi $ */ #ifndef MOD_RIVET_H #define MOD_RIVET_H 1 #include #include "apache_request.h" #include "TclWeb.h" /* init.tcl file relative to the server root directory */ #define RIVET_DIR RIVET_RIVETLIB_DESTDIR #define RIVET_INIT RIVET_RIVETLIB_DESTDIR"/init.tcl" #if 0 #define FILEDEBUGINFO fprintf(stderr, "Function " __FUNCTION__ "\n") #else #define FILEDEBUGINFO #endif /* Configuration options */ /* If you do not have a threaded Tcl, you can define this to 0. This has the effect of running Tcl Init code in the main parent init handler, instead of in child init handlers. */ #ifdef __MINGW32__ #define THREADED_TCL 1 #else #define THREADED_TCL 0 /* Unless you have MINGW32, modify this one! */ #endif /* End Configuration options */ /* For Tcl 8.3/8.4 compatibility - see http://wiki.tcl.tk/3669 */ #ifndef CONST84 # define CONST84 #endif #define VAR_SRC_QUERYSTRING 1 #define VAR_SRC_POST 2 #define VAR_SRC_ALL 3 #define DEFAULT_ERROR_MSG "[an error occurred while processing this directive]" #define DEFAULT_TIME_FORMAT "%A, %d-%b-%Y %H:%M:%S %Z" #define MULTIPART_FORM_DATA 1 /* #define RIVET_VERSION "X.X.X" */ /* IMPORTANT: If you make any changes to the rivet_server_conf struct, * you need to make the appropriate modifications to Rivet_CopyConfig, * Rivet_CreateConfig, Rivet_MergeConfig and so on. */ module AP_MODULE_DECLARE_DATA rivet_module; typedef struct _rivet_server_conf { Tcl_Interp *server_interp; /* per server Tcl interpreter */ Tcl_Obj *rivet_server_init_script; /* run before children are forked */ Tcl_Obj *rivet_global_init_script; /* run once when apache is started */ Tcl_Obj *rivet_child_init_script; Tcl_Obj *rivet_child_exit_script; Tcl_Obj *rivet_before_script; /* script run before each page */ Tcl_Obj *rivet_after_script; /* after */ Tcl_Obj *rivet_error_script; /* for errors */ Tcl_Obj *rivet_abort_script; /* script run upon abort_page call */ Tcl_Obj *after_every_script; /* script to be run always */ /* This flag is used with the above directives. If any of them have changed, it gets set. */ int user_scripts_updated; Tcl_Obj *rivet_default_error_script; /* for errors */ int *cache_size; int *cache_free; int upload_max; int upload_files_to_var; int separate_virtual_interps; int honor_header_only_reqs; int separate_channels; char *server_name; const char *upload_dir; apr_table_t *rivet_server_vars; apr_table_t *rivet_dir_vars; apr_table_t *rivet_user_vars; char **objCacheList; /* Array of cached objects (for priority handling) */ Tcl_HashTable *objCache; /* Objects cache - the key is the script name */ Tcl_Channel *outchannel; /* stuff for buffering output */ } rivet_server_conf; /* eventually we will transfer 'global' variables in here and 'de-globalize' them */ typedef struct _rivet_interp_globals { request_rec* r; /* request rec */ TclWebRequest* req; /* TclWeb API request */ Tcl_Namespace* rivet_ns; /* Rivet commands namespace */ int page_aborting; /* set by abort_page. */ Tcl_Obj* abort_code; /* To be reset by Rivet_SendContent */ int exit_process; /* signals a ::rivet::exit command was called */ int exit_status; /* ::rivet::exit status code */ server_rec* srec; /* pointer to the current server rec obj */ } rivet_interp_globals; /* * we need also a place where to store module wide globals */ typedef struct _mod_rivet_globals { rivet_server_conf* rsc_p; } mod_rivet_globals; int Rivet_ParseExecFile (TclWebRequest *req, char *filename, int toplevel); int Rivet_ParseExecString (TclWebRequest* req, Tcl_Obj* inbuf); rivet_server_conf *Rivet_GetConf(request_rec *r); #ifdef ap_get_module_config #undef ap_get_module_config #endif #ifdef ap_set_module_config #undef ap_set_module_config #endif #define RIVET_SERVER_CONF(module) (rivet_server_conf *)ap_get_module_config(module, &rivet_module) #define RIVET_NEW_CONF(p) (rivet_server_conf *)apr_pcalloc(p, sizeof(rivet_server_conf)) Tcl_Obj* Rivet_BuildConfDictionary ( Tcl_Interp* interp, rivet_server_conf* rivet_conf); Tcl_Obj* Rivet_ReadConfParameter ( Tcl_Interp* interp, rivet_server_conf* rivet_conf, Tcl_Obj* par_name); Tcl_Obj* Rivet_CurrentConfDict ( Tcl_Interp* interp, rivet_server_conf* rivet_conf); Tcl_Obj* Rivet_CurrentServerRec ( Tcl_Interp* interp, server_rec* s ); /* error code set by command 'abort_page' */ #define ABORTPAGE_CODE "ABORTPAGE" #define EXITPAGE_CODE "EXITPAGE" #endif /* MOD_RIVET_H */ rivet-2.3.5/src/parser/Makefile.in000644 001750 001750 00000064572 13200160275 016460 0ustar00mxmmxm000000 000000 # Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ # Makefile for Rivet # Copyright 2004-2005 The Apache Software Foundation # 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. # ... and these two. We want to put the libs in the package path, # rather than the standard library location for the system. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c 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 = src/parser ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/ax_split_version.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/tclconfig/tcl.m4 \ $(top_srcdir)/tclconfig/libtool.m4 \ $(top_srcdir)/m4/ax_prefix_config_h.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(lib_libexecdir)" LTLIBRARIES = $(lib_libexec_LTLIBRARIES) librivetparser_la_DEPENDENCIES = am_librivetparser_la_OBJECTS = librivetparser_la-rivetParser.lo \ librivetparser_la-parserPkgInit.lo librivetparser_la_OBJECTS = $(am_librivetparser_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = librivetparser_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(librivetparser_la_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/tclconfig/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(librivetparser_la_SOURCES) DIST_SOURCES = $(librivetparser_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/tclconfig/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APR_CPPFLAGS = @APR_CPPFLAGS@ APR_INCLUDES = @APR_INCLUDES@ APR_LDFLAGS = @APR_LDFLAGS@ APU_INCLUDES = @APU_INCLUDES@ APU_LDFLAGS = @APU_LDFLAGS@ APXS_CPPFLAGS = @APXS_CPPFLAGS@ APXS_CPPFLAGS_SHLIB = @APXS_CPPFLAGS_SHLIB@ APXS_INCLUDES = @APXS_INCLUDES@ APXS_LDFLAGS = @APXS_LDFLAGS@ APXS_LD_SHLIB = @APXS_LD_SHLIB@ APXS_LIBEXECDIR = @APXS_LIBEXECDIR@ APXS_LIBS = @APXS_LIBS@ APXS_PREFIX = @APXS_PREFIX@ APXS_SYSCONFDIR = @APXS_SYSCONFDIR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CELIB_DIR = @CELIB_DIR@ CFLAGS = @CFLAGS@ CFLAGS_DEBUG = @CFLAGS_DEBUG@ CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ CFLAGS_WARNING = @CFLAGS_WARNING@ CLEANFILES = @CLEANFILES@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH = @CYGPATH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INIT_VERSION = @INIT_VERSION@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ LD_LIBRARY_PATH_VAR = @LD_LIBRARY_PATH_VAR@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_LIB = @MAKE_LIB@ MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ MAKE_STATIC_LIB = @MAKE_STATIC_LIB@ MAKE_STUB_LIB = @MAKE_STUB_LIB@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATH_LIBS = @MATH_LIBS@ MAX_POST = @MAX_POST@ MKDIR_P = @MKDIR_P@ MOD_RIVET_INCLUDES = @MOD_RIVET_INCLUDES@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CFLAGS = @PKG_CFLAGS@ PKG_HEADERS = @PKG_HEADERS@ PKG_INCLUDES = @PKG_INCLUDES@ PKG_LIBS = @PKG_LIBS@ PKG_LIB_FILE = @PKG_LIB_FILE@ PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@ PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@ PKG_STUB_SOURCES = @PKG_STUB_SOURCES@ PKG_TCL_SOURCES = @PKG_TCL_SOURCES@ RANLIB = @RANLIB@ RANLIB_STUB = @RANLIB_STUB@ RIVET_BASE_INCLUDE = @RIVET_BASE_INCLUDE@ RIVET_TCL_TARGET = @RIVET_TCL_TARGET@ RIVET_UPLOAD_DIR = @RIVET_UPLOAD_DIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_BUILD = @SHARED_BUILD@ SHELL = @SHELL@ SHLIB_CFLAGS = @SHLIB_CFLAGS@ SHLIB_LD = @SHLIB_LD@ SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ STLIB_LD = @STLIB_LD@ STRIP = @STRIP@ TCLSH_PROG = @TCLSH_PROG@ TCL_BIN_DIR = @TCL_BIN_DIR@ TCL_DBGX = @TCL_DBGX@ TCL_DEFS = @TCL_DEFS@ TCL_EXTRA_CFLAGS = @TCL_EXTRA_CFLAGS@ TCL_INCLUDES = @TCL_INCLUDES@ TCL_LD_FLAGS = @TCL_LD_FLAGS@ TCL_LIBS = @TCL_LIBS@ TCL_LIB_FILE = @TCL_LIB_FILE@ TCL_LIB_FLAG = @TCL_LIB_FLAG@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ TCL_PATCH_LEVEL = @TCL_PATCH_LEVEL@ TCL_SHLIB_LD_LIBS = @TCL_SHLIB_LD_LIBS@ TCL_SRC_DIR = @TCL_SRC_DIR@ TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@ TCL_STUB_LIB_FLAG = @TCL_STUB_LIB_FLAG@ TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@ TCL_THREADS = @TCL_THREADS@ TCL_VERSION = @TCL_VERSION@ VC_MANIFEST_EMBED_DLL = @VC_MANIFEST_EMBED_DLL@ VC_MANIFEST_EMBED_EXE = @VC_MANIFEST_EMBED_EXE@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ apache_include = @apache_include@ apache_request = @apache_request@ apache_version_dir = @apache_version_dir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rivet_channel = @rivet_channel@ rivet_core = @rivet_core@ rivet_core_cmds = @rivet_core_cmds@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ with_apr_config = @with_apr_config@ with_apu_config = @with_apu_config@ with_apxs = @with_apxs@ lib_libexecdir = @RIVET_TCL_TARGET@ lib_libexec_LTLIBRARIES = librivetparser.la # # Rivet Parser Library # librivetparser_la_SOURCES = rivetParser.c parserPkgInit.c librivetparser_la_LDFLAGS = @TCL_STUB_LIB_SPEC@ @APXS_LDFLAGS@ -module -avoid-version librivetparser_la_LIBADD = @APXS_LIBS@ librivetparser_la_CPPFLAGS = @apache_include@ -I@RIVET_BASE_INCLUDE@/@apache_version_dir@ -I@RIVET_BASE_INCLUDE@ -I../@apache_version_dir@ -I.. @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ -DSTART_TAG='""' -DUSE_TCL_STUBS 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 src/parser/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/parser/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-lib_libexecLTLIBRARIES: $(lib_libexec_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_libexec_LTLIBRARIES)'; test -n "$(lib_libexecdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(lib_libexecdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(lib_libexecdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(lib_libexecdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(lib_libexecdir)"; \ } uninstall-lib_libexecLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_libexec_LTLIBRARIES)'; test -n "$(lib_libexecdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(lib_libexecdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(lib_libexecdir)/$$f"; \ done clean-lib_libexecLTLIBRARIES: -test -z "$(lib_libexec_LTLIBRARIES)" || rm -f $(lib_libexec_LTLIBRARIES) @list='$(lib_libexec_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } librivetparser.la: $(librivetparser_la_OBJECTS) $(librivetparser_la_DEPENDENCIES) $(EXTRA_librivetparser_la_DEPENDENCIES) $(AM_V_CCLD)$(librivetparser_la_LINK) -rpath $(lib_libexecdir) $(librivetparser_la_OBJECTS) $(librivetparser_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librivetparser_la-parserPkgInit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librivetparser_la-rivetParser.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< librivetparser_la-rivetParser.lo: rivetParser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librivetparser_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librivetparser_la-rivetParser.lo -MD -MP -MF $(DEPDIR)/librivetparser_la-rivetParser.Tpo -c -o librivetparser_la-rivetParser.lo `test -f 'rivetParser.c' || echo '$(srcdir)/'`rivetParser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librivetparser_la-rivetParser.Tpo $(DEPDIR)/librivetparser_la-rivetParser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rivetParser.c' object='librivetparser_la-rivetParser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librivetparser_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librivetparser_la-rivetParser.lo `test -f 'rivetParser.c' || echo '$(srcdir)/'`rivetParser.c librivetparser_la-parserPkgInit.lo: parserPkgInit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librivetparser_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librivetparser_la-parserPkgInit.lo -MD -MP -MF $(DEPDIR)/librivetparser_la-parserPkgInit.Tpo -c -o librivetparser_la-parserPkgInit.lo `test -f 'parserPkgInit.c' || echo '$(srcdir)/'`parserPkgInit.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librivetparser_la-parserPkgInit.Tpo $(DEPDIR)/librivetparser_la-parserPkgInit.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parserPkgInit.c' object='librivetparser_la-parserPkgInit.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librivetparser_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librivetparser_la-parserPkgInit.lo `test -f 'parserPkgInit.c' || echo '$(srcdir)/'`parserPkgInit.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 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 $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(lib_libexecdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -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-lib_libexecLTLIBRARIES 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-lib_libexecLTLIBRARIES 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-lib_libexecLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-lib_libexecLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-lib_libexecLTLIBRARIES 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 tags-am uninstall uninstall-am \ uninstall-lib_libexecLTLIBRARIES .PRECIOUS: Makefile # 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: rivet-2.3.5/doc/html/lassign_array.html000644 001750 001750 00000007312 13200160527 017552 0ustar00mxmmxm000000 000000 lassign_array

    Name

    lassign_array — Assign a list of values to array variables

    Synopsis

    ::rivet::lassign_array ?value_list? ?array_name? ?array_variables?

    Description

    lassign_array is an utility command inspired by the same Tclx command and with a close resemblance with Tcl's lassign for assigning list elements to variables. lassign_array first argument is a list of values to be assigned to an array that must be given as second argument. The remaining arguments are the array's variable names which will store as values the elements of the list. Variables names don't matching values in the list are given an empty string. Unassigned list elements are returned as a list.

    ::rivet::lassign_array {1 2 3 4} assigned_array a b c d
    parray assigned_array
    assigned_array
    assigned_array(a) = 1
    assigned_array(b) = 2
    assigned_array(c) = 3
    assigned_array(d) = 4
    
    set rem [::rivet::lassign_array {1 2 3 4 5 6 7} assigned_array a b c d]
    puts $rem
    5 6 7
    rivet-2.3.5/src/000755 001750 001750 00000000000 13200160275 013101 5ustar00mxmmxm000000 000000 rivet-2.3.5/doc/html/escape_string.html000644 001750 001750 00000005333 13200160527 017543 0ustar00mxmmxm000000 000000 escape_string

    Name

    escape_string — convert a string into escaped characters.

    Synopsis

    ::rivet::escape_string ?string?

    Description

    Scans through each character in the specified string looking for special characters, escaping them as needed, mapping special characters to a quoted hexadecimal equivalent, returning the result.

    This is useful for quoting strings that are going to be part of a URL.

    rivet-2.3.5/src/apache-2/mod_rivet.c000644 001750 001750 00000150412 13142322032 016614 0ustar00mxmmxm000000 000000 /* mod_rivet.c -- The apache module itself, for Apache 2.x. */ /* Copyright 2000-2005 The Apache Software Foundation 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. */ /* $Id: mod_rivet.c 1804403 2017-08-08 11:44:26Z mxmanghi $ */ /* Rivet config */ #ifdef HAVE_CONFIG_H #include #endif #include #include /* as long as we need to emulate ap_chdir_file we need to include unistd.h */ #include #include /* Apache includes */ #include #include #include #include #include #include #include #include #include #include #include #include #include /* Tcl includes */ #include /* There is code ifdef'ed out below which uses internal * declerations. */ /* #include */ /* Rivet Includes */ #include "mod_rivet.h" #include "rivet.h" #include "rivetParser.h" #include "rivetChannel.h" #include "apache_config.h" #define MODNAME "mod_rivet" //module AP_MODULE_DECLARE_DATA rivet_module; /* This is used *only* in the PanicProc. Otherwise, don't touch it! */ static request_rec *rivet_panic_request_rec = NULL; static apr_pool_t *rivet_panic_pool = NULL; static server_rec *rivet_panic_server_rec = NULL; /* Need some arbitrary non-NULL pointer which can't also be a request_rec */ #define NESTED_INCLUDE_MAGIC (&rivet_module) #define DEBUG(s) fprintf(stderr, s), fflush(stderr) /* rivet or tcl file */ #define CTYPE_NOT_HANDLED 0 #define RIVET_TEMPLATE 1 #define RIVET_TCLFILE 2 /* rivet return codes */ #define RIVET_OK 0 #define RIVET_ERROR 1 TCL_DECLARE_MUTEX(sendMutex); #define RIVET_TEMPLATE_CTYPE "application/x-httpd-rivet" #define RIVET_TCLFILE_CTYPE "application/x-rivet-tcl" /* * for some reason the max buffer size definition is not exported by Tcl * we steal and reproduce it here prepending the name with TCL */ #define TCL_MAX_CHANNEL_BUFFER_SIZE (1024*1024) static Tcl_Interp* Rivet_CreateTclInterp (server_rec* s); static void Rivet_CreateCache (server_rec *s, apr_pool_t *p); static apr_status_t Rivet_ChildExit(void *data); mod_rivet_globals* rivet_module_globals = NULL; /* -- Rivet_PrintErrorMessage * * Utility function to print the error message stored in errorInfo * with a custom header. This procedure is called to print standard * errors when one of Tcl scripts fails * * Arguments: * * - Tcl_Interp* interp: the Tcl interpreter that was running the script * (and therefore the built-in variable errorInfo * keeps the message) * - const char* error: Custom error header */ static void Rivet_PrintErrorMessage (Tcl_Interp* interp,const char* error_header) { Tcl_Obj* errormsg = Tcl_NewObj(); Tcl_IncrRefCount(errormsg); Tcl_AppendStringsToObj(errormsg,"puts \"",error_header,"
    \"\n",NULL); Tcl_AppendStringsToObj(errormsg,"puts \"
    $errorInfo
    \"\n",NULL); Tcl_EvalObjEx(interp,errormsg,0); Tcl_DecrRefCount(errormsg); } /* * -- Rivet_chdir_file (const char* filename) * * Determines the directory name from the filename argument * and sets it as current working directory * * Argument: * * const char* filename: file name to be used for determining * the current directory (URI style path) * the directory name is everything comes * before the last '/' (slash) character * * This snippet of code came from the mod_ruby project, which is under a BSD license. */ static int Rivet_chdir_file (const char *file) { const char *x; int chdir_retval = 0; char chdir_buf[HUGE_STRING_LEN]; x = strrchr(file, '/'); if (x == NULL) { chdir_retval = chdir(file); } else if (x - file < sizeof(chdir_buf) - 1) { memcpy(chdir_buf, file, x - file); chdir_buf[x - file] = '\0'; chdir_retval = chdir(chdir_buf); } return chdir_retval; } /* * -- Rivet_CheckType (request_rec *r) * * Utility function internally used to determine which type * of file (whether rvt template or plain Tcl script) we are * dealing with. In order to speed up multiple tests the * the test returns an integer (RIVET_TEMPLATE) for rvt templates * or RIVET_TCLFILE for Tcl scripts * * Argument: * * request_rec*: pointer to the current request record * * Returns: * * integer number meaning the type of file we are dealing with * * Side effects: * * none. * */ static int Rivet_CheckType (request_rec *req) { int ctype = CTYPE_NOT_HANDLED; if ( req->handler != NULL ) { if( STRNEQU( req->handler, RIVET_TEMPLATE_CTYPE) ) { ctype = RIVET_TEMPLATE; } else if( STRNEQU( req->handler, RIVET_TCLFILE_CTYPE) ) { ctype = RIVET_TCLFILE; } } return ctype; } /* * -- Rivet_InitServerVariables * * Setup an array in each interpreter to tell us things about Apache. * This saves us from having to do any real call to load an entire * environment. This routine only gets called once, when the child process * is created. * * Arguments: * * Tcl_Interp* interp: pointer to the Tcl interpreter * apr_pool_t* pool: pool used for calling Apache framework functions * * Returned value: * none * * Side effects: * * within the global scope of the interpreter passed as first * argument a 'server' array is created and the variable associated * to the following keys are defined * * SERVER_ROOT - Apache's root location * SERVER_CONF - Apache's configuration file * RIVET_DIR - Rivet's Tcl source directory * RIVET_INIT - Rivet's init.tcl file * RIVET_VERSION - Rivet version (only when RIVET_DISPLAY_VERSION is 1) * MPM_THREADED - It should contain the string 'unsupported' for a prefork MPM * MPM_FORKED - String describing the forking model of the MPM * */ static void Rivet_InitServerVariables( Tcl_Interp *interp, apr_pool_t *pool ) { int ap_mpm_result; Tcl_Obj *obj; obj = Tcl_NewStringObj(ap_server_root, -1); Tcl_IncrRefCount(obj); Tcl_SetVar2Ex(interp, "server", "SERVER_ROOT", obj, TCL_GLOBAL_ONLY); Tcl_DecrRefCount(obj); obj = Tcl_NewStringObj(ap_server_root_relative(pool,SERVER_CONFIG_FILE), -1); Tcl_IncrRefCount(obj); Tcl_SetVar2Ex(interp, "server", "SERVER_CONF", obj, TCL_GLOBAL_ONLY); Tcl_DecrRefCount(obj); obj = Tcl_NewStringObj(ap_server_root_relative(pool, RIVET_DIR), -1); Tcl_IncrRefCount(obj); Tcl_SetVar2Ex(interp, "server", "RIVET_DIR", obj, TCL_GLOBAL_ONLY); Tcl_DecrRefCount(obj); obj = Tcl_NewStringObj(ap_server_root_relative(pool, RIVET_INIT), -1); Tcl_IncrRefCount(obj); Tcl_SetVar2Ex(interp, "server", "RIVET_INIT", obj, TCL_GLOBAL_ONLY); Tcl_DecrRefCount(obj); obj = Tcl_NewStringObj(RIVET_CONFIGURE_CMD,-1); Tcl_IncrRefCount(obj); Tcl_SetVar2Ex(interp, "server", "RIVET_CONFIGURE_CMD", obj, TCL_GLOBAL_ONLY); Tcl_DecrRefCount(obj); #if RIVET_DISPLAY_VERSION obj = Tcl_NewStringObj(RIVET_VERSION, -1); Tcl_IncrRefCount(obj); Tcl_SetVar2Ex(interp, "server", "RIVET_VERSION", obj, TCL_GLOBAL_ONLY); Tcl_DecrRefCount(obj); #endif if (ap_mpm_query(AP_MPMQ_IS_THREADED,&ap_mpm_result) == APR_SUCCESS) { switch (ap_mpm_result) { case AP_MPMQ_STATIC: obj = Tcl_NewStringObj("static", -1); break; case AP_MPMQ_NOT_SUPPORTED: obj = Tcl_NewStringObj("unsupported", -1); break; default: obj = Tcl_NewStringObj("undefined", -1); break; } Tcl_IncrRefCount(obj); Tcl_SetVar2Ex(interp,"server","MPM_THREADED",obj,TCL_GLOBAL_ONLY); Tcl_DecrRefCount(obj); } if (ap_mpm_query(AP_MPMQ_IS_FORKED,&ap_mpm_result) == APR_SUCCESS) { switch (ap_mpm_result) { case AP_MPMQ_STATIC: obj = Tcl_NewStringObj("static", -1); break; case AP_MPMQ_DYNAMIC: obj = Tcl_NewStringObj("dynamic", -1); break; default: obj = Tcl_NewStringObj("undefined", -1); break; } Tcl_IncrRefCount(obj); Tcl_SetVar2Ex(interp,"server","MPM_FORKED",obj,TCL_GLOBAL_ONLY); Tcl_DecrRefCount(obj); } } /* -- Rivet_ExecuteErrorHandler * * Invoking either the default error handler or the ErrorScript. * In case the error handler fails a standard error message is printed * (you're better off if you make your error handlers fail save) * * Arguments: * * - Tcl_Interp* interp: the Tcl interpreter * - Tcl_Obj* tcl_script_obj: the script that failed (to retrieve error * info from it * - request_rec* req: current request obj pointer * * Returned value: * * - A Tcl status */ static int Rivet_ExecuteErrorHandler (Tcl_Interp* interp,Tcl_Obj* tcl_script_obj, rivet_interp_globals* globals) { int result; rivet_server_conf* conf = Rivet_GetConf(globals->r); Tcl_Obj* errscript; /* We extract information from the errorOutbuf variable. Notice that tcl_script_obj * can either be the request processing script or conf->rivet_abort_script */ Tcl_SetVar(interp, "errorOutbuf",Tcl_GetStringFromObj( tcl_script_obj, NULL ),TCL_GLOBAL_ONLY ); /* If we don't have an error script, use the default error handler. */ if (conf->rivet_error_script) { errscript = conf->rivet_error_script; } else { errscript = conf->rivet_default_error_script; } Tcl_IncrRefCount(errscript); result = Tcl_EvalObjEx(interp, errscript, 0); if (result == TCL_ERROR) { Rivet_PrintErrorMessage(interp,"Rivet ErrorScript failed"); } /* This shouldn't make the default_error_script go away, * because it gets a Tcl_IncrRefCount when it is created. */ Tcl_DecrRefCount(errscript); /* In case we are handling an error occurring after an abort_page call (for * example because the AbortScript or AfterEveryScript themselves failed) we must * reset this flag or the logging will be inihibited */ globals->page_aborting = 0; return result; } /* * -- Rivet_RunAbortScript * * */ static int Rivet_RunAbortScript (Tcl_Interp* interp,rivet_server_conf* conf,rivet_interp_globals* globals) { int retcode = TCL_OK; if (conf->rivet_abort_script) { /* Ideally an AbortScript should be fail safe, but in case * it fails we give a chance to the subsequent ErrorScript * to catch this error. */ retcode = Tcl_EvalObjEx(interp,conf->rivet_abort_script,0); if (retcode == TCL_ERROR) { /* This is not elegant, but we want to avoid to print * this error message if an ErrorScript will handle this error. * Thus we print the usual error message only if we are running the * default error handler */ if (conf->rivet_error_script == NULL) { Rivet_PrintErrorMessage(interp,"Rivet AbortScript failed"); } Rivet_ExecuteErrorHandler(interp,conf->rivet_abort_script,globals); } } return retcode; } /* -- Rivet_ExecuteAndCheck * * Tcl script execution central procedure. The script stored in * outbuf is evaluated and in case of errors an error handler is * executed. In case the error code is "RIVET" then the error was * caused by the invocation of ::rivet::abort_page and the script * stored in conf->abort_script is run istead. * The default error handler prints the error buffer * * Arguments: * * - Tcl_Interp* interp: the Tcl interpreter * - Tcl_Obj* tcl_script_obj: a pointer to the Tcl_Obj holding the script * - request_rec* req: the current request_rec object pointer * * Returned value: * * - One of the Tcl defined returned value of Tcl_EvelObjExe (TCL_OK, * TCL_ERROR, TCL_BREAK etc.) * * Side effects: * * The Tcl interpreter internal status is changed by the execution * of the script * */ static int Rivet_ExecuteAndCheck(Tcl_Interp *interp, Tcl_Obj *tcl_script_obj, request_rec *req) { int result; rivet_server_conf* conf = Rivet_GetConf(req); rivet_interp_globals* globals = Tcl_GetAssocData( conf->server_interp, "rivet", NULL ); Tcl_Preserve (interp); result = Tcl_EvalObjEx(interp, tcl_script_obj, 0); if (result == TCL_ERROR) { Tcl_Obj* errorCodeListObj; Tcl_Obj* errorCodeElementObj; /* There was an error, see if it's from Rivet and it was caused * by abort_page. */ errorCodeListObj = Tcl_GetVar2Ex (interp, "errorCode", (char *)NULL, TCL_GLOBAL_ONLY); /* errorCode is guaranteed to be set to NONE, but let's make sure * anyway rather than causing a SIGSEGV */ ap_assert (errorCodeListObj != (Tcl_Obj *)NULL); /* dig the first element out of the errorCode list and see if it * says Rivet -- this shouldn't fail either, but let's assert * success so we don't get a SIGSEGV afterwards */ ap_assert (Tcl_ListObjIndex (interp, errorCodeListObj, 0, &errorCodeElementObj) == TCL_OK); /* if the error was thrown by Rivet, see if it's abort_page and, * if so, don't treat it as an error, i.e. don't execute the * installed error handler or the default one, just check if * a rivet_abort_script is defined, otherwise the page emits * as normal */ if (globals->page_aborting) { Rivet_RunAbortScript(interp,conf,globals); } else { /* Invoke Rivet error handler */ Rivet_ExecuteErrorHandler(interp,tcl_script_obj,globals); } } /* Tcl_Flush moved to the end of Rivet_SendContent */ Tcl_Release(interp); return result; } /* * -- Rivet_ParseExecFile * * Given a filename the corresponding file is checked to exist. * If the file is a Rivet template its content gets parsed and then executed. * This is a separate function so that it may be called from command 'parse' * * Returned value: * * - One of the Tcl defined values returned by Rivet_ExecuteAndCheck (TCL_OK, * TCL_ERROR, TCL_BREAK etc.) * * Arguments: * * - TclWebRequest: pointer to the structure collecting Tcl and Apache data * - filename: pointer to a string storing the path to the template or * Tcl script * - toplevel: integer to be interpreted as a boolean meaning the * file is pointed by the request. When 0 that's a subtemplate * to be parsed and executed from another template * */ int Rivet_ParseExecFile(TclWebRequest *req, char *filename, int toplevel) { char *hashKey = NULL; int isNew = 0; int result = 0; Tcl_Obj *outbuf = NULL; Tcl_HashEntry *entry = NULL; time_t ctime; time_t mtime; rivet_server_conf *rsc; Tcl_Interp *interp = req->interp; rsc = Rivet_GetConf( req->req ); /* If the user configuration has indeed been updated, I guess that pretty much invalidates anything that might have been cached. */ /* This is all horrendously slow, and means we should *also* be doing caching on the modification time of the .htaccess files that concern us. FIXME */ if (rsc->user_scripts_updated && *(rsc->cache_size) != 0) { int ct; Tcl_HashEntry *delEntry; /* Clean out the list. */ ct = *(rsc->cache_free); while (ct < *(rsc->cache_size)) { /* Free the corresponding hash entry. */ delEntry = Tcl_FindHashEntry( rsc->objCache, rsc->objCacheList[ct]); if (delEntry != NULL) { Tcl_DecrRefCount((Tcl_Obj *)Tcl_GetHashValue(delEntry)); } Tcl_DeleteHashEntry(delEntry); free(rsc->objCacheList[ct]); rsc->objCacheList[ct] = NULL; ct ++; } *(rsc->cache_free) = *(rsc->cache_size); } /* If toplevel is 0, we are being called from Parse, which means we need to get the information about the file ourselves. */ if (toplevel == 0) { Tcl_Obj *fnobj; Tcl_StatBuf buf; fnobj = Tcl_NewStringObj(filename, -1); Tcl_IncrRefCount(fnobj); if( Tcl_FSStat(fnobj, &buf) < 0 ) return TCL_ERROR; Tcl_DecrRefCount(fnobj); ctime = buf.st_ctime; mtime = buf.st_mtime; } else { ctime = req->req->finfo.ctime; mtime = req->req->finfo.mtime; } /* Look for the script's compiled version. If it's not found, * create it. */ if (*(rsc->cache_size)) { hashKey = (char*) apr_psprintf(req->req->pool, "%s%lx%lx%d", filename, mtime, ctime, toplevel); entry = Tcl_CreateHashEntry(rsc->objCache, hashKey, &isNew); } /* We don't have a compiled version. Let's create one. */ if (isNew || *(rsc->cache_size) == 0) { outbuf = Tcl_NewObj(); Tcl_IncrRefCount(outbuf); if (toplevel) { if (rsc->rivet_before_script) { Tcl_AppendObjToObj(outbuf,rsc->rivet_before_script); } } /* * We check whether we are dealing with a pure Tcl script or a Rivet template. * Actually this check is done only if we are processing a toplevel file, every nested * file (files included through the 'parse' command) is treated as a template. */ if (!toplevel || (Rivet_CheckType(req->req) == RIVET_TEMPLATE)) { /* toplevel == 0 means we are being called from the parse * command, which only works on Rivet .rvt files. */ result = Rivet_GetRivetFile(filename, toplevel, outbuf, interp); } else { /* It's a plain Tcl file */ result = Rivet_GetTclFile(filename, outbuf, interp); } if (result != TCL_OK) { Tcl_DecrRefCount(outbuf); return result; } if (toplevel && rsc->rivet_after_script) { Tcl_AppendObjToObj(outbuf,rsc->rivet_after_script); } if (*(rsc->cache_size)) { /* We need to incr the reference count of outbuf because we want * it to outlive this function. This allows it to stay alive * as long as it's in the object cache. */ Tcl_IncrRefCount( outbuf ); Tcl_SetHashValue(entry, (ClientData)outbuf); } if (*(rsc->cache_free)) { //hkCopy = (char*) malloc ((strlen(hashKey)+1) * sizeof(char)); //strcpy(rsc->objCacheList[-- *(rsc->cache_free)], hashKey); rsc->objCacheList[--*(rsc->cache_free)] = (char*) malloc ((strlen(hashKey)+1) * sizeof(char)); strcpy(rsc->objCacheList[*(rsc->cache_free)], hashKey); //rsc->objCacheList[-- *(rsc->cache_free) ] = strdup(hashKey); } else if (*(rsc->cache_size)) { /* If it's zero, we just skip this. */ Tcl_HashEntry *delEntry; delEntry = Tcl_FindHashEntry( rsc->objCache, rsc->objCacheList[*(rsc->cache_size) - 1]); Tcl_DecrRefCount((Tcl_Obj *)Tcl_GetHashValue(delEntry)); Tcl_DeleteHashEntry(delEntry); free(rsc->objCacheList[*(rsc->cache_size) - 1]); memmove((rsc->objCacheList) + 1, rsc->objCacheList, sizeof(char *) * (*(rsc->cache_size) - 1)); //hkCopy = (char*) malloc ((strlen(hashKey)+1) * sizeof(char)); //strcpy (rsc->objCacheList[0], hashKey); rsc->objCacheList[0] = (char*) malloc ((strlen(hashKey)+1) * sizeof(char)); strcpy (rsc->objCacheList[0], hashKey); //rsc->objCacheList[0] = (char*) strdup(hashKey); } } else { /* We found a compiled version of this page. */ outbuf = (Tcl_Obj *)Tcl_GetHashValue(entry); Tcl_IncrRefCount(outbuf); } rsc->user_scripts_updated = 0; result = Rivet_ExecuteAndCheck(interp, outbuf, req->req); if (result == TCL_ERROR) { rivet_interp_globals* globals = Tcl_GetAssocData( rsc->server_interp, "rivet", NULL ); /* If this is a toplevel script */ if (toplevel && globals->page_aborting) { result = TCL_OK; } } Tcl_DecrRefCount(outbuf); return result; } /* * -- Rivet_ParseExecString * * This function accepts a Tcl_Obj carrying a string to be interpreted as * a Rivet template. This function is the core for the form * '::rivet::parsestr -string $tclscript' * * Arguments: * * - TclWebRequest* req: pointer to the structure collecting Tcl and * Apache data * - Tcl_Obj* inbuf: Tcl object storing the template to be parsed. */ int Rivet_ParseExecString (TclWebRequest* req, Tcl_Obj* inbuf) { int result; Tcl_Obj* outbuf = Tcl_NewObj(); Tcl_Interp *interp = req->interp; Tcl_IncrRefCount(outbuf); Tcl_AppendToObj(outbuf, "puts -nonewline \"", -1); /* If we are not inside a section, add the closing ". */ if (Rivet_Parser(outbuf, inbuf) == 0) { Tcl_AppendToObj(outbuf, "\"\n", 2); } Tcl_AppendToObj(outbuf, "\n", -1); result = Rivet_ExecuteAndCheck(interp, outbuf, req->req); Tcl_DecrRefCount(outbuf); return result; } static void Rivet_CleanupRequest( request_rec *r ) { #if 0 apr_table_t *t; apr_array_header_t *arr; apr_table_entry_t *elts; int i, nelts; Tcl_Obj *arrayName; Tcl_Interp *interp; rivet_server_conf *rsc = RIVET_SERVER_CONF( r->per_dir_config ); t = rsc->rivet_user_vars; arr = (apr_array_header_t*) apr_table_elts( t ); elts = (apr_table_entry_t *) arr->elts; nelts = arr->nelts; arrayName = Tcl_NewStringObj( "RivetUserConf", -1 ); interp = rsc->server_interp; for( i = 0; i < nelts; ++i ) { Tcl_UnsetVar2(interp, "RivetUserConf", elts[i].key, TCL_GLOBAL_ONLY); } Tcl_DecrRefCount(arrayName); rivet_server_conf *rdc = RIVET_SERVER_CONF( r->per_dir_config ); if( rdc->rivet_before_script ) { Tcl_DecrRefCount( rdc->rivet_before_script ); } if( rdc->rivet_after_script ) { Tcl_DecrRefCount( rdc->rivet_after_script ); } if( rdc->rivet_error_script ) { Tcl_DecrRefCount( rdc->rivet_error_script ); } #endif } /* *----------------------------------------------------------------------------- * * -- Rivet_CreateRivetChannel * * Creates a channel and registers with to the interpreter * * Arguments: * * - Tcl_Interp* interp: a Tcl interpreter object pointer * - rivet_server_conf* rsc: the rivet_server_conf data structure * - apr_pool_t* pPool: a pointer to an APR memory pool * * Returned value: * * none * * Side Effects: * * a Tcl channel is created allocating memory from the pool and * a reference to it is stored in the rivet_server_conf record *----------------------------------------------------------------------------- */ static void Rivet_CreateRivetChannel(Tcl_Interp* interp,rivet_server_conf* rsc, apr_pool_t* pPool) { rsc->outchannel = apr_pcalloc (pPool, sizeof(Tcl_Channel)); *(rsc->outchannel) = Tcl_CreateChannel(&RivetChan, "apacheout", rivet_module_globals, TCL_WRITABLE); /* The channel we have just created replaces Tcl's stdout */ Tcl_SetStdChannel (*(rsc->outchannel), TCL_STDOUT); /* Set the output buffer size to the largest allowed value, so that we * won't send any result packets to the browser unless the Rivet * programmer does a "flush stdout" or the page is completed. */ Tcl_SetChannelBufferSize (*(rsc->outchannel), TCL_MAX_CHANNEL_BUFFER_SIZE); /* We register the Tcl channel to the interpreter */ Tcl_RegisterChannel(rsc->server_interp, *(rsc->outchannel)); } /* *----------------------------------------------------------------------------- * * Rivet_PerInterpInit -- * * Do the initialization that needs to happen for every * interpreter. * * Results: * None. * * Side Effects: * None. * *----------------------------------------------------------------------------- */ static void Rivet_PerInterpInit(server_rec *s, rivet_server_conf *rsc, apr_pool_t *p, int new_channel) { Tcl_Interp *interp = rsc->server_interp; rivet_interp_globals *globals = NULL; Tcl_Obj* auto_path = NULL; Tcl_Obj* rivet_tcl = NULL; ap_assert (interp != (Tcl_Interp *)NULL); Tcl_Preserve (interp); /* We don't generally need more than one channel as the child process * can serve a request at a time, but in case Rivet will ever be deployed * in large systems with many unrelated applications and separate developers * a private channel per interpreter can be created using SeparateChannels * in the conf. */ if (new_channel) { Rivet_CreateRivetChannel(interp,rsc,p); } else { /* We register the Tcl channel to the interpreter */ Tcl_RegisterChannel(interp, *(rsc->outchannel)); } /* Set up interpreter associated data */ globals = apr_pcalloc (p, sizeof(rivet_interp_globals)); Tcl_SetAssocData (interp,"rivet",NULL,globals); /* * abort_page status variables in globals are set here and then * reset in Rivet_SendContent just before the request processing is * completed */ /* Rivet commands namespace is created */ globals->rivet_ns = Tcl_CreateNamespace (interp,RIVET_NS,NULL, (Tcl_NamespaceDeleteProc *)NULL); globals->page_aborting = 0; globals->abort_code = NULL; globals->req = TclWeb_NewRequestObject (p); globals->srec = s; globals->r = NULL; /* Eval Rivet's init.tcl file to load in the Tcl-level commands. */ /* We put in front the auto_path list the path to the directory where * init.tcl is located (provides package Rivet, previously RivetTcl) */ auto_path = Tcl_GetVar2Ex(interp,"auto_path",NULL,TCL_GLOBAL_ONLY); rivet_tcl = Tcl_NewStringObj(RIVET_DIR,-1); Tcl_IncrRefCount(rivet_tcl); if (Tcl_ListObjReplace(interp,auto_path,0,0,1,&rivet_tcl) == TCL_ERROR) { ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s, MODNAME ": error setting auto_path: %s", Tcl_GetStringFromObj(auto_path,NULL)); } Tcl_DecrRefCount(rivet_tcl); /* Initialize the interpreter with Rivet's Tcl commands. */ Rivet_InitCore(interp); /* Create a global array with information about the server. */ Rivet_InitServerVariables(interp, p ); // Rivet_PropagateServerConfArray( interp, rsc ); /* Loading into the interpreter commands in librivet.so */ /* Tcl Bug #3216070 has been solved with 8.5.10 and commands shipped with * Rivetlib can be mapped at this stage */ if (Tcl_PkgRequire(interp, RIVETLIB_TCL_PACKAGE, RIVET_VERSION, 1) == NULL) { ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s, MODNAME ": Error loading rivetlib package: %s", Tcl_GetStringResult(interp) ); exit(1); } /* If rivet is configured to export the ::rivet namespace commands we set the * array variable ::rivet::module_conf(export_namespace_commands) before calling init.tcl * This array will be unset after commands are exported. */ Tcl_SetVar2Ex(interp,"module_conf","export_namespace_commands",Tcl_NewIntObj(RIVET_NAMESPACE_EXPORT),0); Tcl_SetVar2Ex(interp,"module_conf","import_rivet_commands",Tcl_NewIntObj(RIVET_NAMESPACE_IMPORT),0); /* Eval Rivet's init.tcl file to load in the Tcl-level commands. */ /* Watch out! Calling Tcl_PkgRequire with a version number binds this module to * the Rivet package revision number in rivet/init.tcl */ if (Tcl_PkgRequire(interp, "Rivet", RIVET_TCL_PACKAGE_VERSION, 1) == NULL) { ap_log_error (APLOG_MARK, APLOG_ERR, APR_EGENERAL, s, MODNAME ": init.tcl must be installed correctly for Apache Rivet to function: %s (%s)", Tcl_GetStringResult(interp), RIVET_DIR ); exit(1); } Tcl_Release(interp); } /* *----------------------------------------------------------------------------- * * -- Rivet_InitHandler: basic callback for mod_rivet initialization * * Arguments: * * The list of arguments is dictated by the Apache framework specifications * *----------------------------------------------------------------------------- * */ static int Rivet_InitHandler(apr_pool_t *pPool, apr_pool_t *pLog, apr_pool_t *pTemp, server_rec *s) { void* userdata; const char *userdata_key = "rivet_post_config"; rivet_server_conf *rsc = RIVET_SERVER_CONF( s->module_config ); rivet_panic_pool = pPool; rivet_panic_server_rec = s; /* This function runs as post_config_hook * and as such it's run twice by design. * This is the recommended way to avoid a double load of * external modules. */ apr_pool_userdata_get(&userdata, userdata_key, s->process->pool); if (userdata == NULL) { apr_pool_userdata_set((const void *)1, userdata_key, apr_pool_cleanup_null, s->process->pool); ap_log_error(APLOG_MARK,APLOG_INFO,0,s, "first post_config run: not initializing Tcl stuff"); return OK; /* This would be the first time through */ } rivet_module_globals = apr_pcalloc(pPool,sizeof(mod_rivet_globals)); rivet_module_globals->rsc_p = rsc; #if RIVET_DISPLAY_VERSION ap_add_version_component(pPool, RIVET_PACKAGE_NAME"/"RIVET_VERSION); #else ap_add_version_component(pPool, RIVET_PACKAGE_NAME); #endif FILEDEBUGINFO; /* we create and initialize a master (server) interpreter */ rsc->server_interp = Rivet_CreateTclInterp(s) ; /* root interpreter */ Rivet_PerInterpInit(s,rsc,pPool,1); /* we create also the cache */ Rivet_CreateCache(s,pPool); if (rsc->rivet_server_init_script != NULL) { Tcl_Interp* interp = rsc->server_interp; if (Tcl_EvalObjEx(interp, rsc->rivet_server_init_script, 0) != TCL_OK) { ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s, MODNAME ": Error running ServerInitScript '%s': %s", Tcl_GetString(rsc->rivet_server_init_script), Tcl_GetVar(interp, "errorInfo", 0)); } else { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, MODNAME ": ServerInitScript '%s' successful", Tcl_GetString(rsc->rivet_server_init_script)); } } return OK; } /* *----------------------------------------------------------------------------- * * Rivet_PanicProc -- * * Called when Tcl panics, usually because of memory problems. * We log the request, in order to be able to determine what went * wrong later. * * Results: * None. * * Side Effects: * Calls abort(), which does not return - the child exits. * *----------------------------------------------------------------------------- */ static void Rivet_Panic TCL_VARARGS_DEF(CONST char *, arg1) { va_list argList; char *buf; char *format; format = (char *) TCL_VARARGS_START(char *,arg1,argList); buf = (char *) apr_pvsprintf(rivet_panic_pool, format, argList); if (rivet_panic_request_rec != NULL) { ap_log_error(APLOG_MARK, APLOG_CRIT, APR_EGENERAL, rivet_panic_server_rec, MODNAME ": Critical error in request: %s", rivet_panic_request_rec->unparsed_uri); } ap_log_error(APLOG_MARK, APLOG_CRIT, APR_EGENERAL, rivet_panic_server_rec, "%s", buf); abort(); } /* *----------------------------------------------------------------------------- * Rivet_CreateTclInterp -- * * Arguments: * server_rec* s: pointer to a server_rec structure * * Results: * pointer to a Tcl_Interp structure * * Side Effects: * *----------------------------------------------------------------------------- */ static Tcl_Interp* Rivet_CreateTclInterp (server_rec* s) { Tcl_Interp* interp; /* Initialize TCL stuff */ Tcl_FindExecutable(RIVET_NAMEOFEXECUTABLE); interp = Tcl_CreateInterp(); if (interp == NULL) { ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s, MODNAME ": Error in Tcl_CreateInterp, aborting\n"); exit(1); } if (Tcl_Init(interp) == TCL_ERROR) { ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s, MODNAME ": Error in Tcl_Init: %s, aborting\n", Tcl_GetStringResult(interp)); exit(1); } Tcl_SetPanicProc(Rivet_Panic); return interp; } /* *----------------------------------------------------------------------------- * Rivet_CreateCache -- * * Arguments: * rsc: pointer to a server_rec structure * * Results: * None * * Side Effects: * *----------------------------------------------------------------------------- */ static void Rivet_CreateCache (server_rec *s, apr_pool_t *p) { extern int ap_max_requests_per_child; rivet_server_conf *rsc = RIVET_SERVER_CONF( s->module_config ); /* If the user didn't set a cache size in their configuration, we * will assume an arbitrary size for them. * * If the cache size is 0, the user has requested not to cache * documents. */ if(*(rsc->cache_size) < 0) { if (ap_max_requests_per_child != 0) { *(rsc->cache_size) = ap_max_requests_per_child / 5; } else { *(rsc->cache_size) = 50; // Arbitrary number } } if (*(rsc->cache_size) != 0) { *(rsc->cache_free) = *(rsc->cache_size); } // Initialize cache structures if (*(rsc->cache_size)) { rsc->objCacheList = apr_pcalloc( p, (signed)(*(rsc->cache_size) * sizeof(char *))); rsc->objCache = apr_pcalloc(p, sizeof(Tcl_HashTable)); Tcl_InitHashTable(rsc->objCache, TCL_STRING_KEYS); } } /* *----------------------------------------------------------------------------- * * Rivet_InitTclStuff -- * * Initialize the Tcl system - create interpreters, load commands * and so forth. * * Results: * None. * * Side Effects: * None. * *----------------------------------------------------------------------------- */ static void Rivet_InitTclStuff(server_rec *s, apr_pool_t *p) { rivet_server_conf *rsc = RIVET_SERVER_CONF( s->module_config ); Tcl_Interp *interp = rsc->server_interp; rivet_server_conf *myrsc; server_rec *sr; extern int ap_max_requests_per_child; int interpCount = 0; /* This code is run once per child process. In a threaded Tcl build the forking * of a child process most likely has not preserved the thread where the Tcl * notifier runs. The Notifier should have been restarted by one the * pthread_atfork callbacks (setup in Tcl >= 8.5.14 and Tcl >= 8.6.1). In * case pthread_atfork is not supported we unconditionally call Tcl_InitNotifier * hoping for the best (Bug #55153) */ #if !defined(HAVE_PTHREAD_ATFORK) Tcl_InitNotifier(); #endif if (rsc->rivet_global_init_script != NULL) { if (Tcl_EvalObjEx(interp, rsc->rivet_global_init_script, 0) != TCL_OK) { ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s, MODNAME ": Error running GlobalInitScript '%s': %s", Tcl_GetString(rsc->rivet_global_init_script), Tcl_GetVar(interp, "errorInfo", 0)); } else { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, MODNAME ": GlobalInitScript '%s' successful", Tcl_GetString(rsc->rivet_global_init_script)); } } /* * The fork preserves the internal status * of the process, math engine status included. This fact implies * the random number generator has the same seed and every * child process for which SeparateVirtualInterps would generate * the same random number sequence. We therefore reseed the RNG * calling a Tcl script fragment */ if (rsc->separate_virtual_interps == 0) { if (Tcl_Eval(rsc->server_interp,"expr {srand([clock clicks] + [pid])}") != TCL_OK) { ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s, MODNAME ": Tcl interpreter random number generation reseeding failed"); } } for (sr = s; sr; sr = sr->next) { myrsc = RIVET_SERVER_CONF(sr->module_config); /* We only have a different rivet_server_conf if MergeConfig * was called. We really need a separate one for each server, * so we go ahead and create one here, if necessary. */ if (sr != s && myrsc == rsc) { myrsc = RIVET_NEW_CONF(p); ap_set_module_config(sr->module_config, &rivet_module, myrsc); Rivet_CopyConfig( rsc, myrsc ); } myrsc->outchannel = rsc->outchannel; /* This sets up slave interpreters for other virtual hosts. */ if (sr != s) /* not the first one */ { if (rsc->separate_virtual_interps != 0) { char *slavename = (char*) apr_psprintf (p, "%s_%d_%d", sr->server_hostname, sr->port, interpCount++); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, MODNAME ": Rivet_InitTclStuff: creating slave interpreter '%s', hostname '%s', port '%d', separate interpreters %d", slavename, sr->server_hostname, sr->port, rsc->separate_virtual_interps); /* Separate virtual interps. */ myrsc->server_interp = Tcl_CreateSlave(interp, slavename, 0); if (myrsc->server_interp == NULL) { ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s, MODNAME ": slave interp create failed: %s", Tcl_GetStringResult(interp) ); exit(1); } Rivet_PerInterpInit(s, myrsc, p, rsc->separate_channels); } else { myrsc->server_interp = rsc->server_interp; } /* Since these things are global, we copy them into the * rivet_server_conf struct. */ myrsc->cache_size = rsc->cache_size; myrsc->cache_free = rsc->cache_free; myrsc->objCache = rsc->objCache; myrsc->objCacheList = rsc->objCacheList; } myrsc->server_name = (char*)apr_pstrdup(p, sr->server_hostname); } } /* *----------------------------------------------------------------------------- * * Rivet_ChildHandlers -- * * Handles, depending on the situation, the scripts for the init * and exit handlers. * * Results: * None. * * Side Effects: * Runs the rivet_child_init/exit_script scripts. * *----------------------------------------------------------------------------- */ static void Rivet_ChildHandlers(server_rec *s, int init) { server_rec *sr; rivet_server_conf *rsc; rivet_server_conf *top; void *function; void *parentfunction; char *errmsg; top = RIVET_SERVER_CONF(s->module_config); if (init == 1) { parentfunction = top->rivet_child_init_script; errmsg = MODNAME ": Error in Child init script: %s"; } else { parentfunction = top->rivet_child_exit_script; errmsg = MODNAME ": Error in Child exit script: %s"; Tcl_Preserve(top->server_interp); } if (!init) { Tcl_Preserve(top->server_interp); } for (sr = s; sr; sr = sr->next) { rsc = RIVET_SERVER_CONF(sr->module_config); function = init ? rsc->rivet_child_init_script : rsc->rivet_child_exit_script; /* Execute it if it exists and it's the top level, separate * virtual interps are turned on, or it's different than the * main script. */ if (function && ( sr == s || rsc->separate_virtual_interps || function != parentfunction)) { rivet_interp_globals* globals = Tcl_GetAssocData( rsc->server_interp, "rivet", NULL ); Tcl_Preserve (rsc->server_interp); globals->srec = sr; if (Tcl_EvalObjEx(rsc->server_interp,function, 0) != TCL_OK) { ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s, errmsg, Tcl_GetString(function)); ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s, "errorCode: %s", Tcl_GetVar(rsc->server_interp, "errorCode", 0)); ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s, "errorInfo: %s", Tcl_GetVar(rsc->server_interp, "errorInfo", 0)); } Tcl_Release (rsc->server_interp); } /* it's probably pedantic to unregister the channel(s) just before the child exits and the interpreter is deleted if (!init && ((sr == s) || rsc->separate_channels)) { Tcl_UnregisterChannel(rsc->server_interp,*(rsc->outchannel)); } */ } if (!init) { /* * Upon child exit we delete the master interpreter before the * caller invokes Tcl_Finalize. Even if we're running separate * virtual interpreters, we don't delete the slaves * as deleting the master implicitly deletes its slave interpreters. */ /* * The Tcl exit reform now recommends we don't call Tcl_DeleteInterp * anymore when a child process is about to exit */ //if (!Tcl_InterpDeleted (top->server_interp)) { // Tcl_DeleteInterp(top->server_interp); //} Tcl_Release (top->server_interp); } } /* *----------------------------------------------------------------------------- * * Rivet_ChildInit -- * * This function is run when each individual Apache child process * is created. * * Results: * None. * * Side Effects: * Calls Tcl initialization function. * *----------------------------------------------------------------------------- */ static void Rivet_ChildInit(apr_pool_t *pChild, server_rec *s) { ap_assert (s != (server_rec *)NULL); Rivet_InitTclStuff(s, pChild); Rivet_ChildHandlers(s, 1); //cleanup apr_pool_cleanup_register (pChild, s, Rivet_ChildExit, Rivet_ChildExit); } /* *----------------------------------------------------------------------------- * * Rivet_ChildExit -- * * Run when each Apache child process is about to exit. * * Results: * None. * * Side Effects: * *----------------------------------------------------------------------------- */ static apr_status_t Rivet_ChildExit (void *data) { server_rec *s = (server_rec*) data; ap_assert (s != (server_rec *)NULL); ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_EGENERAL, s, MODNAME ": Running ChildExit handler"); Rivet_ChildHandlers(s, 0); return OK; } //TODO: clarify whether rsc or rdc #define USE_APACHE_RSC /* Set things up to execute a file, then execute */ static int Rivet_SendContent(request_rec *r) { int errstatus; int retval; int ctype; Tcl_Interp *interp; static Tcl_Obj *request_init = NULL; static Tcl_Obj *request_cleanup = NULL; rivet_interp_globals *globals = NULL; #ifdef USE_APACHE_RSC rivet_server_conf *rsc = NULL; #else rivet_server_conf *rdc; #endif ctype = Rivet_CheckType(r); if (ctype == CTYPE_NOT_HANDLED) { return DECLINED; } Tcl_MutexLock(&sendMutex); /* Set the global request req to know what we are dealing with in * case we have to call the PanicProc. */ rivet_panic_request_rec = r; rsc = Rivet_GetConf(r); rivet_module_globals->rsc_p = rsc; interp = rsc->server_interp; globals = Tcl_GetAssocData(interp, "rivet", NULL); /* Setting this pointer in globals is crucial as by assigning it * we signal to Rivet commands we are processing an HTTP request. * This pointer gets set to NULL just before we leave this function * making possible to invalidate command execution that could depend * on a valid request_rec */ globals->r = r; globals->srec = r->server; #ifndef USE_APACHE_RSC if (r->per_dir_config != NULL) rdc = RIVET_SERVER_CONF( r->per_dir_config ); else rdc = rsc; #endif r->allowed |= (1 << M_GET); r->allowed |= (1 << M_POST); r->allowed |= (1 << M_PUT); r->allowed |= (1 << M_DELETE); if (r->method_number != M_GET && r->method_number != M_POST && r->method_number != M_PUT && r->method_number != M_DELETE) { retval = DECLINED; goto sendcleanup; } if (r->finfo.filetype == 0) { ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, APR_EGENERAL, r->server, MODNAME ": File does not exist: %s", (r->path_info ? (char*)apr_pstrcat(r->pool, r->filename, r->path_info, NULL) : r->filename)); retval = HTTP_NOT_FOUND; goto sendcleanup; } if ((errstatus = ap_meets_conditions(r)) != OK) { retval = errstatus; goto sendcleanup; } /* * This one is the big catch when it comes to moving towards * Apache 2.0, or one of them, at least. */ if (Rivet_chdir_file(r->filename) < 0) { /* something went wrong doing chdir into r->filename, we are not specific * at this. We simply emit an internal server error and print a log message */ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, APR_EGENERAL, r->server, MODNAME ": Error accessing %s, could not chdir into directory", r->filename); retval = HTTP_INTERNAL_SERVER_ERROR; goto sendcleanup; } /* Initialize this the first time through and keep it around. */ if (request_init == NULL) { request_init = Tcl_NewStringObj("::Rivet::initialize_request\n", -1); Tcl_IncrRefCount(request_init); } if (Tcl_EvalObjEx(interp, request_init, 0) == TCL_ERROR) { ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r->server, MODNAME ": Could not create request namespace (%s)\n" , Tcl_GetStringResult(interp)); retval = HTTP_INTERNAL_SERVER_ERROR; goto sendcleanup; } /* Apache Request stuff */ TclWeb_InitRequest(globals->req, interp, r); ApacheRequest_set_post_max(globals->req->apachereq, rsc->upload_max); ApacheRequest_set_temp_dir(globals->req->apachereq, rsc->upload_dir); #if 0 if (upload_files_to_var) { globals->req->apachereq->hook_data = interp; globals->req->apachereq->upload_hook = Rivet_UploadHook; } #endif errstatus = ApacheRequest_parse(globals->req->apachereq); if (errstatus != OK) { retval = errstatus; goto sendcleanup; } if (r->header_only && !rsc->honor_header_only_reqs) { TclWeb_SetHeaderType(DEFAULT_HEADER_TYPE, globals->req); TclWeb_PrintHeaders(globals->req); retval = OK; goto sendcleanup; } /* * if we are handling the request we also want to check if a charset * parameter was set with the content type, e.g. rivet's configuration * or .htaccess had lines like * * AddType 'application/x-httpd-rivet; charset=utf-8;' rvt */ /* * if strlen(req->content_type) > strlen([RIVET|TCL]_FILE_CTYPE) * a charset parameters might be there */ { int content_type_len = strlen(r->content_type); if (((ctype==RIVET_TEMPLATE) && (content_type_len > strlen(RIVET_TEMPLATE_CTYPE))) || \ ((ctype==RIVET_TCLFILE) && (content_type_len > strlen(RIVET_TCLFILE_CTYPE)))) { char* charset; /* we parse the content type: we are after a 'charset' parameter definition */ charset = strstr(r->content_type,"charset"); if (charset != NULL) { charset = apr_pstrdup(r->pool,charset); /* ther's some freedom about spaces in the AddType lines: let's strip them off */ apr_collapse_spaces(charset,charset); globals->req->charset = charset; } } } if (Rivet_ParseExecFile(globals->req, r->filename, 1) != TCL_OK) { ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r->server, MODNAME ": Error in Rivet_ParseExecFile exec file '%s': %s", r->filename, Tcl_GetVar(interp, "errorInfo", 0)); } /* We execute also the AfterEveryScript if one was set */ if (rsc->after_every_script) { int tcl_status; tcl_status = Rivet_ExecuteAndCheck(interp, rsc->after_every_script,r); if ((tcl_status == TCL_ERROR) && !globals->page_aborting) { Rivet_PrintErrorMessage(interp,"Rivet AfterEveryScript failed"); } } if (request_cleanup == NULL) { request_cleanup = Tcl_NewStringObj("::Rivet::cleanup_request\n", -1); Tcl_IncrRefCount(request_cleanup); } if (Tcl_EvalObjEx(interp, request_cleanup, 0) == TCL_ERROR) { ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r->server, MODNAME ": Error evaluating cleanup request: %s", Tcl_GetVar(interp, "errorInfo", 0)); } /* We finalize the request processing by printing the headers and flushing the rivet channel internal buffer */ TclWeb_PrintHeaders(globals->req); Tcl_Flush(*(rsc->outchannel)); /* Reset globals */ Rivet_CleanupRequest(r); retval = OK; sendcleanup: if (globals->exit_process) { ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_EGENERAL, r, "process terminating with code %d",globals->exit_status); Tcl_Exit(globals->exit_status); } /* Everything is done and we flush the rivet channel before resetting the status */ globals->req->content_sent = 0; globals->page_aborting = 0; if (globals->abort_code != NULL) { Tcl_DecrRefCount(globals->abort_code); globals->abort_code = NULL; } /* We reset this pointer to signal we have terminated the request processing */ globals->r = NULL; Tcl_MutexUnlock(&sendMutex); return retval; } static void rivet_register_hooks (apr_pool_t *p) { ap_hook_post_config (Rivet_InitHandler, NULL, NULL, APR_HOOK_LAST); ap_hook_handler (Rivet_SendContent, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_child_init (Rivet_ChildInit, NULL, NULL, APR_HOOK_LAST); } /* mod_rivet basic structures */ const command_rec rivet_cmds[] = { AP_INIT_TAKE2 ("RivetServerConf", Rivet_ServerConf, NULL, RSRC_CONF, NULL), AP_INIT_TAKE2 ("RivetDirConf", Rivet_DirConf, NULL, ACCESS_CONF, NULL), AP_INIT_TAKE2 ("RivetUserConf", Rivet_UserConf, NULL, ACCESS_CONF|OR_FILEINFO, "RivetUserConf key value: sets RivetUserConf(key) = value"), {NULL} }; module AP_MODULE_DECLARE_DATA rivet_module = { STANDARD20_MODULE_STUFF, Rivet_CreateDirConfig, Rivet_MergeDirConfig, Rivet_CreateConfig, Rivet_MergeConfig, rivet_cmds, rivet_register_hooks }; rivet-2.3.5/doc/html/images/calendar.png000644 001750 001750 00000023215 13200160527 017552 0ustar00mxmmxm000000 000000 PNG  IHDR]&sRGB pHYs+tIME bk IDATx]yX~9m紧Me+d+b0.a,Ac(dM% K*YCkTTHEiվSgQڜ}'wz=>8  E P,3:bmB`fff4FD@@DD@DD@@DDPCܺ^ `p앻 seIoދ|UW1s5?i;tqä:6QNfu)m`Vg&=q&pDs4߳;qWwX֨ Od]W&S]ٙ%ZX+Ƿ𵀺wU͖:9޹p#qFs+m*^\>}"sש@O 8Vr 댹| 3=ٟ ~#id1ݮ%PWޒصw >y|#%;L${'G2&o;ix]9q.<"+deH-jYb.@bXۀ ;lvB[@DшHIEv'?MFkKZVVbe%Qd*%ҋv<@~Bgcѡx?ΏxƩO޲ԃ W6PHUYh,kh]zQ% `DID6̤/ _Xi mFS UӁO_iͩK{@) ~ ?Cd_Rd5fGuzy?m)9VDyF>{/h.O~~h) WT޹Rykua~ztrNٳ zQy{;'F>ԖLʢ6mH>Ѷ,MXBR=t Di6E_$_&a#(9v'gRte6@k/p%ܸx`ff]*ã!n~p h5/^{8zdF_hƈ=.:'w :zfi}vtQ痢k2aO0=kۇo^@.ދw qd)oW 8Q5MsUO*;{.jݼJOÒ>S/_c$΃bm1D #]~D$+-vTNQO~9UAJiL0(M-2%߅?SgW&HocE^pR 7r&ɬ)K }^#WyqH NhcRf_mɣ+(CCxFfdn>rMQEtV&adZl9@osiVtGDFezhL!K3pv+dI $ά~trˎgNU䍀|qyqF-ˍ%\;{b*Y`¤ZjECݗFR1 i5Ɖ5SôcZfyrw^ձ@\~ +6.>{<ޔ~oE, *pզjwEsQT)˗f}hIdUsn[5R_MpU 4 w-r tV4G{EoM7%gw٬(xiF1hOo9[w᛬"@we,`Uf/2}x j9,OKf!̒pN|{n(lB m8O /K\Z/,iF /u-8Uo(Lh)9sbNES4tc? ܶt( I'O'ax͒o8I0@]j0'uv>].Hm)Nc˯nrT써%ιt< rz%kRO53{= ϳ+nߌ}5{nЗ؈c[G:N2`>pY;EvjpMf7>Gso*TS ? P2fl jBlVwIPϑ4[S3@K)=M.@R[Д< pzlvc7;W ӄsX Cך|>TW3T=r2$@ݐo%ffcVr *1E~Z:?gqc"9%wߟ7z l{_ȗ&Pd&,jYa$6P )\%*ЂɅ4Քj* i'[ZQ$@ep54͈cG6[P!.@Lȩ>/Vվڻw+ZI Rjc,yˮ,b@'Lkp dW;h~z Le ]'$ @m2V.rK@FIF89vW%4G)(LJ)ԉ $ Rf⯢ҋ$u-Z$b2j5: {|X($D9wV0sCip2e ĩ _=\2uĆw~9U4:è+}*T %EhK.4R ހ,Fufٽ(:BaҖYг_Eg & +(vJ*͠|Lztw|/+86HYI8t=Yϙ 驏.wY3E[[7ٸ<76˒Gaip9RW a!&Q~wMn3ؤ~Ku?DYoSf7 =D ^g "Uƛ$;8Y%J ""p=g˵E#7~طߋ/U4M-yh4(p?ǻ>uBUŚ8gb G[pBǩqmDDDDDDDDDDDD^ P{Qd`Xq!FX(7P2cM-gH5~H*/k`"Y}QV7~i@Q2~+LqmfG=42MѶyˮyT^}(R*Hiid-BDF񝽷8~q1VOTCѺ욗=.W>MZm.0f sevC!Y=lҨW*07Vu:ӅmFr k^$mN'qn+(DSwM535nL1_B\WkfkfˌUg+4+P|.H:xP Mmr::M/xi3x4?>q*(\^R4BӸURkreF ƈ%N|Ʉ"zLhV;k=E9wrn:$ >Vb!s+dcآ VD ot^5[e.K5W+y_;}j[RTǿI`aEܒiMʝKȒdh5=YaW]:3i!ns4$I 8&|,#%Ǻ:KK+8v|u." Qx闎2pqD`L_̺7s1=fR jeʣ+[|!N{/#}%*x8<˥c,7:W6o K5Wt~&Bf64/%t#0V4 ~"%Ao U Cr<;U:Gi<1 *"|3$*P3'34g5..?P2Kdv_9%2}E0Uk1$roTj8boT^BYsO1c'+ht6Vy[žB7FĉCy4{fR_9JI:pÝίjbj2|`<1ȞgLf};\[BQ\;KꙌ7NO18OG{OC/yv5 ,,6@g1~u8[4?(@NlFՖ*; mX0v1Fݐ|L@Tb (zSy9\ҲBo9#Vur_`jv&'4MɘHK|1d{y-Uڈ&e._⇻?M,'#RL5iaCa1Nu<YjՖ]GaV oOkv]B2 5VT ;vVA7&1?vۮI-J gel~arqH[F^CV~3@fߠ+iH M8ӢOk9)SgH#}zS,*FCYv[;KckqRe$O[0?&Vz"zy Y 3dt_f <*9kI_ "6_5h42=UkDXÄHIbR6M5DM4-=`uU_V2gFk+@MKGJ<IHyOCL5#z1oXWS:At(o޼y3(m Jh}}XD"uZnm!+A0 ٰ+xIGWd11D׵qe,Q8i RzP2f,s~_{ʑ".)FQxig9ʀ~8Rz46$%+w$8NZEtǮz{/Eƚ"Us0Ȟ*)̬D g2&*@p p80GW\ejk/BJRz5Yo/I۽ʴ g+j-L"xUs@෦-T;MxY:BD%c3bbjmqjSޔ(h-K ^LDF̓g:Zt=2 cҋjiLQ_;Ӵġt7 i 6&/ik+-qFRh#ՈJIrB8gOvUq׷:&+%6< {_Po>y©zmXXe.z KMɯcH>~ƢNL8@%Z{6YgQoNl 2/9)ڏh? 2": "" "" ""*o Boso=AcDDDDD|Ȼ%z|\ _8(|,:MW4gPG3Yoi+NP jPl*eIo~;`Եv{XWnz,\o3KW]urZ[uAvœSUK(It޿MFϺSMI`^q]6p{W. ܯu()ЬYms]GzmV8aIGql}QUKkT8;aG; ^ g?)oy_f{7O_+Mj#blp&ݛ<%]~`*) T,A rE)RpWd >DvU?y0OMak\=Q/ "(ɮ?upˆA-1T8SA #|\f)bvW7 ^Mk{^f{|G]ce{tJ\߅Ͱ1B;ֺ-Qߌ~}A3mbYH|p&oA,{:H^0  ձ"ܝ*6-Q֟4g461լ5TvdD,y|g™rawG *=j pͮSz}/Uf->"~zw(PLVۃow|tL3m%Xѱḅ1+Dq0o9)/j{^f{p&=g˵v@X grxXwWd=2&m"KfkKއ;30M[s1/h>IIDATC^&o gr7z`j[-A g-Z-T-GoMpE1ϮW1$4jS1\AU'Fu@DD@DD@@DDU@)4@eD@7(#" "" ""1"OryV:6\rD_k%o_ }0+'ΰg X hȃK5 }-_Z61񽻣oN>;R3c.zF^ڷSYcc5/{\/6R'V% |b\ow(+owS`۬v<Cir@i>h[ìx4 (m0^ UlliZ9z`j>?Oܪ< Q?98y֡Zr̆]mJ!kl~ب/^p_~dpusS\f'yI9ڧylZSQkyv1ud[& @RQw_LLQg1_B\W<XM UыYf(V\gݕkDINo sqPG`q B\#vNUlh7%:y~2@}4 l6 R&X4HL+}ϵ`(t̮ƙE9wrn:$ >Vb!CpGFDP\Q #;400 N0G_O}Qh9f $IKo >Y,dbjCl.-&.llpUչ"&McµH9)xYUNj `А Y>^7 c}-)(0TYin]DJE0xs5qʼI)a%\@q0ҫy\ ]" -B5c0 3.bp3rC F놺 ֹ+K/o(ϏzZrObV:tvyVm/寯&o0m$'JD|@FrRDDDDDD^$B3 };:"|0_ uYOIENDB`rivet-2.3.5/src/rivetcmds/rivetCore.c000644 001750 001750 00000134403 12630671503 017223 0ustar00mxmmxm000000 000000 /* rivetCore.c - Core commands which are compiled into mod_rivet itself. */ /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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. */ /* $Id: rivetCore.c 1718136 2015-12-05 23:29:07Z mxmanghi $ */ /* Rivet config */ #ifdef HAVE_CONFIG_H #include #endif #include #include "httpd.h" #include "http_config.h" #include "http_request.h" #include "http_core.h" #include "http_protocol.h" #include "http_log.h" #include "http_main.h" #include "util_script.h" #include "http_config.h" #include #include #include #include #include #include "apache_request.h" #include "mod_rivet.h" #include "rivet.h" #include "TclWeb.h" #define ENV_ARRAY_NAME "::request::env" #define HEADERS_ARRAY_NAME "::request::headers" #define COOKIES_ARRAY_NAME "cookies" extern module rivet_module; extern char* TclWeb_GetRawPost (TclWebRequest *req); #define POOL (globals->r->pool) /* * -- Rivet_NoRequestRec * * Adds standard error information to the interpreter. This procedure makes * sense only when called by C functions implementing Tcl commands that * are meaningful only if a valid requiest_rec object is defined. These * procedures must return TCL_ERROR right away after Rivet_NoRequestRecord * returns * * Arguments: * * Tcl_Interp*: current Tcl interpreter * Tcl_Obj*: Tcl string object with the command name * * Results: * * None * */ static void Rivet_NoRequestRec (Tcl_Interp* interp, Tcl_Obj* command) { Tcl_AddErrorInfo(interp, "Cannot call "); Tcl_AppendObjToErrorInfo(interp,command); Tcl_AppendObjToErrorInfo(interp,Tcl_NewStringObj(" outside a request processing",-1)); } /* *----------------------------------------------------------------------------- * * Rivet_MakeURL -- * * Make a self-referencing URL. * * Results: * Standard Tcl result. * * Side Effects: * None. * *----------------------------------------------------------------------------- */ TCL_CMD_HEADER( Rivet_MakeURL ) { Tcl_Obj* result = NULL; rivet_interp_globals* globals = Tcl_GetAssocData(interp,"rivet",NULL); char* url_target_name; int target_length; CHECK_REQUEST_REC(globals->r,"::rivet::makeurl"); if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "filename"); return TCL_ERROR; } if (objc == 1) { url_target_name = TclWeb_GetEnvVar (globals->req,"SCRIPT_NAME"); } else { url_target_name = Tcl_GetStringFromObj(objv[1],&target_length); // we check the first character for a '/' (absolute path) // If we are dealing with a relative path we prepend it with // the SCRIPT_NAME environment variable if (url_target_name[0] != '/') { /* relative path */ char* script_name = TclWeb_GetEnvVar (globals->req,"SCRIPT_NAME"); int script_name_l = strlen(script_name); // regardless the reason for a SCRIPT_NAME being undefined we // prevent a segfault and we revert the behavior of makeurl // to the case of an absolute path if (script_name_l > 0) { // script name may have the form a directory path (and mod_rewrite // could have mapped it to a .tcl or .rvt script) if (script_name[script_name_l-1] == '/') { url_target_name = apr_pstrcat(globals->req->req->pool,script_name,url_target_name,NULL); } else { url_target_name = apr_pstrcat(globals->req->req->pool,script_name,"/",url_target_name,NULL); } } else { url_target_name = apr_pstrcat(globals->req->req->pool,"/",url_target_name,NULL); } } } result = Tcl_NewObj(); TclWeb_MakeURL(result, url_target_name, globals->req); Tcl_SetObjResult(interp, result); return TCL_OK; } /* *----------------------------------------------------------------------------- * * Rivet_Parse -- * * Include and parse a Rivet file. * * Results: * Standard Tcl result. * * Side Effects: * Whatever occurs in the Rivet page parsed. * *----------------------------------------------------------------------------- */ TCL_CMD_HEADER( Rivet_Parse ) { char *filename; apr_status_t stat_s; apr_finfo_t finfo_b; rivet_interp_globals *globals = Tcl_GetAssocData(interp, "rivet", NULL); CHECK_REQUEST_REC(globals->r,"::rivet::parse"); if( objc < 2 || objc > 3 ) { Tcl_WrongNumArgs(interp, 1, objv, "?-virtual? filename"); return TCL_ERROR; } if( objc == 2 ) { filename = Tcl_GetStringFromObj( objv[1], (int *)NULL ); } else { if (STREQU( Tcl_GetStringFromObj(objv[1], (int *)NULL), "-virtual")) { /* */ filename = TclWeb_GetVirtualFile(globals->req,Tcl_GetStringFromObj(objv[2],(int *)NULL)); } else if ( STREQU( Tcl_GetStringFromObj(objv[1], (int *)NULL), "-string")) { /* we treat the argument as a string and we pass it as is to Rivet_ParseExecString */ return Rivet_ParseExecString(globals->req, objv[2]); } else { Tcl_WrongNumArgs( interp, 1, objv, "?-virtual? filename | -string template_string" ); return TCL_ERROR; } } if (!strcmp(filename, globals->r->filename)) { Tcl_AddErrorInfo(interp, "Cannot recursively call the same file!"); return TCL_ERROR; } stat_s = apr_stat(&finfo_b,filename,APR_FINFO_NORM,globals->r->pool); if (stat_s != APR_SUCCESS) { char apr_error_message[256]; Tcl_AddErrorInfo(interp,apr_strerror(stat_s,apr_error_message,256)); return TCL_ERROR; } return Rivet_ParseExecFile(globals->req, filename, 0); } /* *----------------------------------------------------------------------------- * * Rivet_Include -- * * Includes a file literally in the output stream. Useful for * images, plain HTML and the like. * * Results: * A standard Tcl result. * * Side Effects: * Adds to the output stream. * *----------------------------------------------------------------------------- */ TCL_CMD_HEADER( Rivet_Include ) { int sz; Tcl_Channel fd; Tcl_Channel tclstdout; Tcl_Obj *outobj; char *filename; Tcl_DString transoptions; Tcl_DString encoptions; rivet_interp_globals *globals = Tcl_GetAssocData(interp, "rivet", NULL); if( objc < 2 || objc > 3 ) { Tcl_WrongNumArgs(interp, 1, objv, "?-virtual? filename"); return TCL_ERROR; } if( objc == 2 ) { filename = Tcl_GetStringFromObj( objv[1], (int *)NULL ); } else { if( !STREQU( Tcl_GetStringFromObj(objv[1], (int *)NULL), "-virtual") ) { Tcl_WrongNumArgs( interp, 1, objv, "?-virtual? filename" ); return TCL_ERROR; } CHECK_REQUEST_REC(globals->r,"::rivet::include -virtual"); filename = TclWeb_GetVirtualFile( globals->req, Tcl_GetStringFromObj(objv[2], (int *)NULL) ); } fd = Tcl_OpenFileChannel(interp, filename, "r", 0664); if (fd == NULL) { return TCL_ERROR; } Tcl_SetChannelOption(interp, fd, "-translation", "binary"); outobj = Tcl_NewObj(); Tcl_IncrRefCount(outobj); sz = Tcl_ReadChars(fd, outobj, -1, 0); if (sz == -1) { Tcl_AddErrorInfo(interp, Tcl_PosixError(interp)); Tcl_DecrRefCount(outobj); return TCL_ERROR; } /* What we are doing is saving the translation and encoding * options, setting them both to binary, and the restoring the * previous settings. */ Tcl_DStringInit(&transoptions); Tcl_DStringInit(&encoptions); tclstdout = Tcl_GetChannel(interp, "stdout", NULL); Tcl_GetChannelOption(interp, tclstdout, "-translation", &transoptions); Tcl_GetChannelOption(interp, tclstdout, "-encoding", &encoptions); Tcl_SetChannelOption(interp, tclstdout, "-translation", "binary"); Tcl_WriteObj(tclstdout, outobj); Tcl_SetChannelOption(interp, tclstdout, "-translation", Tcl_DStringValue(&transoptions)); Tcl_SetChannelOption(interp, tclstdout, "-encoding", Tcl_DStringValue(&encoptions)); Tcl_DStringFree(&transoptions); Tcl_DStringFree(&encoptions); Tcl_DecrRefCount(outobj); return Tcl_Close(interp, fd); } /* *----------------------------------------------------------------------------- * * Rivet_Headers -- * * Command to manipulate HTTP headers from Tcl. * * Results: * A standard Tcl result. * * Side Effects: * None. * *----------------------------------------------------------------------------- */ TCL_CMD_HEADER( Rivet_Headers ) { char *opt; rivet_interp_globals *globals = Tcl_GetAssocData(interp, "rivet", NULL); CHECK_REQUEST_REC(globals->r,"::rivet::headers"); if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "option arg ?arg ...?"); return TCL_ERROR; } opt = Tcl_GetStringFromObj(objv[1], NULL); /* Basic introspection returning the value of the headers_printed flag */ if (!strcmp("sent",opt)) { Tcl_SetObjResult(interp, Tcl_NewIntObj(globals->req->headers_printed)); return TCL_OK; } if (globals->req->headers_printed != 0) { Tcl_AddObjErrorInfo(interp, "Cannot manipulate headers - already sent", -1); return TCL_ERROR; } if (!strcmp("redirect", opt)) /* ### redirect ### */ { if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "new-url"); return TCL_ERROR; } apr_table_set(globals->r->headers_out, "Location", Tcl_GetStringFromObj (objv[2], (int *)NULL)); TclWeb_SetStatus(301, globals->req); return TCL_OK; } else if (!strcmp("get", opt)) /* ### get ### */ { const char* header_value; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "headername"); return TCL_ERROR; } header_value = TclWeb_OutputHeaderGet(Tcl_GetString(objv[2]),globals->req); Tcl_SetObjResult(interp,Tcl_NewStringObj(header_value ? header_value : "",-1)); } else if (!strcmp("set", opt)) /* ### set ### */ { if (objc != 4) { Tcl_WrongNumArgs(interp, 2, objv, "headername value"); return TCL_ERROR; } TclWeb_HeaderSet(Tcl_GetString(objv[2]), Tcl_GetString(objv[3]), globals->req); } else if (!strcmp("add", opt)) /* ### set ### */ { if (objc != 4) { Tcl_WrongNumArgs(interp, 2, objv, "headername value"); return TCL_ERROR; } TclWeb_HeaderAdd(Tcl_GetString(objv[2]), Tcl_GetString(objv[3]), globals->req); } else if (!strcmp("type", opt)) /* ### set ### */ { if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "mime/type"); return TCL_ERROR; } TclWeb_SetHeaderType(Tcl_GetString(objv[2]), globals->req); } else if (!strcmp("numeric", opt)) /* ### numeric ### */ { int st = 200; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "response_code_number"); return TCL_ERROR; } if (Tcl_GetIntFromObj(interp, objv[2], &st) != TCL_ERROR) { TclWeb_SetStatus(st, globals->req); } else { return TCL_ERROR; } } else { Tcl_Obj* result = Tcl_NewStringObj("unrecognized subcommand: ",-1); Tcl_IncrRefCount(result); Tcl_AppendStringsToObj(result,opt,NULL); Tcl_SetObjResult(interp, result); Tcl_DecrRefCount(result); return TCL_ERROR; } return TCL_OK; } /* *----------------------------------------------------------------------------- * * Rivet_LoadEnv -- * * Load the "environmental variables" - those variables that are * set in the environment in a standard CGI program. If no array * name is supplied, they are loaded into an array whose name is * the value of the ENV_ARRAY_NAME #define. * * Results: * A standard Tcl result. * * Side Effects: * None. * *----------------------------------------------------------------------------- */ TCL_CMD_HEADER( Rivet_LoadEnv ) { Tcl_Obj *ArrayObj; rivet_interp_globals *globals = Tcl_GetAssocData(interp, "rivet", NULL); CHECK_REQUEST_REC(globals->r,"::rivet::load_env"); if( objc > 2 ) { Tcl_WrongNumArgs( interp, 1, objv, "?arrayName?" ); return TCL_ERROR; } if( objc == 2 ) { ArrayObj = objv[1]; } else { ArrayObj = Tcl_NewStringObj( ENV_ARRAY_NAME, -1 ); } return TclWeb_GetEnvVars(ArrayObj, globals->req); } /* *----------------------------------------------------------------------------- * * Rivet_LoadHeaders -- * * Load the HTTP headers supplied by the client into a Tcl array, * whose name defaults to the value of the HEADERS_ARRAY_NAME * #define. * * Results: * A standard Tcl result. * * Side Effects: * Creates an array variable if none exists. * *----------------------------------------------------------------------------- */ TCL_CMD_HEADER ( Rivet_LoadHeaders ) { Tcl_Obj *ArrayObj; rivet_interp_globals *globals = Tcl_GetAssocData(interp, "rivet", NULL); CHECK_REQUEST_REC(globals->r,"::rivet::load_headers"); if( objc > 2 ) { Tcl_WrongNumArgs( interp, 1, objv, "?arrayName?" ); return TCL_ERROR; } if( objc == 2 ) { ArrayObj = objv[1]; } else { ArrayObj = Tcl_NewStringObj( HEADERS_ARRAY_NAME, -1 ); } return TclWeb_GetHeaderVars(ArrayObj, globals->req); } /* Tcl command to return a particular variable. */ /* Use: */ /* *----------------------------------------------------------------------------- * * Rivet_Var -- * * Returns information about GET or POST variables: * * var get foo ?default? * var list foo * var names * var number * var all * * Results: * A standard Tcl result. * * Side Effects: * None. * *----------------------------------------------------------------------------- */ TCL_CMD_HEADER ( Rivet_Var ) { char *cmd; char *command; Tcl_Obj *result = NULL; int source; rivet_interp_globals *globals = Tcl_GetAssocData(interp, "rivet", NULL); CHECK_REQUEST_REC(globals->r,"::rivet::var,var_post,var_qs"); if (objc < 2 || objc > 4) { Tcl_WrongNumArgs(interp, 1, objv, "(get varname ?default?|list varname|exists varname|names" "|number|all)"); return TCL_ERROR; } cmd = Tcl_GetString(objv[0]); command = Tcl_GetString(objv[1]); result = Tcl_NewObj(); /* determine if var_qs, var_post or var was called */ if (!strcmp(cmd, "var_qs")) source = VAR_SRC_QUERYSTRING; else if (!strcmp(cmd, "var_post")) source = VAR_SRC_POST; else source = VAR_SRC_ALL; if (!strcmp(command, "get")) { char *key = NULL; char *deflt = NULL; if (objc != 3 && objc != 4) { Tcl_WrongNumArgs(interp, 2, objv, "variablename ?defaultval?"); return TCL_ERROR; } key = Tcl_GetStringFromObj(objv[2], NULL); if (objc == 4) { deflt = Tcl_GetString(objv[3]); } if (TclWeb_GetVar(result, key, source, globals->req) != TCL_OK) { if (deflt == NULL) { Tcl_SetStringObj(result, "", -1); } else { Tcl_SetStringObj(result, deflt, -1); } } } else if(!strcmp(command, "exists")) { char *key; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "variablename"); return TCL_ERROR; } key = Tcl_GetString(objv[2]); TclWeb_VarExists(result, key, source, globals->req); } else if(!strcmp(command, "list")) { char *key; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "variablename"); return TCL_ERROR; } key = Tcl_GetStringFromObj(objv[2], NULL); if (TclWeb_GetVarAsList(result, key, source, globals->req) != TCL_OK) { result = Tcl_NewStringObj("", -1); } } else if(!strcmp(command, "names")) { if (objc != 2) { Tcl_WrongNumArgs(interp, 2, objv, NULL); return TCL_ERROR; } if (TclWeb_GetVarNames(result, source, globals->req) != TCL_OK) { result = Tcl_NewStringObj("", -1); } } else if(!strcmp(command, "number")) { if (objc != 2) { Tcl_WrongNumArgs(interp, 2, objv, NULL); return TCL_ERROR; } TclWeb_VarNumber(result, source, globals->req); } else if(!strcmp(command, "all")) { if (objc != 2) { Tcl_WrongNumArgs(interp, 2, objv, NULL); return TCL_ERROR; } if (TclWeb_GetAllVars(result, source, globals->req) != TCL_OK) { result = Tcl_NewStringObj("", -1); } } else { /* bad command */ Tcl_AppendResult(interp, "bad option: must be one of ", "'get, list, names, number, all'", NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, result); return TCL_OK; } /* */ static int append_key_callback (void *data, const char *key, const char *val) { Tcl_Obj *list = data; Tcl_ListObjAppendElement (NULL, list, Tcl_NewStringObj (key, -1)); return 1; } static int append_key_value_callback (void *data, const char *key, const char *val) { Tcl_Obj *list = data; Tcl_ListObjAppendElement (NULL, list, Tcl_NewStringObj (key, -1)); Tcl_ListObjAppendElement (NULL, list, Tcl_NewStringObj (val, -1)); return 1; } /* *----------------------------------------------------------------------------- * * Rivet_ApacheTable -- * * Deals with Rivet key-value tables in the request structure * * apache_table get tablename key * apache_table set tablename key value * apache_table set tablename list * apache_table exists tablename key * apache_table unset tablename key * apache_table names tablename * apache_table array_get tablename * apache_table clear tablename * * Table names can be "notes", "headers_in", "headers_out", * "err_headers_out", and "subprocess_env". * * Results: * A standard Tcl result. * * Side Effects: * *----------------------------------------------------------------------------- */ TCL_CMD_HEADER( Rivet_ApacheTable ) { apr_table_t *table = NULL; int subcommandindex; static CONST84 char *SubCommand[] = { "get", "set", "exists", "unset", "names", "array_get", "clear", NULL }; enum subcommand { SUB_GET, SUB_SET, SUB_EXISTS, SUB_UNSET, SUB_NAMES, SUB_ARRAY_GET, SUB_CLEAR }; static CONST84 char *tableNames[] = { "notes", "headers_in", "headers_out", "err_headers_out", "subprocess_env", NULL }; int tableindex; enum tablename { TABLE_NOTES, TABLE_HEADERS_IN, TABLE_HEADERS_OUT, TABLE_ERR_HEADERS_OUT, TABLE_SUBPROCESS_ENV }; rivet_interp_globals *globals = Tcl_GetAssocData(interp, "rivet", NULL); CHECK_REQUEST_REC(globals->r,"::rivet::apache_table"); if ((objc < 3) || (objc > 5)) { Tcl_WrongNumArgs(interp, 1, objv, "option tablename ?args?"); return TCL_ERROR; } if (Tcl_GetIndexFromObj(interp, objv[1], SubCommand, "get|set|unset|list", 0, &subcommandindex) == TCL_ERROR) { return TCL_ERROR; } if (Tcl_GetIndexFromObj (interp, objv[2], tableNames, "notes|headers_in|headers_out|err_header_out|subprocess_env", 0, &tableindex) == TCL_ERROR) { return TCL_ERROR; } switch ((enum tablename)tableindex) { case TABLE_NOTES: { table = globals->r->notes; break; } case TABLE_HEADERS_IN: { table = globals->r->headers_in; break; } case TABLE_HEADERS_OUT: { table = globals->r->headers_out; break; } case TABLE_ERR_HEADERS_OUT: { table = globals->r->err_headers_out; break; } case TABLE_SUBPROCESS_ENV: { table = globals->r->subprocess_env; break; } } switch ((enum subcommand)subcommandindex) { case SUB_GET: { const char *key; const char *value; if (objc != 4) { Tcl_WrongNumArgs(interp, 2, objv, "tablename key"); return TCL_ERROR; } key = Tcl_GetString (objv[3]); value = apr_table_get (table, key); if (value != NULL) { Tcl_SetObjResult (interp, Tcl_NewStringObj (value, -1)); } break; } case SUB_EXISTS: { const char *key; const char *value; if (objc != 4) { Tcl_WrongNumArgs(interp, 2, objv, "tablename key"); return TCL_ERROR; } key = Tcl_GetString (objv[3]); value = apr_table_get (table, key); Tcl_SetObjResult (interp, Tcl_NewBooleanObj (value != NULL)); break; } case SUB_SET: { int i; char *key; char *value; if (objc == 4) { int listObjc; Tcl_Obj **listObjv; if (Tcl_ListObjGetElements (interp, objv[3], &listObjc, &listObjv) == TCL_ERROR) { return TCL_ERROR; } if (listObjc % 2 == 1) { Tcl_SetObjResult (interp, Tcl_NewStringObj ("list must have even number of elements", -1)); return TCL_ERROR; } for (i = 0; i < listObjc; i += 2) { apr_table_set (table, Tcl_GetString (listObjv[i]), Tcl_GetString (listObjv[i+1])); } break; } if (objc != 5) { Tcl_WrongNumArgs(interp, 2, objv, "tablename key value"); return TCL_ERROR; } key = Tcl_GetString (objv[3]); value = Tcl_GetString (objv[4]); apr_table_set (table, key, value); break; } case SUB_UNSET: { char *key; if (objc != 4) { Tcl_WrongNumArgs(interp, 2, objv, "tablename key"); return TCL_ERROR; } key = Tcl_GetString (objv[3]); apr_table_unset (table, key); break; } case SUB_NAMES: { Tcl_Obj *list = Tcl_NewObj (); apr_table_do(append_key_callback, (void*)list, table, NULL); Tcl_SetObjResult (interp, list); break; } case SUB_ARRAY_GET: { Tcl_Obj *list = Tcl_NewObj (); apr_table_do(append_key_value_callback, (void*)list, table, NULL); Tcl_SetObjResult (interp, list); break; } case SUB_CLEAR: { apr_table_clear (table); } } return TCL_OK; } /* *----------------------------------------------------------------------------- * * Rivet_Upload -- * * Deals with file uploads (multipart/form-data) like so: * * upload channel uploadname * upload save name uploadname * upload data uploadname * upload exists uploadname * upload size uploadname * upload type uploadname * upload filename uploadname * upload names * * Results: * A standard Tcl result. * * Side Effects: * Has the potential to create files on the file system, or work * with large amounts of data. * *----------------------------------------------------------------------------- */ TCL_CMD_HEADER( Rivet_Upload ) { char *varname = NULL; int subcommandindex; Tcl_Obj *result = NULL; static CONST84 char *SubCommand[] = { "channel", "save", "data", "exists", "size", "type", "filename", "tempname", "names", NULL }; enum subcommand { CHANNEL, SAVE, DATA, EXISTS, SIZE, TYPE, FILENAME, TEMPNAME, NAMES }; rivet_interp_globals *globals = Tcl_GetAssocData(interp, "rivet", NULL); CHECK_REQUEST_REC(globals->r,"::rivet::upload"); if (Tcl_GetIndexFromObj(interp, objv[1], SubCommand, "channel|save|data|exists|size|type|filename|names|tempname" "|tempname|names", 0, &subcommandindex) == TCL_ERROR) { return TCL_ERROR; } /* If it's any of these, we need to find a specific name. */ /* Excluded case is NAMES. */ if ((enum subcommand)subcommandindex == CHANNEL || (enum subcommand)subcommandindex == SAVE || (enum subcommand)subcommandindex == DATA || (enum subcommand)subcommandindex == EXISTS || (enum subcommand)subcommandindex == SIZE || (enum subcommand)subcommandindex == TYPE || (enum subcommand)subcommandindex == FILENAME || (enum subcommand)subcommandindex == TEMPNAME) { varname = Tcl_GetString(objv[2]); if ((enum subcommand)subcommandindex != EXISTS) { if (TclWeb_PrepareUpload(varname, globals->req) != TCL_OK) { Tcl_AddErrorInfo(interp, "Unable to find variable"); return TCL_ERROR; } } /* If it's not the 'save' command, then it has to have an objc of 3. */ if ((enum subcommand)subcommandindex != SAVE && objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "varname"); return TCL_ERROR; } } result = Tcl_NewObj(); switch ((enum subcommand)subcommandindex) { case CHANNEL: { Tcl_Channel chan; char *channelname = NULL; if (TclWeb_UploadChannel(varname, &chan, globals->req) != TCL_OK) { return TCL_ERROR; } channelname = (char *)Tcl_GetChannelName(chan); Tcl_SetStringObj(result, channelname, -1); break; } case SAVE: /* save data to a specified filename */ if (objc != 4) { Tcl_WrongNumArgs(interp, 2, objv, "uploadname filename"); return TCL_ERROR; } if (TclWeb_UploadSave(varname, objv[3], globals->req) != TCL_OK) { return TCL_ERROR; } break; case DATA: if (TclWeb_UploadData(varname, result, globals->req) != TCL_OK) { return TCL_ERROR; } break; case EXISTS: if (TclWeb_PrepareUpload(varname, globals->req) != TCL_OK) { Tcl_SetIntObj(result, 0); } else { Tcl_SetIntObj(result, 1); } break; case SIZE: TclWeb_UploadSize(result, globals->req); break; case TYPE: TclWeb_UploadType(result, globals->req); break; case FILENAME: TclWeb_UploadFilename(result, globals->req); break; case TEMPNAME: TclWeb_UploadTempname(result,globals->req); break; case NAMES: if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "names"); return TCL_ERROR; } TclWeb_UploadNames(result, globals->req); break; default: Tcl_WrongNumArgs(interp, 1, objv, "channel|save ?name?|data|exists|size|type|filename|names|tempname"); } Tcl_SetObjResult(interp, result); return TCL_OK; } /* *----------------------------------------------------------------------------- * * Rivet_RawPost -- * * Returns the raw POST data. * * Results: * The raw post data, or an empty string if there is none. * * Side Effects: * None. * *----------------------------------------------------------------------------- */ TCL_CMD_HEADER ( Rivet_RawPost ) { char *data; Tcl_Obj *retval; rivet_interp_globals *globals = Tcl_GetAssocData(interp, "rivet", NULL); CHECK_REQUEST_REC(globals->r,"::rivet::raw_post"); data = TclWeb_GetRawPost(globals->req); if (!data) { data = ""; } retval = Tcl_NewStringObj(data, -1); Tcl_SetObjResult(interp, retval); return TCL_OK; } /* *----------------------------------------------------------------------------- * * Rivet_NoBody -- * * Tcl command to erase body, so that only header is returned. * Necessary for 304 responses. * * Results: * A standard Tcl return value. * * Side Effects: * Eliminates any body returned in the HTTP response. * *----------------------------------------------------------------------------- */ TCL_CMD_HEADER( Rivet_NoBody ) { rivet_interp_globals *globals = Tcl_GetAssocData(interp, "rivet", NULL); CHECK_REQUEST_REC(globals->r,"::rivet::no_body"); if (globals->req->content_sent == 1) { Tcl_AddErrorInfo(interp, "Content already sent"); return TCL_ERROR; } globals->req->content_sent = 1; return TCL_OK; } /* *----------------------------------------------------------------------------- * * Rivet_AbortPageCmd -- * * Similar in purpose to PHP's "die" command, which halts all * further output to the user. Like an "exit" for web pages, but * without actually exiting the apache child. * * Results: * A standard Tcl result. * * Side Effects: * Flushes the standard (apache) output channel, and tells apache * to stop sending data. * *----------------------------------------------------------------------------- */ TCL_CMD_HEADER( Rivet_AbortPageCmd ) { rivet_interp_globals *globals = Tcl_GetAssocData( interp, "rivet", NULL ); static char *errorMessage = "Page generation terminated by abort_page directive"; if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, ""); return TCL_ERROR; } if (objc == 2) { char* cmd_arg = Tcl_GetStringFromObj(objv[1],NULL); if (strcmp(cmd_arg,"-aborting") == 0) { Tcl_SetObjResult (interp,Tcl_NewBooleanObj(globals->page_aborting)); return TCL_OK; } if (strcmp(cmd_arg,"-exiting") == 0) { Tcl_SetObjResult (interp,Tcl_NewBooleanObj(globals->exit_process)); return TCL_OK; } /* * we assume abort_code to be null, as abort_page shouldn't run twice while * processing the same request */ if (globals->abort_code == NULL) { globals->abort_code = objv[1]; Tcl_IncrRefCount(globals->abort_code); } } /* * If page_aborting is true then this is the second call to abort_page * processing the same request: we ignore it and return a normal * completion code */ if (globals->page_aborting) { return TCL_OK; } /* this is the first (and supposedly unique) abort_page call in a request */ globals->page_aborting = 1; Tcl_AddErrorInfo (interp, errorMessage); Tcl_SetErrorCode (interp, "RIVET", ABORTPAGE_CODE, errorMessage, (char *)NULL); return TCL_ERROR; } /* *----------------------------------------------------------------------------- * Rivet_AbortCodeCmd -- * * Returns the abort code stored internally by passing a user defined parameter * to the command 'abort_page'. * * *----------------------------------------------------------------------------- */ TCL_CMD_HEADER( Rivet_AbortCodeCmd ) { rivet_interp_globals *globals = Tcl_GetAssocData( interp, "rivet", NULL ); if (globals->abort_code != NULL) { Tcl_SetObjResult(interp,globals->abort_code); } return TCL_OK; } /* *----------------------------------------------------------------------------- * * Rivet_EnvCmd -- * * Loads a single environmental variable, to avoid the overhead * of storing all of them when only one is needed. * * Results: * A standard Tcl result. * * Side Effects: * None. * *----------------------------------------------------------------------------- */ TCL_CMD_HEADER( Rivet_EnvCmd ) { rivet_interp_globals *globals = Tcl_GetAssocData( interp, "rivet", NULL ); char *key; char *val; CHECK_REQUEST_REC(globals->r,"::rivet::env"); if( objc != 2 ) { Tcl_WrongNumArgs( interp, 1, objv, "variable" ); return TCL_ERROR; } key = Tcl_GetStringFromObj( objv[1], NULL ); val = TclWeb_GetEnvVar( globals->req, key ); Tcl_SetObjResult(interp, Tcl_NewStringObj( val, -1 ) ); return TCL_OK; } /* *----------------------------------------------------------------------------- * * Rivet_VirtualFilenameCmd -- * * Gets file according to its relationship with the request's * root. (FIXME - check this). * * Results: * A standard Tcl result. * * Side Effects: * None. * *----------------------------------------------------------------------------- */ TCL_CMD_HEADER( Rivet_VirtualFilenameCmd ) { rivet_interp_globals *globals = Tcl_GetAssocData( interp, "rivet", NULL ); char *filename; char *virtual; CHECK_REQUEST_REC(globals->r,"::rivet::virtual_filename"); if( objc != 2 ) { Tcl_WrongNumArgs( interp, 1, objv, "filename" ); return TCL_ERROR; } virtual = Tcl_GetStringFromObj( objv[1], NULL ); filename = TclWeb_GetVirtualFile( globals->req, virtual ); Tcl_SetObjResult(interp, Tcl_NewStringObj( filename, -1 ) ); return TCL_OK; } /* *----------------------------------------------------------------------------- * * Rivet_Inspect -- * * Rivet configuration introspection. Command '::rivet::inspect' * returns a dictionary of configuration data: * * Results: * A dictionary or parameter value * *----------------------------------------------------------------------------- */ TCL_CMD_HEADER( Rivet_InspectCmd ) { rivet_interp_globals* globals = Tcl_GetAssocData( interp, "rivet", NULL ); rivet_server_conf* rsc; int status = TCL_OK; if (objc == 2) { Tcl_Obj* par_name = objv[1]; if (STRNEQU(Tcl_GetStringFromObj(par_name,NULL),"script")) { if (globals->r == NULL) { Tcl_Obj* cmd = Tcl_NewStringObj("return [info script]",-1); Tcl_IncrRefCount(cmd); status = Tcl_EvalObjEx(interp,cmd,TCL_EVAL_DIRECT); Tcl_DecrRefCount(cmd); } else { Tcl_SetObjResult(interp,Tcl_NewStringObj(globals->r->filename,-1)); } return TCL_OK; } } if (objc == 1) { Tcl_Obj* dictObj; CHECK_REQUEST_REC(globals->r,"::rivet::inspect"); rsc = Rivet_GetConf(globals->r); dictObj = Rivet_BuildConfDictionary(interp,rsc); if (dictObj != NULL) { Tcl_IncrRefCount(dictObj); Tcl_SetObjResult(interp,dictObj); Tcl_DecrRefCount(dictObj); } else { status = TCL_ERROR; } } else if (objc == 2) { Tcl_Obj* par_name = objv[1]; char* cmd_arg = Tcl_GetStringFromObj(par_name,NULL); Tcl_IncrRefCount(par_name); if (STRNEQU(cmd_arg,"-all")) { Tcl_Obj* dictObj; CHECK_REQUEST_REC(globals->r,"::rivet::inspect -all"); rsc = Rivet_GetConf(globals->r); dictObj = Rivet_CurrentConfDict(interp,rsc); Tcl_IncrRefCount(dictObj); Tcl_SetObjResult(interp,dictObj); Tcl_DecrRefCount(dictObj); } else if (STRNEQU(cmd_arg,"server")) { /* we read data from the server_rec */ Tcl_Obj* dictObj; dictObj = Rivet_CurrentServerRec(interp,globals->srec); Tcl_IncrRefCount(dictObj); Tcl_SetObjResult(interp,dictObj); Tcl_DecrRefCount(dictObj); } else { Tcl_Obj* par_value = NULL; CHECK_REQUEST_REC(globals->r,"::rivet::inspect"); rsc = Rivet_GetConf(globals->r); par_value = Rivet_ReadConfParameter(interp,rsc,par_name); if (par_value == NULL) { Tcl_Obj* errorinfo = Tcl_NewStringObj("mod_rivet internal error invalid argument: ",-1); Tcl_IncrRefCount(errorinfo); Tcl_AppendObjToObj(errorinfo,par_name); Tcl_AppendObjToErrorInfo(interp,errorinfo); Tcl_DecrRefCount(errorinfo); status = TCL_ERROR; } else { Tcl_IncrRefCount(par_value); Tcl_SetObjResult(interp,par_value); Tcl_DecrRefCount(par_value); } } Tcl_DecrRefCount(par_name); } else { Tcl_WrongNumArgs( interp, 1, objv, "?server | dir | user? ?parameter name?" ); status = TCL_ERROR; } return status; } /* *----------------------------------------------------------------------------- * * Rivet_LogError -- * * Log an error from Rivet * * log_error priority message * * priority can be one of "emerg", "alert", "crit", "err", * "warning", "notice", "info", "debug" * * Results: * A message is logged to the Apache error log. * *----------------------------------------------------------------------------- */ TCL_CMD_HEADER( Rivet_LogErrorCmd ) { char *message = NULL; server_rec *serverRec; int loglevelindex; int apLogLevel = 0; static CONST84 char *logLevel[] = { "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug", NULL }; enum loglevel { EMERG, ALERT, CRIT, ERR, WARNING, NOTICE, INFO, DEBUG }; rivet_interp_globals *globals = Tcl_GetAssocData(interp, "rivet", NULL); if( objc != 3 ) { Tcl_WrongNumArgs( interp, 1, objv, "loglevel message" ); return TCL_ERROR; } message = Tcl_GetString (objv[2]); if (Tcl_GetIndexFromObj(interp, objv[1], logLevel, "emerg|alert|crit|err|warning|notice|info|debug", 0, &loglevelindex) == TCL_ERROR) { return TCL_ERROR; } switch ((enum loglevel)loglevelindex) { case EMERG: apLogLevel = APLOG_EMERG; break; case ALERT: apLogLevel = APLOG_ALERT; break; case CRIT: apLogLevel = APLOG_CRIT; break; case ERR: apLogLevel = APLOG_ERR; break; case WARNING: apLogLevel = APLOG_WARNING; break; case NOTICE: apLogLevel = APLOG_NOTICE; break; case INFO: apLogLevel = APLOG_INFO; break; case DEBUG: apLogLevel = APLOG_DEBUG; break; } /* if we are serving a page, we know our server, * else send null for server */ serverRec = (globals->r == NULL) ? NULL : globals->r->server; ap_log_error (APLOG_MARK, apLogLevel, 0, serverRec, "%s", message); return TCL_OK; } /* *----------------------------------------------------------------------------- * * Rivet_ExitCmd -- * * The exit_process flag is set and the procedure is interrupted * setting the abort_page flag to let this condition be handled * by an AbortScript before the child process exits * * Result: * * TCL_ERROR * * Side Effects: * * - non threaded MPMs: the child process exits for good * - threaded MPMs: the logical variable controlling a bridge thread * is set to zero and the request processing is interrupted * *----------------------------------------------------------------------------- */ TCL_CMD_HEADER( Rivet_ExitCmd ) { static char *errorMessage = "Page generation terminated by ::rivet::exit"; int value; rivet_interp_globals* globals = Tcl_GetAssocData( interp, "rivet", NULL ); if ((objc != 1) && (objc != 2)) { Tcl_WrongNumArgs(interp, 1, objv, "?returnCode?"); return TCL_ERROR; } if (objc == 1) { value = 0; } else if (Tcl_GetIntFromObj(interp, objv[1], &value) != TCL_OK) { return TCL_ERROR; } globals->page_aborting = 1; globals->abort_code = Tcl_NewDictObj(); /* The private->abort_code ref count is decremented before * request processing terminates*/ Tcl_IncrRefCount(globals->abort_code); /* * mod_rivet traps call to exit and offers a chance to handle them * in the way we handle ::rivet::abort_page calls */ Tcl_DictObjPut(interp,globals->abort_code, Tcl_NewStringObj("error_code",-1), Tcl_NewStringObj("exit",-1)); Tcl_DictObjPut(interp,globals->abort_code, Tcl_NewStringObj("return_code",-1), Tcl_NewIntObj(value)); globals->exit_process = 1; globals->exit_status = value; Tcl_AddErrorInfo (interp, errorMessage); Tcl_SetErrorCode (interp, "RIVET", EXITPAGE_CODE, errorMessage, (char *)NULL); return TCL_ERROR; } #define TESTPANIC 0 #ifdef TESTPANIC /* *---------------------------------------------------------------------- * * TestpanicCmd -- * * Calls the panic routine. * * Results: * Always returns TCL_OK. * * Side effects: * May exit application. * *---------------------------------------------------------------------- */ static int TestpanicCmd(dummy, interp, argc, argv) ClientData dummy; /* Not used. */ Tcl_Interp *interp; /* Current interpreter. */ int argc; /* Number of arguments. */ CONST char **argv; /* Argument strings. */ { CONST char *argString; /* * Put the arguments into a var args structure * Append all of the arguments together separated by spaces */ argString = Tcl_Merge(argc-1, argv+1); panic("%s",argString); ckfree((char *)argString); return TCL_OK; } #endif /* TESTPANIC */ /* *----------------------------------------------------------------------------- * * Rivet_InitCore -- * * Creates the core rivet commands. * * Results: * A standard Tcl result. * * Side Effects: * Creates new commands. * *----------------------------------------------------------------------------- */ int Rivet_InitCore( Tcl_Interp *interp ) { RIVET_OBJ_CMD ("makeurl",Rivet_MakeURL); RIVET_OBJ_CMD ("headers",Rivet_Headers); RIVET_OBJ_CMD ("load_env",Rivet_LoadEnv); RIVET_OBJ_CMD ("load_headers",Rivet_LoadHeaders); RIVET_OBJ_CMD ("var",Rivet_Var); RIVET_OBJ_CMD ("abort_page",Rivet_AbortPageCmd); RIVET_OBJ_CMD ("abort_code", Rivet_AbortCodeCmd); RIVET_OBJ_CMD ("virtual_filename",Rivet_VirtualFilenameCmd); RIVET_OBJ_CMD ("apache_table",Rivet_ApacheTable); RIVET_OBJ_CMD ("var_qs",Rivet_Var); RIVET_OBJ_CMD ("var_post",Rivet_Var); RIVET_OBJ_CMD ("raw_post",Rivet_RawPost); RIVET_OBJ_CMD ("upload",Rivet_Upload); RIVET_OBJ_CMD ("include",Rivet_Include); RIVET_OBJ_CMD ("parse",Rivet_Parse); RIVET_OBJ_CMD ("no_body",Rivet_NoBody); RIVET_OBJ_CMD ("env",Rivet_EnvCmd); RIVET_OBJ_CMD ("apache_log_error",Rivet_LogErrorCmd); RIVET_OBJ_CMD ("inspect",Rivet_InspectCmd); RIVET_OBJ_CMD ("exit",Rivet_ExitCmd); #ifdef TESTPANIC RIVET_OBJ_CMD ("testpanic",TestpanicCmd); #endif #if RIVET_NAMESPACE_EXPORT == 1 { rivet_interp_globals *globals = NULL; Tcl_Namespace* rivet_ns; globals = Tcl_GetAssocData(interp, "rivet", NULL); rivet_ns = globals->rivet_ns; RIVET_EXPORT_CMD(interp,rivet_ns,"makeurl"); RIVET_EXPORT_CMD(interp,rivet_ns,"headers"); RIVET_EXPORT_CMD(interp,rivet_ns,"load_env"); RIVET_EXPORT_CMD(interp,rivet_ns,"load_headers"); RIVET_EXPORT_CMD(interp,rivet_ns,"var"); RIVET_EXPORT_CMD(interp,rivet_ns,"abort_page"); RIVET_EXPORT_CMD(interp,rivet_ns,"abort_code"); RIVET_EXPORT_CMD(interp,rivet_ns,"virtual_filename"); RIVET_EXPORT_CMD(interp,rivet_ns,"apache_table"); RIVET_EXPORT_CMD(interp,rivet_ns,"var_qs"); RIVET_EXPORT_CMD(interp,rivet_ns,"var_post"); RIVET_EXPORT_CMD(interp,rivet_ns,"raw_post"); RIVET_EXPORT_CMD(interp,rivet_ns,"upload"); RIVET_EXPORT_CMD(interp,rivet_ns,"include"); RIVET_EXPORT_CMD(interp,rivet_ns,"parse"); RIVET_EXPORT_CMD(interp,rivet_ns,"no_body"); RIVET_EXPORT_CMD(interp,rivet_ns,"env"); RIVET_EXPORT_CMD(interp,rivet_ns,"apache_log_error"); RIVET_EXPORT_CMD(interp,rivet_ns,"inspect"); } // ::rivet::exit is not exported #endif return TCL_OK; } rivet-2.3.5/doc/html/abort_code.html000644 001750 001750 00000005521 13200160527 017015 0ustar00mxmmxm000000 000000 abort_code

    Name

    abort_code — Returns the code passed to abort_page earlier during the request processing

    Synopsis

    ::rivet::abort_code

    Description

    Usage of this command is meaningful only in a script set as AbortScript or AfterEveryScript. abort_code returns the value of the optional parameter passed to abort_page earlier in the same request processing.

    rivet-2.3.5/tests/include.rvt000644 001750 001750 00000000317 11670231317 015642 0ustar00mxmmxm000000 000000 Include Test

    Include Test

    rivet-2.3.5/doc/html/upgrading.html000644 001750 001750 00000010070 13200160530 016661 0ustar00mxmmxm000000 000000 Upgrading from mod_dtcl or NeoWebScript

    Upgrading from mod_dtcl or NeoWebScript

    Rivet is a break from the past, in that we, the authors, have attempted to take what we like best about our past efforts, and leave out or change things we no longer care for. Backwards compatibility was not a primary goal when creating Rivet, but we do provide this information which may be of use to those wishing to upgrade from mod_dtcl or NWS installations.

    mod_dtcl

    Rivet was originally based on the dtcl code, but it has changed (improved!) quite a bit. The concepts remain the same, but many of the commands have changed.

    NeoWebScript

    NWS was a server-side scripting environment based on the Apache HTTP server and Safe-Tcl and it's not maintained anymore.

    The biggest difference between Rivet and Neowebscript is that Neowebscript was designed for shared hosting while Rivet is more oriented toward a site that owns all of its content. In the words of Karl Lehenbauer, NWS author and Rivet Team member:

    Rivet, however, is considerably more efficient, powerful, and evolved, though it still can support multiple independent sites on a single machine through its separate virtual interpreters mechanism.

    • By powerful, the difference is that the full power of Tcl is available to webpage authors, not the restricted version that NWS provides. For instance, you can read or write any file in the system that you have permission to, require any package, open sockets and pipes, etc.
    • By efficient, the difference is that Tcl interpreters survive past the generation of a webpage and are reused again and again, reducing the overhead of generating a page.
    • By evolved, all of our efforts have gone toward Rivet for many years and so, you know, Rivet does more out of the box than Neowebscript did.

    rivet-2.3.5/doc/html/exit.html000644 001750 001750 00000012663 13200160527 015672 0ustar00mxmmxm000000 000000 exit

    Name

    exit — terminate execution and child process

    Synopsis

    ::rivet::exit ?code?

    Description

    Replaces Tcl's exit core command. ::rivet::exit interrupts execution of the current script and passes execution to AbortScript if such script is set. After AbortScript has finished and request processing completed the child process is forced to exit by calling Tcl_Exit producing the same final effect of the core command. During an AbortScript execution the exit condition can be detected

    if {[::rivet::abort_page -exiting]} {
    ...handle exit condition
    }

    ::rivet::exit has a single optional argument ?code?. This value must be a positive integer number to be passed to Tcl_Exit. If any other value is given ?code? is set to 0. The exit code can be obtained from the dictionary returned by ::rivet::abort_code

    [::rivet::abort_code]
    <== return_code  ?code? error_code exit

    We support this command in order to have a gentle way to terminate a request processing before actually exit the child process and avoid an abrupt interruption of a request that might leave an application in a inconsistent state. In some cases ::rivet::exit could be the only way to exit a process and force the Apache HTTP web server to start a fresh one. Moreover the core exit could be called from third parties software and you may not be aware of it. We thus decided to trap this command and give it the most gentle behavior still preserving the its basic purpose.

    [Note]Note
    Nonetheless we discourage the programmer to use such command, and suggest to focus on proper application design and avoid such a drastic way to bail out. If you need to restart the child processes from time to time we recommend to check the MaxRequests parameter in the prefork MPM documentation
    rivet-2.3.5/tclconfig/ltmain.sh000644 001750 001750 00001171464 12703264555 016135 0ustar00mxmmxm000000 000000 #! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 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 this program. If not, see . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.6 Debian-2.4.6-0.1" package_revision=2.4.6 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 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. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES 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 . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! 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 # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! 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 ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # 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. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_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 '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. 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. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # 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. progname=`$ECHO "$progpath" |$SED "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # 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" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_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 "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || 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_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # 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 () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_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. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # 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). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet 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 () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet 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 () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # Set a version string for this script. scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 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. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # to the main code. A hook is just a named list of of function, that can # be run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do eval $_G_hook '"$@"' # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift done func_quote_for_eval ${1+"$@"} func_run_hooks_result=$func_quote_for_eval_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, remove any # options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # ;; # *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # # func_quote_for_eval ${1+"$@"} # my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # # You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd func_options_prep ${1+"$@"} eval func_parse_options \ ${func_options_prep_result+"$func_options_prep_result"} eval func_validate_options \ ${func_parse_options_result+"$func_parse_options_result"} eval func_run_hooks func_options \ ${func_validate_options_result+"$func_validate_options_result"} # save modified positional parameters for caller func_options_result=$func_run_hooks_result } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before # returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} # Adjust func_parse_options positional parameters to match eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables after # splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --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 --no-warnings equivalent to '-Wnone' --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 more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$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. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname (GNU libtool) 2.4.6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= # 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 # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 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 $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # 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 | func_generated_by_libtool_p } # 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 yes = "$lalib_p" } # 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 () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs 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 () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # Get the compilation command and the source file. base_compile= srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg=$arg arg_mode=normal ;; target ) libobj=$arg arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg=$srcfile srcfile=$arg ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; 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 no = "$pic_mode" && test pass_all != "$deplibs_check_method"; 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 no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test yes = "$need_locks"; 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 warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && 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 yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && 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 no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix '.c' with the library object suffix, '.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the '--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE use a list of object files found in FILE to specify objects -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with '-') are ignored. Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in '.la', then a libtool library is created, only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created using 'ar' and 'ranlib', or on Windows using 'lib'. If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # 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 else 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 fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; 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=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_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 install = "$opt_mode" && 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 () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; 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) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi 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" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd 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` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result 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 "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined HAVE_DOS_BASED_FILE_SYSTEM if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined HAVE_DOS_BASED_FILE_SYSTEM } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = (size_t) (q - p); p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t 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) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd 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 # what 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 that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false 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 yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg=$1 shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; 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 none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; 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 none = "$pic_object"; 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 ;; os2dllname) os2dllname=$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 rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg=$arg case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -specs=*|-fsanitize=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; 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 none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false 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 lib,link = "$linkmode,$pass"; 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 lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; 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 .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # 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 yes = "$allow_libtool_libs_with_static_runtimes"; 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=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; 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=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else 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." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir=$ladir absdir=$abs_ladir # Remove this search path later func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; 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 prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. case $temp_rpath: in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && 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 built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; 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 lib = "$linkmode" && test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc* | *os2*) 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 prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; 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 cannot # 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 no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; 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 yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib"; then add=$inst_prefix_dir$libdir/$linklib else add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; 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 prog = "$linkmode"; 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 unsupported != "$hardcode_direct"; 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 yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; 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 cannot 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 yes = "$module"; 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 no = "$build_old_libs"; 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 lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i= ;; esac if test -n "$i"; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; 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 pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; 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 # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type '$version_type'" ;; esac ;; no) current=$1 revision=$2 age=$3 ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; 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 0 -ne "$loop"; 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) # correct to gnu/linux during the next big refactor 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 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. 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 no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; 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 -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release= versuffix= major= newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib= ;; esac fi if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; 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 no = "$build_old_libs"; 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 no = "$allow_undefined"; 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 no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append 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 "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath=$finalize_shlibpath test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname=$realname fi if test -z "$dlname"; then dlname=$soname fi lib=$output_objdir/$realname linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # 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 ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS=$save_ifs if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; 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 yes = "$module" && 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 : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || 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 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { 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 } 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_quiet || { 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 relink = "$opt_mode"; 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 ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } 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 yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { 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 relink = "$opt_mode"; 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 relink = "$opt_mode"; 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 yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; 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= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs 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 test yes = "$build_libtool_libs" || { 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 } if test -n "$pic_flag" || test default != "$pic_mode"; 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" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath=$rpath rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath=$rpath if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; then # We don't need to create a wrapper script. link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # 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" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource=$output_path/$objdir/lt-$output_name.c cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; 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 yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; 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 func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $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 cannot 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 no,yes = "$installed,$need_relink"; 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 } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic for arg do case $arg in -f) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || 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 none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where 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: rivet-2.3.5/tests/channel.rvt000644 001750 001750 00000000237 11670231317 015630 0ustar00mxmmxm000000 000000 HTML MORE HTML LAST HTML rivet-2.3.5/tests/config.rvt000644 001750 001750 00000000220 11670231317 015455 0ustar00mxmmxm000000 000000 rivet-2.3.5/rivet/packages/entities/entities.tcl000644 001750 001750 00000015375 11754303145 021417 0ustar00mxmmxm000000 000000 # -- package RivetEntities # # The code is largely taken from a simple yet clever encoder/decoder of HTML entities # starting from a utf-8 character string. The original code writted by Andy Goth is # at http://wiki.tcl.tk/26403. Package entities extends the functionality in the # original code combining it with Tcl's 'encoding' command to encode/decode from # any supported encoding # # $Id: entities.tcl 1338460 2012-05-14 22:25:41Z mxmanghi $ package provide RivetEntities 1.0 namespace eval ::rivet { # namespace ensemble create -subcommands {encode decode} namespace export encode decode variable utf8_entities_map { \u00a0  \; \u00a1 ¡\; \u00a2 ¢\; \u00a3 £\; \u00a4 ¤\; \u00a5 ¥\; \u00a6 ¦\; \u00a7 §\; \u00a8 ¨\; \u00a9 ©\; \u00aa ª\; \u00ab «\; \u00ac ¬\; \u00ad ­\; \u00ae ®\; \u00af ¯\; \u00b0 °\; \u00b1 ±\; \u00b2 ²\; \u00b3 ³\; \u00b4 ´\; \u00b5 µ\; \u00b6 ¶\; \u00b7 ·\; \u00b8 ¸\; \u00b9 ¹\; \u00ba º\; \u00bb »\; \u00bc ¼\; \u00bd ½\; \u00be ¾\; \u00bf ¿\; \u00c0 À\; \u00c1 Á\; \u00c2 Â\; \u00c3 Ã\; \u00c4 Ä\; \u00c5 Å\; \u00c6 Æ\; \u00c7 Ç\; \u00c8 È\; \u00c9 É\; \u00ca Ê\; \u00cb Ë\; \u00cc Ì\; \u00cd Í\; \u00ce Î\; \u00cf Ï\; \u00d0 Ð\; \u00d1 Ñ\; \u00d2 Ò\; \u00d3 Ó\; \u00d4 Ô\; \u00d5 Õ\; \u00d6 Ö\; \u00d7 ×\; \u00d8 Ø\; \u00d9 Ù\; \u00da Ú\; \u00db Û\; \u00dc Ü\; \u00dd Ý\; \u00de Þ\; \u00df ß\; \u00e0 à\; \u00e1 á\; \u00e2 â\; \u00e3 ã\; \u00e4 ä\; \u00e5 å\; \u00e6 æ\; \u00e7 ç\; \u00e8 è\; \u00e9 é\; \u00ea ê\; \u00eb ë\; \u00ec ì\; \u00ed í\; \u00ee î\; \u00ef ï\; \u00f0 ð\; \u00f1 ñ\; \u00f2 ò\; \u00f3 ó\; \u00f4 ô\; \u00f5 õ\; \u00f6 ö\; \u00f7 ÷\; \u00f8 ø\; \u00f9 ù\; \u00fa ú\; \u00fb û\; \u00fc ü\; \u00fd ý\; \u00fe þ\; \u00ff ÿ\; \u0192 &fnof\; \u0391 &Alpha\; \u0392 &Beta\; \u0393 &Gamma\; \u0394 &Delta\; \u0395 &Epsilon\; \u0396 &Zeta\; \u0397 &Eta\; \u0398 &Theta\; \u0399 &Iota\; \u039a &Kappa\; \u039b &Lambda\; \u039c &Mu\; \u039d &Nu\; \u039e &Xi\; \u039f &Omicron\; \u03a0 &Pi\; \u03a1 &Rho\; \u03a3 &Sigma\; \u03a4 &Tau\; \u03a5 &Upsilon\; \u03a6 &Phi\; \u03a7 &Chi\; \u03a8 &Psi\; \u03a9 &Omega\; \u03b1 &alpha\; \u03b2 &beta\; \u03b3 &gamma\; \u03b4 &delta\; \u03b5 &epsilon\; \u03b6 &zeta\; \u03b7 &eta\; \u03b8 &theta\; \u03b9 &iota\; \u03ba &kappa\; \u03bb &lambda\; \u03bc &mu\; \u03bd &nu\; \u03be &xi\; \u03bf &omicron\; \u03c0 &pi\; \u03c1 &rho\; \u03c2 &sigmaf\; \u03c3 &sigma\; \u03c4 &tau\; \u03c5 &upsilon\; \u03c6 &phi\; \u03c7 &chi\; \u03c8 &psi\; \u03c9 &omega\; \u03d1 &thetasym\; \u03d2 &upsih\; \u03d6 &piv\; \u2022 &bull\; \u2026 &hellip\; \u2032 &prime\; \u2033 &Prime\; \u203e &oline\; \u2044 &frasl\; \u2118 &weierp\; \u2111 &image\; \u211c &real\; \u2122 &trade\; \u2135 &alefsym\; \u2190 &larr\; \u2191 &uarr\; \u2192 &rarr\; \u2193 &darr\; \u2194 &harr\; \u21b5 &crarr\; \u21d0 &lArr\; \u21d1 &uArr\; \u21d2 &rArr\; \u21d3 &dArr\; \u21d4 &hArr\; \u2200 &forall\; \u2202 &part\; \u2203 &exist\; \u2205 &empty\; \u2207 &nabla\; \u2208 &isin\; \u2209 ¬in\; \u220b &ni\; \u220f &prod\; \u2211 &sum\; \u2212 &minus\; \u2217 &lowast\; \u221a &radic\; \u221d &prop\; \u221e &infin\; \u2220 &ang\; \u2227 &and\; \u2228 &or\; \u2229 &cap\; \u222a &cup\; \u222b &int\; \u2234 &there4\; \u223c &sim\; \u2245 &cong\; \u2248 &asymp\; \u2260 &ne\; \u2261 &equiv\; \u2264 &le\; \u2265 &ge\; \u2282 &sub\; \u2283 &sup\; \u2284 &nsub\; \u2286 &sube\; \u2287 &supe\; \u2295 &oplus\; \u2297 &otimes\; \u22a5 &perp\; \u22c5 &sdot\; \u2308 &lceil\; \u2309 &rceil\; \u230a &lfloor\; \u230b &rfloor\; \u2329 &lang\; \u232a &rang\; \u25ca &loz\; \u2660 &spades\; \u2663 &clubs\; \u2665 &hearts\; \u2666 &diams\; \u0022 "\; \u0026 &\; \u003c <\; \u003e >\; \u0152 &OElig\; \u0153 &oelig\; \u0160 &Scaron\; \u0161 &scaron\; \u0178 &Yuml\; \u02c6 &circ\; \u02dc &tilde\; \u2002 &ensp\; \u2003 &emsp\; \u2009 &thinsp\; \u200c &zwnj\; \u200d &zwj\; \u200e &lrm\; \u200f &rlm\; \u2013 &ndash\; \u2014 &mdash\; \u2018 &lsquo\; \u2019 &rsquo\; \u201a &sbquo\; \u201c &ldquo\; \u201d &rdquo\; \u201e &bdquo\; \u2020 &dagger\; \u2021 &Dagger\; \u2030 &permil\; \u2039 &lsaquo\; \u203a &rsaquo\; \u20ac &euro\; } variable entitities_utf8_map [lreverse $utf8_entities_map] proc args_processing {string mode arglist} { if { [dict exists $arglist -encoding] && [dict get $arglist -encoding] ne "utf-8" } { return [encoding $mode [dict get $arglist -encoding] $string] } else { return $string } } # -- encode # # input string is processed and its characters suitable to be transformed # into entities are replaced with their corrisponding HTML (SGML?) entity # # if the input string encoding is diffrent from utf-8 the string is # transformed into utf-8 and then processed for entity substitution # # ::rivet::encode ?-encoding ? # # Arguments: # # * : string whose characted must go through HTML # entities expansion # * : input string character encoding (utf-8 when omitted) # # Returned value: # # - expanded string # # proc encode {string args} { variable utf8_entities_map return [string map $utf8_entities_map\ [args_processing $string convertfrom $args]] } # -- decode # # input string is converted into utf-8 and in case the final string # has to be in some other encoding Tcl's command 'enconding' is # invoked for final conversion # # ::rivet::decode ?-encoding ? # # Arguments: # # * : string whose HTML entities have to be reconverted # in characters # * : output string character encoding (utf-8 when omitted) # # Returned value: # # - converted string # proc decode {string args} { variable entitities_utf8_map return [args_processing [string map $entitities_utf8_map $string]\ convertto $args] } } rivet-2.3.5/doc/html/images/toc-plus.png000644 001750 001750 00000000410 13200160527 017537 0ustar00mxmmxm000000 000000 PNG  IHDR )bKGD#2#IDATxch`#@C"ԣj?RJld:4CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com!*tEXtSignatureab17802e1ddae3211b1ce6bc3b08aec7{( tEXtPage15x9+0+07vIENDB`rivet-2.3.5/rivet/packages/tclrivet/README000644 001750 001750 00000000254 10010744013 017730 0ustar00mxmmxm000000 000000 This package provides "Rivet" for tclsh. In other words, for Tcl scripts not executed inside Apache. tclrivetparser.tcl $Id: README 265369 2004-02-06 16:59:55Z davidw $rivet-2.3.5/src/librivet/000755 001750 001750 00000000000 13200157764 014732 5ustar00mxmmxm000000 000000 rivet-2.3.5/doc/xml/commands.xml000644 001750 001750 00000205217 13013421030 016200 0ustar00mxmmxm000000 000000
    Rivet Tcl Commands and Variables
    Starting with version 2.1.0 Rivet command set moved into the ::rivet namespace. In order to preserve out of the box compatibility with existing scripts, Rivet exports commands by default and makes them available for import into any namespace (global namespace included). Rivet's build system can be told not to export the command set by passing the switch --disable-rivet-commands-export to 'configure'. In the future we may change this option's default. Commands must be imported into another namespace with the command: namespace import -force ::rivet::* Whenever a new application is being developed and compatibility issues can be confined within specific files, it is recommended that commands be specified with their fully qualified names.
    <?= ... ?> Shorthand construct for single strings output <?= $string ?> Description This construct is a simplified form to print a single string wherever needed in a .rvt template. The contruct is equivalent to writing the following line of Tcl code puts -nonewline $string The string argument to the shorthand construct can be any Tcl command returning a value See Hello World or Variable Access abort_code Returns the code passed to abort_page earlier during the request processing ::rivet::abort_code Description Usage of this command is meaningful only in a script set as AbortScript or AfterEveryScript. abort_code returns the value of the optional parameter passed to abort_page earlier in the same request processing. abort_page Stops outputting data to web page, similar in purpose to PHP's die command. ::rivet::abort_page abort code -aborting Description This command flushes the output buffer and stops the Tcl script from sending any more data to the client. A normal Tcl script might use the exit command, but that cannot be used in Rivet without actually exiting the apache child process! abort_page triggers the execution of an optional AbortScript that has to be specified in the configuration. The value of the argument abort code can be retrieved with the abort_code command during the execution of AbortScript or AfterEveryScript, allowing the script to take appropriate actions in order to deal with the cause of the abort. The argument causes to return 1 when the current execution is the outcome of an abort condition. In other words this query is meaningful in code specified as AfterEveryScript to understand if an abort condition took place beforehand. apache_log_error log messages to the Apache error log ::rivet::apache_log_error priority message Description The apache_log_error command logs a message to the Apache error log, whose name and location have been set by the directive. Priority must be one of , , , , , , , or . apache_table access and manipulate Apache tables in the request structure. ::rivet::apache_table get set exists unset names array_get clear Description The apache_table command is for accessing and manipulating Apache tables in the request structure. The table name must be one of , , , , or . ::rivet::apache_table get tablename key When given the name of an Apache table and the name of a key , returns the value of the key in the table, or an empty string. ::rivet::apache_table set tablename key value ::rivet::apache_table set tablename list Stores the in the table under the key . For the list form, contains a list of zero or more pairs of key-value pairs to be set into the table . ::rivet::apache_table exists tablename key Returns 1 if the specified key, , exists in table , else 0. ::rivet::apache_table unset tablename key Removes the key-value pair referenced by from the table . ::rivet::apache_table names tablename Returns a list of all of the keys present in the table . ::rivet::apache_table array_get tablename Returns a list of key-value pairs from the table . ::rivet::apache_table clear tablename Clears the contents of the specified table. catch wraps core command catch and handles in a special way fake error conditions resulting from calls to exit and abort_page ::rivet::catch script error_code_var_name options_var_name Description ::rivet::catch wraps the core language's same command adding some extra error handling needed by mod_rivet design. The rationale for Rivet to have its own ::rivet::catch reads as follows: within mod_rivet a script execution can be interrupted by either calling ::rivet::exit(deprecated) or ::rivet::abort_page. These commands implement a simple internal exception mechanism by returning a special error code so that execution is in turn handed down to the AbortScript and eventually to AfterEveryScript (if any of them is defined). Any code calling one of these commands which runs under control of the ::catch command would need to do this chore itself, checking the error info and in case throw the error again if it had been originated by one of mod_rivet's exceptions calls. This is what ::rivet::catch does hiding the implementation details to provide a better and more compatibile way to handle this condition. This command is not meant to replace the core command, thus it's not exported from the ::rivet namespace and therefore has to be fully qualified. clock_to_rfc850_gmt create a rfc850 time from [clock seconds]. ::rivet::clock_to_rfc850_gmt seconds Description Convert an integer-seconds-since-1970 click value to RFC850 format, with the additional requirement that it be GMT only. cookie get, set and delete cookies. ::rivet::cookie set cookieName cookiValue -days expireInDays -hours expireInHours -minutes expireInMinutes -expires Wdy, DD-Mon-YYYY HH:MM:SS GMT -path uriPathCookieAppliesTo -secure 1/0 -HttpOnly 1/0 ::rivet::cookie get cookieName ::rivet::cookie delete cookieName ::rivet::cookie unset cookieName Description cookie gets, sets, unsets or deletes a cookie. When you get a cookie, the command returns the value of the cookie, or an empty string if no cookie exists. cookie delete will set the timeout value to -1 minutes - deleting the cookie in the browser. cookie unset will remove the defined cookie in the server (perhaps preparatory to checking/resetting the cookie). The command has a number of switches setting a cookie attributes debug A command to print strings, arrays and the values of variables as specified by the arguments. ::rivet::debug -subst<on|off> -separator<string> -option<value> -option<value> ... Description A command to make debugging more convenient print strings, arrays and the values of variables as specified by the arguments. Also allows the setting of an array called debug which will pick up options for all debug commands. env Loads a single "environmental variable" into a Tcl variable. ::rivet::env varName Description If it is only necessary to load one environmental variable, this command may be used to avoid the overhead of loading and storing the entire array. escape_sgml_chars escape special SGML characters in a string. ::rivet::escape_sgml_chars string Description Scans through each character in the specified string looking for any special (with respect to SGML, and hence HTML) characters from the specified string, and returns the result. For example, the right angle bracket is escaped to the corrected ampersand gt symbol. escape_shell_command escape shell metacharacters in a string. ::rivet::escape_shell_command string Description Scans through each character in the specified string looking for any shell metacharacters, such as asterisk, less than and greater than, parens, square brackets, curly brackets, angle brackets, dollar signs, backslashes, semicolons, ampersands, vertical bars, etc. For each metacharacter found, it is quoted in the result by prepending it with a backslash, returning the result. escape_string convert a string into escaped characters. ::rivet::escape_string string Description Scans through each character in the specified string looking for special characters, escaping them as needed, mapping special characters to a quoted hexadecimal equivalent, returning the result. This is useful for quoting strings that are going to be part of a URL. exit terminate execution and child process ::rivet::exit code Description Replaces Tcl's exit core command. ::rivet::exit interrupts execution of the current script and passes execution to AbortScript if such script is set. After AbortScript has finished and request processing completed the child process is forced to exit by calling Tcl_Exit producing the same final effect of the core command. During an AbortScript execution the exit condition can be detected if {[::rivet::abort_page -exiting]} { ...handle exit condition } ::rivet::exit has a single optional argument code. This value must be a positive integer number to be passed to Tcl_Exit. If any other value is given code is set to 0. The exit code can be obtained from the dictionary returned by ::rivet::abort_code [::rivet::abort_code] <== return_code code error_code exit We support this command in order to have a gentle way to terminate a request processing before actually exit the child process and avoid an abrupt interruption of a request that might leave an application in a inconsistent state. In some cases ::rivet::exit could be the only way to exit a process and force the Apache HTTP web server to start a fresh one. Moreover the core exit could be called from third parties software and you may not be aware of it. We thus decided to trap this command and give it the most gentle behavior still preserving the its basic purpose. Nonetheless we discourage the programmer to use such command, and suggest to focus on proper application design and avoid such a drastic way to bail out. If you need to restart the child processes from time to time we recommend to check the MaxRequests parameter in the prefork MPM documentation headers set and parse HTTP headers. ::rivet::headers get set redirect add type numeric Description The headers command is for setting and parsing HTTP headers. ::rivet::headers get headername value Read arbitrary header names and values from output HTTP headers ::rivet::headers set headername value Set arbitrary header names and values into output HTTP headers ::rivet::headers sent Test internal status of the module and returns 1 if the HTTP headers have been already sent ::rivet::headers redirect uri Redirect from the current page to a new URI. Must be done in the first block of TCL code. ::rivet::headers add headername value Add text to header headername. ::rivet::headers type content-type This command sets the Content-type header returned by the script, which is useful if you wish to send content other than HTML with Rivet - PNG or jpeg images, for example. ::rivet::headers numeric response code Set a numeric response code, such as 200, 404 or 500. html construct html tagged text. ::rivet::html string arg Description Print text with the added ability to pass HTML tags following the string. Example: ::rivet::html "Test" b i produces: <b><i>Test</i></b> http_accept Parse HTTP Accept header lines ::rivet::http_accept -zeroweight -default -list http_accept_line Description Command for parsing HTTP Accept header lines that tell the server about preferences and/or capabilities of the browser (e.g. content language,media type, etc.). The following script ::rivet::http_accept returns a dictionary value in which every content preference is matched to its precedence value load_headers set language_precedence [::rivet::http_accept $headers(Accept-Language)] foreach lan [dict keys $language_precedence] { puts "$lan -> [dict get $language_precedence $lan]" } when run from a browser where 5 languages were chosen would output en-us -> 1 en -> 0.8 it -> 0.6 de-de -> 0.4 fr-fr -> 0.2 The -list switch would suppress the precedence values and the accepted fields are returned listed with decreasing precedence order. puts [::rivet::http_accept -list $headers(Accept-Language)] text/html application/xhtml+xml application/xml */* import_keyvalue_pairs Import an argument list into the named array ::rivet::import_keyvalue_pairs arrayName argsList Description key-value pairs, like "-foo bar" are stored in the array arrayName. In that case, the value "bar" would be stored in the element "foo" If "--" appears or a key doesn't begin with "-", the rest of the arg list is stored in the special args element of the array. Example: ::rivet::import_keyvalue_pairs keyvalue_map [list -a1 v1 -a2 v2 -a3 v3 -- 1 2 3 4 5] parray keyvalue_map keyvalue_map(a1) = v1 keyvalue_map(a2) = v2 keyvalue_map(a3) = v3 keyvalue_map(args) = 1 2 3 4 5 include includes a file into the output stream without modification. ::rivet::include filename_name Description Include a file without parsing it for processing tags <? and ?>. This is the best way to include an HTML file or any other static content. incr0 increment a variable or set it to 1 if nonexistent. incr0 varname num Description Increment a variable by . If the variable doesn't exist, create it instead of returning an error. incr0 functionality is provided by the native incr in Tcl >= 8.5, therefore this command is deprecated and kept as an interpreter alias only for compatibility. As such incr0 wasn't moved to the ::rivet namespace and it will be removed in future versions of Rivet. inspect Introspection command for Rivet configuration ::rivet::inspect configuration_section configuration_parameter Description ::rivet::inspect provides introspection into the running configuration of Rivet. Rivet's debug command uses it in order to gain insight into the configuration, but it can be used in any script. ::rivet::inspect can be called in 5 different forms With no argument the command returns a dictionary with 3 keys: server, dir, user. Each key is associated to a subdictionary carrying the configuration as set for that request. In this form the command is meant to support compatibility with previous versions of mod_rivet where three global arrays were created to be internally used by command ::rivet::debug. With the -all argument a dictionary carrying the whole configuration for that specific request is returned. If a configuration parameter is not set it's given the string undefined. Returned configuration paramenters are "ServerInitScript", "GlobalInitScript", "ChildInitScript", "ChildExitScript", "BeforeScript", "AfterScript", "AfterEveryScript", "AbortScript", "ErrorScript", "UploadMaxSize", "UploadDirectory", "UploadFilesToVar", "SeparateVirtualInterps", "HonorHeaderOnlyRequests" With one of the Rivet configuration directives listed above as single argument ::rivet::inspect returns the current value in the configuration record. Passing the argument "script" ::rivet::inspect returns a path to the current script in a similar way core command [info script] does. The basic difference is that the core command returns a relative path with respect to the current working directory, whereas mod_rivet's command returns the full path. Passing the argument "server" ::rivet::inspect returns a dictionary with these fields taken from the server record descriptor hostname: The server hostname admin: The admin's contact information errorlog: The name of the error log server_path: Pathname for ServerPath lassign_array Assign a list of values to array variables ::rivet::lassign_array value_list array_name array_variables Description lassign_array is an utility command inspired by the same Tclx command and with a close resemblance with Tcl's lassign for assigning list elements to variables. lassign_array first argument is a list of values to be assigned to an array that must be given as second argument. The remaining arguments are the array's variable names which will store as values the elements of the list. Variables names don't matching values in the list are given an empty string. Unassigned list elements are returned as a list. ::rivet::lassign_array {1 2 3 4} assigned_array a b c d parray assigned_array assigned_array assigned_array(a) = 1 assigned_array(b) = 2 assigned_array(c) = 3 assigned_array(d) = 4 set rem [::rivet::lassign_array {1 2 3 4 5 6 7} assigned_array a b c d] puts $rem 5 6 7 lempty Returns 1 if <list> is empty or 0 if it has any elements. This command emulates the TclX lempty command. ::rivet::lempty list Description Returns 1 if <list> is empty or 0 if it has any elements. This command emulates the TclX lempty command. lmatch Look for elements in <list> that match <pattern> ::rivet::lmatch -exact -glob -regexp list pattern Description Look for elements in <list> that match <pattern>. This command is a decent replacement for TclX lmatch command when TclX is not available In the following example a regular expression is matched against each element in the input list and a list containing the matching elements is returned ::rivet::lmatch -regexp { aaxa bxxb ccxxxxcc } {.+[x]{2}.+} bxxb ccxxxxcc load_cookies get any cookie variables sent by the client. ::rivet::load_cookies array_name Description Load the array of cookie variables into the specified array name. Uses array by default. load_env get the request's environment variables. ::rivet::load_env array_name Description Load the array of environment variables into the specified array name. Uses array by default. As Rivet pages are run in the namespace, it isn't necessary to qualify the array name for most uses - it's ok to access it as . load_headers get client request's headers. ::rivet::load_headers array_name Description Load the headers that come from a client request into the provided array name, or use if no name is provided. load_response load form variables into an array. ::rivet::load_response arrayName Description Load any form variables passed to this page into an array. If load_response is called without arguments the array is created in the scope of the caller. If the variables var1,var2,var3... having values val1,val2,val3... are passed to the page, the resulting array will be a collection mapping var1,var2,var3... to their corresponding values. load_response was inspired by the same NeoWebScript procedure in the way it deals with multiple assignments: if a variable is assigned more than once the corresponding array element will be a list of the values for the variable. This can be useful in the case of forms with checkbox options that are given the same name. This condition is signalled by the presence of an auxiliary array variable. Example: if a group of checkboxes are associated to the variable then response(var1) will store the list of their values and the array will also have the extra variable which can be tested with the usual [info exists response()] Calling load_response several times for the same array results in adding more values to the array at every call. When needed it is left to the caller to empty the array between two subsequent calls. lremove remove from a list elements matching one or more patterns ::rivet::lremove -regexp | -glob | -exact list pattern pattern pattern Description lremove removes from list list the first occurrence of an element matching one of the patterns listed in the command line. By specifying the option every occurrence of one the patterns is removed Pattern matching can be , style or following regular expressions (). These options are globally valid across the whole pattern list (default is glob style matching) ::rivet::lremove -all -regexp {aa e111 bab aa} aa e111 bab e111 bab ::rivet::lremove -all -regexp {aa e111 bab aa} aa "e\\d+" bab makeurl construct url's based on hostname, port. ::rivet::makeurl filename Description Create a self referencing URL from a filename. makeurl can be used in three ways No argument is passed to the command (returns the current script URL) A relative style path is passed (returns the argument prepended with the current script's URL An absolute path is passed to the command: (returns the full URL to the resource) Example of absolute path: ::rivet::makeurl /tclp.gif returns http://[hostname]:[port]/tclp.gif. where hostname and port are the hostname and port of the server in question. The protocol prefix is inferred from the protocol in the URL referencing the script. no_body Prevents Rivet from sending any content. ::rivet::no_body Description This command is useful for situations where it is necessary to only return HTTP headers and no actual content. For instance, when returning a 304 redirect. parray Tcl's parray with html formatting. ::rivet::parray arrayName pattern Description An html version of the standard Tcl parray command. Displays the entire contents of an array in a sorted, nicely-formatted way. Mostly used for debugging purposes. parse parses a Rivet template file. ::rivet::parse filename Description Like the Tcl source command, but also parses for Rivet <? and ?> processing tags. Using this command, you can use one .rvt file from another. raw_post get the unmodified body of a POST request sent by the client. ::rivet::raw_post Description Returns the raw POST data from the request. If the request was not a POST or there is no data, then "" - an empty string - is returned. redirect Interrupt processing and divert to a new URL ::rivet::redirect URL permanent (default: 0) Description ::rivet::redirect diverts the browser to a new URL and marks the redirection as either permanent in the browser local cache or non permanent (default). Calling ::rivet::redirect causes the script execution to interrupt and control passes to AbortScript, if such script is set, by calling ::rivet::abort_page and passing as abort code a dictionary with 2 keys: error_code: string literal 'redirect' location: the URL the browser will be redirected to ::rivet::redirect drives the redirection by setting the 301 (permanent redirect) or 302 (non permanent redirect) HTTP status codes and attempts to discard the output the script might have already placed in the stdout channel buffer. Therefore the command can fail if A flush stdout was called before ::rivet::redirect thus causing the HTTP headers to be sent and preventing any possibility to manipulate them The channel buffer was filled causing Tcl to flush the channel The stdout channel, like any Tcl channels, can be manipulated and if needed its internal buffer streched. read_file Read the entire contents of a file and return it as a string. ::rivet::read_file file name Description This is a utility command which loads the entire content of a file and returns it as a result. try Catch error and exception conditions ::rivet::try script script handlers finally script Description ::rivet::try wraps the core language command and simply traps exceptions that might have raised by ::rivet::abort_page and ::rivet::exit to throw them again and thus causing AbortScript to be executed. If neither ::rivet::abort_page nor ::rivet::exit are called from script then any handlers specified in the command are tested for execution. Thus ::rivet::try can transparently be used as a replacement for Tcl's own try and it's needed if you want script to safely bail out to AbortScript This script shows how ::rivet:try handles different exceptions or errors. You can drive this script within mod_rivet adding the arguments fail or abort or exit to its URL. You can handle the exit and abort cases with an AbortScript. See AbortScript <html><?::rivet::try { if {[::rivet::var_qs exists exit]} { ::rivet::exit 100 } elseif {[::rivet::var_qs exists abort]} { ::rivet::abort_page } elseif {[::rivet::var_qs exists fail]} { # this is just a non existent command wrong_command } else { puts "<b>OK</b>" } } on error {e o} { puts "catching error -&gt; $e<br/>" dict for {fd fv} $o { puts "$fd --&gt;&gt; $fv<br/>" } } ?></html> Placing this code in a file (try.rvt) on the web server DocumentRoot directory and setting for example the browser to http://localhost/try.rvt?fail=1. catching error -> invalid command name "wrong_command" -errorcode -->> TCL LOOKUP COMMAND wrong_command -code -->> 1 -level -->> 0 -errorstack -->> INNER {invokeStk1 wrong_command} UP 1 -errorinfo -->> invalid command name "wrong_command" while executing "wrong_command" ("::try" body line 9) -errorline -->> 9 unescape_string unescape escaped characters in a string. ::rivet::unescape_string string Description Scans through each character in the specified string looking for escaped character sequences (characters containing a percent sign and two hexadecimal characters, unescaping them back to their original character values, as needed, also mapping plus signs to spaces, and returning the result. This is useful for unquoting strings that have been quoted to be part of a URL. upload handle a file uploaded by a client. ::rivet::upload channel save data exists size type filename Description The upload command is for file upload manipulation. See the relevant Apache Directives to further configure the behavior of this Rivet feature. ::rivet::upload channel uploadname When given the name of a file upload , returns a Tcl channel that can be used to access the uploaded file. ::rivet::upload save uploadname filename Saves the in the file . ::rivet::upload data uploadname Returns data uploaded to the server. This is binary clean - in other words, it will work even with files like images, executables, compressed files, and so on. ::rivet::upload exists uploadname Returns true if an upload named uploadname exists. This can be used in scripts that are meant to be run by different forms that send over uploads that might need specific processing. ::rivet::upload size uploadname Returns the size of the file uploaded. ::rivet::upload type If the Content-type is set, it is returned, otherwise, an empty string. ::rivet::upload filename uploadname Returns the filename on the remote host that uploaded the file. ::rivet::upload tempname uploadname Returns the name of the temporary file on the local host that the file was uploaded into. ::rivet::upload names Returns the variable names, as a list, of all the files uploaded. See . url_query builds a URL query from parameter-value pairs ::rivet::url_query par1 value1 par2 value2 ... Description Builds a URL query out of a list of parameter-value pairs. If the argument list has an odd length the last element is silently discarded. The values of each pair in the list are passed through ::rivet::escape_string for proper representation of characters that could break the URL syntax set query [::rivet::url_query par1 val1 par2 val2 par3 val3] puts $query par1=val1&par2=val2&par3=val3 var var_qs var_post get the value of a form variable. ::rivet::var get list exists number all ::rivet::var_qs get list exists number all ::rivet::var_post get list exists number all Description The var command retrieves information about GET or POST variables sent to the script via client request. It treats both GET and POST variables the same, regardless of their origin. Note that there are two additional forms of ::rivet::var: rivet::var_qs and ::rivet::var_post. These two restrict the retrieval of information to parameters arriving via the querystring (?foo=bar&bee=bop) or POSTing, respectively. ::rivet::var get varname default Returns the value of variable as a string (even if there are multiple values). If the variable doesn't exist as a GET or POST variable, the value is returned, otherwise "" - an empty string - is returned. ::rivet::var list varname Returns the value of variable as a list, one list element per reference. Radiobuttons or multiple selection listboxes are suited widgets which may return list data. If the result list is passed as a default value to the form package, one could also set index "__varname" to get it interpreted as a list. set response(countries) [::rivet::var list countries] set response(__countries) "" form form_request -defaults response form_request select countries -multiple 1 -values {USA Canada Mexico} form_request end ::rivet::var exists varname Returns 1 if exists, 0 if it doesn't. ::rivet::var number Returns the number of variables. ::rivet::var all Return a list of variable names and values. See . wrap Split a string on newlines. ::rivet::wrap string maxlen html Description For each line, wrap the line at a space character to be equal to or shorter than the maximum length value passed. If a third argument called "-html" is present, the string is put together with html <br> line breaks, otherwise it's broken with newlines. wrapline Split the line into multiple lines by splitting on space characters ::rivet::wrapline string maxlen html Description Given a line and a maximum length and option "-html" argument, split the line into multiple lines by splitting on space characters and making sure each line is less than maximum length. If the third argument, "-html", is present, return the result with the lines separated by html <br> line breaks, otherwise the lines are returned separated by newline characters. xml XML Fragments creation ::rivet::xml string tag descriptor tag descriptor ... Description Given a string and a variable number of tag descriptors return XML fragment made by nesting the tags with the same hierarchical order they are listed on the command line. The tag descriptors can be a one element list (the tag) or an odd-length list whose first argument is the tag name and the remaining elements are interpreted as attribute name-attribute value pairs. ::rivet::xml can work as a replacement of ::rivet::html provided you take care of sending the string with command puts ::rivet::xml "a string" b u <== <b><u>a string</u></b> You can tell the tags which attributes they must have ::rivet::xml "a string" [list div class box id testbox] b i <== <div class="box" id="testbox"><b><i>a string</i></b></div> ::rivet::xml "text to be wrapped in XML" div [list a href "http://..../" title "info message"] <== <div><a href="http://..../" title="info message">text to be wrapped in XML</a></div>
    rivet-2.3.5/doc/html/inspect.html000644 001750 001750 00000014034 13200160527 016360 0ustar00mxmmxm000000 000000 inspect

    Name

    inspect — Introspection command for Rivet configuration

    Synopsis

    ::rivet::inspect ?configuration_section? ?configuration_parameter?

    Description

    ::rivet::inspect provides introspection into the running configuration of Rivet. Rivet's debug command uses it in order to gain insight into the configuration, but it can be used in any script.

    ::rivet::inspect can be called in 5 different forms

    • With no argument the command returns a dictionary with 3 keys: server, dir, user. Each key is associated to a subdictionary carrying the configuration as set for that request. In this form the command is meant to support compatibility with previous versions of mod_rivet where three global arrays were created to be internally used by command ::rivet::debug.
    • With the ?-all? argument a dictionary carrying the whole configuration for that specific request is returned. If a configuration parameter is not set it's given the string undefined. Returned configuration paramenters are
          "ServerInitScript",
          "GlobalInitScript",
          "ChildInitScript",
          "ChildExitScript",
          "BeforeScript",
          "AfterScript",
          "AfterEveryScript",
          "AbortScript",
          "ErrorScript",
          "UploadMaxSize",
          "UploadDirectory",
          "UploadFilesToVar",
          "SeparateVirtualInterps",
          "HonorHeaderOnlyRequests"
    • With one of the Rivet configuration directives listed above as single argument ::rivet::inspect returns the current value in the configuration record.
    • Passing the argument "script" ::rivet::inspect returns a path to the current script in a similar way core command [info script] does. The basic difference is that the core command returns a relative path with respect to the current working directory, whereas mod_rivet's command returns the full path.
    • Passing the argument "server" ::rivet::inspect returns a dictionary with these fields taken from the server record descriptor
      • hostname: The server hostname
      • admin: The admin's contact information
      • errorlog: The name of the error log
      • server_path: Pathname for ServerPath
    rivet-2.3.5/contrib/rvt.vim000644 001750 001750 00000001101 07713724623 015312 0ustar00mxmmxm000000 000000 " RVT (mod_dtcl) syntax file. " Language: Tcl + HTML " Maintainer: Wojciech Kocjan " Filenames: *.rvt if version < 600 syntax clear elseif exists("b:current_syntax") finish endif if !exists("main_syntax") let main_syntax = 'rvt' endif if version < 600 so :p:h/html.vim else runtime! syntax/html.vim unlet b:current_syntax endif syntax include @tclTop syntax/tcl.vim syntax region rvtTcl keepend matchgroup=Delimiter start="" contains=@tclTop let b:current_syntax = "rvt" if main_syntax == 'rvt' unlet main_syntax endif rivet-2.3.5/rivet/rivet-tcl/redirect.tcl000644 001750 001750 00000003247 13172617330 017676 0ustar00mxmmxm000000 000000 # # -- ::rivet::redirect # # Redirecting to a new URL by issuing a 301 or 302 (permanent) # diversion to a new resource. # # Arguments: # # - url - URL to which we are redirecting the client # - permanent:[0 | 1] - whether redirection will be permanent (default) # or # - permanent: code - returns any HTTP integer code. In this context # only the 3xx status codes are meaningful # # $ Id: $ # namespace eval ::rivet { proc redirect {url {permanent 0}} { if {[::rivet::headers sent]} { return -code error \ -errorcode headers_already_sent \ -errorinfo "Impossible to redirect: headers already sent" } # In order to preserve compatibility # with the past we chec whether we are # dealing with a boolean argument and handle # it accordingly if {[string is boolean $permanent] } { if {[string is true $permanent]} { set http_code 301 } else { set http_code 302 } } elseif {[string is integer $permanent] && ($permanent > 0)} { set http_code $permanent } else { return -code error \ -errorcode invalid_http_code \ -errorinfo "Invalid HTTP status code: $permanent" } ::rivet::no_body ; ## don’t output anything on a redirect ::rivet::headers set Location $url ::rivet::headers numeric $http_code ::rivet::abort_page [dict create error_code redirect location $url] ; ## stop any further processing return -error ok } } rivet-2.3.5/tests/uploadsave.rvt000644 001750 001750 00000000104 11670231317 016354 0ustar00mxmmxm000000 000000 rivet-2.3.5/doc/examples/table.rvt000644 001750 001750 00000000460 11545343461 016533 0ustar00mxmmxm000000 000000 \n" for {set i 1} { $i <= 8 } {incr i} { puts "\n" for {set j 1} {$j <= 8} {incr j} { set num [ expr $i * $j * 4 - 1] puts [ format " $num $num $num \n" \ $num $num $num ] } puts "\n" } puts "\n" ?> rivet-2.3.5/tests/parse.rvt000644 001750 001750 00000000316 11670231317 015330 0ustar00mxmmxm000000 000000 Parse Test

    Parse Test

    rivet-2.3.5/doc/html/escape_sgml_chars.html000644 001750 001750 00000005320 13200160527 020353 0ustar00mxmmxm000000 000000 escape_sgml_chars

    Name

    escape_sgml_chars — escape special SGML characters in a string.

    Synopsis

    ::rivet::escape_sgml_chars ?string?

    Description

    Scans through each character in the specified string looking for any special (with respect to SGML, and hence HTML) characters from the specified string, and returns the result. For example, the right angle bracket is escaped to the corrected ampersand gt symbol.

    rivet-2.3.5/tests/apachetest/template.conf.1.tcl000644 001750 001750 00000001226 10725054432 021206 0ustar00mxmmxm000000 000000 # \$Id\$ # Minimal config file for testing # Parsed by makeconf.tcl ServerRoot "$CWD" PidFile "$CWD/httpd.pid" ResourceConfig "$CWD/srm.conf" AccessConfig "$CWD/access.conf" Timeout 300 MaxRequestsPerChild 0 $LOADMODULES Port 8081 ServerName localhost DocumentRoot "$CWD" Options All MultiViews AllowOverride All Order allow,deny Allow from all DirectoryIndex index.html AccessFileName .htaccess HostnameLookups Off ErrorLog $CWD/error_log LogLevel debug LogFormat "%h %l %u %t \\"%r\\" %>s %b \\"%{Referer}i\\" \\"%{User-Agent}i\\"" combined CustomLog "$CWD/access_log" combined rivet-2.3.5/tests/apachetest/pkgIndex.tcl000644 001750 001750 00000001144 10034233654 020056 0ustar00mxmmxm000000 000000 # Tcl package index file, version 1.1 # This file is generated by the "pkg_mkIndex" command # and sourced either when an application starts up or # by a "package unknown" script. It invokes the # "package ifneeded" command to set up package-related # information so that packages will be loaded automatically # in response to "package require" commands. When this # script is sourced, the variable $dir must contain the # full path name of this file's directory. package ifneeded apachetest 0.1 [list source [file join $dir apachetest.tcl]] package ifneeded http 2.4.5 [list source [file join $dir http.tcl]] rivet-2.3.5/rivet/rivet-tcl/catch.tcl000644 001750 001750 00000001444 13012635444 017153 0ustar00mxmmxm000000 000000 # -- catch.tcl # # Wrapper of the core [catch] command that checks whether # an error condition is actually raised by [::rivet::abort_page] # or [::rivet::exit]. In case the error is thrown again to allow # the interpreter to interrupt and pass execution to AbortScript # # $Id: catch.tcl 1769855 2016-11-15 16:43:16Z mxmanghi $ # namespace eval ::rivet { proc catch {script args} { set catch_ret [uplevel [list ::catch $script {*}$args]] if {$catch_ret && [::rivet::abort_page -aborting]} { return -code error -errorcode {RIVET ABORTPAGE} "Page abort" } elseif {$catch_ret && [::rivet::abort_page -exiting]} { return -code error -errorcode {RIVET THREAD_EXIT} "Thread exit" } else { return $catch_ret } } } rivet-2.3.5/doc/html/parse.html000644 001750 001750 00000005131 13200160527 016023 0ustar00mxmmxm000000 000000 parse

    Name

    parse — parses a Rivet template file.

    Synopsis

    ::rivet::parse ?filename?

    Description

    Like the Tcl source command, but also parses for Rivet <? and ?> processing tags. Using this command, you can use one .rvt file from another.

    rivet-2.3.5/rivet/packages/asciiglyphs/000755 001750 001750 00000000000 13200157764 017551 5ustar00mxmmxm000000 000000 rivet-2.3.5/doc/Makefile.am000644 001750 001750 00000004427 12163235331 015125 0ustar00mxmmxm000000 000000 # Makefile for Rivet documentation # Copyright 2004-2005 The Apache Software Foundation # 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. # $Id: Makefile.am 1497667 2013-06-28 07:27:21Z mxmanghi $ .PHONY: clean MANDIRS = html/ html/images PICTURES:=$(wildcard images/*.png) EXAMPLES_SGML:=$(wildcard examples-sgml/*.*) EXAMPLES:=$(wildcard examples/*.*) # English, multiple files. html/index.html: rivet.xml rivet-chunk.xsl rivet.xsl xml/*.xml xsltproc --stringparam html.stylesheet rivet.css \ --stringparam html.ext ".html" \ --stringparam chunker.output.encoding UTF-8 \ --nonet -o html/ rivet-chunk.xsl rivet.xml # English, one big file. html/rivet.html: rivet.xml rivet-nochunk.xsl rivet.xsl xml/*.xml xsltproc --stringparam html.stylesheet rivet.css \ --stringparam html.ext ".html" \ --stringparam chunker.output.encoding UTF-8 \ --nonet -o html/rivet.html rivet-nochunk.xsl \ rivet.xml # This means these are not build automatically, but at least # people aren't forced to build them either. docs: picts html/rivet.css html/index.html docs-nochunk: picts html/rivet.css html/rivet.html html/rivet.css: mandirs rivet.css cp -v rivet.css html/ # target picts checks the directory tree exists, then lets target 'graphics' copy new # or updated files to the target tree. picts: mandirs graphics graphics: $(PICTURES) for gfile in $?; do \ cp -v $$gfile html/images/ ; \ done ; \ touch graphics examples: ( echo 'set source_examples { $(EXAMPLES) }; source ./convert_examples.tcl' | @TCLSH_PROG@ ; ) # target that builds the essential directory tree that will get the html and # graphic files of the manual mandirs: $(MANDIRS) $(MANDIRS): mkdir $@ # this target cleans everything up in the html directory distclean: -rm -fr html/*.html -rm -f graphics -rm Makefile .PHONY: examples rivet-2.3.5/tests/checkfails.tcl000644 001750 001750 00000002156 12322611233 016257 0ustar00mxmmxm000000 000000 # -- check_inspect # # tests ::rivet::inspect in its different forms # proc check_inspect { cmd_form args } { set ::failtest(inspect${cmd_form}) 0 set cmdeval [list ::rivet::inspect {*}$args] if {[catch {eval $cmdeval}]} { set ::failtest(inspect${cmd_form}) 1 } } # -- check_fail # # general purpose test function for commands having a single form # proc check_fail {cmd args} { set ::failtest($cmd) 0 set cmdeval [list $cmd {*}$args] if {[catch {eval $cmdeval}]} { set ::failtest($cmd) 1 } } array set ::failtest { } #if {[catch {::rivet::env HTTP_HOST}]} { set ::failtest(env) 1 } #if {[catch {::rivet::makeurl}]} { set ::failtest(makeurl) 1 } check_fail apache_table names headers_in check_fail env HTTP_HOST check_fail makeurl check_fail parse template.rvt check_fail include -virtual check_fail headers redirect http://tcl.apache.org/ check_fail load_env check_fail load_headers check_fail raw_post check_fail var all check_fail no_body check_fail virtual_filename unkn check_inspect 0 check_inspect 1 ChildInitScript check_inspect 2 -all check_inspect 3 server check_inspect 4 script rivet-2.3.5/doc/html/images/toc-minus.png000644 001750 001750 00000000403 13200160527 017711 0ustar00mxmmxm000000 000000 PNG  IHDR )bKGD#2IDATxch`g  I׏j?}-pZECtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com!*tEXtSignatureecf413ef47524404f90c44d8c7d12a2e݈ tEXtPage15x9+0+07vIENDB`rivet-2.3.5/tests/upload.rvt000644 001750 001750 00000000265 11670231317 015505 0ustar00mxmmxm000000 000000 rivet-2.3.5/doc/rivet.css000644 001750 001750 00000015416 12627553250 014744 0ustar00mxmmxm000000 000000 BODY { font-family: verdana; } DIV.ABSTRACT { border: solid 2px; padding-left: 10pt; padding-right: 10pt; } PRE.SCREEN { font-family:monospace; white-space: pre; width: 100%; background-color: #ffffcc; border:solid; color: #000000; border-color: #009999; border-left: solid #009999 2px; border-right: solid #009999 2px; border-top: solid #009999 2px; border-bottom: solid #009999 2px; padding-left: 15pt; } PRE.PROGRAMLISTING { font-family: monospace; white-space: pre; width: 95%; background-color: #ffeeee; border: solid; color: #000000; border-color: #990099; border-left: solid #990099 1px; border-right: solid #990099 1px; border-top: solid #990099 1px; border-bottom: solid #990099 1px; font-size: normal; padding-top: 1em; padding-left: 1em; padding-bottom: 1em; } H1 { color: #ffffff; border: solid 3px #a0a0d0; background-color: #606090; font-variant: small-caps; width: 100%; } H1.TITLE { color: #ffffff; border: solid 3px #a0a0d0; background-color: #606090; font-variant: small-caps; width: 100%; } .TITLE a { color: #ffffff; text-decoration: none; } .TITLE a:active { color: #ffffff; text-decoration: none; } .TITLE a:visited { color: #ffffff; text-decoration: none; } H2 { COLOR: #ffffff ; font-style: italic; BACKGROUND-color: #d0a0a0; BORDER: solid 3px #906060; PADDING: 0.5em; } TABLE.IMPORTANT { font-style:italic; border: solid 2px #ff0000; width: 70%; margin-left: 15%; } TABLE.CAUTION { font-style:italic; border: ridge 2px #ffff00; width: 70%; margin-left: 15%; } TABLE.NOTE { font-style:italic; border: solid 1px #000000; width: 70%; margin-left: 15%; } TABLE.TIP { font-style:italic; border: solid 1px #000000; width: 70%; margin-left: 15%; } TABLE.WARNING { font-style:italic; font-weight: bold; border: ridge 4px #ff0000; width: 70%; margin-left: 15%; } DIV.VARIABLELIST { font-family: sans-serif; font-style: normal; font-weight: normal; padding-left: 20px; font-size: small; } .VARLISTENTRY { font-weight: bold; margin-top: 10px; COLOR: #ffffff ; BACKGROUND-color: #a0a0d0; BORDER: solid 1px #606090; PADDING: 1px } /* * See http://diveintoaccessibility.org/day_26_using_relative_font_sizes.html * for an explanation of the following few commands. * They are really too complicated to explain here in all depth. ;-) */ P { font-size: 12px; } /*/*/A{} BODY P { /* font-size: x-small; */ voice-family: "\"}\""; voice-family: inherit; font-size: normal; } HTML>BODY P { font-size: normal; } /* */ /* Add an external-link icon to absolute links */ a[href^="http:"] { background: url(images/remote.png) right center no-repeat; padding-right: 12px; } a[href^="http:"]:hover { background: url(images/remote.png) right center no-repeat; } /* Add a note icon to footnote links */ a[href^="#FTN"] { background: url(images/qbullet-note.png) right center no-repeat; padding-right: 12px; } a[href^="#FTN"]:hover { background: url(images/qbullet-note.png) right center no-repeat; } /* ...and a back icon to the backlinks in the footnotes themselves */ a[name^="FTN"] { background: url(images/scrollup.png) right center no-repeat; padding-right: 12px; } a[name^="FTN"]:hover { background: url(images/scrollup.png) right center no-repeat; } /* Add a download icon to .gz links */ a[href$=".gz"],a[href$=".tar"],a[href$=".zip"] { background: url(images/disk.png) right center no-repeat; padding-right: 12px; } /* Add an Acrobat Reader icon to PDF links */ a[href$=".pdf"] { background: url(images/acrobat.png) right center no-repeat; padding-right: 12px; } a[href$=".pdf"]:hover { background: url(images/acrobat.png) right center no-repeat; } /* Add a Word icon to RTF links */ a[href$=".rtf"] { background: url(images/word.png) right center no-repeat; padding-right: 12px; } /* ...but not to absolute links in this domain... */ a[href^="http://www.karakas-online.de"] { background: transparent; padding-right: 0px; } a[href^="http://www.karakas-online.de"]:hover { background: transparent; } /* ...or to the translation links on each page */ DIV.translatelink > a[href^="http:"] { background: transparent; padding-right: 0px; } DIV.translatelink > a[href^="http:"]:hover { background: transparent; } /* ...or to any images */ DIV.imagelink a[href^="http:"] { background: transparent; padding-right: 0px; } DIV.imagelink a[href^="http:"]:hover { background: transparent; } P.C2 { COLOR: #ffffff ; BACKGROUND-color: #a0a0d0; BORDER: solid 1px #606090; PADDING: 1px } DIV.NAVFOOTER { color: #000000; background-color: #FFDFDF; padding: 5px; margin-top: 10px; width: 100%; border: 2px solid #d0a0a0; } DIV.NUKEFOOTER { color: #000000; background-color: #B0E0E6; padding: 5px; margin-top: 10px; width: 100%; border: thin solid #a0a0d0; } DIV.NAVHEADER { color: #000000; background-color: #FFDFDF; padding: 5px; margin-bottom: 10px; width: 100%; border: 2px solid #d0a0a0; } DIV.SECT1,DIV.SECT2,DIV.SECT3 { margin-left: 20px; } DIV.EXAMPLE,DIV.TOC { border: thin dotted #70AAE5; padding-left: 10px; padding-right: 10px; color: #000000; background-color: #FFE8E8; } DIV.EXAMPLE { border: thin dotted #22AA22; background-color: #EEE; } DIV.TOC { margin-left: 20px; margin-right: 20px; width: 95%; } UL { /* list-style: url("images/tux-bullet.png") disc; */ } .namespaces { border: 1px solid black; } .namespaces td { padding: 0.2em 1em; /* font-weight: bold; */ } .namespaces thead { background-color: #aaf; } .namespaces tr.init { background-color: #e88; } .namespaces tr.childinit { background-color: #eee; } .namespaces tr.processing { background-color: #e88; } .namespaces tr.childexit { background-color: #eee; } .note td { font-size: small; } li.listitem { font-size: small; } rivet-2.3.5/tests/tclfile.tcl000644 001750 001750 00000000121 07376765413 015622 0ustar00mxmmxm000000 000000 # test file for plain .tcl files puts " - El Burro Sabe Ms Que T!" rivet-2.3.5/doc/examples-sgml/hello.rvt000644 001750 001750 00000000052 11545343461 017504 0ustar00mxmmxm000000 000000 <? puts "Hello World" ?> rivet-2.3.5/rivet/rivet-tcl/debug.tcl000644 001750 001750 00000006052 11756017563 017170 0ustar00mxmmxm000000 000000 ### ## debug ?-option value? ?-option value?... ## A command to make debugging more convenient. Print strings, arrays ## and the values of variables as specified by the arguments. ## ## Also allows the setting of an array called debug which will pick up ## options for all debug commands. ## ## We create this command in the ::request namespace because we want the ## user to be able to use the debug array without actually having to set ## it at the global level. ## ## Options: ## ## -subst - Each word should be considered a variable and subst'd. ## -separator - A text string that goes between each variable. ## -ip - A list of IP addresses to display to. ## ## $Id: debug.tcl 1340583 2012-05-19 22:32:19Z mxmanghi $ ## ### namespace eval ::rivet { proc debug {args} { # starting with 2.1.0 ::RivetUserConf can be created on demand (see ::rivet::inspect) array set ::RivetUserConf [dict get [::rivet::inspect] user] ## If they've turned off debugging, we don't do anything. if {[info exists ::RivetUserConf(Debug)] && !$::RivetUserConf(Debug)} { return } ## We want to save the REMOTE_ADDR for any subsequent calls to debug. if {![info exists ::RivetUserConf(REMOTE_ADDR)]} { set REMOTE_ADDR [env REMOTE_ADDR] set ::RivetUserConf(REMOTE_ADDR) $REMOTE_ADDR } ## Set some defaults for the options. set data(subst) 0 set data(separator)
    ## Check RivetUserConf for globally set options. if {[info exists ::RivetUserConf(DebugIp)]} { set data(ip) $::RivetUserConf(DebugIp) } if {[info exists ::RivetUserConf(DebugSubst)]} { set data(subst) $::RivetUserConf(DebugSubst) } if {[info exists ::RivetUserConf(DebugSeparator)]} { set data(separator) $::RivetUserConf(DebugSeparator) } import_keyvalue_pairs data $args if {[info exists data(ip)]} { set can_see 0 foreach ip $data(ip) { if {[string match $data(ip)* $::RivetUserConf(REMOTE_ADDR)]} { set can_see 1 break } } if {!$can_see} { return } } if {[string tolower $data(subst)] != "on"} { ::rivet::html [join $data(args)] return } set lastWasArray 0 foreach varName $data(args) { upvar $varName var if {[array exists var]} { parray $varName set lastWasArray 1 } elseif {[info exists var]} { if {!$lastWasArray} { ::rivet::html $data(separator) } ::rivet::html $var set lastWasArray 0 } else { if {!$lastWasArray} { ::rivet::html $data(separator) } ::rivet::html $varName set lastWasArray 0 } } } } rivet-2.3.5/doc/examples-sgml/upload.rvt000644 001750 001750 00000000267 11670231317 017670 0ustar00mxmmxm000000 000000 <? ::rivet::upload save MyUpload /tmp/uploadfiles/file1 puts "Saved file [::rivet::upload filename MyUpload] \ ([::rivet::upload size MyUpload] bytes) to server" ?> rivet-2.3.5/rivet/rivet-tcl/import_keyvalue_pairs.tcl000644 001750 001750 00000003265 11727706131 022514 0ustar00mxmmxm000000 000000 ### ## import_keyvalue_pairs -- Import an argument list into the named array. ## ## key-value pairs, like "-foo bar" are stored in the array. In that ## case, the value "bar" would be stored in the element "foo" ## ## If "--" appears or a key doesn't begin with "-", the rest of the arg ## list is stored in the special args element of the array. ## ## $Id: import_keyvalue_pairs.tcl 1300262 2012-03-13 18:05:13Z mxmanghi $ ## ### namespace eval ::rivet { proc import_keyvalue_pairs {arrayName argsList} { upvar 1 $arrayName data # if the first character of the arg list isn't a dash, put the whole # body in the args element of the array, and we're done if {[string index $argsList 0] != "-"} { set data(args) $argsList return } set index 0 set looking 0 set data(args) "" foreach arg $argsList { if {$looking} { set data($varName) $arg set looking 0 } elseif {[string index $arg 0] == "-"} { if {$arg == "--"} { # "--" appears as an argument, store the rest of the arg list # in the args element of the array set data(args) [lrange $argsList [expr {$index + 1} ] end] break } if {$arg == "-args"} { return -code error "-args is a reserved value." } set varName [string range $arg 1 end] set looking 1 } else { set data(args) [lrange $argsList $index end] break } incr index } } } rivet-2.3.5/doc/examples-sgml/vars.rvt000644 001750 001750 00000003036 11754433456 017367 0ustar00mxmmxm000000 000000 <? set errlist {} if { [::rivet::var exists title] } { set title [::rivet::var get title] } else { set errlist "You need to enter a title" } if { [::rivet::var exists salary] } { set salary [::rivet::var get salary] if { ! [string is digit $salary] } { lappend errlist "Salary must be a number" } } else { lappend errlist "You need to enter a salary" } if { [::rivet::var exists boss] } { set boss [::rivet::var get boss] } else { set boss "Mr. Burns" } if { [::rivet::var exists skills] } { set skills [::rivet::var list skills] } else { lappend errlist "You need to enter some skills" } if { [llength $errlist] != 0 } { foreach err $errlist { puts "<b> $err </b>" } } else { puts "Thanks for the information!" ?> <table> <tbody> <tr> <td><b>Title:</b></td> <td><?= $title ?></td> </tr> <tr> <td><b>Boss:</b></td> <td><?= $boss ?></td> </tr> <tr> <td><b>Salary:</b></td> <td><?= $salary ?></td> </tr> <tr> <td><b>Skills:</b></td> <td><?= $skills ?></td> </tr> </tbody> </table> <? } ?> rivet-2.3.5/contrib/validate_mac.tcl000644 001750 001750 00000002066 13013421030 017062 0ustar00mxmmxm000000 000000 # -- validate_mac # # mac address validator to be used with the form broker proc validate_mac {_mac_address_d} { upvar $_mac_address_d mac_address_d dict with mac_address_d { set var [string trim $var] if {[regexp {^[[:xdigit:]]{2}([:-][[:xdigit:]]{2}){5}$} $var]} { set var [string tolower $var] # we normalize the mac address to the Unix form. # The dash '-' characters in the windows representation # are replaced by columns ':' set var [regsub -all -- {-} $var :] # the 'constrain' field is bidirectional: # it tells the validator to curb/change the value # within the bonds/forms/representation suitable. # By setting it the validator tells the FormBroker # to copy the value back in the response array set constrain 1 return FB_OK } else { return FB_WRONG_MAC } } } rivet-2.3.5/genconf.sh000755 001750 001750 00000000414 10706065073 014277 0ustar00mxmmxm000000 000000 #!/bin/sh # Be sure to use a recent autotools set. 1.9 works for me. VERSION="1.10" if [ "$VERSION" != "" ] then # Add the dash VERSION="-$VERSION" fi libtoolize -f -c && aclocal${VERSION} && autoheader && automake${VERSION} --add-missing && autoconf rivet-2.3.5/rivet/packages/dio/dio_Oracle.tcl000644 001750 001750 00000013070 12013014203 020527 0ustar00mxmmxm000000 000000 # dio_Mysql.tcl -- Mysql backend. # Copyright 2006 The Apache Software Foundation # 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. # $Id: dio_Oracle.tcl 265421 2004-10-29 20:17:54Z karl $ package provide dio_Oracle 0.1 namespace eval DIO { ::itcl::class Oracle { inherit Database constructor {args} {eval configure $args} { if {[catch {package require Oratcl}]} { return -code error "No Oracle Tcl package available" } eval configure $args if {[lempty $db]} { if {[lempty $user]} { set user $::env(USER) } set db $user } } destructor { close } method open {} { set command "::oralogon" if {![lempty $user]} { append command " $user" } if {![lempty $pass]} { append command "/$pass" } if {![lempty $host]} { append command "@$host" } if {![lempty $port]} { append command -port $port } if {[catch $command error]} { return -code error $error } set conn $error if {![lempty $db]} { # ??? mysqluse $conn $db } } method close {} { if {![info exists conn]} { return } catch {::oraclose $conn} unset conn } method exec {req} { if {![info exists conn]} { open } set _cur [::oraopen $conn] set cmd ::orasql set is_select 0 if {[::string tolower [lindex $req 0]] == "select"} { set cmd ::orasql set is_select 1 } set errorinfo "" #puts "ORA:$is_select:$req:
    " if {[catch {$cmd $_cur $req} error]} { #puts "ORA:error:$error:
    " set errorinfo $error catch {::oraclose $_cur} set obj [result $interface -error 1 -errorinfo [::list $error]] return $obj } if {[catch {::oracols $_cur name} fields]} { set fields "" } ::oracommit $conn set my_fields $fields set fields [::list] foreach field $my_fields { set field [::string tolower $field] lappend fields $field } set error [::oramsg $_cur rows] set res_cmd "result" lappend res_cmd $interface -resultid $_cur lappend res_cmd -numrows [::list $error] -fields [::list $fields] lappend res_cmd -fetch_first_row $is_select set obj [eval $res_cmd] if {!$is_select} { ::oraclose $_cur } return $obj } method lastkey {} { if {![info exists conn]} { return } return [mysqlinsertid $conn] } method quote {string} { regsub -all {'} $string {\'} string return $string } method sql_limit_syntax {limit {offset ""}} { # temporary return "" if {[lempty $offset]} { return " LIMIT $limit" } return " LIMIT [expr $offset - 1],$limit" } method handle {} { if {![info exists conn]} { open } return $conn } method makeDBFieldValue {table_name field_name val {convert_to {}}} { if {[info exists specialFields(${table_name}@${field_name})]} { switch $specialFields(${table_name}@${field_name}) { DATE { set secs [clock scan $val] set my_val [clock format $secs -format {%Y-%m-%d}] return "to_date('$my_val', 'YYYY-MM-DD')" } DATETIME { set secs [clock scan $val] set my_val [clock format $secs -format {%Y-%m-%d %T}] return "to_date('$my_val', 'YYYY-MM-DD HH24:MI:SS')" } NOW { switch $convert_to { SECS { if {[::string compare $val "now"] == 0} { set secs [clock seconds] set my_val [clock format $secs -format {%Y%m%d%H%M%S}] return $my_val } else { return "($field_name - to_date('1970-01-01')) * 86400" #return "to_char($field_name, 'YYYYMMDDHH24MISS')" } } default { if {[::string compare $val "now"] == 0} { set secs [clock seconds] } else { set secs [clock scan $val] } set my_val [clock format $secs -format {%Y-%m-%d %T}] return "to_date('$my_val', 'YYYY-MM-DD HH24:MI:SS')" } } } default { # no special cod for that type!! return "'[quote $val]'" } } } else { return "'[quote $val]'" } } public variable db "" { if {[info exists conn]} { mysqluse $conn $db } } public variable interface "Oracle" private variable conn private variable _cur } ; ## ::itcl::class Mysql ::itcl::class OracleResult { inherit Result public variable fetch_first_row 0 private variable _data "" private variable _have_first_row 0 constructor {args} { eval configure $args if {$fetch_first_row} { if {[llength [nextrow]] == 0} { set _have_first_row 0 numrows 0 } else { set _have_first_row 1 numrows 1 } } set fetch_first_row 0 } destructor { if {[string length $resultid] > 0} { catch {::oraclose $resultid} } } method nextrow {} { if {[string length $resultid] == 0} { return [::list] } if {$_have_first_row} { set _have_first_row 0 return $_data } set ret [::orafetch $resultid -datavariable _data] switch $ret { 0 { return $_data } 1403 { ::oraclose $resultid set resultid "" return [::list] } default { # FIXME!! have to handle error here !! return [::list] } } } } ; ## ::itcl::class OracleResult } rivet-2.3.5/tests/tclfile.test000644 001750 001750 00000000404 07376765231 016021 0ustar00mxmmxm000000 000000 # $Id: tclfile.test 265087 2001-11-21 17:55:37Z davidw $ ::tcltest::test tclfile-1.1 {Plain .tcl file} { set page [ ::http::geturl "${urlbase}tclfile.tcl" ] set pgdata [string trim [ ::http::data $page ] ] } " - El Burro Sabe Ms Que T!" rivet-2.3.5/rivet/init.tcl000644 001750 001750 00000016431 13175456424 015136 0ustar00mxmmxm000000 000000 # Copyright 2002-2004 The Apache Software Foundation # 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 provide Rivet 2.3 namespace eval ::Rivet { ### ## export_tcl_commands -- ## this is temporary hack to export names of Tcl commands in rivet-tcl/. ## This function will be removed in future versions of Rivet and it's ## meant to provide a basic way to guarantee compatibility with older ## versions of Rivet (see code in ::Rivet::init) ## proc tcl_commands_export_list {tclpath} { # we collect the commands in rivet-tcl by reading the tclIndex # file and then we extract the command list from auto_index namespace eval ::rivet_temp { } set ::rivet_temp::tclpath $tclpath namespace eval ::rivet_temp { variable auto_index array set auto_index {} # the auto_index in ${tclpath}/tclIndex is loaded set dir $tclpath source [file join $tclpath tclIndex] # Rivet Tcl commands not meant to go onto the export list must # be unset from auto_index here unset auto_index(::rivet::catch) unset auto_index(::rivet::try) } set command_list [namespace eval ::rivet_temp {array names auto_index}] # we won't leave anything behind namespace delete ::rivet_temp return $command_list } ### ## This routine gets called each time a new request comes in. ## It sets up the request namespace and creates a global command ## to replace the default global. This ensures that when a user ## uses global variables, they're actually contained within the ## namespace. So, everything gets deleted when the request is finished. ### proc initialize_request {} { catch { namespace delete ::request } namespace eval ::request { } proc ::request::global {args} { foreach arg $args { uplevel "::global ::request::$arg" } } } ### ## The default error handler for Rivet. Any time a page runs into an ## error, this routine will be called to handle the error information. ## If an ErrorScript has been specified, this routine will not be called. ### proc handle_error {} { global errorInfo global errorOutbuf puts
            puts "
    $errorInfo
    " puts "

    OUTPUT BUFFER:

    " puts $errorOutbuf puts
    } ### ## This routine gets called each time a request is finished. Any kind ## of special cleanup can be placed here. ### proc cleanup_request {} { } ### ## The main initialization procedure for Rivet. ### proc init {} { global auto_path global server ## Add the rivet-tcl directory to Tcl's auto search path. ## We insert it at the head of the list because we want any of ## our procs named the same as Tcl's procs to be overridden. ## Example: parray set tclpath [file join [file dirname [info script]] rivet-tcl] set auto_path [linsert $auto_path 0 $tclpath] ## As we moved the commands set to ::rivet namespace we ## we want to guarantee the commands are still accessible ## at global level by putting them on the export list. ## Importing the ::rivet namespace is deprecated and we should ## make it clear in the manual ## we keep in ::rivet::export_list a list of importable commands namespace eval ::rivet [list set cmd_export_list [tcl_commands_export_list $tclpath]] namespace eval ::rivet { ## init.tcl is run by mod_rivet (which creates the ::rivet namespace) but it gets run ## standalone by mkPkgindex during the installation phase. We have to make sure the ## procedure won't fail in this case, so we check for the existence of the variable. if {[info exists module_conf(export_namespace_commands)] && \ $module_conf(export_namespace_commands)} { # commands in 'command_list' are prefixed with ::rivet, so we have to # remove it to build an export list set export_list {} foreach c $cmd_export_list { lappend export_list [namespace tail $c] } #puts stderr "exporting $export_list" eval namespace export $export_list } } ## Add the packages directory to the auto_path. ## If we have a packages$tcl_version directory ## (IE: packages8.3, packages8.4) append that as well. ## The packages directory come right after the rivet-tcl directory. set pkgpath [file join [file dirname [info script]] packages] set auto_path [linsert $auto_path 1 $pkgpath] set auto_path [linsert $auto_path 2 ${pkgpath}-local] if { [file exists ${pkgpath}$::tcl_version] } { lappend auto_path ${pkgpath}$::tcl_version } ## Likewise we have also to add to auto_path the directory containing ## this script since it holds the pkgIndex.tcl file for package Rivet. set auto_path [linsert $auto_path 0 [file dirname [info script]]] ## This will allow users to create proc libraries and tclIndex files ## in the local directory that can be autoloaded. ## Perhaps this must go to the front of the list to allow the user ## to override even Rivet's procs. lappend auto_path . } } ;## namespace eval ::Rivet ## if we are running from within mod_rivet we have already ## defined ::rivet::exit (mod_rivet.c: Rivet_PerInterpInit) ## and we divert Tcl ::exit to ::rivet::exit if {[info commands ::rivet::exit] != ""} { rename ::exit ::Rivet::tclcore_exit proc ::exit {code} { if {[string is integer $code]} { eval ::rivet::exit $code } else { eval ::rivet::exit 0 } } } ## Rivet 2.1.x supports Tcl >= 8.5, therefore there's no more need for ## the command incr0, as the functionality of creating a not yet ## existing variable is now provided by 'incr'. Being incr0 a command ## in Rivet < 2.1.0, before the move into the ::Rivet namespace, ## we alias this command only in the global namespace interp alias {} ::incr0 {} incr ## Initialize Rivet. ::Rivet::init ## And now we get to the import of the whole ::rivet namespace. # Do we actually want to import everything? If Rivet was configured # to import the ::rivet namespace for compatibility we do it right away. # This option is not guaranteed to be supported in future versions. if {[info exists module_conf(import_rivet_commands)] && $module_conf(import_rivet_commands)} { namespace eval :: { namespace import ::rivet::* } } array unset module_conf rivet-2.3.5/doc/xml/form.xml000644 001750 001750 00000065227 12050546663 015373 0ustar00mxmmxm000000 000000
    Form: An HTML Form Fields Generation Utility
    Introduction The form package is a utility for generating html forms. A form object command saves the programmer from typing the cumbersome html code of input elements, working out a solution for better standardization and readability of the code. form requires that only the minimum necessary to distinguish the element is typed, greatly simplyfing the development of forms. Options to the command are treated as a list of parameter-value pairs that become the defaults for the corresponding attributes of the form. A form object has specialized menthods to generate all of the standard input fields, i.e. text, password, hidden, generic button, submit or reset buttons and image. form creates select input fields, radiobutton and checkbox boolean options groups. Also new inputs introduced with HTML5 are supported: color, date, datetime, datetime-local, email, file, month, number, range, search, tel, time, url, week. Other input elements can be generated using the general purpose 'field' method.
    form a Tcl command object for creating HTML forms form form_name -option1 value_1 -option2 value_2 ... creates and returns a new Tcl command named . Options -method post|get The http method for sending the form data back to the server. Possible values are get or post -name form_name a name for the form being created: this value becomes the value of the attribute 'name' in the <form> tag. -defaults default_values an array of default values to be assigned to the fields of the form. Every name in the array is matched with an input field, when a given field gets added to the form it is initialized with the value of the corresponding variable in the array. This option works well in conjuction with the load_response command of Rivet when default values come from another form. -action URL The URL the data are being sent to. If no -action switch is specified the data are sent to the form's URL. Form Object Commands Form object commands follow the usual syntax of Tcl commands with a subcommand argument playing the role of a switch among various functionalities of the command. Form objects also need the name parameter which is to become the value of the 'name' attribute in an input field. This argument is the key that has to be used by the server-side script to retrieve the input field value. form_object subcommand name -option1 value1 -option2 value2 ... Options passed to a subcommand are copied into the tag as attribute="value" pairs. Some subcommands (e.g. form, radiobuttons and checkboxes) treat specific options in a way that fits the specific organization and function of these fields. Exceptions to this general syntax are the field and end subcommands. field is an abstract input field creation method and requires an additional parameter specifiyng the type of field to create. Every concrete input field generation command uses this subcommand internally to print the final html. Subcommands start name -method get | post -name form_name -defaults default_values -action URL args Print the <form> tag with all its attributes. This command must be called as first in the form generation process. The following is a sample of code creating a form named 'formname' whose data will be sent via the GET method. Initial form fields values will be obtained from array response form myform -defaults response -method get -name formname myform start myform text text_entry -size 20 myform select option_selected -values {opt1 opt2 opt3 opt4} myform submit submit -value Search myform end The code prints a form that sends a text entry content and the option value associated with a radiobutton. The URL of the server script is the same that created the form. Use the -url option to specify a different url. Options -method post|get The method to be used to encode the form data. Possible values are get or post -name form_name a name for the form being generated: this value becomes the value of the attribute 'name' in the <form> tag. -defaults default_values an array of default values to be assigned to the fields of the form. Every name in the array is matched with an input field, when a given field gets added to the form it is initialized with the value of the corresponding variable in the array. This option works well in conjuction with the load_response command of Rivet when default values come from another form. -action URL The URL the data will be sent to. If no -action switch is specified the data are sent to the form's URL. end Print the </form> closing tag. This command must be called last in the form generation process field name type args Print a field of the given type and name, including any default key-value pairs defined for this field type and optional key-value pairs included with the statement Options -opt1 val1 Option description radiobuttons name -values values -labels labels args the radiobutton creates a whole radiobutton group with the values and labels specified in the argument list. If no -labels switch is passed to the subcommand the values are printed as labels of the radiobutton. Options -values values_list List of values associated with the radiobuttons to be displayed -labels labels_list List of labels to be printed with every radiobutton. There must be a label for every radiobutton Example: form myform -defaults response -method get -name formname myform start myform text text_entry -size 20 myform radiobuttons fruit -values {big medium small} \ -labels {Watermelon Orange Strawberry} \ -class myradiobclass myform submit submit -value Search myform end will print the following HTML code. <input type="radio" name="fruit" class="myradiobclass" value="big" />Watermelon <input type="radio" name="fruit" class="myradiobclass" value="medium" />Orange <input type="radio" name="fruit" class="myradiobclass" value="small" />Strawberry if the response array has a variable for the name 'fruit' the corresponding radiobutton field is automatically checked. The options values and labels are used internally and don't get into the tag attributes. If a labels option is not given, labels are assigned using the values list. checkbox name -label label -value value args The checkbox subcommand emits a checkbox type input field with the name, label and value attributes set according to the parameters passed to the subcommand. Example: form myform -defaults response -method get -name formname -action <form_url> myform start myform checkbox options -value opt1 -label "Option 1" myform checkbox options -value opt2 -label "Option 2" myform checkbox options -value opt3 -label "Option 3" myform checkbox options -value opt4 -label "Option 4" myform submit save_tps -value "Send Options" myform end myform destroy Provided opt2 was in response array (in the list valued 'options' variable) that initialized the form, the output would look like this <form action="<form_url>" method="get" name="formname"> <input type="checkbox" name="options" id="autogen_1" label="Option 1" value="sopt1" /><label for="autogen_1">Option 1</label> <input type="checkbox" name="options" id="autogen_2" label="Option 2" value="sopt2" /><label for="autogen_2">Option 2</label> <input type="checkbox" name="options" id="autogen_3" label="Option 3" value="sopt3" /><label for="autogen_3">Option 3</label> <input type="checkbox" name="options" id="autogen_4" label="Option 4" value="sopt4" /><label for="autogen_4">Option 4</label> <input type="submit" name="submit" value="Send" /> </form> checkboxes name -labels labels_list -values values_list args The checkboxes is an extended form of the checkbox subcommand. checkboxes prints as many checkboxes as the number of elements in the labels_list argument Options -values values_list List of values associated with the checkboxes to be displayed -labels labels_list List of labels to be printed with every checkbox. There must be a label for every checkbox Example: form myform -defaults response -method post -action <form_url> myform start myform checkboxes options -values {opt1 opt2 opt3 opt4} -labels {"Option 1" "Option 2" "Option 3" "Option 4"} myform submit save_tps -value "Send Options" myform end myform destroy will print the following HTML code <form action="<form_url>" method="post"> <input type="checkbox" name="options" id="autogen_1" label="Option 1" value="opt1" /><label for="autogen_1">Option 1</label> <input type="checkbox" name="options" id="autogen_2" label="Option 2" value="opt2" /><label for="autogen_2">Option 2</label> <input type="checkbox" name="options" id="autogen_3" label="Option 3" value="opt3" /><label for="autogen_3">Option 3</label> <input type="checkbox" name="options" id="autogen_4" label="Option 4" value="opt4" /><label for="autogen_4">Option 4</label> <input type="submit" name="save_tps" value="Send Options" /> </form> password name args Same as text, but the input is obfuscated so as not to reveal the text being typed hidden name args hidden input element: typicall embedded in a form in order to pass status variables. submit name args emits the code for a classical HTML submit button. Example: the following code form myform -defaults response -method get -name feedsearch myform start myform submit submit -value Search Would emit a form like this <form...> <input type="submit" name="submit" value="Search" /> </form> button name args emits the code for a button field having name as name reset name args Classical HTML reset button that resets the input fields back to their initial values image name args Emits an image input field radio name args Emits a radiobutton input field color name args Emits an HTML 5 "color" form field date name args Emits an HTML 5 "date" form field datetime name args Emits an HTML 5 "datetime" form field datetime_local name args Emits an HTML 5 "datetime_local" form field email name args Emits an HTML 5 "email" form field file name args Emits an HTML 5 "file" form field month name args Emits an HTML 5 "month" form field number name args Emits an HTML 5 "number" form field range name args Emits an HTML 5 "range" form field search name args Emits an HTML 5 "search" form field tel name args Emits an HTML 5 "tel" form field time name args Emits an HTML 5 "time" form field url name args Emits an HTML 5 "url" form field week name args Emits an HTML 5 "week" form field
    rivet-2.3.5/tests/mime.types000644 001750 001750 00000030042 07416630270 015501 0ustar00mxmmxm000000 000000 # This is a comment. I love comments. # This file controls what Internet media types are sent to the client for # given file extension(s). Sending the correct media type to the client # is important so they know how to handle the content of the file. # Extra types can either be added here or by using an AddType directive # in your config files. For more information about Internet media types, # please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type # registry is at . # MIME type Extension application/EDI-Consent application/EDI-X12 application/EDIFACT application/activemessage application/andrew-inset ez application/applefile application/atomicmail application/batch-SMTP application/beep+xml application/cals-1840 application/commonground application/cybercash application/dca-rft application/dec-dx application/dvcs application/eshop application/http application/hyperstudio application/iges application/index application/index.cmd application/index.obj application/index.response application/index.vnd application/iotp application/ipp application/isup application/font-tdpfr application/mac-binhex40 hqx application/mac-compactpro cpt application/macwriteii application/marc application/mathematica application/mathematica-old application/msword doc application/news-message-id application/news-transmission application/ocsp-request application/ocsp-response application/octet-stream bin dms lha lzh exe class so dll application/oda oda application/parityfec application/pdf pdf application/pgp-encrypted application/pgp-keys application/pgp-signature application/pkcs10 application/pkcs7-mime application/pkcs7-signature application/pkix-cert application/pkix-crl application/pkixcmp application/postscript ai eps ps application/prs.alvestrand.titrax-sheet application/prs.cww application/prs.nprend application/qsig application/remote-printing application/riscos application/rtf application/sdp application/set-payment application/set-payment-initiation application/set-registration application/set-registration-initiation application/sgml application/sgml-open-catalog application/sieve application/slate application/smil smi smil application/timestamp-query application/timestamp-reply application/vemmi application/vnd.3M.Post-it-Notes application/vnd.FloGraphIt application/vnd.accpac.simply.aso application/vnd.accpac.simply.imp application/vnd.acucobol application/vnd.aether.imp application/vnd.anser-web-certificate-issue-initiation application/vnd.anser-web-funds-transfer-initiation application/vnd.audiograph application/vnd.businessobjects application/vnd.bmi application/vnd.canon-cpdl application/vnd.canon-lips application/vnd.claymore application/vnd.commerce-battelle application/vnd.commonspace application/vnd.comsocaller application/vnd.contact.cmsg application/vnd.cosmocaller application/vnd.cups-postscript application/vnd.cups-raster application/vnd.cups-raw application/vnd.ctc-posml application/vnd.cybank application/vnd.dna application/vnd.dpgraph application/vnd.dxr application/vnd.ecdis-update application/vnd.ecowin.chart application/vnd.ecowin.filerequest application/vnd.ecowin.fileupdate application/vnd.ecowin.series application/vnd.ecowin.seriesrequest application/vnd.ecowin.seriesupdate application/vnd.enliven application/vnd.epson.esf application/vnd.epson.msf application/vnd.epson.quickanime application/vnd.epson.salt application/vnd.epson.ssf application/vnd.ericsson.quickcall application/vnd.eudora.data application/vnd.fdf application/vnd.ffsns application/vnd.framemaker application/vnd.fsc.weblaunch application/vnd.fujitsu.oasys application/vnd.fujitsu.oasys2 application/vnd.fujitsu.oasys3 application/vnd.fujitsu.oasysgp application/vnd.fujitsu.oasysprs application/vnd.fujixerox.ddd application/vnd.fujixerox.docuworks application/vnd.fujixerox.docuworks.binder application/vnd.fut-misnet application/vnd.grafeq application/vnd.groove-account application/vnd.groove-identity-message application/vnd.groove-injector application/vnd.groove-tool-message application/vnd.groove-tool-template application/vnd.groove-vcard application/vnd.hhe.lesson-player application/vnd.hp-HPGL application/vnd.hp-PCL application/vnd.hp-PCLXL application/vnd.hp-hpid application/vnd.hp-hps application/vnd.httphone application/vnd.hzn-3d-crossword application/vnd.ibm.afplinedata application/vnd.ibm.MiniPay application/vnd.ibm.modcap application/vnd.informix-visionary application/vnd.intercon.formnet application/vnd.intertrust.digibox application/vnd.intertrust.nncp application/vnd.intu.qbo application/vnd.intu.qfx application/vnd.irepository.package+xml application/vnd.is-xpr application/vnd.japannet-directory-service application/vnd.japannet-jpnstore-wakeup application/vnd.japannet-payment-wakeup application/vnd.japannet-registration application/vnd.japannet-registration-wakeup application/vnd.japannet-setstore-wakeup application/vnd.japannet-verification application/vnd.japannet-verification-wakeup application/vnd.koan application/vnd.lotus-1-2-3 application/vnd.lotus-approach application/vnd.lotus-freelance application/vnd.lotus-notes application/vnd.lotus-organizer application/vnd.lotus-screencam application/vnd.lotus-wordpro application/vnd.mcd application/vnd.mediastation.cdkey application/vnd.meridian-slingshot application/vnd.mif mif application/vnd.minisoft-hp3000-save application/vnd.mitsubishi.misty-guard.trustweb application/vnd.mobius.daf application/vnd.mobius.dis application/vnd.mobius.msl application/vnd.mobius.plc application/vnd.mobius.txf application/vnd.motorola.flexsuite application/vnd.motorola.flexsuite.adsi application/vnd.motorola.flexsuite.fis application/vnd.motorola.flexsuite.gotap application/vnd.motorola.flexsuite.kmr application/vnd.motorola.flexsuite.ttc application/vnd.motorola.flexsuite.wem application/vnd.mozilla.xul+xml application/vnd.ms-artgalry application/vnd.ms-asf application/vnd.ms-excel xls application/vnd.ms-lrm application/vnd.ms-powerpoint ppt application/vnd.ms-project application/vnd.ms-tnef application/vnd.ms-works application/vnd.mseq application/vnd.msign application/vnd.music-niff application/vnd.musician application/vnd.netfpx application/vnd.noblenet-directory application/vnd.noblenet-sealer application/vnd.noblenet-web application/vnd.novadigm.EDM application/vnd.novadigm.EDX application/vnd.novadigm.EXT application/vnd.osa.netdeploy application/vnd.palm application/vnd.pg.format application/vnd.pg.osasli application/vnd.powerbuilder6 application/vnd.powerbuilder6-s application/vnd.powerbuilder7 application/vnd.powerbuilder7-s application/vnd.powerbuilder75 application/vnd.powerbuilder75-s application/vnd.previewsystems.box application/vnd.publishare-delta-tree application/vnd.pvi.ptid1 application/vnd.pwg-xhtml-print+xml application/vnd.rapid application/vnd.s3sms application/vnd.seemail application/vnd.shana.informed.formdata application/vnd.shana.informed.formtemplate application/vnd.shana.informed.interchange application/vnd.shana.informed.package application/vnd.sss-cod application/vnd.sss-dtf application/vnd.sss-ntf application/vnd.street-stream application/vnd.svd application/vnd.swiftview-ics application/vnd.triscape.mxs application/vnd.trueapp application/vnd.truedoc application/vnd.tve-trigger application/vnd.ufdl application/vnd.uplanet.alert application/vnd.uplanet.alert-wbxml application/vnd.uplanet.bearer-choice-wbxml application/vnd.uplanet.bearer-choice application/vnd.uplanet.cacheop application/vnd.uplanet.cacheop-wbxml application/vnd.uplanet.channel application/vnd.uplanet.channel-wbxml application/vnd.uplanet.list application/vnd.uplanet.list-wbxml application/vnd.uplanet.listcmd application/vnd.uplanet.listcmd-wbxml application/vnd.uplanet.signal application/vnd.vcx application/vnd.vectorworks application/vnd.vidsoft.vidconference application/vnd.visio application/vnd.vividence.scriptfile application/vnd.wap.sic application/vnd.wap.slc application/vnd.wap.wbxml wbxml application/vnd.wap.wmlc wmlc application/vnd.wap.wmlscriptc wmlsc application/vnd.webturbo application/vnd.wrq-hp3000-labelled application/vnd.wt.stf application/vnd.xara application/vnd.xfdl application/vnd.yellowriver-custom-menu application/whoispp-query application/whoispp-response application/wita application/wordperfect5.1 application/x-bcpio bcpio application/x-cdlink vcd application/x-chess-pgn pgn application/x-compress application/x-cpio cpio application/x-csh csh application/x-director dcr dir dxr application/x-dvi dvi application/x-futuresplash spl application/x-gtar gtar application/x-gzip application/x-hdf hdf application/x-javascript js application/x-koan skp skd skt skm application/x-latex latex application/x-netcdf nc cdf application/x-sh sh application/x-shar shar application/x-shockwave-flash swf application/x-stuffit sit application/x-sv4cpio sv4cpio application/x-sv4crc sv4crc application/x-tar tar application/x-tcl tcl application/x-tex tex application/x-texinfo texinfo texi application/x-troff t tr roff application/x-troff-man man application/x-troff-me me application/x-troff-ms ms application/x-ustar ustar application/x-wais-source src application/x400-bp application/xml application/xml-dtd application/xml-external-parsed-entity application/zip zip audio/32kadpcm audio/basic au snd audio/g.722.1 audio/l16 audio/midi mid midi kar audio/mp4a-latm audio/mpa-robust audio/mpeg mpga mp2 mp3 audio/parityfec audio/prs.sid audio/telephone-event audio/tone audio/vnd.cisco.nse audio/vnd.cns.anp1 audio/vnd.cns.inf1 audio/vnd.digital-winds audio/vnd.everad.plj audio/vnd.lucent.voice audio/vnd.nortel.vbk audio/vnd.nuera.ecelp4800 audio/vnd.nuera.ecelp7470 audio/vnd.nuera.ecelp9600 audio/vnd.octel.sbc audio/vnd.qcelp audio/vnd.rhetorex.32kadpcm audio/vnd.vmx.cvsd audio/x-aiff aif aiff aifc audio/x-mpegurl m3u audio/x-pn-realaudio ram rm audio/x-pn-realaudio-plugin rpm audio/x-realaudio ra audio/x-wav wav chemical/x-pdb pdb chemical/x-xyz xyz image/bmp bmp image/cgm image/g3fax image/gif gif image/ief ief image/jpeg jpeg jpg jpe image/naplps image/png png image/prs.btif image/prs.pti image/tiff tiff tif image/vnd.cns.inf2 image/vnd.dwg image/vnd.dxf image/vnd.fastbidsheet image/vnd.fpx image/vnd.fst image/vnd.fujixerox.edmics-mmr image/vnd.fujixerox.edmics-rlc image/vnd.mix image/vnd.net-fpx image/vnd.svf image/vnd.wap.wbmp wbmp image/vnd.xiff image/x-cmu-raster ras image/x-portable-anymap pnm image/x-portable-bitmap pbm image/x-portable-graymap pgm image/x-portable-pixmap ppm image/x-rgb rgb image/x-xbitmap xbm image/x-xpixmap xpm image/x-xwindowdump xwd message/delivery-status message/disposition-notification message/external-body message/http message/news message/partial message/rfc822 message/s-http model/iges igs iges model/mesh msh mesh silo model/vnd.dwf model/vnd.flatland.3dml model/vnd.gdl model/vnd.gs-gdl model/vnd.gtw model/vnd.mts model/vnd.vtu model/vrml wrl vrml multipart/alternative multipart/appledouble multipart/byteranges multipart/digest multipart/encrypted multipart/form-data multipart/header-set multipart/mixed multipart/parallel multipart/related multipart/report multipart/signed multipart/voice-message text/calendar text/css css text/directory text/enriched text/html html htm text/parityfec text/plain asc txt text/prs.lines.tag text/rfc822-headers text/richtext rtx text/rtf rtf text/sgml sgml sgm text/tab-separated-values tsv text/t140 text/uri-list text/vnd.DMClientScript text/vnd.IPTC.NITF text/vnd.IPTC.NewsML text/vnd.abc text/vnd.curl text/vnd.flatland.3dml text/vnd.fly text/vnd.fmi.flexstor text/vnd.in3d.3dml text/vnd.in3d.spot text/vnd.latex-z text/vnd.motorola.reflex text/vnd.ms-mediapackage text/vnd.wap.si text/vnd.wap.sl text/vnd.wap.wml wml text/vnd.wap.wmlscript wmls text/x-setext etx text/xml xml xsl text/xml-external-parsed-entity video/mp4v-es video/mpeg mpeg mpg mpe video/parityfec video/pointer video/quicktime qt mov video/vnd.fvt video/vnd.motorola.video video/vnd.motorola.videop video/vnd.mpegurl mxu video/vnd.mts video/vnd.nokia.interleaved-multimedia video/vnd.vivo video/x-msvideo avi video/x-sgi-movie movie x-conference/x-cooltalk ice rivet-2.3.5/doc/html/calendar_package.html000644 001750 001750 00000007050 13200160530 020131 0ustar00mxmmxm000000 000000 Calendar Package

    Calendar Package

    Introduction

    The package is based on the Calendar class, a class capable of printing an ascii calendar table that closely resembles the output of the typical Unix cal command. The internal code is written entirely in Tcl, therefore doesn't rely on the existance of cal on the system. XmlCalendar inherits the basic methods and adds XML tagging to the table. XmlCalendar prints an XML calendar table whose header, weekdays banner and days rows tags are configurable. Also specific days or specific weeks can be given arbitrary attributes.

    Calendar core methods are based on the cal procedure written by Richard Suchenwirth and published on the Tcl Wiki

    [Note]Note
    The Calendar package uses Tcl dict command to manage markup information. Hence either Tcl8.5 or Tcl8.4 with package dict are required.
    rivet-2.3.5/doc/images/toc-plus.png000644 001750 001750 00000000410 11436722370 016604 0ustar00mxmmxm000000 000000 PNG  IHDR )bKGD#2#IDATxch`#@C"ԣj?RJld:4CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com!*tEXtSignatureab17802e1ddae3211b1ce6bc3b08aec7{( tEXtPage15x9+0+07vIENDB`rivet-2.3.5/src/Makefile.in000644 001750 001750 00000154075 13200160275 015162 0ustar00mxmmxm000000 000000 # Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ # Makefile for Rivet # Copyright 2004-2005 The Apache Software Foundation # 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. #SUBDIRS = librivet parser @apache_version_dir@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c 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 = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/ax_split_version.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/tclconfig/tcl.m4 \ $(top_srcdir)/tclconfig/libtool.m4 \ $(top_srcdir)/m4/ax_prefix_config_h.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(apxs_libexecdir)" \ "$(DESTDIR)$(lib_libexecdir)" LTLIBRARIES = $(apxs_libexec_LTLIBRARIES) $(lib_libexec_LTLIBRARIES) librivetlib_la_DEPENDENCIES = am__dirstamp = $(am__leading_dot)dirstamp am_librivetlib_la_OBJECTS = librivet/librivetlib_la-rivetList.lo \ librivet/librivetlib_la-rivetCrypt.lo \ librivet/librivetlib_la-rivetWWW.lo \ librivet/librivetlib_la-rivetPkgInit.lo librivetlib_la_OBJECTS = $(am_librivetlib_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = librivetlib_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(librivetlib_la_LDFLAGS) $(LDFLAGS) -o \ $@ librivetparser_la_DEPENDENCIES = am_librivetparser_la_OBJECTS = \ parser/librivetparser_la-rivetParser.lo \ parser/librivetparser_la-parserPkgInit.lo librivetparser_la_OBJECTS = $(am_librivetparser_la_OBJECTS) librivetparser_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(librivetparser_la_LDFLAGS) $(LDFLAGS) \ -o $@ mod_rivet_la_DEPENDENCIES = am_mod_rivet_la_OBJECTS = \ @apache_request@/mod_rivet_la-apache_multipart_buffer.lo \ @apache_request@/mod_rivet_la-apache_request.lo \ @rivet_core@/mod_rivet_la-mod_rivet.lo \ @rivet_core_cmds@/mod_rivet_la-rivetCore.lo \ @rivet_core_cmds@/mod_rivet_la-rivetInspect.lo \ @rivet_channel@/mod_rivet_la-rivetChannel.lo \ config/mod_rivet_la-TclWebapache.lo \ config/mod_rivet_la-apache_config.lo \ parser/mod_rivet_la-rivetParser.lo mod_rivet_la_OBJECTS = $(am_mod_rivet_la_OBJECTS) mod_rivet_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(mod_rivet_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/tclconfig/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(librivetlib_la_SOURCES) $(librivetparser_la_SOURCES) \ $(mod_rivet_la_SOURCES) DIST_SOURCES = $(librivetlib_la_SOURCES) $(librivetparser_la_SOURCES) \ $(mod_rivet_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/tclconfig/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APR_CPPFLAGS = @APR_CPPFLAGS@ APR_INCLUDES = @APR_INCLUDES@ APR_LDFLAGS = @APR_LDFLAGS@ APU_INCLUDES = @APU_INCLUDES@ APU_LDFLAGS = @APU_LDFLAGS@ APXS_CPPFLAGS = @APXS_CPPFLAGS@ APXS_CPPFLAGS_SHLIB = @APXS_CPPFLAGS_SHLIB@ APXS_INCLUDES = @APXS_INCLUDES@ APXS_LDFLAGS = @APXS_LDFLAGS@ APXS_LD_SHLIB = @APXS_LD_SHLIB@ APXS_LIBEXECDIR = @APXS_LIBEXECDIR@ APXS_LIBS = @APXS_LIBS@ APXS_PREFIX = @APXS_PREFIX@ APXS_SYSCONFDIR = @APXS_SYSCONFDIR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CELIB_DIR = @CELIB_DIR@ CFLAGS = @CFLAGS@ CFLAGS_DEBUG = @CFLAGS_DEBUG@ CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ CFLAGS_WARNING = @CFLAGS_WARNING@ CLEANFILES = @CLEANFILES@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH = @CYGPATH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INIT_VERSION = @INIT_VERSION@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ LD_LIBRARY_PATH_VAR = @LD_LIBRARY_PATH_VAR@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MAKE_LIB = @MAKE_LIB@ MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ MAKE_STATIC_LIB = @MAKE_STATIC_LIB@ MAKE_STUB_LIB = @MAKE_STUB_LIB@ MANIFEST_TOOL = @MANIFEST_TOOL@ MATH_LIBS = @MATH_LIBS@ MAX_POST = @MAX_POST@ MKDIR_P = @MKDIR_P@ MOD_RIVET_INCLUDES = @MOD_RIVET_INCLUDES@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CFLAGS = @PKG_CFLAGS@ PKG_HEADERS = @PKG_HEADERS@ PKG_INCLUDES = @PKG_INCLUDES@ PKG_LIBS = @PKG_LIBS@ PKG_LIB_FILE = @PKG_LIB_FILE@ PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@ PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@ PKG_STUB_SOURCES = @PKG_STUB_SOURCES@ PKG_TCL_SOURCES = @PKG_TCL_SOURCES@ RANLIB = @RANLIB@ RANLIB_STUB = @RANLIB_STUB@ RIVET_BASE_INCLUDE = @RIVET_BASE_INCLUDE@ RIVET_TCL_TARGET = @RIVET_TCL_TARGET@ RIVET_UPLOAD_DIR = @RIVET_UPLOAD_DIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_BUILD = @SHARED_BUILD@ SHELL = @SHELL@ SHLIB_CFLAGS = @SHLIB_CFLAGS@ SHLIB_LD = @SHLIB_LD@ SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ STLIB_LD = @STLIB_LD@ STRIP = @STRIP@ TCLSH_PROG = @TCLSH_PROG@ TCL_BIN_DIR = @TCL_BIN_DIR@ TCL_DBGX = @TCL_DBGX@ TCL_DEFS = @TCL_DEFS@ TCL_EXTRA_CFLAGS = @TCL_EXTRA_CFLAGS@ TCL_INCLUDES = @TCL_INCLUDES@ TCL_LD_FLAGS = @TCL_LD_FLAGS@ TCL_LIBS = @TCL_LIBS@ TCL_LIB_FILE = @TCL_LIB_FILE@ TCL_LIB_FLAG = @TCL_LIB_FLAG@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ TCL_PATCH_LEVEL = @TCL_PATCH_LEVEL@ TCL_SHLIB_LD_LIBS = @TCL_SHLIB_LD_LIBS@ TCL_SRC_DIR = @TCL_SRC_DIR@ TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@ TCL_STUB_LIB_FLAG = @TCL_STUB_LIB_FLAG@ TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@ TCL_THREADS = @TCL_THREADS@ TCL_VERSION = @TCL_VERSION@ VC_MANIFEST_EMBED_DLL = @VC_MANIFEST_EMBED_DLL@ VC_MANIFEST_EMBED_EXE = @VC_MANIFEST_EMBED_EXE@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ apache_include = @apache_include@ apache_request = @apache_request@ apache_version_dir = @apache_version_dir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rivet_channel = @rivet_channel@ rivet_core = @rivet_core@ rivet_core_cmds = @rivet_core_cmds@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ with_apr_config = @with_apr_config@ with_apu_config = @with_apu_config@ with_apxs = @with_apxs@ lib_libexecdir = @RIVET_TCL_TARGET@ lib_libexec_LTLIBRARIES = librivetparser.la librivetlib.la # # Rivet Parser Library # librivetparser_la_SOURCES = parser/rivetParser.c parser/parserPkgInit.c librivetparser_la_LDFLAGS = @TCL_STUB_LIB_SPEC@ @APXS_LDFLAGS@ -module -avoid-version librivetparser_la_LIBADD = @APXS_LIBS@ librivetparser_la_CPPFLAGS = @apache_include@ -I@rivet_core@ @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ -DSTART_TAG='""' -DUSE_TCL_STUBS # # Rivet Library # librivetlib_la_SOURCES = librivet/rivetList.c librivet/rivetCrypt.c librivet/rivetWWW.c librivet/rivetPkgInit.c librivetlib_la_LDFLAGS = @TCL_STUB_LIB_SPEC@ @APXS_LDFLAGS@ @APR_LDFLAGS@ @APU_LDFLAGS@ -module -avoid-version librivetlib_la_LIBADD = @APXS_LIBS@ librivetlib_la_CPPFLAGS = -I@rivet_core@ -I@apache_request@ @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_INCLUDES@ @APU_INCLUDES@ @APR_CPPFLAGS@ -DSTART_TAG='""' -DUSE_TCL_STUBS # # mod_rivet # apxs_libexecdir = @APXS_LIBEXECDIR@ apxs_libexec_LTLIBRARIES = mod_rivet.la mod_rivet_la_LDFLAGS = @TCL_LIB_SPEC@ @APXS_LDFLAGS@ @APR_LDFLAGS@ @APU_LDFLAGS@ -module -avoid-version mod_rivet_la_LIBADD = @TCL_LIBS@ @APXS_LIBS@ mod_rivet_la_CPPFLAGS = -I@rivet_core@ -I@rivet_channel@ -Iconfig -Iparser -I@apache_request@ @apache_include@ -I@RIVET_BASE_INCLUDE@ @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_CPPFLAGS@ @APR_INCLUDES@ @APU_INCLUDES@ -DSTART_TAG='""' mod_rivet_la_SOURCES = @apache_request@/apache_multipart_buffer.c \ @apache_request@/apache_request.c \ @rivet_core@/mod_rivet.c \ @rivet_core_cmds@/rivetCore.c \ @rivet_core_cmds@/rivetInspect.c \ @rivet_channel@/rivetChannel.c \ config/TclWebapache.c \ config/apache_config.c \ parser/rivetParser.c 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 src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/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-apxs_libexecLTLIBRARIES: $(apxs_libexec_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(apxs_libexec_LTLIBRARIES)'; test -n "$(apxs_libexecdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(apxs_libexecdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(apxs_libexecdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(apxs_libexecdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(apxs_libexecdir)"; \ } uninstall-apxs_libexecLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(apxs_libexec_LTLIBRARIES)'; test -n "$(apxs_libexecdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(apxs_libexecdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(apxs_libexecdir)/$$f"; \ done clean-apxs_libexecLTLIBRARIES: -test -z "$(apxs_libexec_LTLIBRARIES)" || rm -f $(apxs_libexec_LTLIBRARIES) @list='$(apxs_libexec_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } install-lib_libexecLTLIBRARIES: $(lib_libexec_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_libexec_LTLIBRARIES)'; test -n "$(lib_libexecdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(lib_libexecdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(lib_libexecdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(lib_libexecdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(lib_libexecdir)"; \ } uninstall-lib_libexecLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_libexec_LTLIBRARIES)'; test -n "$(lib_libexecdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(lib_libexecdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(lib_libexecdir)/$$f"; \ done clean-lib_libexecLTLIBRARIES: -test -z "$(lib_libexec_LTLIBRARIES)" || rm -f $(lib_libexec_LTLIBRARIES) @list='$(lib_libexec_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } librivet/$(am__dirstamp): @$(MKDIR_P) librivet @: > librivet/$(am__dirstamp) librivet/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) librivet/$(DEPDIR) @: > librivet/$(DEPDIR)/$(am__dirstamp) librivet/librivetlib_la-rivetList.lo: librivet/$(am__dirstamp) \ librivet/$(DEPDIR)/$(am__dirstamp) librivet/librivetlib_la-rivetCrypt.lo: librivet/$(am__dirstamp) \ librivet/$(DEPDIR)/$(am__dirstamp) librivet/librivetlib_la-rivetWWW.lo: librivet/$(am__dirstamp) \ librivet/$(DEPDIR)/$(am__dirstamp) librivet/librivetlib_la-rivetPkgInit.lo: librivet/$(am__dirstamp) \ librivet/$(DEPDIR)/$(am__dirstamp) librivetlib.la: $(librivetlib_la_OBJECTS) $(librivetlib_la_DEPENDENCIES) $(EXTRA_librivetlib_la_DEPENDENCIES) $(AM_V_CCLD)$(librivetlib_la_LINK) -rpath $(lib_libexecdir) $(librivetlib_la_OBJECTS) $(librivetlib_la_LIBADD) $(LIBS) parser/$(am__dirstamp): @$(MKDIR_P) parser @: > parser/$(am__dirstamp) parser/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) parser/$(DEPDIR) @: > parser/$(DEPDIR)/$(am__dirstamp) parser/librivetparser_la-rivetParser.lo: parser/$(am__dirstamp) \ parser/$(DEPDIR)/$(am__dirstamp) parser/librivetparser_la-parserPkgInit.lo: parser/$(am__dirstamp) \ parser/$(DEPDIR)/$(am__dirstamp) librivetparser.la: $(librivetparser_la_OBJECTS) $(librivetparser_la_DEPENDENCIES) $(EXTRA_librivetparser_la_DEPENDENCIES) $(AM_V_CCLD)$(librivetparser_la_LINK) -rpath $(lib_libexecdir) $(librivetparser_la_OBJECTS) $(librivetparser_la_LIBADD) $(LIBS) @apache_request@/$(am__dirstamp): @$(MKDIR_P) @apache_request@ @: > @apache_request@/$(am__dirstamp) @apache_request@/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @apache_request@/$(DEPDIR) @: > @apache_request@/$(DEPDIR)/$(am__dirstamp) @apache_request@/mod_rivet_la-apache_multipart_buffer.lo: \ @apache_request@/$(am__dirstamp) \ @apache_request@/$(DEPDIR)/$(am__dirstamp) @apache_request@/mod_rivet_la-apache_request.lo: \ @apache_request@/$(am__dirstamp) \ @apache_request@/$(DEPDIR)/$(am__dirstamp) @rivet_core@/$(am__dirstamp): @$(MKDIR_P) @rivet_core@ @: > @rivet_core@/$(am__dirstamp) @rivet_core@/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @rivet_core@/$(DEPDIR) @: > @rivet_core@/$(DEPDIR)/$(am__dirstamp) @rivet_core@/mod_rivet_la-mod_rivet.lo: @rivet_core@/$(am__dirstamp) \ @rivet_core@/$(DEPDIR)/$(am__dirstamp) @rivet_core_cmds@/$(am__dirstamp): @$(MKDIR_P) @rivet_core_cmds@ @: > @rivet_core_cmds@/$(am__dirstamp) @rivet_core_cmds@/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @rivet_core_cmds@/$(DEPDIR) @: > @rivet_core_cmds@/$(DEPDIR)/$(am__dirstamp) @rivet_core_cmds@/mod_rivet_la-rivetCore.lo: \ @rivet_core_cmds@/$(am__dirstamp) \ @rivet_core_cmds@/$(DEPDIR)/$(am__dirstamp) @rivet_core_cmds@/mod_rivet_la-rivetInspect.lo: \ @rivet_core_cmds@/$(am__dirstamp) \ @rivet_core_cmds@/$(DEPDIR)/$(am__dirstamp) @rivet_channel@/$(am__dirstamp): @$(MKDIR_P) @rivet_channel@ @: > @rivet_channel@/$(am__dirstamp) @rivet_channel@/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @rivet_channel@/$(DEPDIR) @: > @rivet_channel@/$(DEPDIR)/$(am__dirstamp) @rivet_channel@/mod_rivet_la-rivetChannel.lo: \ @rivet_channel@/$(am__dirstamp) \ @rivet_channel@/$(DEPDIR)/$(am__dirstamp) config/$(am__dirstamp): @$(MKDIR_P) config @: > config/$(am__dirstamp) config/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) config/$(DEPDIR) @: > config/$(DEPDIR)/$(am__dirstamp) config/mod_rivet_la-TclWebapache.lo: config/$(am__dirstamp) \ config/$(DEPDIR)/$(am__dirstamp) config/mod_rivet_la-apache_config.lo: config/$(am__dirstamp) \ config/$(DEPDIR)/$(am__dirstamp) parser/mod_rivet_la-rivetParser.lo: parser/$(am__dirstamp) \ parser/$(DEPDIR)/$(am__dirstamp) mod_rivet.la: $(mod_rivet_la_OBJECTS) $(mod_rivet_la_DEPENDENCIES) $(EXTRA_mod_rivet_la_DEPENDENCIES) $(AM_V_CCLD)$(mod_rivet_la_LINK) -rpath $(apxs_libexecdir) $(mod_rivet_la_OBJECTS) $(mod_rivet_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f @apache_request@/*.$(OBJEXT) -rm -f @apache_request@/*.lo -rm -f @rivet_channel@/*.$(OBJEXT) -rm -f @rivet_channel@/*.lo -rm -f @rivet_core@/*.$(OBJEXT) -rm -f @rivet_core@/*.lo -rm -f @rivet_core_cmds@/*.$(OBJEXT) -rm -f @rivet_core_cmds@/*.lo -rm -f config/*.$(OBJEXT) -rm -f config/*.lo -rm -f librivet/*.$(OBJEXT) -rm -f librivet/*.lo -rm -f parser/*.$(OBJEXT) -rm -f parser/*.lo distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@@apache_request@/$(DEPDIR)/mod_rivet_la-apache_multipart_buffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@apache_request@/$(DEPDIR)/mod_rivet_la-apache_request.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@rivet_channel@/$(DEPDIR)/mod_rivet_la-rivetChannel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@rivet_core@/$(DEPDIR)/mod_rivet_la-mod_rivet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@rivet_core_cmds@/$(DEPDIR)/mod_rivet_la-rivetCore.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@rivet_core_cmds@/$(DEPDIR)/mod_rivet_la-rivetInspect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/mod_rivet_la-TclWebapache.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/mod_rivet_la-apache_config.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@librivet/$(DEPDIR)/librivetlib_la-rivetCrypt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@librivet/$(DEPDIR)/librivetlib_la-rivetList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@librivet/$(DEPDIR)/librivetlib_la-rivetPkgInit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@librivet/$(DEPDIR)/librivetlib_la-rivetWWW.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@parser/$(DEPDIR)/librivetparser_la-parserPkgInit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@parser/$(DEPDIR)/librivetparser_la-rivetParser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@parser/$(DEPDIR)/mod_rivet_la-rivetParser.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< librivet/librivetlib_la-rivetList.lo: librivet/rivetList.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librivetlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librivet/librivetlib_la-rivetList.lo -MD -MP -MF librivet/$(DEPDIR)/librivetlib_la-rivetList.Tpo -c -o librivet/librivetlib_la-rivetList.lo `test -f 'librivet/rivetList.c' || echo '$(srcdir)/'`librivet/rivetList.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) librivet/$(DEPDIR)/librivetlib_la-rivetList.Tpo librivet/$(DEPDIR)/librivetlib_la-rivetList.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='librivet/rivetList.c' object='librivet/librivetlib_la-rivetList.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librivetlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librivet/librivetlib_la-rivetList.lo `test -f 'librivet/rivetList.c' || echo '$(srcdir)/'`librivet/rivetList.c librivet/librivetlib_la-rivetCrypt.lo: librivet/rivetCrypt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librivetlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librivet/librivetlib_la-rivetCrypt.lo -MD -MP -MF librivet/$(DEPDIR)/librivetlib_la-rivetCrypt.Tpo -c -o librivet/librivetlib_la-rivetCrypt.lo `test -f 'librivet/rivetCrypt.c' || echo '$(srcdir)/'`librivet/rivetCrypt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) librivet/$(DEPDIR)/librivetlib_la-rivetCrypt.Tpo librivet/$(DEPDIR)/librivetlib_la-rivetCrypt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='librivet/rivetCrypt.c' object='librivet/librivetlib_la-rivetCrypt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librivetlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librivet/librivetlib_la-rivetCrypt.lo `test -f 'librivet/rivetCrypt.c' || echo '$(srcdir)/'`librivet/rivetCrypt.c librivet/librivetlib_la-rivetWWW.lo: librivet/rivetWWW.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librivetlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librivet/librivetlib_la-rivetWWW.lo -MD -MP -MF librivet/$(DEPDIR)/librivetlib_la-rivetWWW.Tpo -c -o librivet/librivetlib_la-rivetWWW.lo `test -f 'librivet/rivetWWW.c' || echo '$(srcdir)/'`librivet/rivetWWW.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) librivet/$(DEPDIR)/librivetlib_la-rivetWWW.Tpo librivet/$(DEPDIR)/librivetlib_la-rivetWWW.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='librivet/rivetWWW.c' object='librivet/librivetlib_la-rivetWWW.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librivetlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librivet/librivetlib_la-rivetWWW.lo `test -f 'librivet/rivetWWW.c' || echo '$(srcdir)/'`librivet/rivetWWW.c librivet/librivetlib_la-rivetPkgInit.lo: librivet/rivetPkgInit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librivetlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librivet/librivetlib_la-rivetPkgInit.lo -MD -MP -MF librivet/$(DEPDIR)/librivetlib_la-rivetPkgInit.Tpo -c -o librivet/librivetlib_la-rivetPkgInit.lo `test -f 'librivet/rivetPkgInit.c' || echo '$(srcdir)/'`librivet/rivetPkgInit.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) librivet/$(DEPDIR)/librivetlib_la-rivetPkgInit.Tpo librivet/$(DEPDIR)/librivetlib_la-rivetPkgInit.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='librivet/rivetPkgInit.c' object='librivet/librivetlib_la-rivetPkgInit.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librivetlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librivet/librivetlib_la-rivetPkgInit.lo `test -f 'librivet/rivetPkgInit.c' || echo '$(srcdir)/'`librivet/rivetPkgInit.c parser/librivetparser_la-rivetParser.lo: parser/rivetParser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librivetparser_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT parser/librivetparser_la-rivetParser.lo -MD -MP -MF parser/$(DEPDIR)/librivetparser_la-rivetParser.Tpo -c -o parser/librivetparser_la-rivetParser.lo `test -f 'parser/rivetParser.c' || echo '$(srcdir)/'`parser/rivetParser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) parser/$(DEPDIR)/librivetparser_la-rivetParser.Tpo parser/$(DEPDIR)/librivetparser_la-rivetParser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parser/rivetParser.c' object='parser/librivetparser_la-rivetParser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librivetparser_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o parser/librivetparser_la-rivetParser.lo `test -f 'parser/rivetParser.c' || echo '$(srcdir)/'`parser/rivetParser.c parser/librivetparser_la-parserPkgInit.lo: parser/parserPkgInit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librivetparser_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT parser/librivetparser_la-parserPkgInit.lo -MD -MP -MF parser/$(DEPDIR)/librivetparser_la-parserPkgInit.Tpo -c -o parser/librivetparser_la-parserPkgInit.lo `test -f 'parser/parserPkgInit.c' || echo '$(srcdir)/'`parser/parserPkgInit.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) parser/$(DEPDIR)/librivetparser_la-parserPkgInit.Tpo parser/$(DEPDIR)/librivetparser_la-parserPkgInit.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parser/parserPkgInit.c' object='parser/librivetparser_la-parserPkgInit.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librivetparser_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o parser/librivetparser_la-parserPkgInit.lo `test -f 'parser/parserPkgInit.c' || echo '$(srcdir)/'`parser/parserPkgInit.c @apache_request@/mod_rivet_la-apache_multipart_buffer.lo: @apache_request@/apache_multipart_buffer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_rivet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @apache_request@/mod_rivet_la-apache_multipart_buffer.lo -MD -MP -MF @apache_request@/$(DEPDIR)/mod_rivet_la-apache_multipart_buffer.Tpo -c -o @apache_request@/mod_rivet_la-apache_multipart_buffer.lo `test -f '@apache_request@/apache_multipart_buffer.c' || echo '$(srcdir)/'`@apache_request@/apache_multipart_buffer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) @apache_request@/$(DEPDIR)/mod_rivet_la-apache_multipart_buffer.Tpo @apache_request@/$(DEPDIR)/mod_rivet_la-apache_multipart_buffer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@apache_request@/apache_multipart_buffer.c' object='@apache_request@/mod_rivet_la-apache_multipart_buffer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_rivet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @apache_request@/mod_rivet_la-apache_multipart_buffer.lo `test -f '@apache_request@/apache_multipart_buffer.c' || echo '$(srcdir)/'`@apache_request@/apache_multipart_buffer.c @apache_request@/mod_rivet_la-apache_request.lo: @apache_request@/apache_request.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_rivet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @apache_request@/mod_rivet_la-apache_request.lo -MD -MP -MF @apache_request@/$(DEPDIR)/mod_rivet_la-apache_request.Tpo -c -o @apache_request@/mod_rivet_la-apache_request.lo `test -f '@apache_request@/apache_request.c' || echo '$(srcdir)/'`@apache_request@/apache_request.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) @apache_request@/$(DEPDIR)/mod_rivet_la-apache_request.Tpo @apache_request@/$(DEPDIR)/mod_rivet_la-apache_request.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@apache_request@/apache_request.c' object='@apache_request@/mod_rivet_la-apache_request.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_rivet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @apache_request@/mod_rivet_la-apache_request.lo `test -f '@apache_request@/apache_request.c' || echo '$(srcdir)/'`@apache_request@/apache_request.c @rivet_core@/mod_rivet_la-mod_rivet.lo: @rivet_core@/mod_rivet.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_rivet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @rivet_core@/mod_rivet_la-mod_rivet.lo -MD -MP -MF @rivet_core@/$(DEPDIR)/mod_rivet_la-mod_rivet.Tpo -c -o @rivet_core@/mod_rivet_la-mod_rivet.lo `test -f '@rivet_core@/mod_rivet.c' || echo '$(srcdir)/'`@rivet_core@/mod_rivet.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) @rivet_core@/$(DEPDIR)/mod_rivet_la-mod_rivet.Tpo @rivet_core@/$(DEPDIR)/mod_rivet_la-mod_rivet.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@rivet_core@/mod_rivet.c' object='@rivet_core@/mod_rivet_la-mod_rivet.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_rivet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @rivet_core@/mod_rivet_la-mod_rivet.lo `test -f '@rivet_core@/mod_rivet.c' || echo '$(srcdir)/'`@rivet_core@/mod_rivet.c @rivet_core_cmds@/mod_rivet_la-rivetCore.lo: @rivet_core_cmds@/rivetCore.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_rivet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @rivet_core_cmds@/mod_rivet_la-rivetCore.lo -MD -MP -MF @rivet_core_cmds@/$(DEPDIR)/mod_rivet_la-rivetCore.Tpo -c -o @rivet_core_cmds@/mod_rivet_la-rivetCore.lo `test -f '@rivet_core_cmds@/rivetCore.c' || echo '$(srcdir)/'`@rivet_core_cmds@/rivetCore.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) @rivet_core_cmds@/$(DEPDIR)/mod_rivet_la-rivetCore.Tpo @rivet_core_cmds@/$(DEPDIR)/mod_rivet_la-rivetCore.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@rivet_core_cmds@/rivetCore.c' object='@rivet_core_cmds@/mod_rivet_la-rivetCore.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_rivet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @rivet_core_cmds@/mod_rivet_la-rivetCore.lo `test -f '@rivet_core_cmds@/rivetCore.c' || echo '$(srcdir)/'`@rivet_core_cmds@/rivetCore.c @rivet_core_cmds@/mod_rivet_la-rivetInspect.lo: @rivet_core_cmds@/rivetInspect.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_rivet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @rivet_core_cmds@/mod_rivet_la-rivetInspect.lo -MD -MP -MF @rivet_core_cmds@/$(DEPDIR)/mod_rivet_la-rivetInspect.Tpo -c -o @rivet_core_cmds@/mod_rivet_la-rivetInspect.lo `test -f '@rivet_core_cmds@/rivetInspect.c' || echo '$(srcdir)/'`@rivet_core_cmds@/rivetInspect.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) @rivet_core_cmds@/$(DEPDIR)/mod_rivet_la-rivetInspect.Tpo @rivet_core_cmds@/$(DEPDIR)/mod_rivet_la-rivetInspect.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@rivet_core_cmds@/rivetInspect.c' object='@rivet_core_cmds@/mod_rivet_la-rivetInspect.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_rivet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @rivet_core_cmds@/mod_rivet_la-rivetInspect.lo `test -f '@rivet_core_cmds@/rivetInspect.c' || echo '$(srcdir)/'`@rivet_core_cmds@/rivetInspect.c @rivet_channel@/mod_rivet_la-rivetChannel.lo: @rivet_channel@/rivetChannel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_rivet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @rivet_channel@/mod_rivet_la-rivetChannel.lo -MD -MP -MF @rivet_channel@/$(DEPDIR)/mod_rivet_la-rivetChannel.Tpo -c -o @rivet_channel@/mod_rivet_la-rivetChannel.lo `test -f '@rivet_channel@/rivetChannel.c' || echo '$(srcdir)/'`@rivet_channel@/rivetChannel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) @rivet_channel@/$(DEPDIR)/mod_rivet_la-rivetChannel.Tpo @rivet_channel@/$(DEPDIR)/mod_rivet_la-rivetChannel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@rivet_channel@/rivetChannel.c' object='@rivet_channel@/mod_rivet_la-rivetChannel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_rivet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @rivet_channel@/mod_rivet_la-rivetChannel.lo `test -f '@rivet_channel@/rivetChannel.c' || echo '$(srcdir)/'`@rivet_channel@/rivetChannel.c config/mod_rivet_la-TclWebapache.lo: config/TclWebapache.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_rivet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT config/mod_rivet_la-TclWebapache.lo -MD -MP -MF config/$(DEPDIR)/mod_rivet_la-TclWebapache.Tpo -c -o config/mod_rivet_la-TclWebapache.lo `test -f 'config/TclWebapache.c' || echo '$(srcdir)/'`config/TclWebapache.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) config/$(DEPDIR)/mod_rivet_la-TclWebapache.Tpo config/$(DEPDIR)/mod_rivet_la-TclWebapache.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config/TclWebapache.c' object='config/mod_rivet_la-TclWebapache.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_rivet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o config/mod_rivet_la-TclWebapache.lo `test -f 'config/TclWebapache.c' || echo '$(srcdir)/'`config/TclWebapache.c config/mod_rivet_la-apache_config.lo: config/apache_config.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_rivet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT config/mod_rivet_la-apache_config.lo -MD -MP -MF config/$(DEPDIR)/mod_rivet_la-apache_config.Tpo -c -o config/mod_rivet_la-apache_config.lo `test -f 'config/apache_config.c' || echo '$(srcdir)/'`config/apache_config.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) config/$(DEPDIR)/mod_rivet_la-apache_config.Tpo config/$(DEPDIR)/mod_rivet_la-apache_config.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config/apache_config.c' object='config/mod_rivet_la-apache_config.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_rivet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o config/mod_rivet_la-apache_config.lo `test -f 'config/apache_config.c' || echo '$(srcdir)/'`config/apache_config.c parser/mod_rivet_la-rivetParser.lo: parser/rivetParser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_rivet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT parser/mod_rivet_la-rivetParser.lo -MD -MP -MF parser/$(DEPDIR)/mod_rivet_la-rivetParser.Tpo -c -o parser/mod_rivet_la-rivetParser.lo `test -f 'parser/rivetParser.c' || echo '$(srcdir)/'`parser/rivetParser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) parser/$(DEPDIR)/mod_rivet_la-rivetParser.Tpo parser/$(DEPDIR)/mod_rivet_la-rivetParser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parser/rivetParser.c' object='parser/mod_rivet_la-rivetParser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_rivet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o parser/mod_rivet_la-rivetParser.lo `test -f 'parser/rivetParser.c' || echo '$(srcdir)/'`parser/rivetParser.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf @apache_request@/.libs @apache_request@/_libs -rm -rf @rivet_channel@/.libs @rivet_channel@/_libs -rm -rf @rivet_core@/.libs @rivet_core@/_libs -rm -rf @rivet_core_cmds@/.libs @rivet_core_cmds@/_libs -rm -rf config/.libs config/_libs -rm -rf librivet/.libs librivet/_libs -rm -rf parser/.libs parser/_libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 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 $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(apxs_libexecdir)" "$(DESTDIR)$(lib_libexecdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -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) -rm -f @apache_request@/$(DEPDIR)/$(am__dirstamp) -rm -f @apache_request@/$(am__dirstamp) -rm -f @rivet_channel@/$(DEPDIR)/$(am__dirstamp) -rm -f @rivet_channel@/$(am__dirstamp) -rm -f @rivet_core@/$(DEPDIR)/$(am__dirstamp) -rm -f @rivet_core@/$(am__dirstamp) -rm -f @rivet_core_cmds@/$(DEPDIR)/$(am__dirstamp) -rm -f @rivet_core_cmds@/$(am__dirstamp) -rm -f config/$(DEPDIR)/$(am__dirstamp) -rm -f config/$(am__dirstamp) -rm -f librivet/$(DEPDIR)/$(am__dirstamp) -rm -f librivet/$(am__dirstamp) -rm -f parser/$(DEPDIR)/$(am__dirstamp) -rm -f parser/$(am__dirstamp) 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-apxs_libexecLTLIBRARIES clean-generic \ clean-lib_libexecLTLIBRARIES clean-libtool mostlyclean-am distclean: distclean-am -rm -rf @apache_request@/$(DEPDIR) @rivet_channel@/$(DEPDIR) @rivet_core@/$(DEPDIR) @rivet_core_cmds@/$(DEPDIR) config/$(DEPDIR) librivet/$(DEPDIR) parser/$(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: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-apxs_libexecLTLIBRARIES \ install-lib_libexecLTLIBRARIES 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 @apache_request@/$(DEPDIR) @rivet_channel@/$(DEPDIR) @rivet_core@/$(DEPDIR) @rivet_core_cmds@/$(DEPDIR) config/$(DEPDIR) librivet/$(DEPDIR) parser/$(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-apxs_libexecLTLIBRARIES \ uninstall-lib_libexecLTLIBRARIES .MAKE: install-am install-data-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-apxs_libexecLTLIBRARIES clean-generic \ clean-lib_libexecLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am \ install-apxs_libexecLTLIBRARIES install-data install-data-am \ install-data-hook install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-lib_libexecLTLIBRARIES 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 tags-am uninstall uninstall-am \ uninstall-apxs_libexecLTLIBRARIES \ uninstall-lib_libexecLTLIBRARIES .PRECIOUS: Makefile # Removing libtool .la files from installation install-data-hook: echo 'removing unwanted libtool .la files' rm -f $(DESTDIR)/$(lib_libexecdir)/*.la rm -f $(DESTDIR)/$(apxs_libexecdir)/*.la # 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: rivet-2.3.5/README000644 001750 001750 00000001014 12453610043 013170 0ustar00mxmmxm000000 000000 Apache Rivet ============ See the doc/html/installation.html directory for installation and usage instructions. See INSTALL for brief installation instructions - although the above docs in HTML are more thorough and extensive. See LICENSE for licensing terms. $Id: README 1650416 2015-01-08 23:17:55Z mxmanghi $ KNOWN PROBLEMS ============== - Rivet used to conflict with cgi scripts on some Linux machines. This problem seems to have disappeared at least on Debian and Ubuntu now rivet-2.3.5/tclconfig/install-sh000755 001750 001750 00000035463 12703264555 016316 0ustar00mxmmxm000000 000000 #!/bin/sh # install - install a program, script, or datafile scriptversion=2014-09-12.12; # 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. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # 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_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 is_target_a_directory=possibly 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 *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi 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 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac 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 if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. 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 problematic for 'test' and other utilities. 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 # 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 "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` 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. ;; *) # $RANDOM is not portable (e.g. dash); use it when possible to # lower collision chance tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 # As "mkdir -p" follows symlinks and we work in /tmp possibly; so # create the $tmpdir first (and fail if unsuccessful) to make sure # that nobody tries to guess the $tmpdir name. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/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-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 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 oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && 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` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && 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: rivet-2.3.5/rivet/packages/formbroker/formbroker.tcl000644 001750 001750 00000057277 13140044243 022266 0ustar00mxmmxm000000 000000 # -- formbroker.tcl # # Form validation and sanitation tool. Kindly donated by # Karl Lehenbauer (Flightaware.com) # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you 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. namespace eval FormBroker { variable form_definitions [dict create] variable form_list [dict create] variable string_quote force_quote variable form_count 0 # # response_security_error - issue an error with errorCode # # set appropriate -- we expect the rivet error handler # to catch this and do the right thing # proc response_security_error {type message} { error $message "" [list RIVET SECURITY $type $message] } # # force_response_integers - error if any of named vars in response doesn't exist # # or isn't an integer # proc force_response_integers {_response args} { upvar $_response response require_response_vars response {*}$args foreach var $args { if {![regexp {[0-9-]*} response($var)]} { response_security_error NOT_INTEGER "illegal content in $var" } if {![scan $response($var) %d response($var)]} { response_security_error NOT_INTEGER "illegal content in $var" } } } # # force_response_integer_in_range - error if var in response isn't an integer # or if it isn't in range # proc force_response_integer_in_range {_response var lowest highest} { upvar $_response response force_response_integers response $var if {$response($var) < $lowest || $response($var) > $highest} { response_security_error "OUT_OF_RANGE" "$var out of range" } } # -- force_quote # proc force_quote {str} { return "'$str'" } # -- force_sanitize_response_strings proc force_sanitize_response_strings {_response args} { } # # force_quote_response_strings - sanitize and pg_quote all the specified strings in the array # proc force_quote_response_strings {_response args} { upvar $_response response force_sanitize_response_strings response {*}$args foreach var $args { set response($var) [$string_quote $response($var)] } } # # -- force_quote_response_unfilteredstrings - rewrite named response # elements pg_quoted # proc force_quote_response_unfilteredstrings {_response args} { upvar $_response response require_response_vars response {*}$args foreach var $args { set response($var) [$string_quote $response($var)] } } # -- base validators proc validate_string {_var_d} { upvar $_var_d var_d set valid FB_OK dict with var_d { if {$bounds > 0} { if {($nonempty == 1) && ($var == "")} { set valid FB_EMPTY_STRING } elseif {$constrain} { set var [string range $var 0 $bounds-1] } elseif {[string length $var] > $bounds} { set valid FB_STRING_TOO_LONG } } } return $valid } # -- validate_integer # # integer validation checks whether # # 1- the representation *is* an integer # 2- if buonds exist the value must be between [-bound,bound] # 3- if the bounds is a list of 2 elements the value must # be between them # # If needed the variable is constrained within the bounds. # proc validate_integer {_var_d} { upvar $_var_d var_d #puts "var_d: $var_d" set valid FB_OK dict with var_d { if {![string is integer $var]} { return NOT_INTEGER } if {[llength $bounds] == 2} { ::lassign $bounds min_v max_v if {$constrain} { set var [expr min($var,$max_v)] set var [expr max($var,$min_v)] set valid FB_OK } elseif {($var > $max_v) || ($var < $min_v)} { set valid FB_OUT_OF_BOUNDS } else { set valid FB_OK } } elseif {([llength $bounds] == 1) && ($bounds > 0)} { if {$constrain} { set var [expr min($bounds,$var)] set var [expr max(-$bounds,$var)] set valid FB_OK } elseif {(abs($var) > $bounds)} { set valid FB_OUT_OF_BOUNDS } else { set valid FB_OK } } } return $valid } proc validate_unsigned {_var_d} { upvar $_var_d var_d dict with var_d { if {![string is integer $var]} { return NOT_INTEGER } if {[llength $bounds] == 2} { ::lassign $bounds min_v max_v if {$constrain} { set var [expr min($var,$max_v)] set var [expr max($var,$min_v)] set valid FB_OK } elseif {($var > $max_v) || ($var < $min_v)} { set valid FB_OUT_OF_BOUNDS } else { set valid FB_OK } } elseif {([llength $bounds] == 1) && \ ($bounds > 0)} { if {$constrain} { set var [expr max(0,$var)] set var [expr min($bounds,$var)] set valid FB_OK } elseif {($var > $bounds) || ($var < 0)} { set valid FB_OUT_OF_BOUNDS } else { set valid FB_OK } } else { if {$constrain} { set var [expr max(0,$var)] set valid FB_OK } elseif {$var < 0} { set valid FB_OUT_OF_BOUNDS } else { set valid FB_OK } } } return $valid } proc validate_email {_var_d} { upvar $_var_d var_d dict with var_d { if {[regexp -nocase {[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}} $var]} { return FB_OK } else { return FB_INVALID_EMAIL } } } proc validate_boolean {_var_d} { upvar $_var_d var_d dict with var_d { if {[string is boolean $var]} { if {$constrain} { set var [string is true $var] } return FB_OK } else { return FB_INVALID_BOOLEAN } } } proc validate_variable_representation {_var_d} { upvar $_var_d var_d variable form_definitions set validator [dict get $var_d validator] if {[info commands $validator] == ""} { set validator ::FormBroker::validate_string } set validation [$validator var_d] dict set var_d field_validation $validation return [string match $validation FB_OK] } proc validate_var {form_name var_name var_value {force_quoting "-noforcequote"}} { variable form_definitions upvar $var_value value set force_quote_var [string match $force_quoting "-forcequote"] set variable_d [dict get $form_definitions $form_name $var_name] dict set variable_d var $value set valid [validate_variable_representation variable_d] set value [dict get $variable_d var] if {[dict get $variable_d force_quote] || $force_quote_var} { set value [$string_quote $value] } return $valid } # -- constrain_bounds # # During the form creation stage this method is called # to correct possible inconsistencies with a field bounds # definition # proc constrain_bounds {field_type _bounds} { upvar $_bounds bounds switch $field_type { integer { if {[llength $bounds] == 1} { set bounds [list [expr -abs($bounds)] [expr abs($bounds)]] } elseif {[llength $bounds] > 1} { lassign $bounds l1 l2 set bounds [list [expr min($l1,$l2)] [expr max($l1,$l2)]] } else { set bounds 0 } } unsigned { if {[llength $bounds] == 1} { set bounds [list 0 [expr abs($bounds)]] } elseif {[llength $bounds] > 1} { lassign $bounds l1 l2 if {$l1 < 0} { set l1 0 } if {$l2 < 0} { set l2 0 } set bounds [list [expr min($l1,$l2)] [expr max($l1,$l2)]] } else { set bounds 0 } } } } # -- form_definition # # currently this call returns the dictionary # of form field definitions. It's not meant to be # used in regular development. It's supposed to be # private to the FormBroker package # and it may go away with future developments or # change its interface and returned value proc form_definition {form_name} { variable form_definitions return [dict get $form_definitions $form_name] } # -- validation_error # # returns the result of the last validation # operation called on for this form. # proc validation_error {form_name} { variable form_list return [dict get $form_list $form_name form_validation] } # -- failing # # returns a list of variable-status pairs for each # field in a form that did not validate # proc failing {form_name} { set res {} dict for {field field_d} [form_definition $form_name] { dict with field_d { if {$field_validation != "FB_OK"} { lappend res $field $field_validation } } } return $res } # -- result # # accessor to the form field definitions. This procedure # too is not (at least temporarily) to be called from # outside the package # proc result {form_name form_field} { variable form_definitions return [dict get $form_definitions $form_name $form_field] } # --require_response_vars # # error if any of the specified are not in the response # proc require_response_vars {form_name _response} { upvar $_response response variable form_definitions set missing_vars 0 dict for {var variable_d} [dict get $form_definitions $form_name] { if {![info exists response($var)]} { dict with form_definitions $form_name $var { # if the variable was not in the response # but a default was set then we copy this # value in the variable descriptor and # the response array as well if {[info exists default]} { set response($var) $default set var $default } else { set field_validation MISSING_VAR set missing_vars 1 } } } } if {$missing_vars} { response_security_error MISSING_VAR \ "var $var not present in $_response" } } # -- validate # # proc validate { form_name args } { variable form_definitions variable form_list variable string_quote set force_quote_vars 0 set arguments $args if {[llength $arguments] == 0} { error "missing required arguments" } elseif {[llength $arguments] > 3} { error "error calling validate, usage: validate ?-forcequote? response ?copy_response?" } while {[llength $arguments]} { set arguments [::lassign $arguments a] if {$a == "-forcequote"} { set force_quote_vars 1 } elseif {![array exists response]} { upvar $a response } else { upvar $a filtered_response array set filtered_response {} } } if {![array exists response]} { error "error calling validate, usage: validate ?-forcequote? response ?copy_response?" } # we now go ahead validating the response variables set form_valid true set vars_to_validate [dict get $form_list $form_name vars] if {[catch { require_response_vars $form_name response } er eopts]} { #puts "$er $eopts" dict set form_list $form_name form_validation FB_MISSING_VARS return false } # field validation dict with form_list $form_name { set form_validation FB_OK } set form_d [dict get $form_definitions $form_name] #puts "form_d: $form_d" array unset response_a dict for {var variable_d} $form_d { dict set variable_d var $response($var) if {[validate_variable_representation variable_d] == 0} { dict set form_list $form_name form_validation FB_VALIDATION_ERROR set form_valid false } else { # in case it was constrained we write the value back # into the response array if {[dict get $variable_d constrain]} { set response_a($var) [dict get $variable_d var] } else { set response_a($var) $response($var) } if {[dict get $variable_d force_quote] || $force_quote_vars} { set response_a($var) [$string_quote [dict get $variable_d var]] } } dict set form_definitions $form_name $var $variable_d #puts "validated $var -> $variable_d" } # if 'validate' has been called with a filtered_response array # we clean it up and proceed copying the variable values into it if {[array exists filtered_response]} { array unset filtered_response array set filtered_response [array get response_a] } else { array set response [array get response_a] } return $form_valid } # -- response # # proc response {form_name {resp_a response}} { upvar $resp_a response variable form_definitions dict for {var_name var_d} [dict get $form_definitions $form_name] { catch {unset var} catch {unset default} dict with var_d { if {[info exists var]} { set response($var_name) $var } elseif {[info exists default]} { set response($var_name) $default } } } } # -- reset # # proc reset {form_name} { variable form_definitions variable form_list dict set form_list $form_name form_validation FB_OK dict for {var_name var_d} [dict get $form_definitions $form_name] { catch {dict unset var_d $var_name var} } } # -- destroy # # this method is designed to be called # by an 'trace unset' event on the variable # keeping the form description object. # proc destroy {form_name args} { variable form_definitions variable form_list dict unset form_definitions $form_name dict unset form_list $form_name namespace delete ::FormBroker::${form_name} #puts "destroy of $form_name finished" } # -- create # # creates a form object starting from a list of element descriptors # # the procedure accept a list of single descriptors, being each # descriptor a sub-list itself # # - field_name # - type (string, integer, unsigned, email, base64) # - a list of the following keywords and related values # # - bounds # - bounds [low high] # - check_routine [validation routine] # - length [max length] # proc create {args} { variable form_definitions variable form_list variable form_count variable string_quote set form_name "form${form_count}" incr form_count catch { namespace delete $form_name } namespace eval $form_name { foreach cmd { validate failing \ form_definition \ result validate_var \ destroy validation_error \ response reset } { lappend cmdmap $cmd [list [namespace parent] $cmd [namespace tail [namespace current]]] } namespace ensemble create -map [dict create {*}$cmdmap] unset cmdmap unset cmd } dict set form_definitions $form_name [dict create] dict set form_list $form_name [dict create vars {} \ form_validation FB_OK \ failing {} \ default "" \ quoting $string_quote] while {[llength $args]} { set args [::lassign $args e] if {$e == "-quoting"} { dict with form_list $form_name { set args [::lassign $args quoting] if {[uplevel [list info proc $quoting]] == ""} { error [list RIVET INVALID_QUOTING_PROC \ "Non existing quoting proc '$quoting'"] } set string_quote $quoting } continue } # each variable (field) definition must start with the # variable name and variable type. Every other variable # specification argument can be listed in arbitrary order # with the only constraint that argument values must follow # an argument name. If an argument is specified multiple times # the last definition overrides the former ones set e [::lassign $e field_name field_type] # the 'vars' dictionary field stores the # order of form fields in which they are processed # (in general this order would be destroyed by the Tcl's hash # tables) dict with form_list $form_name {::lappend vars $field_name} # this test would handle the case of the most simple possible # variable definition (just the variable name) if {$field_type == ""} { set field_type string } dict set form_definitions $form_name $field_name \ [list type $field_type \ bounds 0 \ constrain 0 \ validator [namespace current]::validate_string \ force_quote 0 \ nonempty 0 \ field_validation FB_OK] dict with form_definitions $form_name $field_name { switch $field_type { integer { set validator [namespace current]::validate_integer } unsigned { set validator [namespace current]::validate_unsigned } email { set validator [namespace current]::validate_email } boolean { set validator [namespace current]::validate_boolean } string - default { set validator [namespace current]::validate_string } } # while {[llength $e] > 0} { set e [::lassign $e field_spec] switch $field_spec { check_routine - validator { set e [::lassign $e validator] } length - bounds { set e [::lassign $e bounds] constrain_bounds $field_type bounds } default { set e [::lassign $e default] # we must not assume the variable 'default' # exists in the dictionary because we # set it only in this code branch dict set form_definitions $form_name $field_name default $default } nonempty { # this flag forces the formbroker to # signal empty strings as form data errors set nonemtpy 1 } constrain { set constrain 1 } noconstrain { set constrain 0 } quote { set force_quote 1 } } } # let's check for possible inconsitencies between # data type and default value. For this purpose # we create a copy of the variable dictionary # representation then we call the validator on it set variable_d [dict get $form_definitions $form_name $field_name] dict set variable_d var $default if {[$validator variable_d] != "FB_OK"} { dict unset form_definitions $form_name $field_name default } } } return [namespace current]::$form_name } proc creategc {varname args} { set formv [uplevel [list set $varname [::FormBroker::create {*}$args]]] uplevel [list trace add variable $varname unset \ [list [namespace current]::destroy [namespace tail $formv]]] return $formv } namespace export * namespace ensemble create } package provide formbroker 1.0 rivet-2.3.5/rivet/packages/session/session-class.tcl000644 001750 001750 00000040071 13022003066 022174 0ustar00mxmmxm000000 000000 # # Session - Itcl object for web session management for Rivet # # $Id: session-class.tcl 1773068 2016-12-07 12:53:10Z mxmanghi $ # # Copyright 2004 The Apache Software Foundation # 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 provide Session 1.0 package require Itcl ::itcl::class Session { # true if the page being processed didn't have a previous session public variable isNewSession 1 # contains the reason why this session is a new session, or "" if it isn't public variable newSessionReason "" # the routine that will handle saving data, could use DIO, could use # flatfiles, etc. public variable saveHandler "" # the name of the DIO object that we'll use to access the database public variable dioObject "DIO" # the name of the cookie used to set the session ID public variable cookieName "rivetSession" # the probability that garbage collection will occur in percent. public variable gcProbability 1 # the number of seconds after which data will be seen as "garbage" # and cleaned up -- defaults to 1 day public variable gcMaxLifetime 86400 # the substring you want to check each HTTP referer for. If the # referer was sent by the browser and the substring is not found, # the session will be deleted. public variable refererCheck "" public variable entropyFile "/dev/urandom" # the number of bytes which will be read from the entropy file public variable entropyLength 0 # set the scramble code to something unique for the site or the # app or whatever, to slightly increase the unguessability of # session ids public variable scrambleCode "some random string" # the lifetime of the cookie in minutes. 0 means until the browser # is closed. public variable cookieLifetime 0 # the lifetime of the session in seconds. this will be updated if # additional pages are fetched while the session is still alive. public variable sessionLifetime 7200 # if a request is being processed, a session is active, and this many # seconds have elapsed since the session was created or the session # update time was last updated, the session update time will be updated # (the session being in use extends the session lifetime) public variable sessionRefreshInterval 900 # the webserver subpath that the session cookie applies to -- defaults # to / public variable cookiePath "/" # the domain to set in the session cookie public variable cookieDomain "" # the status of the last operation, "" if ok public variable status # specifies whether cookies should only be sent over secure connections public variable cookieSecure 0 # specifies whether cookies should only be sent over http connections public variable cookieHttpOnly 0 # the name of the table that session info will be stored in public variable sessionTable "rivet_session" # the name of the table that contains cached session data public variable sessionCacheTable "rivet_session_cache" # the file that debug messages will be written to public variable debugFile stdout # set debug mode to 1 to trace through and see the session object # do its thing public variable debugMode 1 constructor {args} { eval configure $args $dioObject registerSpecialField $sessionTable session_update_time NOW $dioObject registerSpecialField $sessionTable session_start_time NOW } method status {args} { if {$args == ""} { return $status } set status $args } # get_entropy_bytes - read entropyLength bytes from a random data # device, such as /dev/random or /dev/urandom, available on some # systems as a way to generate random data # # if entropyLength is 0 (the default) or entropyFile isn't defined # or doesn't open successfully, returns an empty string # method get_entropy_bytes {} { if {$entropyLength == 0 || $entropyFile == ""} { return "" } if {[catch {open $entropyFile} fp] == 1} { return "" } set entropyBytes [read $fp $entropyLength] close $fp if {[binary scan $entropyBytes h* data]} { debug "get_entropy_bytes: returning '$data'" return $data } error "software bug - binary scan behaved unexpectedly" } # # gen_session_id - generate a session ID by md5'ing as many things # as we can get our hands on. # method gen_session_id {args} { package require md5 # if the Apache unique ID module is installed, the environment # variable UNIQUE_ID will have been set. If not, we'll get an # empty string, which won't hurt anything. set uniqueID [::rivet::env UNIQUE_ID] set sessionIdKey "$uniqueID[clock clicks][pid]$args[clock seconds]$scrambleCode[get_entropy_bytes]" debug "gen_session_id - feeding this to md5: '$sessionIdKey'" return [::md5::md5 -hex -- $sessionIdKey] } # # do_garbage_collection - delete dead sessions from the session table. # corresponding session table cache entries will automatically be # deleted as well (assuming they've been defined with ON DELETE CASCADE) # method do_garbage_collection {} { debug "do_garbage_collection: performing garbage collection" # set result [$dioObject exec "delete from $sessionTable where timestamp 'now' - session_update_time > interval '$gcMaxLifetime seconds';"] set del_cmd "delete from $sessionTable where " append del_cmd [$dioObject makeDBFieldValue $sessionTable session_update_time now SECS] append del_cmd " - [$dioObject makeDBFieldValue $sessionTable session_update_time {} SECS]" append del_cmd " > $gcMaxLifetime" debug "do_garbage_collection: > $del_cmd <" set result [$dioObject exec $del_cmd] $result destroy } # # consider_garbage_collection - perform a garbage collection gcProbability # percent of the time. For example, if gcProbability is 1, about 1 in # every 100 times this routine is called, garbage collection will be # performed. # method consider_garbage_collection {} { if {rand() <= $gcProbability / 100.0} { do_garbage_collection } } # # set_session_cookie - set a session cookie to the specified value -- # other cookie attributes are controlled by variables defined in the # object # method set_session_cookie {value} { ::rivet::cookie set $cookieName $value \ -path $cookiePath \ -minutes $cookieLifetime \ -secure $cookieSecure \ -HttpOnly $cookieHttpOnly } # # id - get the session ID of the current browser # # returns a session ID if their session cookie matches a current session. # returns an empty string if they do not have a session. # # status will be set to an empty string if all is ok, "timeout" if # the session had timed out, "no_cookie" if no cookie was previously # defined (session id could still be valid though -- first visit) # # ...caches the results in the info array to avoid calls to the database # in subsequent requests for the user ID from the same page, a common # occurrence. # method id {} { ::request::global sessionInfo status "" # if we already know the session ID, we're done. # (i.e. we've already validated them earlier in the # handling of the current page.) if {[info exists sessionInfo(sessionID)]} { debug "id called, returning cached ID '$sessionInfo(sessionID)'" return $sessionInfo(sessionID) } # # see if they have a session cookie. if they don't, # set status and return. # set sessionCookie [::rivet::cookie get $cookieName] if {$sessionCookie == ""} { # they did not have a cookie set, they are not logged in status "no_cookie" debug "id: no session cookie '$cookieName'" return "" } # there is a session Cookie, grab the remote address of the connection, # see if our state table says he has logged into us from this # address within our login timeout window and we've given him # this session debug "id: found session cookie '$cookieName' value '$sessionCookie'" set a(session_id) $sessionCookie set a(ip_address) [::rivet::env REMOTE_ADDR] # see if there's a record matching the session ID cookie and # IP address set kf [list session_id ip_address] set key [$dioObject makekey a $kf] if {![$dioObject fetch $key a -table $sessionTable -keyfield $kf]} { debug "id: no entry in the session table for session '$sessionCookie' and address [::rivet::env REMOTE_ADDR]: [$dioObject errorinfo]" status "no_session" return "" } ## Carve the seconds out of the session_update_time field in the # $sessionTable table. Trim off the timezone at the end. set secs [clock scan [string range $a(session_update_time) 0 18]] # if the session has timed out, delete the session and return -1 if {[expr $secs + $sessionLifetime] < [clock seconds]} { $dioObject delete $key -table $sessionTable -keyfield $kf debug "id: session '$sessionCookie' timed out" status "timeout" return "" } # Their session is still alive. If the session refresh # interval time has expired, update the session update time in the # database (we don't update every time they request a page for # performance reasons) The idea is it's been at least 15 minutes or # something like that since they've logged in, and they're still # doing stuff, so reset their session update time to now if {[expr $secs + $sessionRefreshInterval] < [clock seconds]} { debug "session '$sessionCookie' alive, refreshing session update time" set a(session_update_time) now if {![$dioObject store a -table $sessionTable -keyfield $kf]} { debug "id: Failed to store $sessionTable: [$dioObject errorinfo]" puts "Failed to store $sessionTable: [$dioObject errorinfo]" } } # # THEY VALIDATED. Cache the session ID in the sessionInfo array # that will only exist for the handling of this request, set that # this is not a new session (at least one previous request has been # handled with this session ID) and return the session ID # debug "id: active session, '$a(session_id)'" set sessionInfo(sessionID) $a(session_id) set isNewSession 0 return $a(session_id) } # # store - given a package name, a key string, and a data string, # store the data in the rivet session cache # method store {packageName key data} { set a(session_id) [id] set a(package_) $packageName set a(key_) $key regsub -all {\\} $data {\\\\} data set a(data) $data debug "store session data, package_ '$packageName', key_ '$key', data '$data'" set kf [list session_id package_ key_] if {![$dioObject store a -table $sessionCacheTable -keyfield $kf]} { debug "Failed to store $sessionCacheTable '$kf'" #parray a error [$dioObject errorinfo] } } # # fetch - given a package name and a key, return the data stored # for this session # method fetch {packageName key} { set kf [list session_id package_ key_] set a(session_id) [id] set a(package_) $packageName set a(key_) $key set key [$dioObject makekey a $kf] if {![$dioObject fetch $key a -table $sessionCacheTable -keyfield $kf]} { status [$dioObject errorinfo] debug "error: [$dioObject errorinfo]" debug "fetch session data failed, package_ '$packageName', key_ '$key', error '[$dioObject errorinfo]'" return "" } debug "fetch session data succeeded, package_ '$packageName', key_ '$key', result '$a(data)'" return $a(data) } # # stash - # # method stash {packageName keyvalue_d} { dict for {key value} $keyvalue_d { $this store $packageName $key $value } } # # load - given a package names returns a dictionary storing the key - value pairs for this session # # method load {packageName} { set package_d [dict create] $dioObject forall \ "select key_,data from $sessionCacheTable where package_='$packageName' and session_id='[$this id]'" a { dict set package_d $a(key_) $a(data) } return $package_d } # clear - given a package name and optionally a key it deletes rows in the cache for this session. # when also the key value is specified only the row for that package-key pair is deleted # method clear {packageName {key ""}} { if {$key == ""} { set keyval [list [$this id] $packageName] set keyfield {session_id package_} } else { set keyval [list [$this id] $packageName $key] set keyfield {session_id package_ key_} } $dioObject delete $keyval -table $sessionCacheTable -keyfield $keyfield } # # delete - given a user ID and looking at their IP address we inherited # from the environment (thanks, webserver), remove them from the session # table. (the session table is how the server remembers stuff about # sessions) # method delete_session {{session_id ""}} { set ip_address [::rivet::env REMOTE_ADDR] if {$session_id == ""} { set session_id [id] } debug "delete session $session_id" set kf [list session_id ip_address] $dioObject delete [list $session_id $ip_address] -table $sessionTable -keyfield $kf ## NEED TO delete saved session data here too, from the # $sessionCacheTable structure. } # # create_session - Generate a session ID and store the session in the # session table. # # returns the session_id # method create_session {} { ## Create their session by storing their session information in # the session table. set a(ip_address) [::rivet::env REMOTE_ADDR] set a(session_start_time) now set a(session_update_time) now set a(session_id) [gen_session_id $a(ip_address)] set kf [list ip_address session_id] if {![$dioObject store a -table $sessionTable -keyfield $kf]} { debug "Failed to store $sessionTable: [$dioObject errorinfo]" puts "Failed to store $sessionTable: [$dioObject errorinfo]" } debug "create_session: ip $a(ip_address), id '$a(session_id)'" return $a(session_id) } # # activate - find the session ID if they have one. if they don't, create # one and drop a cookie on them. # method activate {} { ::request::global sessionInfo debug "activate: checking out the situation" # a small percentage of the time, try to delete stale session data consider_garbage_collection set id [id] if {$id != ""} { debug "activate: returning session id '$id'" return $id } # it's a new session, save the reason for why it's a new session, # set that it's a new session, drop a session cookie on the browser # that issued this request, set the session ID cache variable, and # return the cookie ID set newSessionReason [status] debug "activate: new session, reason '$newSessionReason'" set id [create_session] set isNewSession 1 set_session_cookie $id set sessionInfo(sessionID) $id debug "activate: created session '$id' and set cookie (theoretically)" return $id } # # is_new_sesion - return a 1 if it's a new session, else a zero if there # were one or more prior pages creating and/or using this session ID # method is_new_session {} { return $isNewSession } # # new_session_reason - return the reason why a session is new, either # it didn't have a cookie "no_cookie", there was a cookie but no # matching session "no_session", or there was a cookie and a session # but the session has timed out "timeout". if the session isn't new, # returns "" # method new_session_reason {} { return $newSessionReason } # # debug - output a debugging message # method debug {message} { if {$debugMode} { puts $debugFile "$this (debug) $message
    " flush $debugFile } } } rivet-2.3.5/doc/html/no_body.html000644 001750 001750 00000004665 13200160527 016355 0ustar00mxmmxm000000 000000 no_body

    Name

    no_body — Prevents Rivet from sending any content.

    Synopsis

    ::rivet::no_body

    Description

    This command is useful for situations where it is necessary to only return HTTP headers and no actual content. For instance, when returning a 304 redirect.

    rivet-2.3.5/rivet/packages/dtcl/pkgIndex.tcl000644 001750 001750 00000000102 07417711327 020432 0ustar00mxmmxm000000 000000 package ifneeded Dtcl 1.0 [list source [file join $dir dtcl.tcl]] rivet-2.3.5/m4/ax_prefix_config_h.m4000644 001750 001750 00000020620 11670231317 016722 0ustar00mxmmxm000000 000000 # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_prefix_config_h.html # =========================================================================== # # SYNOPSIS # # AX_PREFIX_CONFIG_H [(OUTPUT-HEADER [,PREFIX [,ORIG-HEADER]])] # # DESCRIPTION # # This is a new variant from ac_prefix_config_ this one will use a # lowercase-prefix if the config-define was starting with a # lowercase-char, e.g. "#define const", "#define restrict", or "#define # off_t", (and this one can live in another directory, e.g. # testpkg/config.h therefore I decided to move the output-header to be the # first arg) # # takes the usual config.h generated header file; looks for each of the # generated "#define SOMEDEF" lines, and prefixes the defined name (ie. # makes it "#define PREFIX_SOMEDEF". The result is written to the output # config.header file. The PREFIX is converted to uppercase for the # conversions. # # Defaults: # # OUTPUT-HEADER = $PACKAGE-config.h # PREFIX = $PACKAGE # ORIG-HEADER, from AM_CONFIG_HEADER(config.h) # # Your configure.ac script should contain both macros in this order, and # unlike the earlier variations of this prefix-macro it is okay to place # the AX_PREFIX_CONFIG_H call before the AC_OUTPUT invokation. # # Example: # # AC_INIT(config.h.in) # config.h.in as created by "autoheader" # AM_INIT_AUTOMAKE(testpkg, 0.1.1) # makes #undef VERSION and PACKAGE # AM_CONFIG_HEADER(config.h) # prep config.h from config.h.in # AX_PREFIX_CONFIG_H(mylib/_config.h) # prep mylib/_config.h from it.. # AC_MEMORY_H # makes "#undef NEED_MEMORY_H" # AC_C_CONST_H # makes "#undef const" # AC_OUTPUT(Makefile) # creates the "config.h" now # # and also mylib/_config.h # # if the argument to AX_PREFIX_CONFIG_H would have been omitted then the # default outputfile would have been called simply "testpkg-config.h", but # even under the name "mylib/_config.h" it contains prefix-defines like # # #ifndef TESTPKG_VERSION # #define TESTPKG_VERSION "0.1.1" # #endif # #ifndef TESTPKG_NEED_MEMORY_H # #define TESTPKG_NEED_MEMORY_H 1 # #endif # #ifndef _testpkg_const # #define _testpkg_const _const # #endif # # and this "mylib/_config.h" can be installed along with other # header-files, which is most convenient when creating a shared library # (that has some headers) where some functionality is dependent on the # OS-features detected at compile-time. No need to invent some # "mylib-confdefs.h.in" manually. :-) # # Note that some AC_DEFINEs that end up in the config.h file are actually # self-referential - e.g. AC_C_INLINE, AC_C_CONST, and the AC_TYPE_OFF_T # say that they "will define inline|const|off_t if the system does not do # it by itself". You might want to clean up about these - consider an # extra mylib/conf.h that reads something like: # # #include # #ifndef _testpkg_const # #define _testpkg_const const # #endif # # and then start using _testpkg_const in the header files. That is also a # good thing to differentiate whether some library-user has starting to # take up with a different compiler, so perhaps it could read something # like this: # # #ifdef _MSC_VER # #include # #else # #include # #endif # #ifndef _testpkg_const # #define _testpkg_const const # #endif # # LICENSE # # Copyright (c) 2008 Guido U. Draheim # Copyright (c) 2008 Marten Svantesson # Copyright (c) 2008 Gerald Point # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 11 AC_DEFUN([AX_PREFIX_CONFIG_H],[dnl AC_PREREQ([2.62]) AC_BEFORE([AC_CONFIG_HEADERS],[$0])dnl AC_CONFIG_COMMANDS([ifelse($1,,$PACKAGE-config.h,$1)],[dnl AS_VAR_PUSHDEF([_OUT],[ac_prefix_conf_OUT])dnl AS_VAR_PUSHDEF([_DEF],[ac_prefix_conf_DEF])dnl AS_VAR_PUSHDEF([_PKG],[ac_prefix_conf_PKG])dnl AS_VAR_PUSHDEF([_LOW],[ac_prefix_conf_LOW])dnl AS_VAR_PUSHDEF([_UPP],[ac_prefix_conf_UPP])dnl AS_VAR_PUSHDEF([_INP],[ac_prefix_conf_INP])dnl m4_pushdef([_script],[conftest.prefix])dnl m4_pushdef([_symbol],[m4_cr_Letters[]m4_cr_digits[]_])dnl _OUT=`echo ifelse($1, , $PACKAGE-config.h, $1)` _DEF=`echo _$_OUT | sed -e "y:m4_cr_letters:m4_cr_LETTERS[]:" -e "s/@<:@^m4_cr_Letters@:>@/_/g"` _PKG=`echo ifelse($2, , $PACKAGE, $2)` _LOW=`echo _$_PKG | sed -e "y:m4_cr_LETTERS-:m4_cr_letters[]_:"` _UPP=`echo $_PKG | sed -e "y:m4_cr_letters-:m4_cr_LETTERS[]_:" -e "/^@<:@m4_cr_digits@:>@/s/^/_/"` _INP=`echo "ifelse($3,,,$3)" | sed -e 's/ *//'` if test ".$_INP" = "."; then for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue case "$ac_file" in *.h) _INP=$ac_file ;; *) esac test ".$_INP" != "." && break done fi if test ".$_INP" = "."; then case "$_OUT" in */*) _INP=`basename "$_OUT"` ;; *-*) _INP=`echo "$_OUT" | sed -e "s/@<:@_symbol@:>@*-//"` ;; *) _INP=config.h ;; esac fi if test -z "$_PKG" ; then AC_MSG_ERROR([no prefix for _PREFIX_PKG_CONFIG_H]) else if test ! -f "$_INP" ; then if test -f "$srcdir/$_INP" ; then _INP="$srcdir/$_INP" fi fi AC_MSG_NOTICE(creating $_OUT - prefix $_UPP for $_INP defines) if test -f $_INP ; then AS_ECHO(["s/^@%:@undef *\\(@<:@m4_cr_LETTERS[]_@:>@\\)/@%:@undef $_UPP""_\\1/"]) > _script AS_ECHO(["s/^@%:@undef *\\(@<:@m4_cr_letters@:>@\\)/@%:@undef $_LOW""_\\1/"]) >> _script AS_ECHO(["s/^@%:@def[]ine *\\(@<:@m4_cr_LETTERS[]_@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_UPP""_\\1\\"]) >> _script AS_ECHO(["@%:@def[]ine $_UPP""_\\1\\2\\"]) >> _script AS_ECHO(["@%:@endif/"]) >> _script AS_ECHO(["s/^@%:@def[]ine *\\(@<:@m4_cr_letters@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_LOW""_\\1\\"]) >> _script AS_ECHO(["@%:@define $_LOW""_\\1\\2\\"]) >> _script AS_ECHO(["@%:@endif/"]) >> _script # now executing _script on _DEF input to create _OUT output file echo "@%:@ifndef $_DEF" >$tmp/pconfig.h echo "@%:@def[]ine $_DEF 1" >>$tmp/pconfig.h echo ' ' >>$tmp/pconfig.h echo /'*' $_OUT. Generated automatically at end of configure. '*'/ >>$tmp/pconfig.h sed -f _script $_INP >>$tmp/pconfig.h echo ' ' >>$tmp/pconfig.h echo '/* once:' $_DEF '*/' >>$tmp/pconfig.h echo "@%:@endif" >>$tmp/pconfig.h if cmp -s $_OUT $tmp/pconfig.h 2>/dev/null; then AC_MSG_NOTICE([$_OUT is unchanged]) else ac_dir=`AS_DIRNAME(["$_OUT"])` AS_MKDIR_P(["$ac_dir"]) rm -f "$_OUT" mv $tmp/pconfig.h "$_OUT" fi cp _script _configs.sed else AC_MSG_ERROR([input file $_INP does not exist - skip generating $_OUT]) fi rm -f conftest.* fi m4_popdef([_symbol])dnl m4_popdef([_script])dnl AS_VAR_POPDEF([_INP])dnl AS_VAR_POPDEF([_UPP])dnl AS_VAR_POPDEF([_LOW])dnl AS_VAR_POPDEF([_PKG])dnl AS_VAR_POPDEF([_DEF])dnl AS_VAR_POPDEF([_OUT])dnl ],[PACKAGE="$PACKAGE"])]) rivet-2.3.5/doc/xml/internals.xml000644 001750 001750 00000027076 12515752330 016423 0ustar00mxmmxm000000 000000
    Rivet Internals This section easily falls out of date, as new code is added, old code is removed, and changes are made. The best place to look is the source code itself. If you are interested in the changes themselves, the Subversion revision control system (svn) can provide you with information about what has been happening with the code.
    Initialization When Apache is started, (or when child Apache processes are started if a threaded Tcl is used), Rivet_InitTclStuff is called, which creates a new interpreter, or one interpreter per virtual host, depending on the configuration. It also initializes various things, like the RivetChan channel system, creates the Rivet-specific Tcl commands, and executes Rivet's init.tcl. The caching system is also set up, and if there is a GlobalInitScript, it is run.
    RivetChan The RivetChan system was created in order to have an actual Tcl channel that we could redirect standard output to. This lets us use, for instance, the regular puts command in .rvt pages. It works by creating a channel that buffers output, and, at predetermined times, passes it on to Apache's IO system. Tcl's regular standard output is replaced with an instance of this channel type, so that, by default, output will go to the web page.
    The <command>global</command> Command Rivet aims to run standard Tcl code with as few surprises as possible. At times this involves some compromises - in this case regarding the global command. The problem is that the command will create truly global variables. If the user is just cut'n'pasting some Tcl code into Rivet, they most likely just want to be able to share the variable in question with other procs, and don't really care if the variable is actually persistant between pages. The solution we have created is to create a proc ::request::global that takes the place of the global command in Rivet templates. If you really need a true global variable, use either ::global or add the :: namespace qualifier to variables you wish to make global.
    Page Parsing, Execution and Caching When a Rivet page is requested, it is transformed into an ordinary Tcl script by parsing the file for the <? ?> processing instruction tags. Everything outside these tags becomes a large puts statement, and everything inside them remains Tcl code. Each .rvt file is evaluated in its own ::request namespace, so that it is not necessary to create and tear down interpreters after each page. By running in its own namespace, though, each page will not run afoul of local variables created by other scripts, because they will be deleted automatically when the namespace goes away after Apache finishes handling the request. One current problem with this system is that while variables are garbage collected, file handles are not, so that it is very important that Rivet script authors make sure to close all the files they open. After a script has been loaded and parsed into it's "pure Tcl" form, it is also cached, so that it may be used in the future without having to reload it (and re-parse it) from the disk. The number of scripts stored in memory is configurable. This feature can significantly improve performance.
    Extending Rivet by developing C procedures implementing new commands Rivet endows the Tcl interpreter with new commands serving as interface between the application layer and the Apache web server. Many of these commands are meaningful only when a HTTP request is under way and therefore a request_rec object allocated by the framework is existing and was passed to mod_rivet as argument of a callback. In case commands have to gain access to a valid request_rec object the C procedure must check if such a pointer exists and it's initialized with valid data. For this purpose the procedure handling requests (Rivet_SendContent) makes a copy of such pointer and keeps it in an internal structure. The copy is set to NULL just before returning to the framework, right after mod_rivet's has carried out its request processing. When the pointer copy is NULL the module is outside any request processing and this condition invalidates the execution of many of the Rivet commands. In case they are called (for example in a ChildInitScript, GlobalInitScript, ServerInitScript or ChildExitScript) they fail with a Tcl error you can handle with a catch command. For this purpose in the macro CHECK_REQUEST_REC was defined accepting two arguments: the copy to the request_rec pointer (stored in the rivet_interp_globals structure) and the command name. If the pointer is NULL the macro calls Tcl_NoRequestRec and returns TCL_ERROR causing the command to fail. These are the step to follow to implement a new C language command for mod_rivet Define the command and associated C language procedure in src/rivetcmds/rivetCore.c using the macro RIVET_OBJ_CMD("mycmd",Rivet_MyCmd) This macro ensures the command is defined as ::rivet::mycmd Add the code of Rivet_MyCmd to src/rivetcmd/rivetCore.c (in case the code resides in a different file also src/Makefile.am should be changed to tell the build system how to compile the code and link it into mod_rivet.so) If the code must gain access to globals->r put add the macro testing for the pointer TCL_CMD_HEADER( Rivet_MyCmd ) { rivet_interp_globals *globals = Tcl_GetAssocData( interp, "rivet", NULL ); .... CHECK_REQUEST_REC(globals->r,"::rivet::mycmd"); ... } Add a test for this command in . For instance ... check_fail no_body check_fail virtual_filename unkn check_fail my_cmd <arg1> <arg2> .... Where are optional arguments in case the command needs to check for globals->r in special cases. Then, if ::rivet::mycmd must fail also should modified as virtual_filename->1 mycmd->1 The value associated to the test must be in case the command doesn't need to test the globals->r pointer.
    Debugging Rivet and Apache If you are interested in hacking on Rivet, you're welcome to contribute! Invariably, when working with code, things go wrong, and it's necessary to do some debugging. In a server environment like Apache, it can be a bit more difficult to find the right way to do this. Here are some techniques to try. The first thing you should know is that Apache can be launched as a single process with the argument: httpd -X. On Linux, one of the first things to try is the system call tracer, strace. You don't even have to recompile Rivet or Apache for this to work. strace -o /tmp/outputfile -S 1000 httpd -X This command will run httpd in the system call tracer, which leaves its output (there is potentially a lot of it) in /tmp/outputfile. The option tells strace to only record the first 1000 bytes of a syscall. Some calls such as write can potentially be much longer than this, so you may want to increase this number. The results are a list of all the system calls made by the program. You want to look at the end, where the failure presumably occured, to see if you can find anything that looks like an error. If you're not sure what to make of the results, you can always ask on the Rivet development mailing list. If strace (or its equivalent on your operating system) doesn't answer your question, it may be time to debug Apache and Rivet. To do this, you will need to rebuild mod_rivet. First of all you have to configure the build by running the ./configure script with the option and after you have set the CFLAGS and LDFLAGS environment variables export CFLAGS="-g -O0" export LDFLAGS="-g" ./configure --enable-symbols ...... make make install Arguments to ./configure must fit your Apache HTTP web server installation. See the output produced by ./configure --help And check the installation page to have further information. Since it's easier to debug a single process, we'll still run Apache in single process mode with -X: @ashland [~] $ gdb /usr/sbin/apache.dbg GNU gdb 5.3-debian Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-linux"... (gdb) run -X Starting program: /usr/sbin/apache.dbg -X [New Thread 16384 (LWP 13598)] . . . When your apache session is up and running, you can request a web page with the browser, and see where things go wrong (if you are dealing with a crash, for instance).
    rivet-2.3.5/doc/html/shorthand.html000644 001750 001750 00000006224 13200160527 016707 0ustar00mxmmxm000000 000000 <?= ... ?>

    Name

    <?= ... ?> — Shorthand construct for single strings output

    Synopsis

    <?= $string ?>

    Description

    This construct is a simplified form to print a single string wherever needed in a ?.rvt? template. The contruct is equivalent to writing the following line of Tcl code

    puts -nonewline $string

    The ?string? argument to the shorthand construct can be any Tcl command returning a value

    See Example 1, “Hello World” or Example 3, “Variable Access”

    rivet-2.3.5/README.configure000644 001750 001750 00000002445 11727745622 015200 0ustar00mxmmxm000000 000000 $Id: README.configure 1300386 2012-03-13 22:34:58Z karl $ This is an agglomeration of notes about using autoconf and friends to create the build environment (configure script, etc) that builds and installs Rivet. It will probably go away eventually. WHERE IS THE CONFIGURE SCRIPT? If you've checked out the source tree from SVN, you'll notice there's no configure script, and no configure.in, and no Makefile.in, etc. You get to fiddle the autoconf stuff to create all that. This used to be hard but not so much anymore. Try autoreconf -fi This runs aclocal, autoconf, automake and whatever else to properly generate config.h.in, aclocal.m4, */Makefile.in, etc. autoconf and stuff has evolved, and old versions won't work and will cause weird problems. You want to be at least at autoconf 2.58 automake 1.11 CONFIG.GUESS AND FRIENDS Ever wonder where config.guess, install-sh, and stuff come from? (You see them in a lot of packages.) This stuff a lot can get pooped out there using libtoolize. libtoolize --force --copy to install config.guess, config.sub, ltmain.sh This stuff is in the tclconfig directory, which isn't really the best name because it's grown to include a lot of autoconf-related stuff. But it really doesn't matter anymore because autoreconf appears to take care of it all. rivet-2.3.5/rivet/packages/000755 001750 001750 00000000000 13200157764 015232 5ustar00mxmmxm000000 000000 rivet-2.3.5/tests/apachetest/template.conf.2.tcl000644 001750 001750 00000001345 12764370173 021221 0ustar00mxmmxm000000 000000 # \$Id\$ # Minimal config file for testing # Parsed by makeconf.tcl ServerRoot "$CWD" PidFile "$CWD/httpd.pid" #ResourceConfig "$CWD/srm.conf" #AccessConfig "$CWD/access.conf" Timeout 300 KeepAliveTimeout 100 KeepAlive On MaxRequestsPerChild 0 $LOADMODULES Listen 8081 ServerName localhost DocumentRoot "$CWD" Options All MultiViews AllowOverride All #Order allow,deny #Allow from all Require all granted DirectoryIndex index.html AccessFileName .htaccess HostnameLookups Off ErrorLog $CWD/error_log LogLevel debug LogFormat "%h %l %u %t \\"%r\\" %>s %b \\"%{Referer}i\\" \\"%{User-Agent}i\\"" combined CustomLog "$CWD/access_log" combined rivet-2.3.5/LICENSE000644 001750 001750 00000026136 10016623143 013327 0ustar00mxmmxm000000 000000 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. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] 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. rivet-2.3.5/rivet/packages/session/session-httpd.conf000644 001750 001750 00000000762 10016623143 022364 0ustar00mxmmxm000000 000000 ## ## session-httpd.conf -- include in for from an Apache httpd.conf file ## to pick up ## ## Include file ## ## $Id: session-httpd.conf 265377 2004-02-24 10:24:35Z davidw $ ## RivetServerConf ChildInitScript "source /opt/local/rivet/packages/sc-session/session-class.tcl; Session SESSION -entropyFile /dev/urandom -entropyLength 10 -debugMode 1" RivetDirConf BeforeScript "SESSION activate" rivet-2.3.5/doc/html/load_cookies.html000644 001750 001750 00000004767 13200160527 017362 0ustar00mxmmxm000000 000000 load_cookies

    Name

    load_cookies — get any cookie variables sent by the client.

    Synopsis

    ::rivet::load_cookies ?array_name?

    Description

    Load the array of cookie variables into the specified array name. Uses array cookies by default.

    rivet-2.3.5/rivet/rivet-tcl/parray.tcl000644 001750 001750 00000002370 12210752233 017361 0ustar00mxmmxm000000 000000 ### ## parray ?pattern? ## An html version of the standard Tcl 'parray' command. ## Displays the entire contents of an array in a sorted, nicely-formatted ## way. Mostly used for debugging purposes. ## ## arrayName - Name of the array to display. ## pattern - A wildcard pattern of variables within the array to display. ## ## $Id: parray.tcl 1519325 2013-09-01 23:58:19Z mxmanghi $ ## ### namespace eval ::rivet { proc parray {arrayName {pattern *}} { upvar 1 $arrayName array if {![array exists array]} { return -code error "\"$arrayName\" isn't an array" } set maxl 0 foreach name [lsort [array names array $pattern]] { if {[string length $name] > $maxl} { set maxl [string length $name] } } puts stdout "
    $arrayName"
            set maxl [expr {$maxl + [string length $arrayName] + 2}]
            foreach name [lsort [array names array $pattern]] {
                set nameString [format %s(%s) $arrayName [::rivet::escape_sgml_chars $name]]
                puts stdout [format "%-*s = %s" $maxl $nameString [::rivet::escape_sgml_chars $array($name)]]
            }
            puts stdout "
    " } namespace export parray } rivet-2.3.5/src/channel/000755 001750 001750 00000000000 13200157764 014522 5ustar00mxmmxm000000 000000 rivet-2.3.5/doc/rivet.xsl000644 001750 001750 00000025640 12343445264 014762 0ustar00mxmmxm000000 000000 article toc,title,example ? ? ( ) ( ) ...

    	    
    	      
    	    
    	  
    	    
    	  
    rivet-2.3.5/src/config/apache_config.h000644 001750 001750 00000003031 12357526204 017274 0ustar00mxmmxm000000 000000 /* apache_config.h -- configuration functions for apache 2.x */ /* Copyright 2000-2005 The Apache Software Foundation 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. */ /* $Id: apache_config.h 1547463 2013-12-03 16:35:08Z mxmanghi $ */ #ifndef __apache_config_h__ #define __apache_config_h__ void Rivet_CopyConfig( rivet_server_conf *oldrsc, rivet_server_conf *newrsc); const char* Rivet_ServerConf(cmd_parms *cmd, void *dummy, const char *var, const char *val); const char* Rivet_DirConf(cmd_parms *cmd, void *vrdc, const char *var, const char *val); const char* Rivet_UserConf(cmd_parms *cmd, void *vrdc, const char *var, const char *val); void* Rivet_CreateDirConfig(apr_pool_t *p, char *dir); void* Rivet_MergeDirConfig( apr_pool_t *p, void *basev, void *addv); void* Rivet_CreateConfig(apr_pool_t *p, server_rec *s); void* Rivet_MergeConfig(apr_pool_t *p, void *basev, void *overridesv); void Rivet_MergeDirConfigVars(apr_pool_t *p,rivet_server_conf *new,rivet_server_conf *base,rivet_server_conf *add); #endif rivet-2.3.5/doc/html/rivet.css000644 001750 001750 00000015416 13200160527 015675 0ustar00mxmmxm000000 000000 BODY { font-family: verdana; } DIV.ABSTRACT { border: solid 2px; padding-left: 10pt; padding-right: 10pt; } PRE.SCREEN { font-family:monospace; white-space: pre; width: 100%; background-color: #ffffcc; border:solid; color: #000000; border-color: #009999; border-left: solid #009999 2px; border-right: solid #009999 2px; border-top: solid #009999 2px; border-bottom: solid #009999 2px; padding-left: 15pt; } PRE.PROGRAMLISTING { font-family: monospace; white-space: pre; width: 95%; background-color: #ffeeee; border: solid; color: #000000; border-color: #990099; border-left: solid #990099 1px; border-right: solid #990099 1px; border-top: solid #990099 1px; border-bottom: solid #990099 1px; font-size: normal; padding-top: 1em; padding-left: 1em; padding-bottom: 1em; } H1 { color: #ffffff; border: solid 3px #a0a0d0; background-color: #606090; font-variant: small-caps; width: 100%; } H1.TITLE { color: #ffffff; border: solid 3px #a0a0d0; background-color: #606090; font-variant: small-caps; width: 100%; } .TITLE a { color: #ffffff; text-decoration: none; } .TITLE a:active { color: #ffffff; text-decoration: none; } .TITLE a:visited { color: #ffffff; text-decoration: none; } H2 { COLOR: #ffffff ; font-style: italic; BACKGROUND-color: #d0a0a0; BORDER: solid 3px #906060; PADDING: 0.5em; } TABLE.IMPORTANT { font-style:italic; border: solid 2px #ff0000; width: 70%; margin-left: 15%; } TABLE.CAUTION { font-style:italic; border: ridge 2px #ffff00; width: 70%; margin-left: 15%; } TABLE.NOTE { font-style:italic; border: solid 1px #000000; width: 70%; margin-left: 15%; } TABLE.TIP { font-style:italic; border: solid 1px #000000; width: 70%; margin-left: 15%; } TABLE.WARNING { font-style:italic; font-weight: bold; border: ridge 4px #ff0000; width: 70%; margin-left: 15%; } DIV.VARIABLELIST { font-family: sans-serif; font-style: normal; font-weight: normal; padding-left: 20px; font-size: small; } .VARLISTENTRY { font-weight: bold; margin-top: 10px; COLOR: #ffffff ; BACKGROUND-color: #a0a0d0; BORDER: solid 1px #606090; PADDING: 1px } /* * See http://diveintoaccessibility.org/day_26_using_relative_font_sizes.html * for an explanation of the following few commands. * They are really too complicated to explain here in all depth. ;-) */ P { font-size: 12px; } /*/*/A{} BODY P { /* font-size: x-small; */ voice-family: "\"}\""; voice-family: inherit; font-size: normal; } HTML>BODY P { font-size: normal; } /* */ /* Add an external-link icon to absolute links */ a[href^="http:"] { background: url(images/remote.png) right center no-repeat; padding-right: 12px; } a[href^="http:"]:hover { background: url(images/remote.png) right center no-repeat; } /* Add a note icon to footnote links */ a[href^="#FTN"] { background: url(images/qbullet-note.png) right center no-repeat; padding-right: 12px; } a[href^="#FTN"]:hover { background: url(images/qbullet-note.png) right center no-repeat; } /* ...and a back icon to the backlinks in the footnotes themselves */ a[name^="FTN"] { background: url(images/scrollup.png) right center no-repeat; padding-right: 12px; } a[name^="FTN"]:hover { background: url(images/scrollup.png) right center no-repeat; } /* Add a download icon to .gz links */ a[href$=".gz"],a[href$=".tar"],a[href$=".zip"] { background: url(images/disk.png) right center no-repeat; padding-right: 12px; } /* Add an Acrobat Reader icon to PDF links */ a[href$=".pdf"] { background: url(images/acrobat.png) right center no-repeat; padding-right: 12px; } a[href$=".pdf"]:hover { background: url(images/acrobat.png) right center no-repeat; } /* Add a Word icon to RTF links */ a[href$=".rtf"] { background: url(images/word.png) right center no-repeat; padding-right: 12px; } /* ...but not to absolute links in this domain... */ a[href^="http://www.karakas-online.de"] { background: transparent; padding-right: 0px; } a[href^="http://www.karakas-online.de"]:hover { background: transparent; } /* ...or to the translation links on each page */ DIV.translatelink > a[href^="http:"] { background: transparent; padding-right: 0px; } DIV.translatelink > a[href^="http:"]:hover { background: transparent; } /* ...or to any images */ DIV.imagelink a[href^="http:"] { background: transparent; padding-right: 0px; } DIV.imagelink a[href^="http:"]:hover { background: transparent; } P.C2 { COLOR: #ffffff ; BACKGROUND-color: #a0a0d0; BORDER: solid 1px #606090; PADDING: 1px } DIV.NAVFOOTER { color: #000000; background-color: #FFDFDF; padding: 5px; margin-top: 10px; width: 100%; border: 2px solid #d0a0a0; } DIV.NUKEFOOTER { color: #000000; background-color: #B0E0E6; padding: 5px; margin-top: 10px; width: 100%; border: thin solid #a0a0d0; } DIV.NAVHEADER { color: #000000; background-color: #FFDFDF; padding: 5px; margin-bottom: 10px; width: 100%; border: 2px solid #d0a0a0; } DIV.SECT1,DIV.SECT2,DIV.SECT3 { margin-left: 20px; } DIV.EXAMPLE,DIV.TOC { border: thin dotted #70AAE5; padding-left: 10px; padding-right: 10px; color: #000000; background-color: #FFE8E8; } DIV.EXAMPLE { border: thin dotted #22AA22; background-color: #EEE; } DIV.TOC { margin-left: 20px; margin-right: 20px; width: 95%; } UL { /* list-style: url("images/tux-bullet.png") disc; */ } .namespaces { border: 1px solid black; } .namespaces td { padding: 0.2em 1em; /* font-weight: bold; */ } .namespaces thead { background-color: #aaf; } .namespaces tr.init { background-color: #e88; } .namespaces tr.childinit { background-color: #eee; } .namespaces tr.processing { background-color: #e88; } .namespaces tr.childexit { background-color: #eee; } .note td { font-size: small; } li.listitem { font-size: small; } rivet-2.3.5/doc/html/entities.html000644 001750 001750 00000004572 13200160530 016537 0ustar00mxmmxm000000 000000 RivetEntities

    RivetEntities

    Introduction

    The RivetEntities package was kindly provided by Harald Oehlmann and is largely taken from a simple yet clever encoder/decoder of HTML entities starting from a utf-8 character string. The original code writted by Andy Goth is at http://wiki.tcl.tk/26403. Package entities extends the functionality in the original code combining it with Tcl's 'encoding' command to encode/decode from any supported encoding

    rivet-2.3.5/src/rivetcmds/rivetInspect.c000644 001750 001750 00000031173 12453464656 017754 0ustar00mxmmxm000000 000000 /* * rivetConf.c - Functions for accessing Rivet configuration variables * * Functions in this file implement core function to be called mainly * by the Rivet_InspectCmd function, which implments command 'inspect' * */ /* Copyright 2002-2004 The Apache Software Foundation 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. */ /* $Id: */ #include #include #include #include #include #include "httpd.h" #include "http_config.h" #include "http_request.h" #include "http_core.h" #include "http_main.h" #include "util_script.h" #include "http_config.h" #include "mod_rivet.h" /* These arrays must be kept aligned. confDirectives must be NULL terminated */ static const char* confDirectives[] = { "ServerInitScript", "GlobalInitScript", "ChildInitScript", "ChildExitScript", "BeforeScript", "AfterScript", "AfterEveryScript", "AbortScript", "ErrorScript", "UploadMaxSize", "UploadDirectory", "UploadFilesToVar", "SeparateVirtualInterps", "SeparateChannels", "HonorHeaderOnlyRequests", NULL }; enum confIndices { server_init_script, global_init_script, child_init_script, child_exit_script, before_script, after_script, after_every_script, abort_script, error_script, upload_max, upload_directory, upload_files_to_var, separate_virtual_interps, separate_channels, honor_header_only_requests, conf_index_terminator }; /* * -- Rivet_ReadConfParameter * * This procedure reads a single field named par_name from * rivet_server_conf structure and returns a Tcl_Obj pointer * containing the field value. See confDirectives for a list * of possible names. If the procedure is queried for a non * existing field a NULL is returned. * * Arguments: * * - interp: pointer to the current Tcl interpreter structure * - rsc: a pointer to a rivet_server_conf structure * - par_name: parameter name (as listed in confDirectives) * * Returned value: * * - A Tcl_Obj pointer to the parameter value. A NULL * pointer works as a signal for an error (invalid parameter) * - If the parameter value in the configuration is undefined * then the Tcl_Obj string contains the string 'undefined' * */ Tcl_Obj* Rivet_ReadConfParameter ( Tcl_Interp* interp, rivet_server_conf* rsc, Tcl_Obj* par_name) { int parameter_i; Tcl_Obj* par_value = NULL; if (Tcl_GetIndexFromObj(interp, par_name, confDirectives, "", 0, ¶meter_i) == TCL_ERROR) { return NULL; } switch (parameter_i) { case server_init_script: { par_value = rsc->rivet_server_init_script; break; } case global_init_script: { par_value = rsc->rivet_global_init_script; break; } case child_init_script: { par_value = rsc->rivet_child_init_script; break; } case child_exit_script: { par_value = rsc->rivet_child_exit_script; break; } case before_script: { par_value = rsc->rivet_before_script; break; } case after_script: { par_value = rsc->rivet_after_script; break; } case after_every_script: { par_value = rsc->after_every_script; break; } case abort_script: { par_value = rsc->rivet_abort_script; break; } case error_script: { par_value = rsc->rivet_error_script; break; } case upload_max: { par_value = Tcl_NewIntObj(rsc->upload_max); break; } case upload_directory: { par_value = Tcl_NewStringObj(rsc->upload_dir,-1); break; } case upload_files_to_var: { par_value = Tcl_NewIntObj(rsc->upload_files_to_var); break; } case separate_virtual_interps: { par_value = Tcl_NewIntObj(rsc->separate_virtual_interps); break; } case separate_channels: { par_value = Tcl_NewIntObj(rsc->separate_channels); break; } case honor_header_only_requests: { par_value = Tcl_NewIntObj(rsc->honor_header_only_reqs); break; } default: { return NULL; } } if (par_value == NULL) { par_value = Tcl_NewStringObj("undefined",-1); } return par_value; } /* * Rivet_ReadConfTable: * * This procedure builds a key-value list from an apr table * It's called by Rivet_BuildConfDictionary to read theRivet * configuration tables but it can work for every apr table * * Arguments: * * - interp: Tcl_Interp pointer * - table: an apr_table_t pointer * */ static Tcl_Obj* Rivet_ReadConfTable (Tcl_Interp* interp, apr_table_t* table) { Tcl_Obj* key; Tcl_Obj* val; apr_array_header_t *arr; apr_table_entry_t *elts; int nelts,i; int tcl_status = TCL_OK; Tcl_Obj* keyval_list = Tcl_NewObj(); //Tcl_IncrRefCount(keyval_list); arr = (apr_array_header_t*) apr_table_elts( table ); elts = (apr_table_entry_t *) arr->elts; nelts = arr->nelts; for (i = 0; i < nelts; i++) { key = Tcl_NewStringObj( elts[i].key, -1); val = Tcl_NewStringObj( elts[i].val, -1); Tcl_IncrRefCount(key); Tcl_IncrRefCount(val); tcl_status = Tcl_ListObjAppendElement (interp,keyval_list,key); if (tcl_status == TCL_ERROR) { Tcl_DecrRefCount(keyval_list); Tcl_DecrRefCount(key); Tcl_DecrRefCount(val); return NULL; } tcl_status = Tcl_ListObjAppendElement (interp,keyval_list,val); if (tcl_status == TCL_ERROR) { Tcl_DecrRefCount(keyval_list); Tcl_DecrRefCount(key); Tcl_DecrRefCount(val); return NULL; } Tcl_DecrRefCount(key); Tcl_DecrRefCount(val); } return keyval_list; } /* * -- Rivet_BuildConfDictionary * * Parameters set in the configuration files are collected in three * APR tables by Rivet_ServerConf,Rivet_DirConf and Rivet_UserConf. * * Arguments: * * - interp: Tcl_Interp pointer * - rivet_conf: pointer to a rivet_server_conf structure as * returned by Rivet_GetConf * * Returned value: * * - Tcl dictionary storing the dir/user/server configuration. The * dictionary refCount is incremented * */ Tcl_Obj* Rivet_BuildConfDictionary ( Tcl_Interp* interp, rivet_server_conf* rivet_conf) { apr_table_t* conf_tables[3]; Tcl_Obj* keyval_list = NULL; Tcl_Obj* key_list[2]; int it; Tcl_Obj* conf_dict = Tcl_NewObj(); static const char* section_names[] = { "dir", "user", "server" }; enum { dir_conf_section, user_conf_section, server_conf_section }; conf_tables[0] = rivet_conf->rivet_dir_vars; conf_tables[1] = rivet_conf->rivet_user_vars; conf_tables[2] = rivet_conf->rivet_server_vars; // Tcl_IncrRefCount(conf_dict); for (it=0; it < 3; it++) { keyval_list = Rivet_ReadConfTable(interp,conf_tables[it]); if (keyval_list != NULL) { int i; Tcl_Obj** objArrayPnt; int objArrayCnt; Tcl_Obj* val; Tcl_IncrRefCount(keyval_list); key_list[0] = Tcl_NewStringObj(section_names[it],-1); Tcl_IncrRefCount(key_list[0]); Tcl_ListObjGetElements(interp,keyval_list,&objArrayCnt,&objArrayPnt); for (i=0; i < objArrayCnt; i+=2) { key_list[1] = objArrayPnt[i]; val = objArrayPnt[i+1]; Tcl_IncrRefCount(key_list[1]); Tcl_IncrRefCount(val); Tcl_DictObjPutKeyList(interp,conf_dict,2,key_list,val); Tcl_DecrRefCount(key_list[1]); Tcl_DecrRefCount(val); } Tcl_DecrRefCount(key_list[0]); Tcl_DecrRefCount(keyval_list); } else { return NULL; } } return conf_dict; } /* * Rivet_CurrentConfDict * * This function is called by Rivet_InspectCmd which implements command * '::rivet::inspect -all'. The function returns a dictionary where every * parameter name (confDirectives) is associated to its value stored in * the rivet_server_conf as returned by Rivet_GetConf * * Arguments: * * - interp: Tcl interpreter pointer * - rivet_conf: a pointer to a rivet_server_conf structure * * Returned value_ * * - a Tcl_Obj* pointer to a dictionary. The function is guaranteed to * return a Tcl_Obj pointer * */ Tcl_Obj* Rivet_CurrentConfDict ( Tcl_Interp* interp, rivet_server_conf* rivet_conf) { Tcl_Obj* dictObj = Tcl_NewObj(); Tcl_Obj* par_name; static const char** p; for (p = confDirectives; (*p) != NULL; p++) { Tcl_Obj* par_value; par_name = Tcl_NewStringObj(*p,-1); Tcl_IncrRefCount(par_name); par_value = Rivet_ReadConfParameter(interp,rivet_conf,par_name); ap_assert(par_value != NULL); Tcl_IncrRefCount(par_value); Tcl_DictObjPut(interp,dictObj,par_name,par_value); Tcl_DecrRefCount(par_value); Tcl_DecrRefCount(par_name); } return dictObj; } /* * -- Rivet_CurrentServerRec * * ::rivet::inspect provides also some basic access to * fields of the server_rec object. * * */ Tcl_Obj* Rivet_CurrentServerRec (Tcl_Interp* interp, server_rec* s ) { Tcl_Obj* dictObj; Tcl_Obj* field_name; Tcl_Obj* field_value; dictObj = Tcl_NewObj(); field_value = Tcl_NewStringObj(s->server_hostname,-1); field_name = Tcl_NewStringObj("hostname",-1); Tcl_IncrRefCount(field_value); Tcl_IncrRefCount(field_name); Tcl_DictObjPut(interp,dictObj,field_name,field_value); Tcl_DecrRefCount(field_value); Tcl_DecrRefCount(field_name); field_value = Tcl_NewStringObj(s->error_fname,-1); field_name = Tcl_NewStringObj("errorlog",-1); Tcl_IncrRefCount(field_value); Tcl_IncrRefCount(field_name); Tcl_DictObjPut(interp,dictObj,field_name,field_value); Tcl_DecrRefCount(field_value); Tcl_DecrRefCount(field_name); field_value = Tcl_NewStringObj(s->server_admin,-1); field_name = Tcl_NewStringObj("admin",-1); Tcl_IncrRefCount(field_value); Tcl_IncrRefCount(field_name); Tcl_DictObjPut(interp,dictObj,field_name,field_value); Tcl_DecrRefCount(field_value); Tcl_DecrRefCount(field_name); field_value = Tcl_NewStringObj(s->path,-1); field_name = Tcl_NewStringObj("server_path",-1); Tcl_IncrRefCount(field_value); Tcl_IncrRefCount(field_name); Tcl_DictObjPut(interp,dictObj,field_name,field_value); Tcl_DecrRefCount(field_value); Tcl_DecrRefCount(field_name); field_value = Tcl_NewIntObj(s->is_virtual); field_name = Tcl_NewStringObj("virtual",-1); Tcl_IncrRefCount(field_value); Tcl_IncrRefCount(field_name); Tcl_DictObjPut(interp,dictObj,field_name,field_value); Tcl_DecrRefCount(field_value); Tcl_DecrRefCount(field_name); return dictObj; } rivet-2.3.5/src/config/apache_config.c000644 001750 001750 00000047557 12453077417 017320 0ustar00mxmmxm000000 000000 /* apache_config.c -- configuration functions for apache 2.x */ /* Copyright 2000-2005 The Apache Software Foundation 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. */ /* $Id: apache_config.c 1649980 2015-01-07 00:34:23Z mxmanghi $ */ /* Rivet config */ #ifdef HAVE_CONFIG_H #include #endif /* httpd includes */ #include #include /* APR includes */ #include #include #include #include "mod_rivet.h" #include "apache_config.h" #include "rivet.h" /* * -- Rivet_AssignStringtoConf -- * * Assign a string to a Tcl_Obj valued configuration parameter * * Arguments: * * - objPnt: Pointer to a pointer to a Tcl_Obj. If the pointer *objPnt * is NULL (configuration script obj pointers are initialized to NULL) * a new Tcl_Obj is created * - string_value: a string to be assigned to the Tcl_Obj * * Results: * * - Pointer to a Tcl_Obj containing the parameter value. * */ static Tcl_Obj* Rivet_AssignStringToConf (Tcl_Obj** objPnt, const char* string_value) { Tcl_Obj *objarg = NULL; if (*objPnt == NULL) { objarg = Tcl_NewStringObj(string_value,-1); Tcl_IncrRefCount(objarg); *objPnt = objarg; } else { objarg = *objPnt; Tcl_AppendToObj(objarg, string_value, -1); } Tcl_AppendToObj( objarg, "\n", 1 ); return objarg; } /* * -- Rivet_SetScript -- * * Add the text from an apache directive, such as UserConf, to * the corresponding variable in the rivet_server_conf structure. * In most cases, we append the new value to any previously * existing value, but Before, After and Error scripts override * the old directive completely. * * Results: * * Returns a Tcl_Obj* pointing to the string representation of * the current value for the directive. * */ static const char * Rivet_SetScript (apr_pool_t *pool, rivet_server_conf *rsc, const char *script, const char *string) { Tcl_Obj *objarg = NULL; if( STREQU( script, "GlobalInitScript" ) ) { objarg = Rivet_AssignStringToConf(&(rsc->rivet_global_init_script),string); } else if( STREQU( script, "ChildInitScript" ) ) { objarg = Rivet_AssignStringToConf(&(rsc->rivet_child_init_script),string); } else if( STREQU( script, "ChildExitScript" ) ) { objarg = Rivet_AssignStringToConf(&(rsc->rivet_child_exit_script),string); } else if( STREQU( script, "BeforeScript" ) ) { objarg = Rivet_AssignStringToConf(&(rsc->rivet_before_script),string); } else if( STREQU( script, "AfterScript" ) ) { objarg = Rivet_AssignStringToConf(&(rsc->rivet_after_script),string); } else if( STREQU( script, "ErrorScript" ) ) { objarg = Rivet_AssignStringToConf(&(rsc->rivet_error_script),string); } else if( STREQU( script, "ServerInitScript" ) ) { objarg = Rivet_AssignStringToConf(&(rsc->rivet_server_init_script),string); } else if( STREQU( script, "AbortScript" ) ) { objarg = Rivet_AssignStringToConf(&(rsc->rivet_abort_script),string); } else if( STREQU( script, "AfterEveryScript" ) ) { objarg = Rivet_AssignStringToConf(&(rsc->after_every_script),string); } if( !objarg ) return string; return Tcl_GetStringFromObj( objarg, NULL ); } /* * -- Rivet_GetConf * * Rivet_GetConf fetches the confguration from the server record * and carries out a merge with server variables stored in directory * specific configuration * * Arguments: * * - request_rec* r: pointer to the request data * * Results: * * - rivet_server_conf* rsc: the server merged configuration * * Side Effects: * * None. * */ rivet_server_conf * Rivet_GetConf( request_rec *r ) { rivet_server_conf *rsc = RIVET_SERVER_CONF( r->server->module_config ); void *dconf = r->per_dir_config; rivet_server_conf *newconfig = NULL; rivet_server_conf *rdc; FILEDEBUGINFO; /* If there is no per dir config, just return the server config */ if (dconf == NULL) { return rsc; } rdc = RIVET_SERVER_CONF( dconf ); newconfig = RIVET_NEW_CONF( r->pool ); Rivet_CopyConfig( rsc, newconfig ); Rivet_MergeDirConfigVars( r->pool, newconfig, rsc, rdc ); return newconfig; } /* * -- Rivet_CopyConfig -- * * Copy the rivet_server_conf struct. * * Results: * None. * * Side Effects: * None. * */ void Rivet_CopyConfig( rivet_server_conf *oldrsc, rivet_server_conf *newrsc ) { FILEDEBUGINFO; newrsc->server_interp = oldrsc->server_interp; newrsc->rivet_global_init_script = oldrsc->rivet_global_init_script; newrsc->rivet_before_script = oldrsc->rivet_before_script; newrsc->rivet_after_script = oldrsc->rivet_after_script; newrsc->rivet_error_script = oldrsc->rivet_error_script; newrsc->rivet_abort_script = oldrsc->rivet_abort_script; newrsc->after_every_script = oldrsc->after_every_script; newrsc->user_scripts_updated = oldrsc->user_scripts_updated; newrsc->rivet_default_error_script = oldrsc->rivet_default_error_script; /* These are pointers so that they can be passed around... */ newrsc->cache_size = oldrsc->cache_size; newrsc->cache_free = oldrsc->cache_free; newrsc->upload_max = oldrsc->upload_max; newrsc->upload_files_to_var = oldrsc->upload_files_to_var; newrsc->separate_virtual_interps = oldrsc->separate_virtual_interps; newrsc->honor_header_only_reqs = oldrsc->honor_header_only_reqs; newrsc->separate_channels = oldrsc->separate_channels; newrsc->server_name = oldrsc->server_name; newrsc->upload_dir = oldrsc->upload_dir; newrsc->rivet_server_vars = oldrsc->rivet_server_vars; newrsc->rivet_dir_vars = oldrsc->rivet_dir_vars; newrsc->rivet_user_vars = oldrsc->rivet_user_vars; newrsc->objCacheList = oldrsc->objCacheList; newrsc->objCache = oldrsc->objCache; newrsc->outchannel = oldrsc->outchannel; } /* * -- Rivet_MergeDirConfigVars * * Merging of base configuration with per directory configuration * is done checking each field in the configuration record. If * a more specific (per directory) conf variable is defined then * it supersedes the base record variable * * Arguments: * * - apr_pool_t* t: pointer to an APR memory pool * - rivet_server_conf* new: pointer to a record to store the * merged configuration * - rivet_server_conf* base: * - rivet_server_conf* add: * * Results: * * configuration record are merge in place * * Side Effects: * * None. */ void Rivet_MergeDirConfigVars(apr_pool_t *p, rivet_server_conf *new, rivet_server_conf *base, rivet_server_conf *add ) { FILEDEBUGINFO; new->rivet_child_init_script = add->rivet_child_init_script ? add->rivet_child_init_script : base->rivet_child_init_script; new->rivet_child_exit_script = add->rivet_child_exit_script ? add->rivet_child_exit_script : base->rivet_child_exit_script; new->rivet_before_script = add->rivet_before_script ? add->rivet_before_script : base->rivet_before_script; new->rivet_after_script = add->rivet_after_script ? add->rivet_after_script : base->rivet_after_script; new->rivet_error_script = add->rivet_error_script ? add->rivet_error_script : base->rivet_error_script; new->rivet_abort_script = add->rivet_abort_script ? add->rivet_abort_script : base->rivet_abort_script; new->after_every_script = add->after_every_script ? add->after_every_script : base->after_every_script; new->user_scripts_updated = add->user_scripts_updated ? add->user_scripts_updated : base->user_scripts_updated; new->upload_dir = add->upload_dir ? add->upload_dir : base->upload_dir; /* Merge the tables of dir and user variables. */ if (base->rivet_dir_vars && add->rivet_dir_vars) { new->rivet_dir_vars = apr_table_overlay ( p, base->rivet_dir_vars, add->rivet_dir_vars ); } else { new->rivet_dir_vars = base->rivet_dir_vars; } if (base->rivet_user_vars && add->rivet_user_vars) { new->rivet_user_vars = apr_table_overlay ( p, base->rivet_user_vars, add->rivet_user_vars ); } else { new->rivet_user_vars = base->rivet_user_vars; } } /* * -- Rivet_CreateDirConfig * * Apache HTTP server framework calls this function to * have a pointer to newly initialized directory specific * configuration record. * * Arguments: * * - apr_pool_t*: pointer to an APR memory pool * - char*: string pointer to the directory name * * Returned value: * * - void* pointer to a brand new rivet configuration record * */ void * Rivet_CreateDirConfig(apr_pool_t *p, char *dir) { rivet_server_conf *rdc = RIVET_NEW_CONF(p); FILEDEBUGINFO; rdc->rivet_server_vars = (apr_table_t *) apr_table_make ( p, 4 ); rdc->rivet_dir_vars = (apr_table_t *) apr_table_make ( p, 4 ); rdc->rivet_user_vars = (apr_table_t *) apr_table_make ( p, 4 ); return rdc; } /* * -- Rivet_MergeDirConfig * * Apache framework callback merging 2 per directory config records * * Arguments: * * - apr_pool_t* p: pointer to an APR memory pool * - void* basev, addv: pointers to configuration records to be * merged * * Results: * * - void*: pointer to the resulting configuration */ void * Rivet_MergeDirConfig( apr_pool_t *p, void *basev, void *addv ) { rivet_server_conf *base = (rivet_server_conf *)basev; rivet_server_conf *add = (rivet_server_conf *)addv; rivet_server_conf *new = RIVET_NEW_CONF(p); FILEDEBUGINFO; Rivet_MergeDirConfigVars( p, new, base, add ); return new; } /* * -- Rivet_MergeConfig -- * * This function is called when there is a config option set both * at the 'global' level, and for a virtual host. It "resolves * the conflicts" so to speak, by creating a new configuration, * and this function is where we get to have our say about how to * go about doing that. For most of the options, we override the * global option with the local one. * * Results: * Returns a new server configuration. * * Side Effects: * None. * */ void * Rivet_MergeConfig(apr_pool_t *p, void *basev, void *overridesv) { rivet_server_conf *rsc = RIVET_NEW_CONF(p); rivet_server_conf *base = (rivet_server_conf *) basev; rivet_server_conf *overrides = (rivet_server_conf *) overridesv; FILEDEBUGINFO; /* For completeness' sake, we list the fate of all the members of * the rivet_server_conf struct. */ /* server_interp isn't set at this point. */ /* rivet_global_init_script is global, not per server. */ rsc->rivet_child_init_script = overrides->rivet_child_init_script ? overrides->rivet_child_init_script : base->rivet_child_init_script; rsc->rivet_child_exit_script = overrides->rivet_child_exit_script ? overrides->rivet_child_exit_script : base->rivet_child_exit_script; rsc->rivet_before_script = overrides->rivet_before_script ? overrides->rivet_before_script : base->rivet_before_script; rsc->rivet_after_script = overrides->rivet_after_script ? overrides->rivet_after_script : base->rivet_after_script; rsc->rivet_error_script = overrides->rivet_error_script ? overrides->rivet_error_script : base->rivet_error_script; rsc->rivet_default_error_script = overrides->rivet_default_error_script ? overrides->rivet_default_error_script : base->rivet_default_error_script; rsc->rivet_abort_script = overrides->rivet_abort_script ? overrides->rivet_abort_script : base->rivet_abort_script; rsc->after_every_script = overrides->after_every_script ? overrides->after_every_script : base->after_every_script; /* cache_size is global, and set up later. */ /* cache_free is not set up at this point. */ rsc->upload_max = overrides->upload_max ? overrides->upload_max : base->upload_max; rsc->separate_virtual_interps = base->separate_virtual_interps; rsc->honor_header_only_reqs = base->honor_header_only_reqs; rsc->separate_channels = base->separate_channels; /* server_name is set up later. */ rsc->upload_dir = overrides->upload_dir ? overrides->upload_dir : base->upload_dir; rsc->rivet_server_vars = overrides->rivet_server_vars ? overrides->rivet_server_vars : base->rivet_server_vars; rsc->rivet_dir_vars = overrides->rivet_dir_vars ? overrides->rivet_dir_vars : base->rivet_dir_vars; rsc->rivet_user_vars = overrides->rivet_user_vars ? overrides->rivet_user_vars : base->rivet_user_vars; /* objCacheList is set up later. */ /* objCache is set up later. */ /* outchannel is set up later. */ return rsc; } /* * -- Rivet_CreateConfig * * * */ void * Rivet_CreateConfig(apr_pool_t *p, server_rec *s ) { rivet_server_conf *rsc = RIVET_NEW_CONF(p); FILEDEBUGINFO; rsc->server_interp = NULL; /* scripts obj pointers *must* be initialized to NULL */ rsc->rivet_server_init_script = NULL; rsc->rivet_global_init_script = NULL; rsc->rivet_child_init_script = NULL; rsc->rivet_child_exit_script = NULL; rsc->rivet_before_script = NULL; rsc->rivet_after_script = NULL; rsc->rivet_error_script = NULL; rsc->rivet_abort_script = NULL; rsc->after_every_script = NULL; rsc->user_scripts_updated = 0; rsc->rivet_default_error_script = Tcl_NewStringObj("::Rivet::handle_error", -1); Tcl_IncrRefCount(rsc->rivet_default_error_script); /* these are pointers so that they can be passed around... */ rsc->cache_size = apr_pcalloc(p, sizeof(int)); rsc->cache_free = apr_pcalloc(p, sizeof(int)); *(rsc->cache_size) = -1; *(rsc->cache_free) = 0; rsc->upload_max = RIVET_MAX_POST; rsc->upload_files_to_var = RIVET_UPLOAD_FILES_TO_VAR; rsc->separate_virtual_interps = RIVET_SEPARATE_VIRTUAL_INTERPS; rsc->honor_header_only_reqs = RIVET_HEAD_REQUESTS; rsc->separate_channels = 0; rsc->upload_dir = RIVET_UPLOAD_DIR; rsc->server_name = NULL; rsc->objCacheList = NULL; rsc->objCache = NULL; rsc->outchannel = NULL; rsc->rivet_server_vars = (apr_table_t *) apr_table_make ( p, 4 ); rsc->rivet_dir_vars = (apr_table_t *) apr_table_make ( p, 4 ); rsc->rivet_user_vars = (apr_table_t *) apr_table_make ( p, 4 ); return rsc; } /* * -- Rivet_UserConf * * Implements the RivetUserConf Apache Directive * * Command Arguments: * RivetUserConf BeforeScript